summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cvsignore28
-rw-r--r--config.h.in1632
-rwxr-xr-xconfigure18897
-rw-r--r--moduli.074
-rw-r--r--openbsd-compat/.cvsignore1
-rw-r--r--openbsd-compat/bsd-snprintf.c46
-rw-r--r--openbsd-compat/regress/.cvsignore5
-rw-r--r--readconf.c12
-rw-r--r--readconf.h4
-rw-r--r--regress/.cvsignore1
-rw-r--r--scard/.cvsignore2
-rw-r--r--scp.0158
-rw-r--r--scp.19
-rw-r--r--servconf.c5
-rw-r--r--sftp-client.c18
-rw-r--r--sftp-client.h4
-rw-r--r--sftp-server.074
-rw-r--r--sftp.0349
-rw-r--r--sftp.115
-rw-r--r--sftp.c175
-rw-r--r--ssh-add.0119
-rw-r--r--ssh-agent.0123
-rw-r--r--ssh-keygen.0546
-rw-r--r--ssh-keygen.c6
-rw-r--r--ssh-keyscan.0109
-rw-r--r--ssh-keysign.051
-rw-r--r--ssh-pkcs11-helper.025
-rw-r--r--ssh.0935
-rw-r--r--ssh.112
-rw-r--r--ssh_config.0795
-rw-r--r--ssh_config.512
-rw-r--r--sshconnect.c124
-rw-r--r--sshd.0640
-rw-r--r--sshd_config.0813
34 files changed, 25447 insertions, 372 deletions
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 9baaa3b4e..000000000
--- a/.cvsignore
+++ /dev/null
@@ -1,28 +0,0 @@
1*.0
2*.out
3Makefile
4autom4te.cache
5buildit.sh
6buildpkg.sh
7config.cache
8config.h
9config.h.in
10config.log
11config.status
12configure
13openssh.xml
14opensshd.init
15scp
16sftp
17sftp-server
18ssh
19ssh-add
20ssh-agent
21ssh-keygen
22ssh-keyscan
23ssh-keysign
24ssh-pkcs11-helper
25sshd
26stamp-h.in
27survey
28survey.sh
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 000000000..b75e501b2
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,1632 @@
1/* config.h.in. Generated from configure.ac by autoheader. */
2
3/* Define if building universal (internal helper macro) */
4#undef AC_APPLE_UNIVERSAL_BUILD
5
6/* Define if you have a getaddrinfo that fails for the all-zeros IPv6 address
7 */
8#undef AIX_GETNAMEINFO_HACK
9
10/* Define if your AIX loginfailed() function takes 4 arguments (AIX >= 5.2) */
11#undef AIX_LOGINFAILED_4ARG
12
13/* System only supports IPv4 audit records */
14#undef AU_IPv4
15
16/* Define if your resolver libs need this for getrrsetbyname */
17#undef BIND_8_COMPAT
18
19/* The system has incomplete BSM API */
20#undef BROKEN_BSM_API
21
22/* Define if cmsg_type is not passed correctly */
23#undef BROKEN_CMSG_TYPE
24
25/* getaddrinfo is broken (if present) */
26#undef BROKEN_GETADDRINFO
27
28/* getgroups(0,NULL) will return -1 */
29#undef BROKEN_GETGROUPS
30
31/* FreeBSD glob does not do what we need */
32#undef BROKEN_GLOB
33
34/* Define if you system's inet_ntoa is busted (e.g. Irix gcc issue) */
35#undef BROKEN_INET_NTOA
36
37/* ia_uinfo routines not supported by OS yet */
38#undef BROKEN_LIBIAF
39
40/* Ultrix mmap can't map files */
41#undef BROKEN_MMAP
42
43/* Define if your struct dirent expects you to allocate extra space for d_name
44 */
45#undef BROKEN_ONE_BYTE_DIRENT_D_NAME
46
47/* Can't do comparisons on readv */
48#undef BROKEN_READV_COMPARISON
49
50/* Define if you have a broken realpath. */
51#undef BROKEN_REALPATH
52
53/* Needed for NeXT */
54#undef BROKEN_SAVED_UIDS
55
56/* Define if your setregid() is broken */
57#undef BROKEN_SETREGID
58
59/* Define if your setresgid() is broken */
60#undef BROKEN_SETRESGID
61
62/* Define if your setresuid() is broken */
63#undef BROKEN_SETRESUID
64
65/* Define if your setreuid() is broken */
66#undef BROKEN_SETREUID
67
68/* LynxOS has broken setvbuf() implementation */
69#undef BROKEN_SETVBUF
70
71/* QNX shadow support is broken */
72#undef BROKEN_SHADOW_EXPIRE
73
74/* Define if your snprintf is busted */
75#undef BROKEN_SNPRINTF
76
77/* FreeBSD strnvis does not do what we need */
78#undef BROKEN_STRNVIS
79
80/* tcgetattr with ICANON may hang */
81#undef BROKEN_TCGETATTR_ICANON
82
83/* updwtmpx is broken (if present) */
84#undef BROKEN_UPDWTMPX
85
86/* Define if you have BSD auth support */
87#undef BSD_AUTH
88
89/* Define if you want to specify the path to your lastlog file */
90#undef CONF_LASTLOG_FILE
91
92/* Define if you want to specify the path to your utmp file */
93#undef CONF_UTMP_FILE
94
95/* Define if you want to specify the path to your wtmpx file */
96#undef CONF_WTMPX_FILE
97
98/* Define if you want to specify the path to your wtmp file */
99#undef CONF_WTMP_FILE
100
101/* Define if your platform needs to skip post auth file descriptor passing */
102#undef DISABLE_FD_PASSING
103
104/* Define if you don't want to use lastlog */
105#undef DISABLE_LASTLOG
106
107/* Define if you don't want to use your system's login() call */
108#undef DISABLE_LOGIN
109
110/* Define if you don't want to use pututline() etc. to write [uw]tmp */
111#undef DISABLE_PUTUTLINE
112
113/* Define if you don't want to use pututxline() etc. to write [uw]tmpx */
114#undef DISABLE_PUTUTXLINE
115
116/* Define if you want to disable shadow passwords */
117#undef DISABLE_SHADOW
118
119/* Define if you don't want to use utmp */
120#undef DISABLE_UTMP
121
122/* Define if you don't want to use utmpx */
123#undef DISABLE_UTMPX
124
125/* Define if you don't want to use wtmp */
126#undef DISABLE_WTMP
127
128/* Define if you don't want to use wtmpx */
129#undef DISABLE_WTMPX
130
131/* Enable for PKCS#11 support */
132#undef ENABLE_PKCS11
133
134/* File names may not contain backslash characters */
135#undef FILESYSTEM_NO_BACKSLASH
136
137/* fsid_t has member val */
138#undef FSID_HAS_VAL
139
140/* fsid_t has member __val */
141#undef FSID_HAS___VAL
142
143/* Define to 1 if the `getpgrp' function requires zero arguments. */
144#undef GETPGRP_VOID
145
146/* Conflicting defs for getspnam */
147#undef GETSPNAM_CONFLICTING_DEFS
148
149/* Define if your system glob() function has the GLOB_ALTDIRFUNC extension */
150#undef GLOB_HAS_ALTDIRFUNC
151
152/* Define if your system glob() function has gl_matchc options in glob_t */
153#undef GLOB_HAS_GL_MATCHC
154
155/* Define if your system glob() function has gl_statv options in glob_t */
156#undef GLOB_HAS_GL_STATV
157
158/* Define this if you want GSSAPI support in the version 2 protocol */
159#undef GSSAPI
160
161/* Define if you want to use shadow password expire field */
162#undef HAS_SHADOW_EXPIRE
163
164/* Define if your system uses access rights style file descriptor passing */
165#undef HAVE_ACCRIGHTS_IN_MSGHDR
166
167/* Define if you have ut_addr in utmp.h */
168#undef HAVE_ADDR_IN_UTMP
169
170/* Define if you have ut_addr in utmpx.h */
171#undef HAVE_ADDR_IN_UTMPX
172
173/* Define if you have ut_addr_v6 in utmp.h */
174#undef HAVE_ADDR_V6_IN_UTMP
175
176/* Define if you have ut_addr_v6 in utmpx.h */
177#undef HAVE_ADDR_V6_IN_UTMPX
178
179/* Define to 1 if you have the `arc4random' function. */
180#undef HAVE_ARC4RANDOM
181
182/* Define to 1 if you have the `arc4random_buf' function. */
183#undef HAVE_ARC4RANDOM_BUF
184
185/* Define to 1 if you have the `arc4random_uniform' function. */
186#undef HAVE_ARC4RANDOM_UNIFORM
187
188/* Define to 1 if you have the `asprintf' function. */
189#undef HAVE_ASPRINTF
190
191/* OpenBSD's gcc has bounded */
192#undef HAVE_ATTRIBUTE__BOUNDED__
193
194/* Have attribute nonnull */
195#undef HAVE_ATTRIBUTE__NONNULL__
196
197/* OpenBSD's gcc has sentinel */
198#undef HAVE_ATTRIBUTE__SENTINEL__
199
200/* Define to 1 if you have the `aug_get_machine' function. */
201#undef HAVE_AUG_GET_MACHINE
202
203/* Define to 1 if you have the `b64_ntop' function. */
204#undef HAVE_B64_NTOP
205
206/* Define to 1 if you have the `b64_pton' function. */
207#undef HAVE_B64_PTON
208
209/* Define if you have the basename function. */
210#undef HAVE_BASENAME
211
212/* Define to 1 if you have the `bcopy' function. */
213#undef HAVE_BCOPY
214
215/* Define to 1 if you have the `bindresvport_sa' function. */
216#undef HAVE_BINDRESVPORT_SA
217
218/* Define to 1 if you have the `BN_is_prime_ex' function. */
219#undef HAVE_BN_IS_PRIME_EX
220
221/* Define to 1 if you have the <bsd/libutil.h> header file. */
222#undef HAVE_BSD_LIBUTIL_H
223
224/* Define to 1 if you have the <bsm/audit.h> header file. */
225#undef HAVE_BSM_AUDIT_H
226
227/* Define to 1 if you have the <bstring.h> header file. */
228#undef HAVE_BSTRING_H
229
230/* Define to 1 if you have the `clock' function. */
231#undef HAVE_CLOCK
232
233/* Have clock_gettime */
234#undef HAVE_CLOCK_GETTIME
235
236/* define if you have clock_t data type */
237#undef HAVE_CLOCK_T
238
239/* Define to 1 if you have the `closefrom' function. */
240#undef HAVE_CLOSEFROM
241
242/* Define if gai_strerror() returns const char * */
243#undef HAVE_CONST_GAI_STRERROR_PROTO
244
245/* Define if your system uses ancillary data style file descriptor passing */
246#undef HAVE_CONTROL_IN_MSGHDR
247
248/* Define to 1 if you have the `crypt' function. */
249#undef HAVE_CRYPT
250
251/* Define to 1 if you have the <crypto/sha2.h> header file. */
252#undef HAVE_CRYPTO_SHA2_H
253
254/* Define to 1 if you have the <crypt.h> header file. */
255#undef HAVE_CRYPT_H
256
257/* Define if you are on Cygwin */
258#undef HAVE_CYGWIN
259
260/* Define if your libraries define daemon() */
261#undef HAVE_DAEMON
262
263/* Define to 1 if you have the declaration of `authenticate', and to 0 if you
264 don't. */
265#undef HAVE_DECL_AUTHENTICATE
266
267/* Define to 1 if you have the declaration of `GLOB_NOMATCH', and to 0 if you
268 don't. */
269#undef HAVE_DECL_GLOB_NOMATCH
270
271/* Define to 1 if you have the declaration of `GSS_C_NT_HOSTBASED_SERVICE',
272 and to 0 if you don't. */
273#undef HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE
274
275/* Define to 1 if you have the declaration of `howmany', and to 0 if you
276 don't. */
277#undef HAVE_DECL_HOWMANY
278
279/* Define to 1 if you have the declaration of `h_errno', and to 0 if you
280 don't. */
281#undef HAVE_DECL_H_ERRNO
282
283/* Define to 1 if you have the declaration of `loginfailed', and to 0 if you
284 don't. */
285#undef HAVE_DECL_LOGINFAILED
286
287/* Define to 1 if you have the declaration of `loginrestrictions', and to 0 if
288 you don't. */
289#undef HAVE_DECL_LOGINRESTRICTIONS
290
291/* Define to 1 if you have the declaration of `loginsuccess', and to 0 if you
292 don't. */
293#undef HAVE_DECL_LOGINSUCCESS
294
295/* Define to 1 if you have the declaration of `MAXSYMLINKS', and to 0 if you
296 don't. */
297#undef HAVE_DECL_MAXSYMLINKS
298
299/* Define to 1 if you have the declaration of `NFDBITS', and to 0 if you
300 don't. */
301#undef HAVE_DECL_NFDBITS
302
303/* Define to 1 if you have the declaration of `offsetof', and to 0 if you
304 don't. */
305#undef HAVE_DECL_OFFSETOF
306
307/* Define to 1 if you have the declaration of `O_NONBLOCK', and to 0 if you
308 don't. */
309#undef HAVE_DECL_O_NONBLOCK
310
311/* Define to 1 if you have the declaration of `passwdexpired', and to 0 if you
312 don't. */
313#undef HAVE_DECL_PASSWDEXPIRED
314
315/* Define to 1 if you have the declaration of `setauthdb', and to 0 if you
316 don't. */
317#undef HAVE_DECL_SETAUTHDB
318
319/* Define to 1 if you have the declaration of `SHUT_RD', and to 0 if you
320 don't. */
321#undef HAVE_DECL_SHUT_RD
322
323/* Define to 1 if you have the declaration of `writev', and to 0 if you don't.
324 */
325#undef HAVE_DECL_WRITEV
326
327/* Define to 1 if you have the declaration of `_getlong', and to 0 if you
328 don't. */
329#undef HAVE_DECL__GETLONG
330
331/* Define to 1 if you have the declaration of `_getshort', and to 0 if you
332 don't. */
333#undef HAVE_DECL__GETSHORT
334
335/* Define to 1 if you have the `DES_crypt' function. */
336#undef HAVE_DES_CRYPT
337
338/* Define if you have /dev/ptmx */
339#undef HAVE_DEV_PTMX
340
341/* Define if you have /dev/ptc */
342#undef HAVE_DEV_PTS_AND_PTC
343
344/* Define to 1 if you have the <dirent.h> header file. */
345#undef HAVE_DIRENT_H
346
347/* Define to 1 if you have the `dirfd' function. */
348#undef HAVE_DIRFD
349
350/* Define to 1 if you have the `dirname' function. */
351#undef HAVE_DIRNAME
352
353/* Define to 1 if you have the `DSA_generate_parameters_ex' function. */
354#undef HAVE_DSA_GENERATE_PARAMETERS_EX
355
356/* Define to 1 if you have the <elf.h> header file. */
357#undef HAVE_ELF_H
358
359/* Define to 1 if you have the `endgrent' function. */
360#undef HAVE_ENDGRENT
361
362/* Define to 1 if you have the <endian.h> header file. */
363#undef HAVE_ENDIAN_H
364
365/* Define to 1 if you have the `endutent' function. */
366#undef HAVE_ENDUTENT
367
368/* Define to 1 if you have the `endutxent' function. */
369#undef HAVE_ENDUTXENT
370
371/* Define if your system has /etc/default/login */
372#undef HAVE_ETC_DEFAULT_LOGIN
373
374/* Define if libcrypto has EVP_CIPHER_CTX_ctrl */
375#undef HAVE_EVP_CIPHER_CTX_CTRL
376
377/* Define to 1 if you have the `EVP_sha256' function. */
378#undef HAVE_EVP_SHA256
379
380/* Define if you have ut_exit in utmp.h */
381#undef HAVE_EXIT_IN_UTMP
382
383/* Define to 1 if you have the `fchmod' function. */
384#undef HAVE_FCHMOD
385
386/* Define to 1 if you have the `fchown' function. */
387#undef HAVE_FCHOWN
388
389/* Use F_CLOSEM fcntl for closefrom */
390#undef HAVE_FCNTL_CLOSEM
391
392/* Define to 1 if you have the <fcntl.h> header file. */
393#undef HAVE_FCNTL_H
394
395/* Define to 1 if the system has the type `fd_mask'. */
396#undef HAVE_FD_MASK
397
398/* Define to 1 if you have the <features.h> header file. */
399#undef HAVE_FEATURES_H
400
401/* Define to 1 if you have the <floatingpoint.h> header file. */
402#undef HAVE_FLOATINGPOINT_H
403
404/* Define to 1 if you have the `fmt_scaled' function. */
405#undef HAVE_FMT_SCALED
406
407/* Define to 1 if you have the `freeaddrinfo' function. */
408#undef HAVE_FREEADDRINFO
409
410/* Define to 1 if the system has the type `fsblkcnt_t'. */
411#undef HAVE_FSBLKCNT_T
412
413/* Define to 1 if the system has the type `fsfilcnt_t'. */
414#undef HAVE_FSFILCNT_T
415
416/* Define to 1 if you have the `fstatvfs' function. */
417#undef HAVE_FSTATVFS
418
419/* Define to 1 if you have the `futimes' function. */
420#undef HAVE_FUTIMES
421
422/* Define to 1 if you have the `gai_strerror' function. */
423#undef HAVE_GAI_STRERROR
424
425/* Define to 1 if you have the `getaddrinfo' function. */
426#undef HAVE_GETADDRINFO
427
428/* Define to 1 if you have the `getaudit' function. */
429#undef HAVE_GETAUDIT
430
431/* Define to 1 if you have the `getaudit_addr' function. */
432#undef HAVE_GETAUDIT_ADDR
433
434/* Define to 1 if you have the `getcwd' function. */
435#undef HAVE_GETCWD
436
437/* Define to 1 if you have the `getgrouplist' function. */
438#undef HAVE_GETGROUPLIST
439
440/* Define to 1 if you have the `getgrset' function. */
441#undef HAVE_GETGRSET
442
443/* Define to 1 if you have the `getlastlogxbyname' function. */
444#undef HAVE_GETLASTLOGXBYNAME
445
446/* Define to 1 if you have the `getluid' function. */
447#undef HAVE_GETLUID
448
449/* Define to 1 if you have the `getnameinfo' function. */
450#undef HAVE_GETNAMEINFO
451
452/* Define to 1 if you have the `getopt' function. */
453#undef HAVE_GETOPT
454
455/* Define to 1 if you have the <getopt.h> header file. */
456#undef HAVE_GETOPT_H
457
458/* Define if your getopt(3) defines and uses optreset */
459#undef HAVE_GETOPT_OPTRESET
460
461/* Define if your libraries define getpagesize() */
462#undef HAVE_GETPAGESIZE
463
464/* Define to 1 if you have the `getpeereid' function. */
465#undef HAVE_GETPEEREID
466
467/* Define to 1 if you have the `getpeerucred' function. */
468#undef HAVE_GETPEERUCRED
469
470/* Define to 1 if you have the `getpgid' function. */
471#undef HAVE_GETPGID
472
473/* Define to 1 if you have the `getpgrp' function. */
474#undef HAVE_GETPGRP
475
476/* Define to 1 if you have the `getpwanam' function. */
477#undef HAVE_GETPWANAM
478
479/* Define to 1 if you have the `getrlimit' function. */
480#undef HAVE_GETRLIMIT
481
482/* Define if getrrsetbyname() exists */
483#undef HAVE_GETRRSETBYNAME
484
485/* Define to 1 if you have the `getrusage' function. */
486#undef HAVE_GETRUSAGE
487
488/* Define to 1 if you have the `getseuserbyname' function. */
489#undef HAVE_GETSEUSERBYNAME
490
491/* Define to 1 if you have the `gettimeofday' function. */
492#undef HAVE_GETTIMEOFDAY
493
494/* Define to 1 if you have the `getttyent' function. */
495#undef HAVE_GETTTYENT
496
497/* Define to 1 if you have the `getutent' function. */
498#undef HAVE_GETUTENT
499
500/* Define to 1 if you have the `getutid' function. */
501#undef HAVE_GETUTID
502
503/* Define to 1 if you have the `getutline' function. */
504#undef HAVE_GETUTLINE
505
506/* Define to 1 if you have the `getutxent' function. */
507#undef HAVE_GETUTXENT
508
509/* Define to 1 if you have the `getutxid' function. */
510#undef HAVE_GETUTXID
511
512/* Define to 1 if you have the `getutxline' function. */
513#undef HAVE_GETUTXLINE
514
515/* Define to 1 if you have the `getutxuser' function. */
516#undef HAVE_GETUTXUSER
517
518/* Define to 1 if you have the `get_default_context_with_level' function. */
519#undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL
520
521/* Define to 1 if you have the `glob' function. */
522#undef HAVE_GLOB
523
524/* Define to 1 if you have the <glob.h> header file. */
525#undef HAVE_GLOB_H
526
527/* Define to 1 if you have the `group_from_gid' function. */
528#undef HAVE_GROUP_FROM_GID
529
530/* Define to 1 if you have the <gssapi_generic.h> header file. */
531#undef HAVE_GSSAPI_GENERIC_H
532
533/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
534#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
535
536/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
537#undef HAVE_GSSAPI_GSSAPI_H
538
539/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
540#undef HAVE_GSSAPI_GSSAPI_KRB5_H
541
542/* Define to 1 if you have the <gssapi.h> header file. */
543#undef HAVE_GSSAPI_H
544
545/* Define to 1 if you have the <gssapi_krb5.h> header file. */
546#undef HAVE_GSSAPI_KRB5_H
547
548/* Define if HEADER.ad exists in arpa/nameser.h */
549#undef HAVE_HEADER_AD
550
551/* Define to 1 if you have the `HMAC_CTX_init' function. */
552#undef HAVE_HMAC_CTX_INIT
553
554/* Define if you have ut_host in utmp.h */
555#undef HAVE_HOST_IN_UTMP
556
557/* Define if you have ut_host in utmpx.h */
558#undef HAVE_HOST_IN_UTMPX
559
560/* Define to 1 if you have the <iaf.h> header file. */
561#undef HAVE_IAF_H
562
563/* Define to 1 if you have the <ia.h> header file. */
564#undef HAVE_IA_H
565
566/* Define if you have ut_id in utmp.h */
567#undef HAVE_ID_IN_UTMP
568
569/* Define if you have ut_id in utmpx.h */
570#undef HAVE_ID_IN_UTMPX
571
572/* Define to 1 if you have the `inet_aton' function. */
573#undef HAVE_INET_ATON
574
575/* Define to 1 if you have the `inet_ntoa' function. */
576#undef HAVE_INET_NTOA
577
578/* Define to 1 if you have the `inet_ntop' function. */
579#undef HAVE_INET_NTOP
580
581/* Define to 1 if you have the `innetgr' function. */
582#undef HAVE_INNETGR
583
584/* define if you have int64_t data type */
585#undef HAVE_INT64_T
586
587/* Define to 1 if you have the <inttypes.h> header file. */
588#undef HAVE_INTTYPES_H
589
590/* define if you have intxx_t data type */
591#undef HAVE_INTXX_T
592
593/* Define to 1 if the system has the type `in_addr_t'. */
594#undef HAVE_IN_ADDR_T
595
596/* Define to 1 if the system has the type `in_port_t'. */
597#undef HAVE_IN_PORT_T
598
599/* Define if you have isblank(3C). */
600#undef HAVE_ISBLANK
601
602/* Define to 1 if you have the `krb5_cc_new_unique' function. */
603#undef HAVE_KRB5_CC_NEW_UNIQUE
604
605/* Define to 1 if you have the `krb5_free_error_message' function. */
606#undef HAVE_KRB5_FREE_ERROR_MESSAGE
607
608/* Define to 1 if you have the `krb5_get_error_message' function. */
609#undef HAVE_KRB5_GET_ERROR_MESSAGE
610
611/* Define to 1 if you have the <lastlog.h> header file. */
612#undef HAVE_LASTLOG_H
613
614/* Define if you want ldns support */
615#undef HAVE_LDNS
616
617/* Define to 1 if you have the <libaudit.h> header file. */
618#undef HAVE_LIBAUDIT_H
619
620/* Define to 1 if you have the `bsm' library (-lbsm). */
621#undef HAVE_LIBBSM
622
623/* Define to 1 if you have the `crypt' library (-lcrypt). */
624#undef HAVE_LIBCRYPT
625
626/* Define to 1 if you have the `dl' library (-ldl). */
627#undef HAVE_LIBDL
628
629/* Define to 1 if you have the <libgen.h> header file. */
630#undef HAVE_LIBGEN_H
631
632/* Define if system has libiaf that supports set_id */
633#undef HAVE_LIBIAF
634
635/* Define to 1 if you have the `network' library (-lnetwork). */
636#undef HAVE_LIBNETWORK
637
638/* Define to 1 if you have the `nsl' library (-lnsl). */
639#undef HAVE_LIBNSL
640
641/* Define to 1 if you have the `pam' library (-lpam). */
642#undef HAVE_LIBPAM
643
644/* Define to 1 if you have the `socket' library (-lsocket). */
645#undef HAVE_LIBSOCKET
646
647/* Define to 1 if you have the <libutil.h> header file. */
648#undef HAVE_LIBUTIL_H
649
650/* Define to 1 if you have the `xnet' library (-lxnet). */
651#undef HAVE_LIBXNET
652
653/* Define to 1 if you have the `z' library (-lz). */
654#undef HAVE_LIBZ
655
656/* Define to 1 if you have the <limits.h> header file. */
657#undef HAVE_LIMITS_H
658
659/* Define to 1 if you have the <linux/audit.h> header file. */
660#undef HAVE_LINUX_AUDIT_H
661
662/* Define to 1 if you have the <linux/filter.h> header file. */
663#undef HAVE_LINUX_FILTER_H
664
665/* Define to 1 if you have the <linux/if_tun.h> header file. */
666#undef HAVE_LINUX_IF_TUN_H
667
668/* Define to 1 if you have the <linux/seccomp.h> header file. */
669#undef HAVE_LINUX_SECCOMP_H
670
671/* Define to 1 if you have the <locale.h> header file. */
672#undef HAVE_LOCALE_H
673
674/* Define to 1 if you have the `login' function. */
675#undef HAVE_LOGIN
676
677/* Define to 1 if you have the <login_cap.h> header file. */
678#undef HAVE_LOGIN_CAP_H
679
680/* Define to 1 if you have the `login_getcapbool' function. */
681#undef HAVE_LOGIN_GETCAPBOOL
682
683/* Define to 1 if you have the <login.h> header file. */
684#undef HAVE_LOGIN_H
685
686/* Define to 1 if you have the `logout' function. */
687#undef HAVE_LOGOUT
688
689/* Define to 1 if you have the `logwtmp' function. */
690#undef HAVE_LOGWTMP
691
692/* Define to 1 if the system has the type `long double'. */
693#undef HAVE_LONG_DOUBLE
694
695/* Define to 1 if the system has the type `long long'. */
696#undef HAVE_LONG_LONG
697
698/* Define to 1 if you have the <maillock.h> header file. */
699#undef HAVE_MAILLOCK_H
700
701/* Define to 1 if you have the `mblen' function. */
702#undef HAVE_MBLEN
703
704/* Define to 1 if you have the `md5_crypt' function. */
705#undef HAVE_MD5_CRYPT
706
707/* Define if you want to allow MD5 passwords */
708#undef HAVE_MD5_PASSWORDS
709
710/* Define to 1 if you have the `memmove' function. */
711#undef HAVE_MEMMOVE
712
713/* Define to 1 if you have the <memory.h> header file. */
714#undef HAVE_MEMORY_H
715
716/* Define to 1 if you have the `mkdtemp' function. */
717#undef HAVE_MKDTEMP
718
719/* Define to 1 if you have the `mmap' function. */
720#undef HAVE_MMAP
721
722/* define if you have mode_t data type */
723#undef HAVE_MODE_T
724
725/* Some systems put nanosleep outside of libc */
726#undef HAVE_NANOSLEEP
727
728/* Define to 1 if you have the <ndir.h> header file. */
729#undef HAVE_NDIR_H
730
731/* Define to 1 if you have the <netdb.h> header file. */
732#undef HAVE_NETDB_H
733
734/* Define to 1 if you have the <netgroup.h> header file. */
735#undef HAVE_NETGROUP_H
736
737/* Define to 1 if you have the <net/if_tun.h> header file. */
738#undef HAVE_NET_IF_TUN_H
739
740/* Define if you are on NeXT */
741#undef HAVE_NEXT
742
743/* Define to 1 if you have the `ngetaddrinfo' function. */
744#undef HAVE_NGETADDRINFO
745
746/* Define to 1 if you have the `nsleep' function. */
747#undef HAVE_NSLEEP
748
749/* Define to 1 if you have the `ogetaddrinfo' function. */
750#undef HAVE_OGETADDRINFO
751
752/* Define if you have an old version of PAM which takes only one argument to
753 pam_strerror */
754#undef HAVE_OLD_PAM
755
756/* Define to 1 if you have the `openlog_r' function. */
757#undef HAVE_OPENLOG_R
758
759/* Define to 1 if you have the `openpty' function. */
760#undef HAVE_OPENPTY
761
762/* Define if your ssl headers are included with #include <openssl/header.h> */
763#undef HAVE_OPENSSL
764
765/* Define if you have Digital Unix Security Integration Architecture */
766#undef HAVE_OSF_SIA
767
768/* Define to 1 if you have the `pam_getenvlist' function. */
769#undef HAVE_PAM_GETENVLIST
770
771/* Define to 1 if you have the <pam/pam_appl.h> header file. */
772#undef HAVE_PAM_PAM_APPL_H
773
774/* Define to 1 if you have the `pam_putenv' function. */
775#undef HAVE_PAM_PUTENV
776
777/* Define to 1 if you have the <paths.h> header file. */
778#undef HAVE_PATHS_H
779
780/* Define if you have ut_pid in utmp.h */
781#undef HAVE_PID_IN_UTMP
782
783/* define if you have pid_t data type */
784#undef HAVE_PID_T
785
786/* Define to 1 if you have the `poll' function. */
787#undef HAVE_POLL
788
789/* Define to 1 if you have the <poll.h> header file. */
790#undef HAVE_POLL_H
791
792/* Define to 1 if you have the `prctl' function. */
793#undef HAVE_PRCTL
794
795/* Define if you have /proc/$pid/fd */
796#undef HAVE_PROC_PID
797
798/* Define to 1 if you have the `pstat' function. */
799#undef HAVE_PSTAT
800
801/* Define to 1 if you have the <pty.h> header file. */
802#undef HAVE_PTY_H
803
804/* Define to 1 if you have the `pututline' function. */
805#undef HAVE_PUTUTLINE
806
807/* Define to 1 if you have the `pututxline' function. */
808#undef HAVE_PUTUTXLINE
809
810/* Define to 1 if you have the `readpassphrase' function. */
811#undef HAVE_READPASSPHRASE
812
813/* Define to 1 if you have the <readpassphrase.h> header file. */
814#undef HAVE_READPASSPHRASE_H
815
816/* Define to 1 if you have the `realpath' function. */
817#undef HAVE_REALPATH
818
819/* Define to 1 if you have the `recvmsg' function. */
820#undef HAVE_RECVMSG
821
822/* sys/resource.h has RLIMIT_NPROC */
823#undef HAVE_RLIMIT_NPROC
824
825/* Define to 1 if you have the <rpc/types.h> header file. */
826#undef HAVE_RPC_TYPES_H
827
828/* Define to 1 if you have the `rresvport_af' function. */
829#undef HAVE_RRESVPORT_AF
830
831/* Define to 1 if you have the `RSA_generate_key_ex' function. */
832#undef HAVE_RSA_GENERATE_KEY_EX
833
834/* Define to 1 if you have the `RSA_get_default_method' function. */
835#undef HAVE_RSA_GET_DEFAULT_METHOD
836
837/* Define to 1 if you have the <sandbox.h> header file. */
838#undef HAVE_SANDBOX_H
839
840/* Define to 1 if you have the `sandbox_init' function. */
841#undef HAVE_SANDBOX_INIT
842
843/* define if you have sa_family_t data type */
844#undef HAVE_SA_FAMILY_T
845
846/* Define to 1 if you have the `scan_scaled' function. */
847#undef HAVE_SCAN_SCALED
848
849/* Define if you have SecureWare-based protected password database */
850#undef HAVE_SECUREWARE
851
852/* Define to 1 if you have the <security/pam_appl.h> header file. */
853#undef HAVE_SECURITY_PAM_APPL_H
854
855/* Define to 1 if you have the `sendmsg' function. */
856#undef HAVE_SENDMSG
857
858/* Define to 1 if you have the `setauthdb' function. */
859#undef HAVE_SETAUTHDB
860
861/* Define to 1 if you have the `setdtablesize' function. */
862#undef HAVE_SETDTABLESIZE
863
864/* Define to 1 if you have the `setegid' function. */
865#undef HAVE_SETEGID
866
867/* Define to 1 if you have the `setenv' function. */
868#undef HAVE_SETENV
869
870/* Define to 1 if you have the `seteuid' function. */
871#undef HAVE_SETEUID
872
873/* Define to 1 if you have the `setgroupent' function. */
874#undef HAVE_SETGROUPENT
875
876/* Define to 1 if you have the `setgroups' function. */
877#undef HAVE_SETGROUPS
878
879/* Define to 1 if you have the `setlinebuf' function. */
880#undef HAVE_SETLINEBUF
881
882/* Define to 1 if you have the `setlogin' function. */
883#undef HAVE_SETLOGIN
884
885/* Define to 1 if you have the `setluid' function. */
886#undef HAVE_SETLUID
887
888/* Define to 1 if you have the `setpassent' function. */
889#undef HAVE_SETPASSENT
890
891/* Define to 1 if you have the `setpcred' function. */
892#undef HAVE_SETPCRED
893
894/* Define to 1 if you have the `setproctitle' function. */
895#undef HAVE_SETPROCTITLE
896
897/* Define to 1 if you have the `setregid' function. */
898#undef HAVE_SETREGID
899
900/* Define to 1 if you have the `setresgid' function. */
901#undef HAVE_SETRESGID
902
903/* Define to 1 if you have the `setresuid' function. */
904#undef HAVE_SETRESUID
905
906/* Define to 1 if you have the `setreuid' function. */
907#undef HAVE_SETREUID
908
909/* Define to 1 if you have the `setrlimit' function. */
910#undef HAVE_SETRLIMIT
911
912/* Define to 1 if you have the `setsid' function. */
913#undef HAVE_SETSID
914
915/* Define to 1 if you have the `setutent' function. */
916#undef HAVE_SETUTENT
917
918/* Define to 1 if you have the `setutxdb' function. */
919#undef HAVE_SETUTXDB
920
921/* Define to 1 if you have the `setutxent' function. */
922#undef HAVE_SETUTXENT
923
924/* Define to 1 if you have the `setvbuf' function. */
925#undef HAVE_SETVBUF
926
927/* Define to 1 if you have the `set_id' function. */
928#undef HAVE_SET_ID
929
930/* Define to 1 if you have the `SHA256_Update' function. */
931#undef HAVE_SHA256_UPDATE
932
933/* Define to 1 if you have the <sha2.h> header file. */
934#undef HAVE_SHA2_H
935
936/* Define to 1 if you have the <shadow.h> header file. */
937#undef HAVE_SHADOW_H
938
939/* Define to 1 if you have the `sigaction' function. */
940#undef HAVE_SIGACTION
941
942/* Define to 1 if you have the `sigvec' function. */
943#undef HAVE_SIGVEC
944
945/* Define to 1 if the system has the type `sig_atomic_t'. */
946#undef HAVE_SIG_ATOMIC_T
947
948/* define if you have size_t data type */
949#undef HAVE_SIZE_T
950
951/* Define to 1 if you have the `snprintf' function. */
952#undef HAVE_SNPRINTF
953
954/* Define to 1 if you have the `socketpair' function. */
955#undef HAVE_SOCKETPAIR
956
957/* Have PEERCRED socket option */
958#undef HAVE_SO_PEERCRED
959
960/* define if you have ssize_t data type */
961#undef HAVE_SSIZE_T
962
963/* Fields in struct sockaddr_storage */
964#undef HAVE_SS_FAMILY_IN_SS
965
966/* Define to 1 if you have the `statfs' function. */
967#undef HAVE_STATFS
968
969/* Define to 1 if you have the `statvfs' function. */
970#undef HAVE_STATVFS
971
972/* Define to 1 if you have the <stddef.h> header file. */
973#undef HAVE_STDDEF_H
974
975/* Define to 1 if you have the <stdint.h> header file. */
976#undef HAVE_STDINT_H
977
978/* Define to 1 if you have the <stdlib.h> header file. */
979#undef HAVE_STDLIB_H
980
981/* Define to 1 if you have the `strdup' function. */
982#undef HAVE_STRDUP
983
984/* Define to 1 if you have the `strerror' function. */
985#undef HAVE_STRERROR
986
987/* Define to 1 if you have the `strftime' function. */
988#undef HAVE_STRFTIME
989
990/* Silly mkstemp() */
991#undef HAVE_STRICT_MKSTEMP
992
993/* Define to 1 if you have the <strings.h> header file. */
994#undef HAVE_STRINGS_H
995
996/* Define to 1 if you have the <string.h> header file. */
997#undef HAVE_STRING_H
998
999/* Define to 1 if you have the `strlcat' function. */
1000#undef HAVE_STRLCAT
1001
1002/* Define to 1 if you have the `strlcpy' function. */
1003#undef HAVE_STRLCPY
1004
1005/* Define to 1 if you have the `strmode' function. */
1006#undef HAVE_STRMODE
1007
1008/* Define to 1 if you have the `strnlen' function. */
1009#undef HAVE_STRNLEN
1010
1011/* Define to 1 if you have the `strnvis' function. */
1012#undef HAVE_STRNVIS
1013
1014/* Define to 1 if you have the `strptime' function. */
1015#undef HAVE_STRPTIME
1016
1017/* Define to 1 if you have the `strsep' function. */
1018#undef HAVE_STRSEP
1019
1020/* Define to 1 if you have the `strtoll' function. */
1021#undef HAVE_STRTOLL
1022
1023/* Define to 1 if you have the `strtonum' function. */
1024#undef HAVE_STRTONUM
1025
1026/* Define to 1 if you have the `strtoul' function. */
1027#undef HAVE_STRTOUL
1028
1029/* Define to 1 if you have the `strtoull' function. */
1030#undef HAVE_STRTOULL
1031
1032/* define if you have struct addrinfo data type */
1033#undef HAVE_STRUCT_ADDRINFO
1034
1035/* define if you have struct in6_addr data type */
1036#undef HAVE_STRUCT_IN6_ADDR
1037
1038/* Define to 1 if `pw_change' is a member of `struct passwd'. */
1039#undef HAVE_STRUCT_PASSWD_PW_CHANGE
1040
1041/* Define to 1 if `pw_class' is a member of `struct passwd'. */
1042#undef HAVE_STRUCT_PASSWD_PW_CLASS
1043
1044/* Define to 1 if `pw_expire' is a member of `struct passwd'. */
1045#undef HAVE_STRUCT_PASSWD_PW_EXPIRE
1046
1047/* Define to 1 if `pw_gecos' is a member of `struct passwd'. */
1048#undef HAVE_STRUCT_PASSWD_PW_GECOS
1049
1050/* define if you have struct sockaddr_in6 data type */
1051#undef HAVE_STRUCT_SOCKADDR_IN6
1052
1053/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */
1054#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
1055
1056/* define if you have struct sockaddr_storage data type */
1057#undef HAVE_STRUCT_SOCKADDR_STORAGE
1058
1059/* Define to 1 if `st_blksize' is a member of `struct stat'. */
1060#undef HAVE_STRUCT_STAT_ST_BLKSIZE
1061
1062/* Define to 1 if the system has the type `struct timespec'. */
1063#undef HAVE_STRUCT_TIMESPEC
1064
1065/* define if you have struct timeval */
1066#undef HAVE_STRUCT_TIMEVAL
1067
1068/* Define to 1 if you have the `swap32' function. */
1069#undef HAVE_SWAP32
1070
1071/* Define to 1 if you have the `sysconf' function. */
1072#undef HAVE_SYSCONF
1073
1074/* Define if you have syslen in utmpx.h */
1075#undef HAVE_SYSLEN_IN_UTMPX
1076
1077/* Define to 1 if you have the <sys/audit.h> header file. */
1078#undef HAVE_SYS_AUDIT_H
1079
1080/* Define to 1 if you have the <sys/bitypes.h> header file. */
1081#undef HAVE_SYS_BITYPES_H
1082
1083/* Define to 1 if you have the <sys/bsdtty.h> header file. */
1084#undef HAVE_SYS_BSDTTY_H
1085
1086/* Define to 1 if you have the <sys/cdefs.h> header file. */
1087#undef HAVE_SYS_CDEFS_H
1088
1089/* Define to 1 if you have the <sys/dir.h> header file. */
1090#undef HAVE_SYS_DIR_H
1091
1092/* Define if your system defines sys_errlist[] */
1093#undef HAVE_SYS_ERRLIST
1094
1095/* Define to 1 if you have the <sys/mman.h> header file. */
1096#undef HAVE_SYS_MMAN_H
1097
1098/* Define to 1 if you have the <sys/mount.h> header file. */
1099#undef HAVE_SYS_MOUNT_H
1100
1101/* Define to 1 if you have the <sys/ndir.h> header file. */
1102#undef HAVE_SYS_NDIR_H
1103
1104/* Define if your system defines sys_nerr */
1105#undef HAVE_SYS_NERR
1106
1107/* Define to 1 if you have the <sys/poll.h> header file. */
1108#undef HAVE_SYS_POLL_H
1109
1110/* Define to 1 if you have the <sys/prctl.h> header file. */
1111#undef HAVE_SYS_PRCTL_H
1112
1113/* Define to 1 if you have the <sys/pstat.h> header file. */
1114#undef HAVE_SYS_PSTAT_H
1115
1116/* Define to 1 if you have the <sys/ptms.h> header file. */
1117#undef HAVE_SYS_PTMS_H
1118
1119/* Define to 1 if you have the <sys/select.h> header file. */
1120#undef HAVE_SYS_SELECT_H
1121
1122/* Define to 1 if you have the <sys/statvfs.h> header file. */
1123#undef HAVE_SYS_STATVFS_H
1124
1125/* Define to 1 if you have the <sys/stat.h> header file. */
1126#undef HAVE_SYS_STAT_H
1127
1128/* Define to 1 if you have the <sys/stream.h> header file. */
1129#undef HAVE_SYS_STREAM_H
1130
1131/* Define to 1 if you have the <sys/stropts.h> header file. */
1132#undef HAVE_SYS_STROPTS_H
1133
1134/* Define to 1 if you have the <sys/strtio.h> header file. */
1135#undef HAVE_SYS_STRTIO_H
1136
1137/* Force use of sys/syslog.h on Ultrix */
1138#undef HAVE_SYS_SYSLOG_H
1139
1140/* Define to 1 if you have the <sys/sysmacros.h> header file. */
1141#undef HAVE_SYS_SYSMACROS_H
1142
1143/* Define to 1 if you have the <sys/timers.h> header file. */
1144#undef HAVE_SYS_TIMERS_H
1145
1146/* Define to 1 if you have the <sys/time.h> header file. */
1147#undef HAVE_SYS_TIME_H
1148
1149/* Define to 1 if you have the <sys/types.h> header file. */
1150#undef HAVE_SYS_TYPES_H
1151
1152/* Define to 1 if you have the <sys/un.h> header file. */
1153#undef HAVE_SYS_UN_H
1154
1155/* Define to 1 if you have the `tcgetpgrp' function. */
1156#undef HAVE_TCGETPGRP
1157
1158/* Define to 1 if you have the `tcsendbreak' function. */
1159#undef HAVE_TCSENDBREAK
1160
1161/* Define to 1 if you have the `time' function. */
1162#undef HAVE_TIME
1163
1164/* Define to 1 if you have the <time.h> header file. */
1165#undef HAVE_TIME_H
1166
1167/* Define if you have ut_time in utmp.h */
1168#undef HAVE_TIME_IN_UTMP
1169
1170/* Define if you have ut_time in utmpx.h */
1171#undef HAVE_TIME_IN_UTMPX
1172
1173/* Define to 1 if you have the `timingsafe_bcmp' function. */
1174#undef HAVE_TIMINGSAFE_BCMP
1175
1176/* Define to 1 if you have the <tmpdir.h> header file. */
1177#undef HAVE_TMPDIR_H
1178
1179/* Define to 1 if you have the `truncate' function. */
1180#undef HAVE_TRUNCATE
1181
1182/* Define to 1 if you have the <ttyent.h> header file. */
1183#undef HAVE_TTYENT_H
1184
1185/* Define if you have ut_tv in utmp.h */
1186#undef HAVE_TV_IN_UTMP
1187
1188/* Define if you have ut_tv in utmpx.h */
1189#undef HAVE_TV_IN_UTMPX
1190
1191/* Define if you have ut_type in utmp.h */
1192#undef HAVE_TYPE_IN_UTMP
1193
1194/* Define if you have ut_type in utmpx.h */
1195#undef HAVE_TYPE_IN_UTMPX
1196
1197/* Define to 1 if you have the <ucred.h> header file. */
1198#undef HAVE_UCRED_H
1199
1200/* define if you have uintxx_t data type */
1201#undef HAVE_UINTXX_T
1202
1203/* Define to 1 if you have the <unistd.h> header file. */
1204#undef HAVE_UNISTD_H
1205
1206/* Define to 1 if you have the `unsetenv' function. */
1207#undef HAVE_UNSETENV
1208
1209/* Define to 1 if the system has the type `unsigned long long'. */
1210#undef HAVE_UNSIGNED_LONG_LONG
1211
1212/* Define to 1 if you have the `updwtmp' function. */
1213#undef HAVE_UPDWTMP
1214
1215/* Define to 1 if you have the `updwtmpx' function. */
1216#undef HAVE_UPDWTMPX
1217
1218/* Define to 1 if you have the <usersec.h> header file. */
1219#undef HAVE_USERSEC_H
1220
1221/* Define to 1 if you have the `user_from_uid' function. */
1222#undef HAVE_USER_FROM_UID
1223
1224/* Define to 1 if you have the `usleep' function. */
1225#undef HAVE_USLEEP
1226
1227/* Define to 1 if you have the <util.h> header file. */
1228#undef HAVE_UTIL_H
1229
1230/* Define to 1 if you have the `utimes' function. */
1231#undef HAVE_UTIMES
1232
1233/* Define to 1 if you have the <utime.h> header file. */
1234#undef HAVE_UTIME_H
1235
1236/* Define to 1 if you have the `utmpname' function. */
1237#undef HAVE_UTMPNAME
1238
1239/* Define to 1 if you have the `utmpxname' function. */
1240#undef HAVE_UTMPXNAME
1241
1242/* Define to 1 if you have the <utmpx.h> header file. */
1243#undef HAVE_UTMPX_H
1244
1245/* Define to 1 if you have the <utmp.h> header file. */
1246#undef HAVE_UTMP_H
1247
1248/* define if you have u_char data type */
1249#undef HAVE_U_CHAR
1250
1251/* define if you have u_int data type */
1252#undef HAVE_U_INT
1253
1254/* define if you have u_int64_t data type */
1255#undef HAVE_U_INT64_T
1256
1257/* define if you have u_intxx_t data type */
1258#undef HAVE_U_INTXX_T
1259
1260/* Define to 1 if you have the `vasprintf' function. */
1261#undef HAVE_VASPRINTF
1262
1263/* Define if va_copy exists */
1264#undef HAVE_VA_COPY
1265
1266/* Define to 1 if you have the `vhangup' function. */
1267#undef HAVE_VHANGUP
1268
1269/* Define to 1 if you have the <vis.h> header file. */
1270#undef HAVE_VIS_H
1271
1272/* Define to 1 if you have the `vsnprintf' function. */
1273#undef HAVE_VSNPRINTF
1274
1275/* Define to 1 if you have the `waitpid' function. */
1276#undef HAVE_WAITPID
1277
1278/* Define to 1 if you have the `_getlong' function. */
1279#undef HAVE__GETLONG
1280
1281/* Define to 1 if you have the `_getpty' function. */
1282#undef HAVE__GETPTY
1283
1284/* Define to 1 if you have the `_getshort' function. */
1285#undef HAVE__GETSHORT
1286
1287/* Define if you have struct __res_state _res as an extern */
1288#undef HAVE__RES_EXTERN
1289
1290/* Define to 1 if you have the `__b64_ntop' function. */
1291#undef HAVE___B64_NTOP
1292
1293/* Define to 1 if you have the `__b64_pton' function. */
1294#undef HAVE___B64_PTON
1295
1296/* Define if compiler implements __FUNCTION__ */
1297#undef HAVE___FUNCTION__
1298
1299/* Define if libc defines __progname */
1300#undef HAVE___PROGNAME
1301
1302/* Fields in struct sockaddr_storage */
1303#undef HAVE___SS_FAMILY_IN_SS
1304
1305/* Define if __va_copy exists */
1306#undef HAVE___VA_COPY
1307
1308/* Define if compiler implements __func__ */
1309#undef HAVE___func__
1310
1311/* Define this if you are using the Heimdal version of Kerberos V5 */
1312#undef HEIMDAL
1313
1314/* Define if you need to use IP address instead of hostname in $DISPLAY */
1315#undef IPADDR_IN_DISPLAY
1316
1317/* Detect IPv4 in IPv6 mapped addresses and treat as IPv4 */
1318#undef IPV4_IN_IPV6
1319
1320/* Define if your system choked on IP TOS setting */
1321#undef IP_TOS_IS_BROKEN
1322
1323/* Define if you want Kerberos 5 support */
1324#undef KRB5
1325
1326/* Define if pututxline updates lastlog too */
1327#undef LASTLOG_WRITE_PUTUTXLINE
1328
1329/* Define if you want TCP Wrappers support */
1330#undef LIBWRAP
1331
1332/* Define to whatever link() returns for "not supported" if it doesn't return
1333 EOPNOTSUPP. */
1334#undef LINK_OPNOTSUPP_ERRNO
1335
1336/* Adjust Linux out-of-memory killer */
1337#undef LINUX_OOM_ADJUST
1338
1339/* max value of long long calculated by configure */
1340#undef LLONG_MAX
1341
1342/* min value of long long calculated by configure */
1343#undef LLONG_MIN
1344
1345/* Account locked with pw(1) */
1346#undef LOCKED_PASSWD_PREFIX
1347
1348/* String used in /etc/passwd to denote locked account */
1349#undef LOCKED_PASSWD_STRING
1350
1351/* String used in /etc/passwd to denote locked account */
1352#undef LOCKED_PASSWD_SUBSTR
1353
1354/* Some versions of /bin/login need the TERM supplied on the commandline */
1355#undef LOGIN_NEEDS_TERM
1356
1357/* Some systems need a utmpx entry for /bin/login to work */
1358#undef LOGIN_NEEDS_UTMPX
1359
1360/* Define if your login program cannot handle end of options ("--") */
1361#undef LOGIN_NO_ENDOPT
1362
1363/* If your header files don't define LOGIN_PROGRAM, then use this (detected)
1364 from environment and PATH */
1365#undef LOGIN_PROGRAM_FALLBACK
1366
1367/* Set this to your mail directory if you do not have _PATH_MAILDIR */
1368#undef MAIL_DIRECTORY
1369
1370/* Need setpgrp to acquire controlling tty */
1371#undef NEED_SETPGRP
1372
1373/* compiler does not accept __attribute__ on return types */
1374#undef NO_ATTRIBUTE_ON_RETURN_TYPE
1375
1376/* Define if the concept of ports only accessible to superusers isn't known */
1377#undef NO_IPPORT_RESERVED_CONCEPT
1378
1379/* Define if you don't want to use lastlog in session.c */
1380#undef NO_SSH_LASTLOG
1381
1382/* Define if X11 doesn't support AF_UNIX sockets on that system */
1383#undef NO_X11_UNIX_SOCKETS
1384
1385/* Define if EVP_DigestUpdate returns void */
1386#undef OPENSSL_EVP_DIGESTUPDATE_VOID
1387
1388/* libcrypto includes complete ECC support */
1389#undef OPENSSL_HAS_ECC
1390
1391/* libcrypto has EVP AES CTR */
1392#undef OPENSSL_HAVE_EVPCTR
1393
1394/* libcrypto has EVP AES GCM */
1395#undef OPENSSL_HAVE_EVPGCM
1396
1397/* libcrypto is missing AES 192 and 256 bit functions */
1398#undef OPENSSL_LOBOTOMISED_AES
1399
1400/* Define if you want OpenSSL's internally seeded PRNG only */
1401#undef OPENSSL_PRNG_ONLY
1402
1403/* Define to the address where bug reports for this package should be sent. */
1404#undef PACKAGE_BUGREPORT
1405
1406/* Define to the full name of this package. */
1407#undef PACKAGE_NAME
1408
1409/* Define to the full name and version of this package. */
1410#undef PACKAGE_STRING
1411
1412/* Define to the one symbol short name of this package. */
1413#undef PACKAGE_TARNAME
1414
1415/* Define to the home page for this package. */
1416#undef PACKAGE_URL
1417
1418/* Define to the version of this package. */
1419#undef PACKAGE_VERSION
1420
1421/* Define if you are using Solaris-derived PAM which passes pam_messages to
1422 the conversation function with an extra level of indirection */
1423#undef PAM_SUN_CODEBASE
1424
1425/* Work around problematic Linux PAM modules handling of PAM_TTY */
1426#undef PAM_TTY_KLUDGE
1427
1428/* must supply username to passwd */
1429#undef PASSWD_NEEDS_USERNAME
1430
1431/* System dirs owned by bin (uid 2) */
1432#undef PLATFORM_SYS_DIR_UID
1433
1434/* Port number of PRNGD/EGD random number socket */
1435#undef PRNGD_PORT
1436
1437/* Location of PRNGD/EGD random number socket */
1438#undef PRNGD_SOCKET
1439
1440/* read(1) can return 0 for a non-closed fd */
1441#undef PTY_ZEROREAD
1442
1443/* Sandbox using Darwin sandbox_init(3) */
1444#undef SANDBOX_DARWIN
1445
1446/* no privsep sandboxing */
1447#undef SANDBOX_NULL
1448
1449/* Sandbox using setrlimit(2) */
1450#undef SANDBOX_RLIMIT
1451
1452/* Sandbox using seccomp filter */
1453#undef SANDBOX_SECCOMP_FILTER
1454
1455/* setrlimit RLIMIT_FSIZE works */
1456#undef SANDBOX_SKIP_RLIMIT_FSIZE
1457
1458/* Sandbox using systrace(4) */
1459#undef SANDBOX_SYSTRACE
1460
1461/* Specify the system call convention in use */
1462#undef SECCOMP_AUDIT_ARCH
1463
1464/* Define if your platform breaks doing a seteuid before a setuid */
1465#undef SETEUID_BREAKS_SETUID
1466
1467/* The size of `int', as computed by sizeof. */
1468#undef SIZEOF_INT
1469
1470/* The size of `long int', as computed by sizeof. */
1471#undef SIZEOF_LONG_INT
1472
1473/* The size of `long long int', as computed by sizeof. */
1474#undef SIZEOF_LONG_LONG_INT
1475
1476/* The size of `short int', as computed by sizeof. */
1477#undef SIZEOF_SHORT_INT
1478
1479/* Define if you want S/Key support */
1480#undef SKEY
1481
1482/* Define if your skeychallenge() function takes 4 arguments (NetBSD) */
1483#undef SKEYCHALLENGE_4ARG
1484
1485/* Define as const if snprintf() can declare const char *fmt */
1486#undef SNPRINTF_CONST
1487
1488/* Define to a Set Process Title type if your system is supported by
1489 bsd-setproctitle.c */
1490#undef SPT_TYPE
1491
1492/* Define if sshd somehow reacquires a controlling TTY after setsid() */
1493#undef SSHD_ACQUIRES_CTTY
1494
1495/* Define if pam_chauthtok wants real uid set to the unpriv'ed user */
1496#undef SSHPAM_CHAUTHTOK_NEEDS_RUID
1497
1498/* Use audit debugging module */
1499#undef SSH_AUDIT_EVENTS
1500
1501/* Windows is sensitive to read buffer size */
1502#undef SSH_IOBUFSZ
1503
1504/* non-privileged user for privilege separation */
1505#undef SSH_PRIVSEP_USER
1506
1507/* Use tunnel device compatibility to OpenBSD */
1508#undef SSH_TUN_COMPAT_AF
1509
1510/* Open tunnel devices the FreeBSD way */
1511#undef SSH_TUN_FREEBSD
1512
1513/* Open tunnel devices the Linux tun/tap way */
1514#undef SSH_TUN_LINUX
1515
1516/* No layer 2 tunnel support */
1517#undef SSH_TUN_NO_L2
1518
1519/* Open tunnel devices the OpenBSD way */
1520#undef SSH_TUN_OPENBSD
1521
1522/* Prepend the address family to IP tunnel traffic */
1523#undef SSH_TUN_PREPEND_AF
1524
1525/* Define to 1 if you have the ANSI C header files. */
1526#undef STDC_HEADERS
1527
1528/* Define if you want a different $PATH for the superuser */
1529#undef SUPERUSER_PATH
1530
1531/* syslog_r function is safe to use in in a signal handler */
1532#undef SYSLOG_R_SAFE_IN_SIGHAND
1533
1534/* Support passwords > 8 chars */
1535#undef UNIXWARE_LONG_PASSWORDS
1536
1537/* Specify default $PATH */
1538#undef USER_PATH
1539
1540/* Define this if you want to use libkafs' AFS support */
1541#undef USE_AFS
1542
1543/* Use BSM audit module */
1544#undef USE_BSM_AUDIT
1545
1546/* Use btmp to log bad logins */
1547#undef USE_BTMP
1548
1549/* Use libedit for sftp */
1550#undef USE_LIBEDIT
1551
1552/* Use Linux audit module */
1553#undef USE_LINUX_AUDIT
1554
1555/* Enable OpenSSL engine support */
1556#undef USE_OPENSSL_ENGINE
1557
1558/* Define if you want to enable PAM support */
1559#undef USE_PAM
1560
1561/* Use PIPES instead of a socketpair() */
1562#undef USE_PIPES
1563
1564/* Define if you have Solaris process contracts */
1565#undef USE_SOLARIS_PROCESS_CONTRACTS
1566
1567/* Define if you have Solaris projects */
1568#undef USE_SOLARIS_PROJECTS
1569
1570/* Define if you shouldn't strip 'tty' from your ttyname in [uw]tmp */
1571#undef WITH_ABBREV_NO_TTY
1572
1573/* Define if you want to enable AIX4's authenticate function */
1574#undef WITH_AIXAUTHENTICATE
1575
1576/* Define if you have/want arrays (cluster-wide session managment, not C
1577 arrays) */
1578#undef WITH_IRIX_ARRAY
1579
1580/* Define if you want IRIX audit trails */
1581#undef WITH_IRIX_AUDIT
1582
1583/* Define if you want IRIX kernel jobs */
1584#undef WITH_IRIX_JOBS
1585
1586/* Define if you want IRIX project management */
1587#undef WITH_IRIX_PROJECT
1588
1589/* Define if you want SELinux support. */
1590#undef WITH_SELINUX
1591
1592/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
1593 significant byte first (like Motorola and SPARC, unlike Intel). */
1594#if defined AC_APPLE_UNIVERSAL_BUILD
1595# if defined __BIG_ENDIAN__
1596# define WORDS_BIGENDIAN 1
1597# endif
1598#else
1599# ifndef WORDS_BIGENDIAN
1600# undef WORDS_BIGENDIAN
1601# endif
1602#endif
1603
1604/* Define if xauth is found in your path */
1605#undef XAUTH_PATH
1606
1607/* Number of bits in a file offset, on hosts where this is settable. */
1608#undef _FILE_OFFSET_BITS
1609
1610/* Define for large files, on AIX-style hosts. */
1611#undef _LARGE_FILES
1612
1613/* log for bad login attempts */
1614#undef _PATH_BTMP
1615
1616/* Full path of your "passwd" program */
1617#undef _PATH_PASSWD_PROG
1618
1619/* Specify location of ssh.pid */
1620#undef _PATH_SSH_PIDDIR
1621
1622/* Define if we don't have struct __res_state in resolv.h */
1623#undef __res_state
1624
1625/* Define to `__inline__' or `__inline' if that's what the C compiler
1626 calls it, or to nothing if 'inline' is not supported under any name. */
1627#ifndef __cplusplus
1628#undef inline
1629#endif
1630
1631/* type to use in place of socklen_t if not defined */
1632#undef socklen_t
diff --git a/configure b/configure
new file mode 100755
index 000000000..0d6fad5f4
--- /dev/null
+++ b/configure
@@ -0,0 +1,18897 @@
1#! /bin/sh
2# From configure.ac Revision: 1.536 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.68 for OpenSSH Portable.
5#
6# Report bugs to <openssh-unix-dev@mindrot.org>.
7#
8#
9# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
10# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
12#
13#
14# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
16## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
19
20# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
22if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
23 emulate sh
24 NULLCMD=:
25 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
28 setopt NO_GLOB_SUBST
29else
30 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
35esac
36fi
37
38
39as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
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'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
76
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
79 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
84fi
85
86
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
92IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
95as_myself=
96case $0 in #((
97 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
105IFS=$as_save_IFS
106
107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
117fi
118
119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
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 || :
126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
136
137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
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; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
221 # Preserve -v and -x to the replacement shell.
222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: openssh-unix-dev@mindrot.org about your system,
244$0: including any error possibly output before this
245$0: message. Then install a modern shell, or manually run
246$0: the script under such a shell if you do have one."
247 fi
248 exit 1
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
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
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{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
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 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
375# script with STATUS, using 1 if that was 0.
376as_fn_error ()
377{
378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
382 fi
383 $as_echo "$as_me: error: $2" >&2
384 as_fn_exit $as_status
385} # as_fn_error
386
387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
405
406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
410$as_echo X/"$0" |
411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
425# Avoid depending upon Character Ranges.
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
431
432
433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
442 sed '
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
447 N
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450 t loop
451 s/-\n.*//
452 ' >$as_me.lineno &&
453 chmod +x "$as_me.lineno" ||
454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
460 # Exit status is that of the last command.
461 exit
462}
463
464ECHO_C= ECHO_N= ECHO_T=
465case `echo -n x` in #(((((
466-n*)
467 case `echo 'xy\c'` in
468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
472 esac;;
473*)
474 ECHO_N='-n';;
475esac
476
477rm -f conf$$ conf$$.exe conf$$.file
478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
482 mkdir conf$$.dir 2>/dev/null
483fi
484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
496 as_ln_s='cp -p'
497 fi
498else
499 as_ln_s='cp -p'
500fi
501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
503
504if mkdir -p . 2>/dev/null; then
505 as_mkdir_p='mkdir -p "$as_dir"'
506else
507 test -d ./-p && rmdir ./-p
508 as_mkdir_p=false
509fi
510
511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
522 test -d "$1/.";
523 else
524 case $1 in #(
525 -*)set "./$1";;
526 esac;
527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
533
534# Sed expression to map a string onto a valid CPP name.
535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
536
537# Sed expression to map a string onto a valid variable name.
538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
539
540
541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
543
544# Name of the host.
545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
549#
550# Initializations.
551#
552ac_default_prefix=/usr/local
553ac_clean_files=
554ac_config_libobj_dir=.
555LIBOBJS=
556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
560
561# Identity of this package.
562PACKAGE_NAME='OpenSSH'
563PACKAGE_TARNAME='openssh'
564PACKAGE_VERSION='Portable'
565PACKAGE_STRING='OpenSSH Portable'
566PACKAGE_BUGREPORT='openssh-unix-dev@mindrot.org'
567PACKAGE_URL=''
568
569ac_unique_file="ssh.c"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
573#ifdef HAVE_SYS_TYPES_H
574# include <sys/types.h>
575#endif
576#ifdef HAVE_SYS_STAT_H
577# include <sys/stat.h>
578#endif
579#ifdef STDC_HEADERS
580# include <stdlib.h>
581# include <stddef.h>
582#else
583# ifdef HAVE_STDLIB_H
584# include <stdlib.h>
585# endif
586#endif
587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
589# include <memory.h>
590# endif
591# include <string.h>
592#endif
593#ifdef HAVE_STRINGS_H
594# include <strings.h>
595#endif
596#ifdef HAVE_INTTYPES_H
597# include <inttypes.h>
598#endif
599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
603# include <unistd.h>
604#endif"
605
606ac_subst_vars='LTLIBOBJS
607LIBOBJS
608UNSUPPORTED_ALGORITHMS
609TEST_SSH_IPV6
610piddir
611user_path
612mansubdir
613MANTYPE
614XAUTH_PATH
615STRIP_OPT
616xauth_path
617PRIVSEP_PATH
618K5LIBS
619GSSLIBS
620KRB5CONF
621SSHDLIBS
622SSHLIBS
623SSH_PRIVSEP_USER
624COMMENT_OUT_ECC
625TEST_SSH_ECC
626TEST_SSH_SHA256
627LIBEDIT
628PKGCONFIG
629LD
630PATH_PASSWD_PROG
631LOGIN_PROGRAM_FALLBACK
632STARTUP_SCRIPT_SHELL
633MAKE_PACKAGE_SUPPORTED
634PATH_USERADD_PROG
635PATH_GROUPADD_PROG
636MANFMT
637TEST_SHELL
638MANDOC
639NROFF
640GROFF
641SH
642TEST_MINUS_S_SH
643ENT
644SED
645PERL
646KILL
647CAT
648AR
649INSTALL_DATA
650INSTALL_SCRIPT
651INSTALL_PROGRAM
652RANLIB
653AWK
654EGREP
655GREP
656CPP
657host_os
658host_vendor
659host_cpu
660host
661build_os
662build_vendor
663build_cpu
664build
665OBJEXT
666EXEEXT
667ac_ct_CC
668CPPFLAGS
669LDFLAGS
670CFLAGS
671CC
672target_alias
673host_alias
674build_alias
675LIBS
676ECHO_T
677ECHO_N
678ECHO_C
679DEFS
680mandir
681localedir
682libdir
683psdir
684pdfdir
685dvidir
686htmldir
687infodir
688docdir
689oldincludedir
690includedir
691localstatedir
692sharedstatedir
693sysconfdir
694datadir
695datarootdir
696libexecdir
697sbindir
698bindir
699program_transform_name
700prefix
701exec_prefix
702PACKAGE_URL
703PACKAGE_BUGREPORT
704PACKAGE_STRING
705PACKAGE_VERSION
706PACKAGE_TARNAME
707PACKAGE_NAME
708PATH_SEPARATOR
709SHELL'
710ac_subst_files=''
711ac_user_opts='
712enable_option_checking
713enable_largefile
714with_stackprotect
715with_rpath
716with_cflags
717with_cppflags
718with_ldflags
719with_libs
720with_Werror
721with_solaris_contracts
722with_solaris_projects
723with_osfsia
724with_zlib
725with_zlib_version_check
726with_skey
727with_tcp_wrappers
728with_ldns
729with_libedit
730with_audit
731with_ssl_dir
732with_openssl_header_check
733with_ssl_engine
734with_prngd_port
735with_prngd_socket
736with_pam
737with_privsep_user
738with_sandbox
739with_selinux
740with_kerberos5
741with_privsep_path
742with_xauth
743enable_strip
744with_maildir
745with_mantype
746with_md5_passwords
747with_shadow
748with_ipaddr_display
749enable_etc_default_login
750with_default_path
751with_superuser_path
752with_4in6
753with_bsd_auth
754with_pid_dir
755enable_lastlog
756enable_utmp
757enable_utmpx
758enable_wtmp
759enable_wtmpx
760enable_libutil
761enable_pututline
762enable_pututxline
763with_lastlog
764'
765 ac_precious_vars='build_alias
766host_alias
767target_alias
768CC
769CFLAGS
770LDFLAGS
771LIBS
772CPPFLAGS
773CPP'
774
775
776# Initialize some variables set by options.
777ac_init_help=
778ac_init_version=false
779ac_unrecognized_opts=
780ac_unrecognized_sep=
781# The variables have the same names as the options, with
782# dashes changed to underlines.
783cache_file=/dev/null
784exec_prefix=NONE
785no_create=
786no_recursion=
787prefix=NONE
788program_prefix=NONE
789program_suffix=NONE
790program_transform_name=s,x,x,
791silent=
792site=
793srcdir=
794verbose=
795x_includes=NONE
796x_libraries=NONE
797
798# Installation directory options.
799# These are left unexpanded so users can "make install exec_prefix=/foo"
800# and all the variables that are supposed to be based on exec_prefix
801# by default will actually change.
802# Use braces instead of parens because sh, perl, etc. also accept them.
803# (The list follows the same order as the GNU Coding Standards.)
804bindir='${exec_prefix}/bin'
805sbindir='${exec_prefix}/sbin'
806libexecdir='${exec_prefix}/libexec'
807datarootdir='${prefix}/share'
808datadir='${datarootdir}'
809sysconfdir='${prefix}/etc'
810sharedstatedir='${prefix}/com'
811localstatedir='${prefix}/var'
812includedir='${prefix}/include'
813oldincludedir='/usr/include'
814docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
815infodir='${datarootdir}/info'
816htmldir='${docdir}'
817dvidir='${docdir}'
818pdfdir='${docdir}'
819psdir='${docdir}'
820libdir='${exec_prefix}/lib'
821localedir='${datarootdir}/locale'
822mandir='${datarootdir}/man'
823
824ac_prev=
825ac_dashdash=
826for ac_option
827do
828 # If the previous option needs an argument, assign it.
829 if test -n "$ac_prev"; then
830 eval $ac_prev=\$ac_option
831 ac_prev=
832 continue
833 fi
834
835 case $ac_option in
836 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
837 *=) ac_optarg= ;;
838 *) ac_optarg=yes ;;
839 esac
840
841 # Accept the important Cygnus configure options, so we can diagnose typos.
842
843 case $ac_dashdash$ac_option in
844 --)
845 ac_dashdash=yes ;;
846
847 -bindir | --bindir | --bindi | --bind | --bin | --bi)
848 ac_prev=bindir ;;
849 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
850 bindir=$ac_optarg ;;
851
852 -build | --build | --buil | --bui | --bu)
853 ac_prev=build_alias ;;
854 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
855 build_alias=$ac_optarg ;;
856
857 -cache-file | --cache-file | --cache-fil | --cache-fi \
858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859 ac_prev=cache_file ;;
860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
862 cache_file=$ac_optarg ;;
863
864 --config-cache | -C)
865 cache_file=config.cache ;;
866
867 -datadir | --datadir | --datadi | --datad)
868 ac_prev=datadir ;;
869 -datadir=* | --datadir=* | --datadi=* | --datad=*)
870 datadir=$ac_optarg ;;
871
872 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873 | --dataroo | --dataro | --datar)
874 ac_prev=datarootdir ;;
875 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877 datarootdir=$ac_optarg ;;
878
879 -disable-* | --disable-*)
880 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
881 # Reject names that are not valid shell variable names.
882 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
883 as_fn_error $? "invalid feature name: $ac_useropt"
884 ac_useropt_orig=$ac_useropt
885 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886 case $ac_user_opts in
887 *"
888"enable_$ac_useropt"
889"*) ;;
890 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
891 ac_unrecognized_sep=', ';;
892 esac
893 eval enable_$ac_useropt=no ;;
894
895 -docdir | --docdir | --docdi | --doc | --do)
896 ac_prev=docdir ;;
897 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
898 docdir=$ac_optarg ;;
899
900 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
901 ac_prev=dvidir ;;
902 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
903 dvidir=$ac_optarg ;;
904
905 -enable-* | --enable-*)
906 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
907 # Reject names that are not valid shell variable names.
908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
909 as_fn_error $? "invalid feature name: $ac_useropt"
910 ac_useropt_orig=$ac_useropt
911 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
912 case $ac_user_opts in
913 *"
914"enable_$ac_useropt"
915"*) ;;
916 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
917 ac_unrecognized_sep=', ';;
918 esac
919 eval enable_$ac_useropt=\$ac_optarg ;;
920
921 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
922 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
923 | --exec | --exe | --ex)
924 ac_prev=exec_prefix ;;
925 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
926 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
927 | --exec=* | --exe=* | --ex=*)
928 exec_prefix=$ac_optarg ;;
929
930 -gas | --gas | --ga | --g)
931 # Obsolete; use --with-gas.
932 with_gas=yes ;;
933
934 -help | --help | --hel | --he | -h)
935 ac_init_help=long ;;
936 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
937 ac_init_help=recursive ;;
938 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
939 ac_init_help=short ;;
940
941 -host | --host | --hos | --ho)
942 ac_prev=host_alias ;;
943 -host=* | --host=* | --hos=* | --ho=*)
944 host_alias=$ac_optarg ;;
945
946 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
947 ac_prev=htmldir ;;
948 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
949 | --ht=*)
950 htmldir=$ac_optarg ;;
951
952 -includedir | --includedir | --includedi | --included | --include \
953 | --includ | --inclu | --incl | --inc)
954 ac_prev=includedir ;;
955 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
956 | --includ=* | --inclu=* | --incl=* | --inc=*)
957 includedir=$ac_optarg ;;
958
959 -infodir | --infodir | --infodi | --infod | --info | --inf)
960 ac_prev=infodir ;;
961 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
962 infodir=$ac_optarg ;;
963
964 -libdir | --libdir | --libdi | --libd)
965 ac_prev=libdir ;;
966 -libdir=* | --libdir=* | --libdi=* | --libd=*)
967 libdir=$ac_optarg ;;
968
969 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
970 | --libexe | --libex | --libe)
971 ac_prev=libexecdir ;;
972 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
973 | --libexe=* | --libex=* | --libe=*)
974 libexecdir=$ac_optarg ;;
975
976 -localedir | --localedir | --localedi | --localed | --locale)
977 ac_prev=localedir ;;
978 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
979 localedir=$ac_optarg ;;
980
981 -localstatedir | --localstatedir | --localstatedi | --localstated \
982 | --localstate | --localstat | --localsta | --localst | --locals)
983 ac_prev=localstatedir ;;
984 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
985 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
986 localstatedir=$ac_optarg ;;
987
988 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
989 ac_prev=mandir ;;
990 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
991 mandir=$ac_optarg ;;
992
993 -nfp | --nfp | --nf)
994 # Obsolete; use --without-fp.
995 with_fp=no ;;
996
997 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
998 | --no-cr | --no-c | -n)
999 no_create=yes ;;
1000
1001 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1003 no_recursion=yes ;;
1004
1005 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1006 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1007 | --oldin | --oldi | --old | --ol | --o)
1008 ac_prev=oldincludedir ;;
1009 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1010 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1011 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1012 oldincludedir=$ac_optarg ;;
1013
1014 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1015 ac_prev=prefix ;;
1016 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1017 prefix=$ac_optarg ;;
1018
1019 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1020 | --program-pre | --program-pr | --program-p)
1021 ac_prev=program_prefix ;;
1022 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1023 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1024 program_prefix=$ac_optarg ;;
1025
1026 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1027 | --program-suf | --program-su | --program-s)
1028 ac_prev=program_suffix ;;
1029 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1030 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1031 program_suffix=$ac_optarg ;;
1032
1033 -program-transform-name | --program-transform-name \
1034 | --program-transform-nam | --program-transform-na \
1035 | --program-transform-n | --program-transform- \
1036 | --program-transform | --program-transfor \
1037 | --program-transfo | --program-transf \
1038 | --program-trans | --program-tran \
1039 | --progr-tra | --program-tr | --program-t)
1040 ac_prev=program_transform_name ;;
1041 -program-transform-name=* | --program-transform-name=* \
1042 | --program-transform-nam=* | --program-transform-na=* \
1043 | --program-transform-n=* | --program-transform-=* \
1044 | --program-transform=* | --program-transfor=* \
1045 | --program-transfo=* | --program-transf=* \
1046 | --program-trans=* | --program-tran=* \
1047 | --progr-tra=* | --program-tr=* | --program-t=*)
1048 program_transform_name=$ac_optarg ;;
1049
1050 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1051 ac_prev=pdfdir ;;
1052 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1053 pdfdir=$ac_optarg ;;
1054
1055 -psdir | --psdir | --psdi | --psd | --ps)
1056 ac_prev=psdir ;;
1057 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1058 psdir=$ac_optarg ;;
1059
1060 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061 | -silent | --silent | --silen | --sile | --sil)
1062 silent=yes ;;
1063
1064 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1065 ac_prev=sbindir ;;
1066 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1067 | --sbi=* | --sb=*)
1068 sbindir=$ac_optarg ;;
1069
1070 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1071 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1072 | --sharedst | --shareds | --shared | --share | --shar \
1073 | --sha | --sh)
1074 ac_prev=sharedstatedir ;;
1075 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1076 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1077 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1078 | --sha=* | --sh=*)
1079 sharedstatedir=$ac_optarg ;;
1080
1081 -site | --site | --sit)
1082 ac_prev=site ;;
1083 -site=* | --site=* | --sit=*)
1084 site=$ac_optarg ;;
1085
1086 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1087 ac_prev=srcdir ;;
1088 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1089 srcdir=$ac_optarg ;;
1090
1091 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1092 | --syscon | --sysco | --sysc | --sys | --sy)
1093 ac_prev=sysconfdir ;;
1094 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1095 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1096 sysconfdir=$ac_optarg ;;
1097
1098 -target | --target | --targe | --targ | --tar | --ta | --t)
1099 ac_prev=target_alias ;;
1100 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1101 target_alias=$ac_optarg ;;
1102
1103 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1104 verbose=yes ;;
1105
1106 -version | --version | --versio | --versi | --vers | -V)
1107 ac_init_version=: ;;
1108
1109 -with-* | --with-*)
1110 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1113 as_fn_error $? "invalid package name: $ac_useropt"
1114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118"with_$ac_useropt"
1119"*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval with_$ac_useropt=\$ac_optarg ;;
1124
1125 -without-* | --without-*)
1126 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1127 # Reject names that are not valid shell variable names.
1128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1129 as_fn_error $? "invalid package name: $ac_useropt"
1130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"with_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval with_$ac_useropt=no ;;
1140
1141 --x)
1142 # Obsolete; use --with-x.
1143 with_x=yes ;;
1144
1145 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146 | --x-incl | --x-inc | --x-in | --x-i)
1147 ac_prev=x_includes ;;
1148 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1150 x_includes=$ac_optarg ;;
1151
1152 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154 ac_prev=x_libraries ;;
1155 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1157 x_libraries=$ac_optarg ;;
1158
1159 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1160Try \`$0 --help' for more information"
1161 ;;
1162
1163 *=*)
1164 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1165 # Reject names that are not valid shell variable names.
1166 case $ac_envvar in #(
1167 '' | [0-9]* | *[!_$as_cr_alnum]* )
1168 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1169 esac
1170 eval $ac_envvar=\$ac_optarg
1171 export $ac_envvar ;;
1172
1173 *)
1174 # FIXME: should be removed in autoconf 3.0.
1175 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1176 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1177 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1178 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1179 ;;
1180
1181 esac
1182done
1183
1184if test -n "$ac_prev"; then
1185 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1186 as_fn_error $? "missing argument to $ac_option"
1187fi
1188
1189if test -n "$ac_unrecognized_opts"; then
1190 case $enable_option_checking in
1191 no) ;;
1192 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1193 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1194 esac
1195fi
1196
1197# Check all directory arguments for consistency.
1198for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1199 datadir sysconfdir sharedstatedir localstatedir includedir \
1200 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1201 libdir localedir mandir
1202do
1203 eval ac_val=\$$ac_var
1204 # Remove trailing slashes.
1205 case $ac_val in
1206 */ )
1207 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1208 eval $ac_var=\$ac_val;;
1209 esac
1210 # Be sure to have absolute directory names.
1211 case $ac_val in
1212 [\\/$]* | ?:[\\/]* ) continue;;
1213 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1214 esac
1215 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1216done
1217
1218# There might be people who depend on the old broken behavior: `$host'
1219# used to hold the argument of --host etc.
1220# FIXME: To remove some day.
1221build=$build_alias
1222host=$host_alias
1223target=$target_alias
1224
1225# FIXME: To remove some day.
1226if test "x$host_alias" != x; then
1227 if test "x$build_alias" = x; then
1228 cross_compiling=maybe
1229 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1230 If a cross compiler is detected then cross compile mode will be used" >&2
1231 elif test "x$build_alias" != "x$host_alias"; then
1232 cross_compiling=yes
1233 fi
1234fi
1235
1236ac_tool_prefix=
1237test -n "$host_alias" && ac_tool_prefix=$host_alias-
1238
1239test "$silent" = yes && exec 6>/dev/null
1240
1241
1242ac_pwd=`pwd` && test -n "$ac_pwd" &&
1243ac_ls_di=`ls -di .` &&
1244ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1245 as_fn_error $? "working directory cannot be determined"
1246test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1247 as_fn_error $? "pwd does not report name of working directory"
1248
1249
1250# Find the source files, if location was not specified.
1251if test -z "$srcdir"; then
1252 ac_srcdir_defaulted=yes
1253 # Try the directory containing this script, then the parent directory.
1254 ac_confdir=`$as_dirname -- "$as_myself" ||
1255$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1256 X"$as_myself" : 'X\(//\)[^/]' \| \
1257 X"$as_myself" : 'X\(//\)$' \| \
1258 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1259$as_echo X"$as_myself" |
1260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\/\)[^/].*/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\).*/{
1273 s//\1/
1274 q
1275 }
1276 s/.*/./; q'`
1277 srcdir=$ac_confdir
1278 if test ! -r "$srcdir/$ac_unique_file"; then
1279 srcdir=..
1280 fi
1281else
1282 ac_srcdir_defaulted=no
1283fi
1284if test ! -r "$srcdir/$ac_unique_file"; then
1285 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1286 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1287fi
1288ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1289ac_abs_confdir=`(
1290 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1291 pwd)`
1292# When building in place, set srcdir=.
1293if test "$ac_abs_confdir" = "$ac_pwd"; then
1294 srcdir=.
1295fi
1296# Remove unnecessary trailing slashes from srcdir.
1297# Double slashes in file names in object file debugging info
1298# mess up M-x gdb in Emacs.
1299case $srcdir in
1300*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1301esac
1302for ac_var in $ac_precious_vars; do
1303 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1304 eval ac_env_${ac_var}_value=\$${ac_var}
1305 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1306 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1307done
1308
1309#
1310# Report the --help message.
1311#
1312if test "$ac_init_help" = "long"; then
1313 # Omit some internal or obsolete options to make the list less imposing.
1314 # This message is too long to be a string in the A/UX 3.1 sh.
1315 cat <<_ACEOF
1316\`configure' configures OpenSSH Portable to adapt to many kinds of systems.
1317
1318Usage: $0 [OPTION]... [VAR=VALUE]...
1319
1320To assign environment variables (e.g., CC, CFLAGS...), specify them as
1321VAR=VALUE. See below for descriptions of some of the useful variables.
1322
1323Defaults for the options are specified in brackets.
1324
1325Configuration:
1326 -h, --help display this help and exit
1327 --help=short display options specific to this package
1328 --help=recursive display the short help of all the included packages
1329 -V, --version display version information and exit
1330 -q, --quiet, --silent do not print \`checking ...' messages
1331 --cache-file=FILE cache test results in FILE [disabled]
1332 -C, --config-cache alias for \`--cache-file=config.cache'
1333 -n, --no-create do not create output files
1334 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1335
1336Installation directories:
1337 --prefix=PREFIX install architecture-independent files in PREFIX
1338 [$ac_default_prefix]
1339 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1340 [PREFIX]
1341
1342By default, \`make install' will install all the files in
1343\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1344an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1345for instance \`--prefix=\$HOME'.
1346
1347For better control, use the options below.
1348
1349Fine tuning of the installation directories:
1350 --bindir=DIR user executables [EPREFIX/bin]
1351 --sbindir=DIR system admin executables [EPREFIX/sbin]
1352 --libexecdir=DIR program executables [EPREFIX/libexec]
1353 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1354 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1355 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1356 --libdir=DIR object code libraries [EPREFIX/lib]
1357 --includedir=DIR C header files [PREFIX/include]
1358 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1359 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1360 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1361 --infodir=DIR info documentation [DATAROOTDIR/info]
1362 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1363 --mandir=DIR man documentation [DATAROOTDIR/man]
1364 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh]
1365 --htmldir=DIR html documentation [DOCDIR]
1366 --dvidir=DIR dvi documentation [DOCDIR]
1367 --pdfdir=DIR pdf documentation [DOCDIR]
1368 --psdir=DIR ps documentation [DOCDIR]
1369_ACEOF
1370
1371 cat <<\_ACEOF
1372
1373System types:
1374 --build=BUILD configure for building on BUILD [guessed]
1375 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1376_ACEOF
1377fi
1378
1379if test -n "$ac_init_help"; then
1380 case $ac_init_help in
1381 short | recursive ) echo "Configuration of OpenSSH Portable:";;
1382 esac
1383 cat <<\_ACEOF
1384
1385Optional Features:
1386 --disable-option-checking ignore unrecognized --enable/--with options
1387 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1388 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1389 --disable-largefile omit support for large files
1390 --disable-strip Disable calling strip(1) on install
1391 --disable-etc-default-login Disable using PATH from /etc/default/login no
1392 --disable-lastlog disable use of lastlog even if detected no
1393 --disable-utmp disable use of utmp even if detected no
1394 --disable-utmpx disable use of utmpx even if detected no
1395 --disable-wtmp disable use of wtmp even if detected no
1396 --disable-wtmpx disable use of wtmpx even if detected no
1397 --disable-libutil disable use of libutil (login() etc.) no
1398 --disable-pututline disable use of pututline() etc. (uwtmp) no
1399 --disable-pututxline disable use of pututxline() etc. (uwtmpx) no
1400
1401Optional Packages:
1402 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1403 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1404 --without-stackprotect Don't use compiler's stack protection
1405 --without-rpath Disable auto-added -R linker paths
1406 --with-cflags Specify additional flags to pass to compiler
1407 --with-cppflags Specify additional flags to pass to preprocessor
1408 --with-ldflags Specify additional flags to pass to linker
1409 --with-libs Specify additional libraries to link with
1410 --with-Werror Build main code with -Werror
1411 --with-solaris-contracts Enable Solaris process contracts (experimental)
1412 --with-solaris-projects Enable Solaris projects (experimental)
1413 --with-osfsia Enable Digital Unix SIA
1414 --with-zlib=PATH Use zlib in PATH
1415 --without-zlib-version-check Disable zlib version check
1416 --with-skey[=PATH] Enable S/Key support (optionally in PATH)
1417 --with-tcp-wrappers[=PATH] Enable tcpwrappers support (optionally in PATH)
1418 --with-ldns[=PATH] Use ldns for DNSSEC support (optionally in PATH)
1419 --with-libedit[=PATH] Enable libedit support for sftp
1420 --with-audit=module Enable audit support (modules=debug,bsm,linux)
1421 --with-ssl-dir=PATH Specify path to OpenSSL installation
1422 --without-openssl-header-check Disable OpenSSL version consistency check
1423 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support
1424 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT
1425 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1426 --with-pam Enable PAM support
1427 --with-privsep-user=user Specify non-privileged user for privilege separation
1428 --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter)
1429 --with-selinux Enable SELinux support
1430 --with-kerberos5=PATH Enable Kerberos 5 support
1431 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1432 --with-xauth=PATH Specify path to xauth program
1433 --with-maildir=/path/to/mail Specify your system mail directory
1434 --with-mantype=man|cat|doc Set man page type
1435 --with-md5-passwords Enable use of MD5 passwords
1436 --without-shadow Disable shadow password support
1437 --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY
1438 --with-default-path= Specify default \$PATH environment for server
1439 --with-superuser-path= Specify different path for super-user
1440 --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses
1441 --with-bsd-auth Enable BSD auth support
1442 --with-pid-dir=PATH Specify location of ssh.pid file
1443 --with-lastlog=FILE|DIR specify lastlog location common locations
1444
1445Some influential environment variables:
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1449 nonstandard directory <lib dir>
1450 LIBS libraries to pass to the linker, e.g. -l<library>
1451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1452 you have headers in a nonstandard directory <include dir>
1453 CPP C preprocessor
1454
1455Use these variables to override the choices made by `configure' or to help
1456it to find libraries and programs with nonstandard names/locations.
1457
1458Report bugs to <openssh-unix-dev@mindrot.org>.
1459_ACEOF
1460ac_status=$?
1461fi
1462
1463if test "$ac_init_help" = "recursive"; then
1464 # If there are subdirs, report their specific --help.
1465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1466 test -d "$ac_dir" ||
1467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468 continue
1469 ac_builddir=.
1470
1471case "$ac_dir" in
1472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473*)
1474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1475 # A ".." for each directory in $ac_dir_suffix.
1476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1477 case $ac_top_builddir_sub in
1478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480 esac ;;
1481esac
1482ac_abs_top_builddir=$ac_pwd
1483ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484# for backward compatibility:
1485ac_top_builddir=$ac_top_build_prefix
1486
1487case $srcdir in
1488 .) # We are building in place.
1489 ac_srcdir=.
1490 ac_top_srcdir=$ac_top_builddir_sub
1491 ac_abs_top_srcdir=$ac_pwd ;;
1492 [\\/]* | ?:[\\/]* ) # Absolute name.
1493 ac_srcdir=$srcdir$ac_dir_suffix;
1494 ac_top_srcdir=$srcdir
1495 ac_abs_top_srcdir=$srcdir ;;
1496 *) # Relative name.
1497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498 ac_top_srcdir=$ac_top_build_prefix$srcdir
1499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1500esac
1501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1502
1503 cd "$ac_dir" || { ac_status=$?; continue; }
1504 # Check for guested configure.
1505 if test -f "$ac_srcdir/configure.gnu"; then
1506 echo &&
1507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508 elif test -f "$ac_srcdir/configure"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure" --help=recursive
1511 else
1512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1513 fi || ac_status=$?
1514 cd "$ac_pwd" || { ac_status=$?; break; }
1515 done
1516fi
1517
1518test -n "$ac_init_help" && exit $ac_status
1519if $ac_init_version; then
1520 cat <<\_ACEOF
1521OpenSSH configure Portable
1522generated by GNU Autoconf 2.68
1523
1524Copyright (C) 2010 Free Software Foundation, Inc.
1525This configure script is free software; the Free Software Foundation
1526gives unlimited permission to copy, distribute and modify it.
1527_ACEOF
1528 exit
1529fi
1530
1531## ------------------------ ##
1532## Autoconf initialization. ##
1533## ------------------------ ##
1534
1535# ac_fn_c_try_compile LINENO
1536# --------------------------
1537# Try to compile conftest.$ac_ext, and return whether this succeeded.
1538ac_fn_c_try_compile ()
1539{
1540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541 rm -f conftest.$ac_objext
1542 if { { ac_try="$ac_compile"
1543case "(($ac_try" in
1544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545 *) ac_try_echo=$ac_try;;
1546esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548$as_echo "$ac_try_echo"; } >&5
1549 (eval "$ac_compile") 2>conftest.err
1550 ac_status=$?
1551 if test -s conftest.err; then
1552 grep -v '^ *+' conftest.err >conftest.er1
1553 cat conftest.er1 >&5
1554 mv -f conftest.er1 conftest.err
1555 fi
1556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557 test $ac_status = 0; } && {
1558 test -z "$ac_c_werror_flag" ||
1559 test ! -s conftest.err
1560 } && test -s conftest.$ac_objext; then :
1561 ac_retval=0
1562else
1563 $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5
1565
1566 ac_retval=1
1567fi
1568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1569 as_fn_set_status $ac_retval
1570
1571} # ac_fn_c_try_compile
1572
1573# ac_fn_c_try_run LINENO
1574# ----------------------
1575# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1576# that executables *can* be run.
1577ac_fn_c_try_run ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 if { { ac_try="$ac_link"
1581case "(($ac_try" in
1582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583 *) ac_try_echo=$ac_try;;
1584esac
1585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586$as_echo "$ac_try_echo"; } >&5
1587 (eval "$ac_link") 2>&5
1588 ac_status=$?
1589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1590 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1591 { { case "(($ac_try" in
1592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1593 *) ac_try_echo=$ac_try;;
1594esac
1595eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1596$as_echo "$ac_try_echo"; } >&5
1597 (eval "$ac_try") 2>&5
1598 ac_status=$?
1599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1600 test $ac_status = 0; }; }; then :
1601 ac_retval=0
1602else
1603 $as_echo "$as_me: program exited with status $ac_status" >&5
1604 $as_echo "$as_me: failed program was:" >&5
1605sed 's/^/| /' conftest.$ac_ext >&5
1606
1607 ac_retval=$ac_status
1608fi
1609 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1610 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1611 as_fn_set_status $ac_retval
1612
1613} # ac_fn_c_try_run
1614
1615# ac_fn_c_try_cpp LINENO
1616# ----------------------
1617# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1618ac_fn_c_try_cpp ()
1619{
1620 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1621 if { { ac_try="$ac_cpp conftest.$ac_ext"
1622case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } > conftest.i && {
1637 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 }; then :
1640 ac_retval=0
1641else
1642 $as_echo "$as_me: failed program was:" >&5
1643sed 's/^/| /' conftest.$ac_ext >&5
1644
1645 ac_retval=1
1646fi
1647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1648 as_fn_set_status $ac_retval
1649
1650} # ac_fn_c_try_cpp
1651
1652# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1653# -------------------------------------------------------
1654# Tests whether HEADER exists and can be compiled using the include files in
1655# INCLUDES, setting the cache variable VAR accordingly.
1656ac_fn_c_check_header_compile ()
1657{
1658 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1660$as_echo_n "checking for $2... " >&6; }
1661if eval \${$3+:} false; then :
1662 $as_echo_n "(cached) " >&6
1663else
1664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1665/* end confdefs.h. */
1666$4
1667#include <$2>
1668_ACEOF
1669if ac_fn_c_try_compile "$LINENO"; then :
1670 eval "$3=yes"
1671else
1672 eval "$3=no"
1673fi
1674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1675fi
1676eval ac_res=\$$3
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1678$as_echo "$ac_res" >&6; }
1679 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1680
1681} # ac_fn_c_check_header_compile
1682
1683# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1684# ---------------------------------------------
1685# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1686# accordingly.
1687ac_fn_c_check_decl ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 as_decl_name=`echo $2|sed 's/ *(.*//'`
1691 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1693$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1694if eval \${$3+:} false; then :
1695 $as_echo_n "(cached) " >&6
1696else
1697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698/* end confdefs.h. */
1699$4
1700int
1701main ()
1702{
1703#ifndef $as_decl_name
1704#ifdef __cplusplus
1705 (void) $as_decl_use;
1706#else
1707 (void) $as_decl_name;
1708#endif
1709#endif
1710
1711 ;
1712 return 0;
1713}
1714_ACEOF
1715if ac_fn_c_try_compile "$LINENO"; then :
1716 eval "$3=yes"
1717else
1718 eval "$3=no"
1719fi
1720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1721fi
1722eval ac_res=\$$3
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1724$as_echo "$ac_res" >&6; }
1725 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1726
1727} # ac_fn_c_check_decl
1728
1729# ac_fn_c_try_link LINENO
1730# -----------------------
1731# Try to link conftest.$ac_ext, and return whether this succeeded.
1732ac_fn_c_try_link ()
1733{
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 rm -f conftest.$ac_objext conftest$ac_exeext
1736 if { { ac_try="$ac_link"
1737case "(($ac_try" in
1738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1739 *) ac_try_echo=$ac_try;;
1740esac
1741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1742$as_echo "$ac_try_echo"; } >&5
1743 (eval "$ac_link") 2>conftest.err
1744 ac_status=$?
1745 if test -s conftest.err; then
1746 grep -v '^ *+' conftest.err >conftest.er1
1747 cat conftest.er1 >&5
1748 mv -f conftest.er1 conftest.err
1749 fi
1750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1751 test $ac_status = 0; } && {
1752 test -z "$ac_c_werror_flag" ||
1753 test ! -s conftest.err
1754 } && test -s conftest$ac_exeext && {
1755 test "$cross_compiling" = yes ||
1756 $as_test_x conftest$ac_exeext
1757 }; then :
1758 ac_retval=0
1759else
1760 $as_echo "$as_me: failed program was:" >&5
1761sed 's/^/| /' conftest.$ac_ext >&5
1762
1763 ac_retval=1
1764fi
1765 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1766 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1767 # interfere with the next link command; also delete a directory that is
1768 # left behind by Apple's compiler. We do this before executing the actions.
1769 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1770 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1771 as_fn_set_status $ac_retval
1772
1773} # ac_fn_c_try_link
1774
1775# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1776# -------------------------------------------------------
1777# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1778# the include files in INCLUDES and setting the cache variable VAR
1779# accordingly.
1780ac_fn_c_check_header_mongrel ()
1781{
1782 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783 if eval \${$3+:} false; then :
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1785$as_echo_n "checking for $2... " >&6; }
1786if eval \${$3+:} false; then :
1787 $as_echo_n "(cached) " >&6
1788fi
1789eval ac_res=\$$3
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1791$as_echo "$ac_res" >&6; }
1792else
1793 # Is the header compilable?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1795$as_echo_n "checking $2 usability... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798$4
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_compile "$LINENO"; then :
1802 ac_header_compiler=yes
1803else
1804 ac_header_compiler=no
1805fi
1806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1808$as_echo "$ac_header_compiler" >&6; }
1809
1810# Is the header present?
1811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1812$as_echo_n "checking $2 presence... " >&6; }
1813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1814/* end confdefs.h. */
1815#include <$2>
1816_ACEOF
1817if ac_fn_c_try_cpp "$LINENO"; then :
1818 ac_header_preproc=yes
1819else
1820 ac_header_preproc=no
1821fi
1822rm -f conftest.err conftest.i conftest.$ac_ext
1823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1824$as_echo "$ac_header_preproc" >&6; }
1825
1826# So? What about this header?
1827case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1828 yes:no: )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1830$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1832$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1833 ;;
1834 no:yes:* )
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1836$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1838$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1840$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1842$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1844$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1845( $as_echo "## ------------------------------------------- ##
1846## Report this to openssh-unix-dev@mindrot.org ##
1847## ------------------------------------------- ##"
1848 ) | sed "s/^/$as_me: WARNING: /" >&2
1849 ;;
1850esac
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1852$as_echo_n "checking for $2... " >&6; }
1853if eval \${$3+:} false; then :
1854 $as_echo_n "(cached) " >&6
1855else
1856 eval "$3=\$ac_header_compiler"
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
1861fi
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863
1864} # ac_fn_c_check_header_mongrel
1865
1866# ac_fn_c_check_func LINENO FUNC VAR
1867# ----------------------------------
1868# Tests whether FUNC exists, setting the cache variable VAR accordingly
1869ac_fn_c_check_func ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
1874if eval \${$3+:} false; then :
1875 $as_echo_n "(cached) " >&6
1876else
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1880 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1881#define $2 innocuous_$2
1882
1883/* System header to define __stub macros and hopefully few prototypes,
1884 which can conflict with char $2 (); below.
1885 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1886 <limits.h> exists even on freestanding compilers. */
1887
1888#ifdef __STDC__
1889# include <limits.h>
1890#else
1891# include <assert.h>
1892#endif
1893
1894#undef $2
1895
1896/* Override any GCC internal prototype to avoid an error.
1897 Use char because int might match the return type of a GCC
1898 builtin and then its argument prototype would still apply. */
1899#ifdef __cplusplus
1900extern "C"
1901#endif
1902char $2 ();
1903/* The GNU C library defines this for functions which it implements
1904 to always fail with ENOSYS. Some functions are actually named
1905 something starting with __ and the normal name is an alias. */
1906#if defined __stub_$2 || defined __stub___$2
1907choke me
1908#endif
1909
1910int
1911main ()
1912{
1913return $2 ();
1914 ;
1915 return 0;
1916}
1917_ACEOF
1918if ac_fn_c_try_link "$LINENO"; then :
1919 eval "$3=yes"
1920else
1921 eval "$3=no"
1922fi
1923rm -f core conftest.err conftest.$ac_objext \
1924 conftest$ac_exeext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
1929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930
1931} # ac_fn_c_check_func
1932
1933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
1942if eval \${$3+:} false; then :
1943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1984
1985} # ac_fn_c_check_type
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2166# ----------------------------------------------------
2167# Tries to find if the field MEMBER exists in type AGGR, after including
2168# INCLUDES, setting cache variable VAR accordingly.
2169ac_fn_c_check_member ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2173$as_echo_n "checking for $2.$3... " >&6; }
2174if eval \${$4+:} false; then :
2175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$5
2180int
2181main ()
2182{
2183static $2 ac_aggr;
2184if (ac_aggr.$3)
2185return 0;
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 eval "$4=yes"
2192else
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195$5
2196int
2197main ()
2198{
2199static $2 ac_aggr;
2200if (sizeof ac_aggr.$3)
2201return 0;
2202 ;
2203 return 0;
2204}
2205_ACEOF
2206if ac_fn_c_try_compile "$LINENO"; then :
2207 eval "$4=yes"
2208else
2209 eval "$4=no"
2210fi
2211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212fi
2213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214fi
2215eval ac_res=\$$4
2216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2217$as_echo "$ac_res" >&6; }
2218 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2219
2220} # ac_fn_c_check_member
2221cat >config.log <<_ACEOF
2222This file contains any messages produced by compilers while
2223running configure, to aid debugging if configure makes a mistake.
2224
2225It was created by OpenSSH $as_me Portable, which was
2226generated by GNU Autoconf 2.68. Invocation command line was
2227
2228 $ $0 $@
2229
2230_ACEOF
2231exec 5>>config.log
2232{
2233cat <<_ASUNAME
2234## --------- ##
2235## Platform. ##
2236## --------- ##
2237
2238hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2239uname -m = `(uname -m) 2>/dev/null || echo unknown`
2240uname -r = `(uname -r) 2>/dev/null || echo unknown`
2241uname -s = `(uname -s) 2>/dev/null || echo unknown`
2242uname -v = `(uname -v) 2>/dev/null || echo unknown`
2243
2244/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2245/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2246
2247/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2248/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2249/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2250/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2251/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2252/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2253/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2254
2255_ASUNAME
2256
2257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2258for as_dir in $PATH
2259do
2260 IFS=$as_save_IFS
2261 test -z "$as_dir" && as_dir=.
2262 $as_echo "PATH: $as_dir"
2263 done
2264IFS=$as_save_IFS
2265
2266} >&5
2267
2268cat >&5 <<_ACEOF
2269
2270
2271## ----------- ##
2272## Core tests. ##
2273## ----------- ##
2274
2275_ACEOF
2276
2277
2278# Keep a trace of the command line.
2279# Strip out --no-create and --no-recursion so they do not pile up.
2280# Strip out --silent because we don't want to record it for future runs.
2281# Also quote any args containing shell meta-characters.
2282# Make two passes to allow for proper duplicate-argument suppression.
2283ac_configure_args=
2284ac_configure_args0=
2285ac_configure_args1=
2286ac_must_keep_next=false
2287for ac_pass in 1 2
2288do
2289 for ac_arg
2290 do
2291 case $ac_arg in
2292 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2294 | -silent | --silent | --silen | --sile | --sil)
2295 continue ;;
2296 *\'*)
2297 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2298 esac
2299 case $ac_pass in
2300 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2301 2)
2302 as_fn_append ac_configure_args1 " '$ac_arg'"
2303 if test $ac_must_keep_next = true; then
2304 ac_must_keep_next=false # Got value, back to normal.
2305 else
2306 case $ac_arg in
2307 *=* | --config-cache | -C | -disable-* | --disable-* \
2308 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2309 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2310 | -with-* | --with-* | -without-* | --without-* | --x)
2311 case "$ac_configure_args0 " in
2312 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2313 esac
2314 ;;
2315 -* ) ac_must_keep_next=true ;;
2316 esac
2317 fi
2318 as_fn_append ac_configure_args " '$ac_arg'"
2319 ;;
2320 esac
2321 done
2322done
2323{ ac_configure_args0=; unset ac_configure_args0;}
2324{ ac_configure_args1=; unset ac_configure_args1;}
2325
2326# When interrupted or exit'd, cleanup temporary files, and complete
2327# config.log. We remove comments because anyway the quotes in there
2328# would cause problems or look ugly.
2329# WARNING: Use '\'' to represent an apostrophe within the trap.
2330# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2331trap 'exit_status=$?
2332 # Save into config.log some information that might help in debugging.
2333 {
2334 echo
2335
2336 $as_echo "## ---------------- ##
2337## Cache variables. ##
2338## ---------------- ##"
2339 echo
2340 # The following way of writing the cache mishandles newlines in values,
2341(
2342 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2343 eval ac_val=\$$ac_var
2344 case $ac_val in #(
2345 *${as_nl}*)
2346 case $ac_var in #(
2347 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2348$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2349 esac
2350 case $ac_var in #(
2351 _ | IFS | as_nl) ;; #(
2352 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2353 *) { eval $ac_var=; unset $ac_var;} ;;
2354 esac ;;
2355 esac
2356 done
2357 (set) 2>&1 |
2358 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2359 *${as_nl}ac_space=\ *)
2360 sed -n \
2361 "s/'\''/'\''\\\\'\'''\''/g;
2362 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2363 ;; #(
2364 *)
2365 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2366 ;;
2367 esac |
2368 sort
2369)
2370 echo
2371
2372 $as_echo "## ----------------- ##
2373## Output variables. ##
2374## ----------------- ##"
2375 echo
2376 for ac_var in $ac_subst_vars
2377 do
2378 eval ac_val=\$$ac_var
2379 case $ac_val in
2380 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2381 esac
2382 $as_echo "$ac_var='\''$ac_val'\''"
2383 done | sort
2384 echo
2385
2386 if test -n "$ac_subst_files"; then
2387 $as_echo "## ------------------- ##
2388## File substitutions. ##
2389## ------------------- ##"
2390 echo
2391 for ac_var in $ac_subst_files
2392 do
2393 eval ac_val=\$$ac_var
2394 case $ac_val in
2395 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2396 esac
2397 $as_echo "$ac_var='\''$ac_val'\''"
2398 done | sort
2399 echo
2400 fi
2401
2402 if test -s confdefs.h; then
2403 $as_echo "## ----------- ##
2404## confdefs.h. ##
2405## ----------- ##"
2406 echo
2407 cat confdefs.h
2408 echo
2409 fi
2410 test "$ac_signal" != 0 &&
2411 $as_echo "$as_me: caught signal $ac_signal"
2412 $as_echo "$as_me: exit $exit_status"
2413 } >&5
2414 rm -f core *.core core.conftest.* &&
2415 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2416 exit $exit_status
2417' 0
2418for ac_signal in 1 2 13 15; do
2419 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2420done
2421ac_signal=0
2422
2423# confdefs.h avoids OS command line length limits that DEFS can exceed.
2424rm -f -r conftest* confdefs.h
2425
2426$as_echo "/* confdefs.h */" > confdefs.h
2427
2428# Predefined preprocessor variables.
2429
2430cat >>confdefs.h <<_ACEOF
2431#define PACKAGE_NAME "$PACKAGE_NAME"
2432_ACEOF
2433
2434cat >>confdefs.h <<_ACEOF
2435#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2436_ACEOF
2437
2438cat >>confdefs.h <<_ACEOF
2439#define PACKAGE_VERSION "$PACKAGE_VERSION"
2440_ACEOF
2441
2442cat >>confdefs.h <<_ACEOF
2443#define PACKAGE_STRING "$PACKAGE_STRING"
2444_ACEOF
2445
2446cat >>confdefs.h <<_ACEOF
2447#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2448_ACEOF
2449
2450cat >>confdefs.h <<_ACEOF
2451#define PACKAGE_URL "$PACKAGE_URL"
2452_ACEOF
2453
2454
2455# Let the site file select an alternate cache file if it wants to.
2456# Prefer an explicitly selected file to automatically selected ones.
2457ac_site_file1=NONE
2458ac_site_file2=NONE
2459if test -n "$CONFIG_SITE"; then
2460 # We do not want a PATH search for config.site.
2461 case $CONFIG_SITE in #((
2462 -*) ac_site_file1=./$CONFIG_SITE;;
2463 */*) ac_site_file1=$CONFIG_SITE;;
2464 *) ac_site_file1=./$CONFIG_SITE;;
2465 esac
2466elif test "x$prefix" != xNONE; then
2467 ac_site_file1=$prefix/share/config.site
2468 ac_site_file2=$prefix/etc/config.site
2469else
2470 ac_site_file1=$ac_default_prefix/share/config.site
2471 ac_site_file2=$ac_default_prefix/etc/config.site
2472fi
2473for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2474do
2475 test "x$ac_site_file" = xNONE && continue
2476 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2478$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2479 sed 's/^/| /' "$ac_site_file" >&5
2480 . "$ac_site_file" \
2481 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2483as_fn_error $? "failed to load site script $ac_site_file
2484See \`config.log' for more details" "$LINENO" 5; }
2485 fi
2486done
2487
2488if test -r "$cache_file"; then
2489 # Some versions of bash will fail to source /dev/null (special files
2490 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2491 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2492 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2493$as_echo "$as_me: loading cache $cache_file" >&6;}
2494 case $cache_file in
2495 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2496 *) . "./$cache_file";;
2497 esac
2498 fi
2499else
2500 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2501$as_echo "$as_me: creating cache $cache_file" >&6;}
2502 >$cache_file
2503fi
2504
2505# Check that the precious variables saved in the cache have kept the same
2506# value.
2507ac_cache_corrupted=false
2508for ac_var in $ac_precious_vars; do
2509 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2510 eval ac_new_set=\$ac_env_${ac_var}_set
2511 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2512 eval ac_new_val=\$ac_env_${ac_var}_value
2513 case $ac_old_set,$ac_new_set in
2514 set,)
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2516$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2517 ac_cache_corrupted=: ;;
2518 ,set)
2519 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2520$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2521 ac_cache_corrupted=: ;;
2522 ,);;
2523 *)
2524 if test "x$ac_old_val" != "x$ac_new_val"; then
2525 # differences in whitespace do not lead to failure.
2526 ac_old_val_w=`echo x $ac_old_val`
2527 ac_new_val_w=`echo x $ac_new_val`
2528 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2529 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2530$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2531 ac_cache_corrupted=:
2532 else
2533 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2534$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2535 eval $ac_var=\$ac_old_val
2536 fi
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2538$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2539 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2540$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2541 fi;;
2542 esac
2543 # Pass precious variables to config.status.
2544 if test "$ac_new_set" = set; then
2545 case $ac_new_val in
2546 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2547 *) ac_arg=$ac_var=$ac_new_val ;;
2548 esac
2549 case " $ac_configure_args " in
2550 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2551 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2552 esac
2553 fi
2554done
2555if $ac_cache_corrupted; then
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2557$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2559$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2560 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2561fi
2562## -------------------- ##
2563## Main body of script. ##
2564## -------------------- ##
2565
2566ac_ext=c
2567ac_cpp='$CPP $CPPFLAGS'
2568ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2569ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2570ac_compiler_gnu=$ac_cv_c_compiler_gnu
2571
2572
2573
2574
2575ac_ext=c
2576ac_cpp='$CPP $CPPFLAGS'
2577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580
2581
2582ac_config_headers="$ac_config_headers config.h"
2583
2584ac_ext=c
2585ac_cpp='$CPP $CPPFLAGS'
2586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2588ac_compiler_gnu=$ac_cv_c_compiler_gnu
2589if test -n "$ac_tool_prefix"; then
2590 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2591set dummy ${ac_tool_prefix}gcc; ac_word=$2
2592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2593$as_echo_n "checking for $ac_word... " >&6; }
2594if ${ac_cv_prog_CC+:} false; then :
2595 $as_echo_n "(cached) " >&6
2596else
2597 if test -n "$CC"; then
2598 ac_cv_prog_CC="$CC" # Let the user override the test.
2599else
2600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2601for as_dir in $PATH
2602do
2603 IFS=$as_save_IFS
2604 test -z "$as_dir" && as_dir=.
2605 for ac_exec_ext in '' $ac_executable_extensions; do
2606 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2607 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2609 break 2
2610 fi
2611done
2612 done
2613IFS=$as_save_IFS
2614
2615fi
2616fi
2617CC=$ac_cv_prog_CC
2618if test -n "$CC"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2620$as_echo "$CC" >&6; }
2621else
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2623$as_echo "no" >&6; }
2624fi
2625
2626
2627fi
2628if test -z "$ac_cv_prog_CC"; then
2629 ac_ct_CC=$CC
2630 # Extract the first word of "gcc", so it can be a program name with args.
2631set dummy gcc; ac_word=$2
2632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2633$as_echo_n "checking for $ac_word... " >&6; }
2634if ${ac_cv_prog_ac_ct_CC+:} false; then :
2635 $as_echo_n "(cached) " >&6
2636else
2637 if test -n "$ac_ct_CC"; then
2638 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2639else
2640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641for as_dir in $PATH
2642do
2643 IFS=$as_save_IFS
2644 test -z "$as_dir" && as_dir=.
2645 for ac_exec_ext in '' $ac_executable_extensions; do
2646 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2647 ac_cv_prog_ac_ct_CC="gcc"
2648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2649 break 2
2650 fi
2651done
2652 done
2653IFS=$as_save_IFS
2654
2655fi
2656fi
2657ac_ct_CC=$ac_cv_prog_ac_ct_CC
2658if test -n "$ac_ct_CC"; then
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2660$as_echo "$ac_ct_CC" >&6; }
2661else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2663$as_echo "no" >&6; }
2664fi
2665
2666 if test "x$ac_ct_CC" = x; then
2667 CC=""
2668 else
2669 case $cross_compiling:$ac_tool_warned in
2670yes:)
2671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2673ac_tool_warned=yes ;;
2674esac
2675 CC=$ac_ct_CC
2676 fi
2677else
2678 CC="$ac_cv_prog_CC"
2679fi
2680
2681if test -z "$CC"; then
2682 if test -n "$ac_tool_prefix"; then
2683 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2684set dummy ${ac_tool_prefix}cc; ac_word=$2
2685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2686$as_echo_n "checking for $ac_word... " >&6; }
2687if ${ac_cv_prog_CC+:} false; then :
2688 $as_echo_n "(cached) " >&6
2689else
2690 if test -n "$CC"; then
2691 ac_cv_prog_CC="$CC" # Let the user override the test.
2692else
2693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2694for as_dir in $PATH
2695do
2696 IFS=$as_save_IFS
2697 test -z "$as_dir" && as_dir=.
2698 for ac_exec_ext in '' $ac_executable_extensions; do
2699 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2700 ac_cv_prog_CC="${ac_tool_prefix}cc"
2701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2702 break 2
2703 fi
2704done
2705 done
2706IFS=$as_save_IFS
2707
2708fi
2709fi
2710CC=$ac_cv_prog_CC
2711if test -n "$CC"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2713$as_echo "$CC" >&6; }
2714else
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2716$as_echo "no" >&6; }
2717fi
2718
2719
2720 fi
2721fi
2722if test -z "$CC"; then
2723 # Extract the first word of "cc", so it can be a program name with args.
2724set dummy cc; ac_word=$2
2725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2726$as_echo_n "checking for $ac_word... " >&6; }
2727if ${ac_cv_prog_CC+:} false; then :
2728 $as_echo_n "(cached) " >&6
2729else
2730 if test -n "$CC"; then
2731 ac_cv_prog_CC="$CC" # Let the user override the test.
2732else
2733 ac_prog_rejected=no
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
2740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2741 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2742 ac_prog_rejected=yes
2743 continue
2744 fi
2745 ac_cv_prog_CC="cc"
2746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2747 break 2
2748 fi
2749done
2750 done
2751IFS=$as_save_IFS
2752
2753if test $ac_prog_rejected = yes; then
2754 # We found a bogon in the path, so make sure we never use it.
2755 set dummy $ac_cv_prog_CC
2756 shift
2757 if test $# != 0; then
2758 # We chose a different compiler from the bogus one.
2759 # However, it has the same basename, so the bogon will be chosen
2760 # first if we set CC to just the basename; use the full file name.
2761 shift
2762 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2763 fi
2764fi
2765fi
2766fi
2767CC=$ac_cv_prog_CC
2768if test -n "$CC"; then
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2770$as_echo "$CC" >&6; }
2771else
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2773$as_echo "no" >&6; }
2774fi
2775
2776
2777fi
2778if test -z "$CC"; then
2779 if test -n "$ac_tool_prefix"; then
2780 for ac_prog in cl.exe
2781 do
2782 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2783set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2785$as_echo_n "checking for $ac_word... " >&6; }
2786if ${ac_cv_prog_CC+:} false; then :
2787 $as_echo_n "(cached) " >&6
2788else
2789 if test -n "$CC"; then
2790 ac_cv_prog_CC="$CC" # Let the user override the test.
2791else
2792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2793for as_dir in $PATH
2794do
2795 IFS=$as_save_IFS
2796 test -z "$as_dir" && as_dir=.
2797 for ac_exec_ext in '' $ac_executable_extensions; do
2798 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2799 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2801 break 2
2802 fi
2803done
2804 done
2805IFS=$as_save_IFS
2806
2807fi
2808fi
2809CC=$ac_cv_prog_CC
2810if test -n "$CC"; then
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2812$as_echo "$CC" >&6; }
2813else
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2815$as_echo "no" >&6; }
2816fi
2817
2818
2819 test -n "$CC" && break
2820 done
2821fi
2822if test -z "$CC"; then
2823 ac_ct_CC=$CC
2824 for ac_prog in cl.exe
2825do
2826 # Extract the first word of "$ac_prog", so it can be a program name with args.
2827set dummy $ac_prog; ac_word=$2
2828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2829$as_echo_n "checking for $ac_word... " >&6; }
2830if ${ac_cv_prog_ac_ct_CC+:} false; then :
2831 $as_echo_n "(cached) " >&6
2832else
2833 if test -n "$ac_ct_CC"; then
2834 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2835else
2836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2837for as_dir in $PATH
2838do
2839 IFS=$as_save_IFS
2840 test -z "$as_dir" && as_dir=.
2841 for ac_exec_ext in '' $ac_executable_extensions; do
2842 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2843 ac_cv_prog_ac_ct_CC="$ac_prog"
2844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2845 break 2
2846 fi
2847done
2848 done
2849IFS=$as_save_IFS
2850
2851fi
2852fi
2853ac_ct_CC=$ac_cv_prog_ac_ct_CC
2854if test -n "$ac_ct_CC"; then
2855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2856$as_echo "$ac_ct_CC" >&6; }
2857else
2858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2859$as_echo "no" >&6; }
2860fi
2861
2862
2863 test -n "$ac_ct_CC" && break
2864done
2865
2866 if test "x$ac_ct_CC" = x; then
2867 CC=""
2868 else
2869 case $cross_compiling:$ac_tool_warned in
2870yes:)
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2872$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2873ac_tool_warned=yes ;;
2874esac
2875 CC=$ac_ct_CC
2876 fi
2877fi
2878
2879fi
2880
2881
2882test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2884as_fn_error $? "no acceptable C compiler found in \$PATH
2885See \`config.log' for more details" "$LINENO" 5; }
2886
2887# Provide some information about the compiler.
2888$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2889set X $ac_compile
2890ac_compiler=$2
2891for ac_option in --version -v -V -qversion; do
2892 { { ac_try="$ac_compiler $ac_option >&5"
2893case "(($ac_try" in
2894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895 *) ac_try_echo=$ac_try;;
2896esac
2897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2898$as_echo "$ac_try_echo"; } >&5
2899 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2900 ac_status=$?
2901 if test -s conftest.err; then
2902 sed '10a\
2903... rest of stderr output deleted ...
2904 10q' conftest.err >conftest.er1
2905 cat conftest.er1 >&5
2906 fi
2907 rm -f conftest.er1 conftest.err
2908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2909 test $ac_status = 0; }
2910done
2911
2912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2913/* end confdefs.h. */
2914
2915int
2916main ()
2917{
2918
2919 ;
2920 return 0;
2921}
2922_ACEOF
2923ac_clean_files_save=$ac_clean_files
2924ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2925# Try to create an executable without -o first, disregard a.out.
2926# It will help us diagnose broken compilers, and finding out an intuition
2927# of exeext.
2928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2929$as_echo_n "checking whether the C compiler works... " >&6; }
2930ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2931
2932# The possible output files:
2933ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2934
2935ac_rmfiles=
2936for ac_file in $ac_files
2937do
2938 case $ac_file in
2939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2940 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2941 esac
2942done
2943rm -f $ac_rmfiles
2944
2945if { { ac_try="$ac_link_default"
2946case "(($ac_try" in
2947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948 *) ac_try_echo=$ac_try;;
2949esac
2950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2951$as_echo "$ac_try_echo"; } >&5
2952 (eval "$ac_link_default") 2>&5
2953 ac_status=$?
2954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2955 test $ac_status = 0; }; then :
2956 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2957# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2958# in a Makefile. We should not override ac_cv_exeext if it was cached,
2959# so that the user can short-circuit this test for compilers unknown to
2960# Autoconf.
2961for ac_file in $ac_files ''
2962do
2963 test -f "$ac_file" || continue
2964 case $ac_file in
2965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2966 ;;
2967 [ab].out )
2968 # We found the default executable, but exeext='' is most
2969 # certainly right.
2970 break;;
2971 *.* )
2972 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2973 then :; else
2974 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2975 fi
2976 # We set ac_cv_exeext here because the later test for it is not
2977 # safe: cross compilers may not add the suffix if given an `-o'
2978 # argument, so we may need to know it at that point already.
2979 # Even if this section looks crufty: it has the advantage of
2980 # actually working.
2981 break;;
2982 * )
2983 break;;
2984 esac
2985done
2986test "$ac_cv_exeext" = no && ac_cv_exeext=
2987
2988else
2989 ac_file=''
2990fi
2991if test -z "$ac_file"; then :
2992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2993$as_echo "no" >&6; }
2994$as_echo "$as_me: failed program was:" >&5
2995sed 's/^/| /' conftest.$ac_ext >&5
2996
2997{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2999as_fn_error 77 "C compiler cannot create executables
3000See \`config.log' for more details" "$LINENO" 5; }
3001else
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3003$as_echo "yes" >&6; }
3004fi
3005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3006$as_echo_n "checking for C compiler default output file name... " >&6; }
3007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3008$as_echo "$ac_file" >&6; }
3009ac_exeext=$ac_cv_exeext
3010
3011rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3012ac_clean_files=$ac_clean_files_save
3013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3014$as_echo_n "checking for suffix of executables... " >&6; }
3015if { { ac_try="$ac_link"
3016case "(($ac_try" in
3017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3018 *) ac_try_echo=$ac_try;;
3019esac
3020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3021$as_echo "$ac_try_echo"; } >&5
3022 (eval "$ac_link") 2>&5
3023 ac_status=$?
3024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3025 test $ac_status = 0; }; then :
3026 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3027# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3028# work properly (i.e., refer to `conftest.exe'), while it won't with
3029# `rm'.
3030for ac_file in conftest.exe conftest conftest.*; do
3031 test -f "$ac_file" || continue
3032 case $ac_file in
3033 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3034 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3035 break;;
3036 * ) break;;
3037 esac
3038done
3039else
3040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3042as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3043See \`config.log' for more details" "$LINENO" 5; }
3044fi
3045rm -f conftest conftest$ac_cv_exeext
3046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3047$as_echo "$ac_cv_exeext" >&6; }
3048
3049rm -f conftest.$ac_ext
3050EXEEXT=$ac_cv_exeext
3051ac_exeext=$EXEEXT
3052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3053/* end confdefs.h. */
3054#include <stdio.h>
3055int
3056main ()
3057{
3058FILE *f = fopen ("conftest.out", "w");
3059 return ferror (f) || fclose (f) != 0;
3060
3061 ;
3062 return 0;
3063}
3064_ACEOF
3065ac_clean_files="$ac_clean_files conftest.out"
3066# Check that the compiler produces executables we can run. If not, either
3067# the compiler is broken, or we cross compile.
3068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3069$as_echo_n "checking whether we are cross compiling... " >&6; }
3070if test "$cross_compiling" != yes; then
3071 { { ac_try="$ac_link"
3072case "(($ac_try" in
3073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3074 *) ac_try_echo=$ac_try;;
3075esac
3076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3077$as_echo "$ac_try_echo"; } >&5
3078 (eval "$ac_link") 2>&5
3079 ac_status=$?
3080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3081 test $ac_status = 0; }
3082 if { ac_try='./conftest$ac_cv_exeext'
3083 { { case "(($ac_try" in
3084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3085 *) ac_try_echo=$ac_try;;
3086esac
3087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3088$as_echo "$ac_try_echo"; } >&5
3089 (eval "$ac_try") 2>&5
3090 ac_status=$?
3091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3092 test $ac_status = 0; }; }; then
3093 cross_compiling=no
3094 else
3095 if test "$cross_compiling" = maybe; then
3096 cross_compiling=yes
3097 else
3098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3100as_fn_error $? "cannot run C compiled programs.
3101If you meant to cross compile, use \`--host'.
3102See \`config.log' for more details" "$LINENO" 5; }
3103 fi
3104 fi
3105fi
3106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3107$as_echo "$cross_compiling" >&6; }
3108
3109rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3110ac_clean_files=$ac_clean_files_save
3111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3112$as_echo_n "checking for suffix of object files... " >&6; }
3113if ${ac_cv_objext+:} false; then :
3114 $as_echo_n "(cached) " >&6
3115else
3116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3117/* end confdefs.h. */
3118
3119int
3120main ()
3121{
3122
3123 ;
3124 return 0;
3125}
3126_ACEOF
3127rm -f conftest.o conftest.obj
3128if { { ac_try="$ac_compile"
3129case "(($ac_try" in
3130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3131 *) ac_try_echo=$ac_try;;
3132esac
3133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3134$as_echo "$ac_try_echo"; } >&5
3135 (eval "$ac_compile") 2>&5
3136 ac_status=$?
3137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3138 test $ac_status = 0; }; then :
3139 for ac_file in conftest.o conftest.obj conftest.*; do
3140 test -f "$ac_file" || continue;
3141 case $ac_file in
3142 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3143 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3144 break;;
3145 esac
3146done
3147else
3148 $as_echo "$as_me: failed program was:" >&5
3149sed 's/^/| /' conftest.$ac_ext >&5
3150
3151{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3153as_fn_error $? "cannot compute suffix of object files: cannot compile
3154See \`config.log' for more details" "$LINENO" 5; }
3155fi
3156rm -f conftest.$ac_cv_objext conftest.$ac_ext
3157fi
3158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3159$as_echo "$ac_cv_objext" >&6; }
3160OBJEXT=$ac_cv_objext
3161ac_objext=$OBJEXT
3162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3163$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3164if ${ac_cv_c_compiler_gnu+:} false; then :
3165 $as_echo_n "(cached) " >&6
3166else
3167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3168/* end confdefs.h. */
3169
3170int
3171main ()
3172{
3173#ifndef __GNUC__
3174 choke me
3175#endif
3176
3177 ;
3178 return 0;
3179}
3180_ACEOF
3181if ac_fn_c_try_compile "$LINENO"; then :
3182 ac_compiler_gnu=yes
3183else
3184 ac_compiler_gnu=no
3185fi
3186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3187ac_cv_c_compiler_gnu=$ac_compiler_gnu
3188
3189fi
3190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3191$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3192if test $ac_compiler_gnu = yes; then
3193 GCC=yes
3194else
3195 GCC=
3196fi
3197ac_test_CFLAGS=${CFLAGS+set}
3198ac_save_CFLAGS=$CFLAGS
3199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3200$as_echo_n "checking whether $CC accepts -g... " >&6; }
3201if ${ac_cv_prog_cc_g+:} false; then :
3202 $as_echo_n "(cached) " >&6
3203else
3204 ac_save_c_werror_flag=$ac_c_werror_flag
3205 ac_c_werror_flag=yes
3206 ac_cv_prog_cc_g=no
3207 CFLAGS="-g"
3208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3209/* end confdefs.h. */
3210
3211int
3212main ()
3213{
3214
3215 ;
3216 return 0;
3217}
3218_ACEOF
3219if ac_fn_c_try_compile "$LINENO"; then :
3220 ac_cv_prog_cc_g=yes
3221else
3222 CFLAGS=""
3223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3224/* end confdefs.h. */
3225
3226int
3227main ()
3228{
3229
3230 ;
3231 return 0;
3232}
3233_ACEOF
3234if ac_fn_c_try_compile "$LINENO"; then :
3235
3236else
3237 ac_c_werror_flag=$ac_save_c_werror_flag
3238 CFLAGS="-g"
3239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3240/* end confdefs.h. */
3241
3242int
3243main ()
3244{
3245
3246 ;
3247 return 0;
3248}
3249_ACEOF
3250if ac_fn_c_try_compile "$LINENO"; then :
3251 ac_cv_prog_cc_g=yes
3252fi
3253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3254fi
3255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3256fi
3257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3258 ac_c_werror_flag=$ac_save_c_werror_flag
3259fi
3260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3261$as_echo "$ac_cv_prog_cc_g" >&6; }
3262if test "$ac_test_CFLAGS" = set; then
3263 CFLAGS=$ac_save_CFLAGS
3264elif test $ac_cv_prog_cc_g = yes; then
3265 if test "$GCC" = yes; then
3266 CFLAGS="-g -O2"
3267 else
3268 CFLAGS="-g"
3269 fi
3270else
3271 if test "$GCC" = yes; then
3272 CFLAGS="-O2"
3273 else
3274 CFLAGS=
3275 fi
3276fi
3277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3278$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3279if ${ac_cv_prog_cc_c89+:} false; then :
3280 $as_echo_n "(cached) " >&6
3281else
3282 ac_cv_prog_cc_c89=no
3283ac_save_CC=$CC
3284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3285/* end confdefs.h. */
3286#include <stdarg.h>
3287#include <stdio.h>
3288#include <sys/types.h>
3289#include <sys/stat.h>
3290/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3291struct buf { int x; };
3292FILE * (*rcsopen) (struct buf *, struct stat *, int);
3293static char *e (p, i)
3294 char **p;
3295 int i;
3296{
3297 return p[i];
3298}
3299static char *f (char * (*g) (char **, int), char **p, ...)
3300{
3301 char *s;
3302 va_list v;
3303 va_start (v,p);
3304 s = g (p, va_arg (v,int));
3305 va_end (v);
3306 return s;
3307}
3308
3309/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3310 function prototypes and stuff, but not '\xHH' hex character constants.
3311 These don't provoke an error unfortunately, instead are silently treated
3312 as 'x'. The following induces an error, until -std is added to get
3313 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3314 array size at least. It's necessary to write '\x00'==0 to get something
3315 that's true only with -std. */
3316int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3317
3318/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3319 inside strings and character constants. */
3320#define FOO(x) 'x'
3321int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3322
3323int test (int i, double x);
3324struct s1 {int (*f) (int a);};
3325struct s2 {int (*f) (double a);};
3326int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3327int argc;
3328char **argv;
3329int
3330main ()
3331{
3332return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3333 ;
3334 return 0;
3335}
3336_ACEOF
3337for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3338 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3339do
3340 CC="$ac_save_CC $ac_arg"
3341 if ac_fn_c_try_compile "$LINENO"; then :
3342 ac_cv_prog_cc_c89=$ac_arg
3343fi
3344rm -f core conftest.err conftest.$ac_objext
3345 test "x$ac_cv_prog_cc_c89" != "xno" && break
3346done
3347rm -f conftest.$ac_ext
3348CC=$ac_save_CC
3349
3350fi
3351# AC_CACHE_VAL
3352case "x$ac_cv_prog_cc_c89" in
3353 x)
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3355$as_echo "none needed" >&6; } ;;
3356 xno)
3357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3358$as_echo "unsupported" >&6; } ;;
3359 *)
3360 CC="$CC $ac_cv_prog_cc_c89"
3361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3362$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3363esac
3364if test "x$ac_cv_prog_cc_c89" != xno; then :
3365
3366fi
3367
3368ac_ext=c
3369ac_cpp='$CPP $CPPFLAGS'
3370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3372ac_compiler_gnu=$ac_cv_c_compiler_gnu
3373
3374ac_aux_dir=
3375for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3376 if test -f "$ac_dir/install-sh"; then
3377 ac_aux_dir=$ac_dir
3378 ac_install_sh="$ac_aux_dir/install-sh -c"
3379 break
3380 elif test -f "$ac_dir/install.sh"; then
3381 ac_aux_dir=$ac_dir
3382 ac_install_sh="$ac_aux_dir/install.sh -c"
3383 break
3384 elif test -f "$ac_dir/shtool"; then
3385 ac_aux_dir=$ac_dir
3386 ac_install_sh="$ac_aux_dir/shtool install -c"
3387 break
3388 fi
3389done
3390if test -z "$ac_aux_dir"; then
3391 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3392fi
3393
3394# These three variables are undocumented and unsupported,
3395# and are intended to be withdrawn in a future Autoconf release.
3396# They can cause serious problems if a builder's source tree is in a directory
3397# whose full name contains unusual characters.
3398ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3399ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3400ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3401
3402
3403# Make sure we can run config.sub.
3404$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3405 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3406
3407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3408$as_echo_n "checking build system type... " >&6; }
3409if ${ac_cv_build+:} false; then :
3410 $as_echo_n "(cached) " >&6
3411else
3412 ac_build_alias=$build_alias
3413test "x$ac_build_alias" = x &&
3414 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3415test "x$ac_build_alias" = x &&
3416 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3417ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3418 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3419
3420fi
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3422$as_echo "$ac_cv_build" >&6; }
3423case $ac_cv_build in
3424*-*-*) ;;
3425*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3426esac
3427build=$ac_cv_build
3428ac_save_IFS=$IFS; IFS='-'
3429set x $ac_cv_build
3430shift
3431build_cpu=$1
3432build_vendor=$2
3433shift; shift
3434# Remember, the first character of IFS is used to create $*,
3435# except with old shells:
3436build_os=$*
3437IFS=$ac_save_IFS
3438case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3439
3440
3441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3442$as_echo_n "checking host system type... " >&6; }
3443if ${ac_cv_host+:} false; then :
3444 $as_echo_n "(cached) " >&6
3445else
3446 if test "x$host_alias" = x; then
3447 ac_cv_host=$ac_cv_build
3448else
3449 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3450 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3451fi
3452
3453fi
3454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3455$as_echo "$ac_cv_host" >&6; }
3456case $ac_cv_host in
3457*-*-*) ;;
3458*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3459esac
3460host=$ac_cv_host
3461ac_save_IFS=$IFS; IFS='-'
3462set x $ac_cv_host
3463shift
3464host_cpu=$1
3465host_vendor=$2
3466shift; shift
3467# Remember, the first character of IFS is used to create $*,
3468# except with old shells:
3469host_os=$*
3470IFS=$ac_save_IFS
3471case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3472
3473
3474
3475ac_ext=c
3476ac_cpp='$CPP $CPPFLAGS'
3477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3479ac_compiler_gnu=$ac_cv_c_compiler_gnu
3480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3481$as_echo_n "checking how to run the C preprocessor... " >&6; }
3482# On Suns, sometimes $CPP names a directory.
3483if test -n "$CPP" && test -d "$CPP"; then
3484 CPP=
3485fi
3486if test -z "$CPP"; then
3487 if ${ac_cv_prog_CPP+:} false; then :
3488 $as_echo_n "(cached) " >&6
3489else
3490 # Double quotes because CPP needs to be expanded
3491 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3492 do
3493 ac_preproc_ok=false
3494for ac_c_preproc_warn_flag in '' yes
3495do
3496 # Use a header file that comes with gcc, so configuring glibc
3497 # with a fresh cross-compiler works.
3498 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3499 # <limits.h> exists even on freestanding compilers.
3500 # On the NeXT, cc -E runs the code through the compiler's parser,
3501 # not just through cpp. "Syntax error" is here to catch this case.
3502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3503/* end confdefs.h. */
3504#ifdef __STDC__
3505# include <limits.h>
3506#else
3507# include <assert.h>
3508#endif
3509 Syntax error
3510_ACEOF
3511if ac_fn_c_try_cpp "$LINENO"; then :
3512
3513else
3514 # Broken: fails on valid input.
3515continue
3516fi
3517rm -f conftest.err conftest.i conftest.$ac_ext
3518
3519 # OK, works on sane cases. Now check whether nonexistent headers
3520 # can be detected and how.
3521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3522/* end confdefs.h. */
3523#include <ac_nonexistent.h>
3524_ACEOF
3525if ac_fn_c_try_cpp "$LINENO"; then :
3526 # Broken: success on invalid input.
3527continue
3528else
3529 # Passes both tests.
3530ac_preproc_ok=:
3531break
3532fi
3533rm -f conftest.err conftest.i conftest.$ac_ext
3534
3535done
3536# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3537rm -f conftest.i conftest.err conftest.$ac_ext
3538if $ac_preproc_ok; then :
3539 break
3540fi
3541
3542 done
3543 ac_cv_prog_CPP=$CPP
3544
3545fi
3546 CPP=$ac_cv_prog_CPP
3547else
3548 ac_cv_prog_CPP=$CPP
3549fi
3550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3551$as_echo "$CPP" >&6; }
3552ac_preproc_ok=false
3553for ac_c_preproc_warn_flag in '' yes
3554do
3555 # Use a header file that comes with gcc, so configuring glibc
3556 # with a fresh cross-compiler works.
3557 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3558 # <limits.h> exists even on freestanding compilers.
3559 # On the NeXT, cc -E runs the code through the compiler's parser,
3560 # not just through cpp. "Syntax error" is here to catch this case.
3561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3562/* end confdefs.h. */
3563#ifdef __STDC__
3564# include <limits.h>
3565#else
3566# include <assert.h>
3567#endif
3568 Syntax error
3569_ACEOF
3570if ac_fn_c_try_cpp "$LINENO"; then :
3571
3572else
3573 # Broken: fails on valid input.
3574continue
3575fi
3576rm -f conftest.err conftest.i conftest.$ac_ext
3577
3578 # OK, works on sane cases. Now check whether nonexistent headers
3579 # can be detected and how.
3580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3581/* end confdefs.h. */
3582#include <ac_nonexistent.h>
3583_ACEOF
3584if ac_fn_c_try_cpp "$LINENO"; then :
3585 # Broken: success on invalid input.
3586continue
3587else
3588 # Passes both tests.
3589ac_preproc_ok=:
3590break
3591fi
3592rm -f conftest.err conftest.i conftest.$ac_ext
3593
3594done
3595# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3596rm -f conftest.i conftest.err conftest.$ac_ext
3597if $ac_preproc_ok; then :
3598
3599else
3600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3602as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3603See \`config.log' for more details" "$LINENO" 5; }
3604fi
3605
3606ac_ext=c
3607ac_cpp='$CPP $CPPFLAGS'
3608ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3609ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3610ac_compiler_gnu=$ac_cv_c_compiler_gnu
3611
3612
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3614$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3615if ${ac_cv_path_GREP+:} false; then :
3616 $as_echo_n "(cached) " >&6
3617else
3618 if test -z "$GREP"; then
3619 ac_path_GREP_found=false
3620 # Loop through the user's path and test for each of PROGNAME-LIST
3621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3623do
3624 IFS=$as_save_IFS
3625 test -z "$as_dir" && as_dir=.
3626 for ac_prog in grep ggrep; do
3627 for ac_exec_ext in '' $ac_executable_extensions; do
3628 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3629 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3630# Check for GNU ac_path_GREP and select it if it is found.
3631 # Check for GNU $ac_path_GREP
3632case `"$ac_path_GREP" --version 2>&1` in
3633*GNU*)
3634 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3635*)
3636 ac_count=0
3637 $as_echo_n 0123456789 >"conftest.in"
3638 while :
3639 do
3640 cat "conftest.in" "conftest.in" >"conftest.tmp"
3641 mv "conftest.tmp" "conftest.in"
3642 cp "conftest.in" "conftest.nl"
3643 $as_echo 'GREP' >> "conftest.nl"
3644 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3645 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3646 as_fn_arith $ac_count + 1 && ac_count=$as_val
3647 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3648 # Best one so far, save it but keep looking for a better one
3649 ac_cv_path_GREP="$ac_path_GREP"
3650 ac_path_GREP_max=$ac_count
3651 fi
3652 # 10*(2^10) chars as input seems more than enough
3653 test $ac_count -gt 10 && break
3654 done
3655 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3656esac
3657
3658 $ac_path_GREP_found && break 3
3659 done
3660 done
3661 done
3662IFS=$as_save_IFS
3663 if test -z "$ac_cv_path_GREP"; then
3664 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3665 fi
3666else
3667 ac_cv_path_GREP=$GREP
3668fi
3669
3670fi
3671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3672$as_echo "$ac_cv_path_GREP" >&6; }
3673 GREP="$ac_cv_path_GREP"
3674
3675
3676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3677$as_echo_n "checking for egrep... " >&6; }
3678if ${ac_cv_path_EGREP+:} false; then :
3679 $as_echo_n "(cached) " >&6
3680else
3681 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3682 then ac_cv_path_EGREP="$GREP -E"
3683 else
3684 if test -z "$EGREP"; then
3685 ac_path_EGREP_found=false
3686 # Loop through the user's path and test for each of PROGNAME-LIST
3687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
3692 for ac_prog in egrep; do
3693 for ac_exec_ext in '' $ac_executable_extensions; do
3694 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3695 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3696# Check for GNU ac_path_EGREP and select it if it is found.
3697 # Check for GNU $ac_path_EGREP
3698case `"$ac_path_EGREP" --version 2>&1` in
3699*GNU*)
3700 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3701*)
3702 ac_count=0
3703 $as_echo_n 0123456789 >"conftest.in"
3704 while :
3705 do
3706 cat "conftest.in" "conftest.in" >"conftest.tmp"
3707 mv "conftest.tmp" "conftest.in"
3708 cp "conftest.in" "conftest.nl"
3709 $as_echo 'EGREP' >> "conftest.nl"
3710 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3711 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3712 as_fn_arith $ac_count + 1 && ac_count=$as_val
3713 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3714 # Best one so far, save it but keep looking for a better one
3715 ac_cv_path_EGREP="$ac_path_EGREP"
3716 ac_path_EGREP_max=$ac_count
3717 fi
3718 # 10*(2^10) chars as input seems more than enough
3719 test $ac_count -gt 10 && break
3720 done
3721 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3722esac
3723
3724 $ac_path_EGREP_found && break 3
3725 done
3726 done
3727 done
3728IFS=$as_save_IFS
3729 if test -z "$ac_cv_path_EGREP"; then
3730 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3731 fi
3732else
3733 ac_cv_path_EGREP=$EGREP
3734fi
3735
3736 fi
3737fi
3738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3739$as_echo "$ac_cv_path_EGREP" >&6; }
3740 EGREP="$ac_cv_path_EGREP"
3741
3742
3743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3744$as_echo_n "checking for ANSI C header files... " >&6; }
3745if ${ac_cv_header_stdc+:} false; then :
3746 $as_echo_n "(cached) " >&6
3747else
3748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749/* end confdefs.h. */
3750#include <stdlib.h>
3751#include <stdarg.h>
3752#include <string.h>
3753#include <float.h>
3754
3755int
3756main ()
3757{
3758
3759 ;
3760 return 0;
3761}
3762_ACEOF
3763if ac_fn_c_try_compile "$LINENO"; then :
3764 ac_cv_header_stdc=yes
3765else
3766 ac_cv_header_stdc=no
3767fi
3768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3769
3770if test $ac_cv_header_stdc = yes; then
3771 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3773/* end confdefs.h. */
3774#include <string.h>
3775
3776_ACEOF
3777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3778 $EGREP "memchr" >/dev/null 2>&1; then :
3779
3780else
3781 ac_cv_header_stdc=no
3782fi
3783rm -f conftest*
3784
3785fi
3786
3787if test $ac_cv_header_stdc = yes; then
3788 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3790/* end confdefs.h. */
3791#include <stdlib.h>
3792
3793_ACEOF
3794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3795 $EGREP "free" >/dev/null 2>&1; then :
3796
3797else
3798 ac_cv_header_stdc=no
3799fi
3800rm -f conftest*
3801
3802fi
3803
3804if test $ac_cv_header_stdc = yes; then
3805 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3806 if test "$cross_compiling" = yes; then :
3807 :
3808else
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3810/* end confdefs.h. */
3811#include <ctype.h>
3812#include <stdlib.h>
3813#if ((' ' & 0x0FF) == 0x020)
3814# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3815# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3816#else
3817# define ISLOWER(c) \
3818 (('a' <= (c) && (c) <= 'i') \
3819 || ('j' <= (c) && (c) <= 'r') \
3820 || ('s' <= (c) && (c) <= 'z'))
3821# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3822#endif
3823
3824#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3825int
3826main ()
3827{
3828 int i;
3829 for (i = 0; i < 256; i++)
3830 if (XOR (islower (i), ISLOWER (i))
3831 || toupper (i) != TOUPPER (i))
3832 return 2;
3833 return 0;
3834}
3835_ACEOF
3836if ac_fn_c_try_run "$LINENO"; then :
3837
3838else
3839 ac_cv_header_stdc=no
3840fi
3841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3842 conftest.$ac_objext conftest.beam conftest.$ac_ext
3843fi
3844
3845fi
3846fi
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3848$as_echo "$ac_cv_header_stdc" >&6; }
3849if test $ac_cv_header_stdc = yes; then
3850
3851$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3852
3853fi
3854
3855# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3856for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3857 inttypes.h stdint.h unistd.h
3858do :
3859 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3860ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3861"
3862if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3863 cat >>confdefs.h <<_ACEOF
3864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3865_ACEOF
3866
3867fi
3868
3869done
3870
3871
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3873$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3874if ${ac_cv_c_bigendian+:} false; then :
3875 $as_echo_n "(cached) " >&6
3876else
3877 ac_cv_c_bigendian=unknown
3878 # See if we're dealing with a universal compiler.
3879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3880/* end confdefs.h. */
3881#ifndef __APPLE_CC__
3882 not a universal capable compiler
3883 #endif
3884 typedef int dummy;
3885
3886_ACEOF
3887if ac_fn_c_try_compile "$LINENO"; then :
3888
3889 # Check for potential -arch flags. It is not universal unless
3890 # there are at least two -arch flags with different values.
3891 ac_arch=
3892 ac_prev=
3893 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3894 if test -n "$ac_prev"; then
3895 case $ac_word in
3896 i?86 | x86_64 | ppc | ppc64)
3897 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3898 ac_arch=$ac_word
3899 else
3900 ac_cv_c_bigendian=universal
3901 break
3902 fi
3903 ;;
3904 esac
3905 ac_prev=
3906 elif test "x$ac_word" = "x-arch"; then
3907 ac_prev=arch
3908 fi
3909 done
3910fi
3911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912 if test $ac_cv_c_bigendian = unknown; then
3913 # See if sys/param.h defines the BYTE_ORDER macro.
3914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3915/* end confdefs.h. */
3916#include <sys/types.h>
3917 #include <sys/param.h>
3918
3919int
3920main ()
3921{
3922#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3923 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3924 && LITTLE_ENDIAN)
3925 bogus endian macros
3926 #endif
3927
3928 ;
3929 return 0;
3930}
3931_ACEOF
3932if ac_fn_c_try_compile "$LINENO"; then :
3933 # It does; now see whether it defined to BIG_ENDIAN or not.
3934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3935/* end confdefs.h. */
3936#include <sys/types.h>
3937 #include <sys/param.h>
3938
3939int
3940main ()
3941{
3942#if BYTE_ORDER != BIG_ENDIAN
3943 not big endian
3944 #endif
3945
3946 ;
3947 return 0;
3948}
3949_ACEOF
3950if ac_fn_c_try_compile "$LINENO"; then :
3951 ac_cv_c_bigendian=yes
3952else
3953 ac_cv_c_bigendian=no
3954fi
3955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3956fi
3957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3958 fi
3959 if test $ac_cv_c_bigendian = unknown; then
3960 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3962/* end confdefs.h. */
3963#include <limits.h>
3964
3965int
3966main ()
3967{
3968#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
3969 bogus endian macros
3970 #endif
3971
3972 ;
3973 return 0;
3974}
3975_ACEOF
3976if ac_fn_c_try_compile "$LINENO"; then :
3977 # It does; now see whether it defined to _BIG_ENDIAN or not.
3978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3979/* end confdefs.h. */
3980#include <limits.h>
3981
3982int
3983main ()
3984{
3985#ifndef _BIG_ENDIAN
3986 not big endian
3987 #endif
3988
3989 ;
3990 return 0;
3991}
3992_ACEOF
3993if ac_fn_c_try_compile "$LINENO"; then :
3994 ac_cv_c_bigendian=yes
3995else
3996 ac_cv_c_bigendian=no
3997fi
3998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3999fi
4000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4001 fi
4002 if test $ac_cv_c_bigendian = unknown; then
4003 # Compile a test program.
4004 if test "$cross_compiling" = yes; then :
4005 # Try to guess by grepping values from an object file.
4006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4007/* end confdefs.h. */
4008short int ascii_mm[] =
4009 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4010 short int ascii_ii[] =
4011 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4012 int use_ascii (int i) {
4013 return ascii_mm[i] + ascii_ii[i];
4014 }
4015 short int ebcdic_ii[] =
4016 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4017 short int ebcdic_mm[] =
4018 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4019 int use_ebcdic (int i) {
4020 return ebcdic_mm[i] + ebcdic_ii[i];
4021 }
4022 extern int foo;
4023
4024int
4025main ()
4026{
4027return use_ascii (foo) == use_ebcdic (foo);
4028 ;
4029 return 0;
4030}
4031_ACEOF
4032if ac_fn_c_try_compile "$LINENO"; then :
4033 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4034 ac_cv_c_bigendian=yes
4035 fi
4036 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4037 if test "$ac_cv_c_bigendian" = unknown; then
4038 ac_cv_c_bigendian=no
4039 else
4040 # finding both strings is unlikely to happen, but who knows?
4041 ac_cv_c_bigendian=unknown
4042 fi
4043 fi
4044fi
4045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4046else
4047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4048/* end confdefs.h. */
4049$ac_includes_default
4050int
4051main ()
4052{
4053
4054 /* Are we little or big endian? From Harbison&Steele. */
4055 union
4056 {
4057 long int l;
4058 char c[sizeof (long int)];
4059 } u;
4060 u.l = 1;
4061 return u.c[sizeof (long int) - 1] == 1;
4062
4063 ;
4064 return 0;
4065}
4066_ACEOF
4067if ac_fn_c_try_run "$LINENO"; then :
4068 ac_cv_c_bigendian=no
4069else
4070 ac_cv_c_bigendian=yes
4071fi
4072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4073 conftest.$ac_objext conftest.beam conftest.$ac_ext
4074fi
4075
4076 fi
4077fi
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4079$as_echo "$ac_cv_c_bigendian" >&6; }
4080 case $ac_cv_c_bigendian in #(
4081 yes)
4082 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4083;; #(
4084 no)
4085 ;; #(
4086 universal)
4087
4088$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4089
4090 ;; #(
4091 *)
4092 as_fn_error $? "unknown endianness
4093 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4094 esac
4095
4096
4097# Checks for programs.
4098for ac_prog in gawk mawk nawk awk
4099do
4100 # Extract the first word of "$ac_prog", so it can be a program name with args.
4101set dummy $ac_prog; ac_word=$2
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4103$as_echo_n "checking for $ac_word... " >&6; }
4104if ${ac_cv_prog_AWK+:} false; then :
4105 $as_echo_n "(cached) " >&6
4106else
4107 if test -n "$AWK"; then
4108 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4109else
4110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111for as_dir in $PATH
4112do
4113 IFS=$as_save_IFS
4114 test -z "$as_dir" && as_dir=.
4115 for ac_exec_ext in '' $ac_executable_extensions; do
4116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4117 ac_cv_prog_AWK="$ac_prog"
4118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4119 break 2
4120 fi
4121done
4122 done
4123IFS=$as_save_IFS
4124
4125fi
4126fi
4127AWK=$ac_cv_prog_AWK
4128if test -n "$AWK"; then
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4130$as_echo "$AWK" >&6; }
4131else
4132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133$as_echo "no" >&6; }
4134fi
4135
4136
4137 test -n "$AWK" && break
4138done
4139
4140ac_ext=c
4141ac_cpp='$CPP $CPPFLAGS'
4142ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4143ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4144ac_compiler_gnu=$ac_cv_c_compiler_gnu
4145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4146$as_echo_n "checking how to run the C preprocessor... " >&6; }
4147# On Suns, sometimes $CPP names a directory.
4148if test -n "$CPP" && test -d "$CPP"; then
4149 CPP=
4150fi
4151if test -z "$CPP"; then
4152 if ${ac_cv_prog_CPP+:} false; then :
4153 $as_echo_n "(cached) " >&6
4154else
4155 # Double quotes because CPP needs to be expanded
4156 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4157 do
4158 ac_preproc_ok=false
4159for ac_c_preproc_warn_flag in '' yes
4160do
4161 # Use a header file that comes with gcc, so configuring glibc
4162 # with a fresh cross-compiler works.
4163 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4164 # <limits.h> exists even on freestanding compilers.
4165 # On the NeXT, cc -E runs the code through the compiler's parser,
4166 # not just through cpp. "Syntax error" is here to catch this case.
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168/* end confdefs.h. */
4169#ifdef __STDC__
4170# include <limits.h>
4171#else
4172# include <assert.h>
4173#endif
4174 Syntax error
4175_ACEOF
4176if ac_fn_c_try_cpp "$LINENO"; then :
4177
4178else
4179 # Broken: fails on valid input.
4180continue
4181fi
4182rm -f conftest.err conftest.i conftest.$ac_ext
4183
4184 # OK, works on sane cases. Now check whether nonexistent headers
4185 # can be detected and how.
4186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4187/* end confdefs.h. */
4188#include <ac_nonexistent.h>
4189_ACEOF
4190if ac_fn_c_try_cpp "$LINENO"; then :
4191 # Broken: success on invalid input.
4192continue
4193else
4194 # Passes both tests.
4195ac_preproc_ok=:
4196break
4197fi
4198rm -f conftest.err conftest.i conftest.$ac_ext
4199
4200done
4201# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4202rm -f conftest.i conftest.err conftest.$ac_ext
4203if $ac_preproc_ok; then :
4204 break
4205fi
4206
4207 done
4208 ac_cv_prog_CPP=$CPP
4209
4210fi
4211 CPP=$ac_cv_prog_CPP
4212else
4213 ac_cv_prog_CPP=$CPP
4214fi
4215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4216$as_echo "$CPP" >&6; }
4217ac_preproc_ok=false
4218for ac_c_preproc_warn_flag in '' yes
4219do
4220 # Use a header file that comes with gcc, so configuring glibc
4221 # with a fresh cross-compiler works.
4222 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4223 # <limits.h> exists even on freestanding compilers.
4224 # On the NeXT, cc -E runs the code through the compiler's parser,
4225 # not just through cpp. "Syntax error" is here to catch this case.
4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h. */
4228#ifdef __STDC__
4229# include <limits.h>
4230#else
4231# include <assert.h>
4232#endif
4233 Syntax error
4234_ACEOF
4235if ac_fn_c_try_cpp "$LINENO"; then :
4236
4237else
4238 # Broken: fails on valid input.
4239continue
4240fi
4241rm -f conftest.err conftest.i conftest.$ac_ext
4242
4243 # OK, works on sane cases. Now check whether nonexistent headers
4244 # can be detected and how.
4245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4246/* end confdefs.h. */
4247#include <ac_nonexistent.h>
4248_ACEOF
4249if ac_fn_c_try_cpp "$LINENO"; then :
4250 # Broken: success on invalid input.
4251continue
4252else
4253 # Passes both tests.
4254ac_preproc_ok=:
4255break
4256fi
4257rm -f conftest.err conftest.i conftest.$ac_ext
4258
4259done
4260# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4261rm -f conftest.i conftest.err conftest.$ac_ext
4262if $ac_preproc_ok; then :
4263
4264else
4265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4267as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4268See \`config.log' for more details" "$LINENO" 5; }
4269fi
4270
4271ac_ext=c
4272ac_cpp='$CPP $CPPFLAGS'
4273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4275ac_compiler_gnu=$ac_cv_c_compiler_gnu
4276
4277if test -n "$ac_tool_prefix"; then
4278 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4279set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4281$as_echo_n "checking for $ac_word... " >&6; }
4282if ${ac_cv_prog_RANLIB+:} false; then :
4283 $as_echo_n "(cached) " >&6
4284else
4285 if test -n "$RANLIB"; then
4286 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4287else
4288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4289for as_dir in $PATH
4290do
4291 IFS=$as_save_IFS
4292 test -z "$as_dir" && as_dir=.
4293 for ac_exec_ext in '' $ac_executable_extensions; do
4294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4295 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4297 break 2
4298 fi
4299done
4300 done
4301IFS=$as_save_IFS
4302
4303fi
4304fi
4305RANLIB=$ac_cv_prog_RANLIB
4306if test -n "$RANLIB"; then
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4308$as_echo "$RANLIB" >&6; }
4309else
4310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4311$as_echo "no" >&6; }
4312fi
4313
4314
4315fi
4316if test -z "$ac_cv_prog_RANLIB"; then
4317 ac_ct_RANLIB=$RANLIB
4318 # Extract the first word of "ranlib", so it can be a program name with args.
4319set dummy ranlib; ac_word=$2
4320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4321$as_echo_n "checking for $ac_word... " >&6; }
4322if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4323 $as_echo_n "(cached) " >&6
4324else
4325 if test -n "$ac_ct_RANLIB"; then
4326 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4327else
4328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4329for as_dir in $PATH
4330do
4331 IFS=$as_save_IFS
4332 test -z "$as_dir" && as_dir=.
4333 for ac_exec_ext in '' $ac_executable_extensions; do
4334 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4335 ac_cv_prog_ac_ct_RANLIB="ranlib"
4336 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4337 break 2
4338 fi
4339done
4340 done
4341IFS=$as_save_IFS
4342
4343fi
4344fi
4345ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4346if test -n "$ac_ct_RANLIB"; then
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4348$as_echo "$ac_ct_RANLIB" >&6; }
4349else
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4351$as_echo "no" >&6; }
4352fi
4353
4354 if test "x$ac_ct_RANLIB" = x; then
4355 RANLIB=":"
4356 else
4357 case $cross_compiling:$ac_tool_warned in
4358yes:)
4359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4361ac_tool_warned=yes ;;
4362esac
4363 RANLIB=$ac_ct_RANLIB
4364 fi
4365else
4366 RANLIB="$ac_cv_prog_RANLIB"
4367fi
4368
4369# Find a good install program. We prefer a C program (faster),
4370# so one script is as good as another. But avoid the broken or
4371# incompatible versions:
4372# SysV /etc/install, /usr/sbin/install
4373# SunOS /usr/etc/install
4374# IRIX /sbin/install
4375# AIX /bin/install
4376# AmigaOS /C/install, which installs bootblocks on floppy discs
4377# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4378# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4379# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4380# OS/2's system install, which has a completely different semantic
4381# ./install, which can be erroneously created by make from ./install.sh.
4382# Reject install programs that cannot install multiple files.
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4384$as_echo_n "checking for a BSD-compatible install... " >&6; }
4385if test -z "$INSTALL"; then
4386if ${ac_cv_path_install+:} false; then :
4387 $as_echo_n "(cached) " >&6
4388else
4389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390for as_dir in $PATH
4391do
4392 IFS=$as_save_IFS
4393 test -z "$as_dir" && as_dir=.
4394 # Account for people who put trailing slashes in PATH elements.
4395case $as_dir/ in #((
4396 ./ | .// | /[cC]/* | \
4397 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4398 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4399 /usr/ucb/* ) ;;
4400 *)
4401 # OSF1 and SCO ODT 3.0 have their own names for install.
4402 # Don't use installbsd from OSF since it installs stuff as root
4403 # by default.
4404 for ac_prog in ginstall scoinst install; do
4405 for ac_exec_ext in '' $ac_executable_extensions; do
4406 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4407 if test $ac_prog = install &&
4408 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4409 # AIX install. It has an incompatible calling convention.
4410 :
4411 elif test $ac_prog = install &&
4412 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4413 # program-specific install script used by HP pwplus--don't use.
4414 :
4415 else
4416 rm -rf conftest.one conftest.two conftest.dir
4417 echo one > conftest.one
4418 echo two > conftest.two
4419 mkdir conftest.dir
4420 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4421 test -s conftest.one && test -s conftest.two &&
4422 test -s conftest.dir/conftest.one &&
4423 test -s conftest.dir/conftest.two
4424 then
4425 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4426 break 3
4427 fi
4428 fi
4429 fi
4430 done
4431 done
4432 ;;
4433esac
4434
4435 done
4436IFS=$as_save_IFS
4437
4438rm -rf conftest.one conftest.two conftest.dir
4439
4440fi
4441 if test "${ac_cv_path_install+set}" = set; then
4442 INSTALL=$ac_cv_path_install
4443 else
4444 # As a last resort, use the slow shell script. Don't cache a
4445 # value for INSTALL within a source directory, because that will
4446 # break other packages using the cache if that directory is
4447 # removed, or if the value is a relative name.
4448 INSTALL=$ac_install_sh
4449 fi
4450fi
4451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4452$as_echo "$INSTALL" >&6; }
4453
4454# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4455# It thinks the first close brace ends the variable substitution.
4456test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4457
4458test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4459
4460test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4461
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4463$as_echo_n "checking for egrep... " >&6; }
4464if ${ac_cv_path_EGREP+:} false; then :
4465 $as_echo_n "(cached) " >&6
4466else
4467 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4468 then ac_cv_path_EGREP="$GREP -E"
4469 else
4470 if test -z "$EGREP"; then
4471 ac_path_EGREP_found=false
4472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
4478 for ac_prog in egrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4481 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4482# Check for GNU ac_path_EGREP and select it if it is found.
4483 # Check for GNU $ac_path_EGREP
4484case `"$ac_path_EGREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4487*)
4488 ac_count=0
4489 $as_echo_n 0123456789 >"conftest.in"
4490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
4495 $as_echo 'EGREP' >> "conftest.nl"
4496 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4498 as_fn_arith $ac_count + 1 && ac_count=$as_val
4499 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_EGREP="$ac_path_EGREP"
4502 ac_path_EGREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
4509
4510 $ac_path_EGREP_found && break 3
4511 done
4512 done
4513 done
4514IFS=$as_save_IFS
4515 if test -z "$ac_cv_path_EGREP"; then
4516 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4517 fi
4518else
4519 ac_cv_path_EGREP=$EGREP
4520fi
4521
4522 fi
4523fi
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4525$as_echo "$ac_cv_path_EGREP" >&6; }
4526 EGREP="$ac_cv_path_EGREP"
4527
4528
4529# Extract the first word of "ar", so it can be a program name with args.
4530set dummy ar; ac_word=$2
4531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4532$as_echo_n "checking for $ac_word... " >&6; }
4533if ${ac_cv_path_AR+:} false; then :
4534 $as_echo_n "(cached) " >&6
4535else
4536 case $AR in
4537 [\\/]* | ?:[\\/]*)
4538 ac_cv_path_AR="$AR" # Let the user override the test with a path.
4539 ;;
4540 *)
4541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4542for as_dir in $PATH
4543do
4544 IFS=$as_save_IFS
4545 test -z "$as_dir" && as_dir=.
4546 for ac_exec_ext in '' $ac_executable_extensions; do
4547 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4548 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
4549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4550 break 2
4551 fi
4552done
4553 done
4554IFS=$as_save_IFS
4555
4556 ;;
4557esac
4558fi
4559AR=$ac_cv_path_AR
4560if test -n "$AR"; then
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4562$as_echo "$AR" >&6; }
4563else
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565$as_echo "no" >&6; }
4566fi
4567
4568
4569# Extract the first word of "cat", so it can be a program name with args.
4570set dummy cat; ac_word=$2
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4572$as_echo_n "checking for $ac_word... " >&6; }
4573if ${ac_cv_path_CAT+:} false; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 case $CAT in
4577 [\\/]* | ?:[\\/]*)
4578 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4579 ;;
4580 *)
4581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4582for as_dir in $PATH
4583do
4584 IFS=$as_save_IFS
4585 test -z "$as_dir" && as_dir=.
4586 for ac_exec_ext in '' $ac_executable_extensions; do
4587 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4588 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4590 break 2
4591 fi
4592done
4593 done
4594IFS=$as_save_IFS
4595
4596 ;;
4597esac
4598fi
4599CAT=$ac_cv_path_CAT
4600if test -n "$CAT"; then
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4602$as_echo "$CAT" >&6; }
4603else
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4605$as_echo "no" >&6; }
4606fi
4607
4608
4609# Extract the first word of "kill", so it can be a program name with args.
4610set dummy kill; ac_word=$2
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612$as_echo_n "checking for $ac_word... " >&6; }
4613if ${ac_cv_path_KILL+:} false; then :
4614 $as_echo_n "(cached) " >&6
4615else
4616 case $KILL in
4617 [\\/]* | ?:[\\/]*)
4618 ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
4619 ;;
4620 *)
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622for as_dir in $PATH
4623do
4624 IFS=$as_save_IFS
4625 test -z "$as_dir" && as_dir=.
4626 for ac_exec_ext in '' $ac_executable_extensions; do
4627 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4628 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630 break 2
4631 fi
4632done
4633 done
4634IFS=$as_save_IFS
4635
4636 ;;
4637esac
4638fi
4639KILL=$ac_cv_path_KILL
4640if test -n "$KILL"; then
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4642$as_echo "$KILL" >&6; }
4643else
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4645$as_echo "no" >&6; }
4646fi
4647
4648
4649for ac_prog in perl5 perl
4650do
4651 # Extract the first word of "$ac_prog", so it can be a program name with args.
4652set dummy $ac_prog; ac_word=$2
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if ${ac_cv_path_PERL+:} false; then :
4656 $as_echo_n "(cached) " >&6
4657else
4658 case $PERL in
4659 [\\/]* | ?:[\\/]*)
4660 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4661 ;;
4662 *)
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in $PATH
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
4669 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4670 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4673 fi
4674done
4675 done
4676IFS=$as_save_IFS
4677
4678 ;;
4679esac
4680fi
4681PERL=$ac_cv_path_PERL
4682if test -n "$PERL"; then
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
4684$as_echo "$PERL" >&6; }
4685else
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687$as_echo "no" >&6; }
4688fi
4689
4690
4691 test -n "$PERL" && break
4692done
4693
4694# Extract the first word of "sed", so it can be a program name with args.
4695set dummy sed; ac_word=$2
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697$as_echo_n "checking for $ac_word... " >&6; }
4698if ${ac_cv_path_SED+:} false; then :
4699 $as_echo_n "(cached) " >&6
4700else
4701 case $SED in
4702 [\\/]* | ?:[\\/]*)
4703 ac_cv_path_SED="$SED" # Let the user override the test with a path.
4704 ;;
4705 *)
4706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707for as_dir in $PATH
4708do
4709 IFS=$as_save_IFS
4710 test -z "$as_dir" && as_dir=.
4711 for ac_exec_ext in '' $ac_executable_extensions; do
4712 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4713 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715 break 2
4716 fi
4717done
4718 done
4719IFS=$as_save_IFS
4720
4721 ;;
4722esac
4723fi
4724SED=$ac_cv_path_SED
4725if test -n "$SED"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4727$as_echo "$SED" >&6; }
4728else
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730$as_echo "no" >&6; }
4731fi
4732
4733
4734
4735# Extract the first word of "ent", so it can be a program name with args.
4736set dummy ent; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_path_ENT+:} false; then :
4740 $as_echo_n "(cached) " >&6
4741else
4742 case $ENT in
4743 [\\/]* | ?:[\\/]*)
4744 ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
4745 ;;
4746 *)
4747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750 IFS=$as_save_IFS
4751 test -z "$as_dir" && as_dir=.
4752 for ac_exec_ext in '' $ac_executable_extensions; do
4753 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4754 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756 break 2
4757 fi
4758done
4759 done
4760IFS=$as_save_IFS
4761
4762 ;;
4763esac
4764fi
4765ENT=$ac_cv_path_ENT
4766if test -n "$ENT"; then
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4768$as_echo "$ENT" >&6; }
4769else
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771$as_echo "no" >&6; }
4772fi
4773
4774
4775
4776# Extract the first word of "bash", so it can be a program name with args.
4777set dummy bash; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
4780if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4781 $as_echo_n "(cached) " >&6
4782else
4783 case $TEST_MINUS_S_SH in
4784 [\\/]* | ?:[\\/]*)
4785 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4786 ;;
4787 *)
4788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in $PATH
4790do
4791 IFS=$as_save_IFS
4792 test -z "$as_dir" && as_dir=.
4793 for ac_exec_ext in '' $ac_executable_extensions; do
4794 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4795 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797 break 2
4798 fi
4799done
4800 done
4801IFS=$as_save_IFS
4802
4803 ;;
4804esac
4805fi
4806TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4807if test -n "$TEST_MINUS_S_SH"; then
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4809$as_echo "$TEST_MINUS_S_SH" >&6; }
4810else
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
4813fi
4814
4815
4816# Extract the first word of "ksh", so it can be a program name with args.
4817set dummy ksh; ac_word=$2
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819$as_echo_n "checking for $ac_word... " >&6; }
4820if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4821 $as_echo_n "(cached) " >&6
4822else
4823 case $TEST_MINUS_S_SH in
4824 [\\/]* | ?:[\\/]*)
4825 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4826 ;;
4827 *)
4828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829for as_dir in $PATH
4830do
4831 IFS=$as_save_IFS
4832 test -z "$as_dir" && as_dir=.
4833 for ac_exec_ext in '' $ac_executable_extensions; do
4834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4835 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837 break 2
4838 fi
4839done
4840 done
4841IFS=$as_save_IFS
4842
4843 ;;
4844esac
4845fi
4846TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4847if test -n "$TEST_MINUS_S_SH"; then
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4849$as_echo "$TEST_MINUS_S_SH" >&6; }
4850else
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852$as_echo "no" >&6; }
4853fi
4854
4855
4856# Extract the first word of "sh", so it can be a program name with args.
4857set dummy sh; ac_word=$2
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4861 $as_echo_n "(cached) " >&6
4862else
4863 case $TEST_MINUS_S_SH in
4864 [\\/]* | ?:[\\/]*)
4865 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4866 ;;
4867 *)
4868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in $PATH
4870do
4871 IFS=$as_save_IFS
4872 test -z "$as_dir" && as_dir=.
4873 for ac_exec_ext in '' $ac_executable_extensions; do
4874 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4875 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877 break 2
4878 fi
4879done
4880 done
4881IFS=$as_save_IFS
4882
4883 ;;
4884esac
4885fi
4886TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4887if test -n "$TEST_MINUS_S_SH"; then
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4889$as_echo "$TEST_MINUS_S_SH" >&6; }
4890else
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
4895
4896# Extract the first word of "sh", so it can be a program name with args.
4897set dummy sh; ac_word=$2
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899$as_echo_n "checking for $ac_word... " >&6; }
4900if ${ac_cv_path_SH+:} false; then :
4901 $as_echo_n "(cached) " >&6
4902else
4903 case $SH in
4904 [\\/]* | ?:[\\/]*)
4905 ac_cv_path_SH="$SH" # Let the user override the test with a path.
4906 ;;
4907 *)
4908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in $PATH
4910do
4911 IFS=$as_save_IFS
4912 test -z "$as_dir" && as_dir=.
4913 for ac_exec_ext in '' $ac_executable_extensions; do
4914 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4915 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917 break 2
4918 fi
4919done
4920 done
4921IFS=$as_save_IFS
4922
4923 ;;
4924esac
4925fi
4926SH=$ac_cv_path_SH
4927if test -n "$SH"; then
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
4929$as_echo "$SH" >&6; }
4930else
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932$as_echo "no" >&6; }
4933fi
4934
4935
4936# Extract the first word of "groff", so it can be a program name with args.
4937set dummy groff; ac_word=$2
4938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4939$as_echo_n "checking for $ac_word... " >&6; }
4940if ${ac_cv_path_GROFF+:} false; then :
4941 $as_echo_n "(cached) " >&6
4942else
4943 case $GROFF in
4944 [\\/]* | ?:[\\/]*)
4945 ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
4946 ;;
4947 *)
4948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4949for as_dir in $PATH
4950do
4951 IFS=$as_save_IFS
4952 test -z "$as_dir" && as_dir=.
4953 for ac_exec_ext in '' $ac_executable_extensions; do
4954 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4955 ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
4956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4957 break 2
4958 fi
4959done
4960 done
4961IFS=$as_save_IFS
4962
4963 ;;
4964esac
4965fi
4966GROFF=$ac_cv_path_GROFF
4967if test -n "$GROFF"; then
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
4969$as_echo "$GROFF" >&6; }
4970else
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4972$as_echo "no" >&6; }
4973fi
4974
4975
4976# Extract the first word of "nroff", so it can be a program name with args.
4977set dummy nroff; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_NROFF+:} false; then :
4981 $as_echo_n "(cached) " >&6
4982else
4983 case $NROFF in
4984 [\\/]* | ?:[\\/]*)
4985 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
4986 ;;
4987 *)
4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH
4990do
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4995 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
4996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997 break 2
4998 fi
4999done
5000 done
5001IFS=$as_save_IFS
5002
5003 ;;
5004esac
5005fi
5006NROFF=$ac_cv_path_NROFF
5007if test -n "$NROFF"; then
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
5009$as_echo "$NROFF" >&6; }
5010else
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016# Extract the first word of "mandoc", so it can be a program name with args.
5017set dummy mandoc; ac_word=$2
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019$as_echo_n "checking for $ac_word... " >&6; }
5020if ${ac_cv_path_MANDOC+:} false; then :
5021 $as_echo_n "(cached) " >&6
5022else
5023 case $MANDOC in
5024 [\\/]* | ?:[\\/]*)
5025 ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
5026 ;;
5027 *)
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 for ac_exec_ext in '' $ac_executable_extensions; do
5034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5035 ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
5036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 break 2
5038 fi
5039done
5040 done
5041IFS=$as_save_IFS
5042
5043 ;;
5044esac
5045fi
5046MANDOC=$ac_cv_path_MANDOC
5047if test -n "$MANDOC"; then
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
5049$as_echo "$MANDOC" >&6; }
5050else
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
5053fi
5054
5055
5056TEST_SHELL=sh
5057
5058
5059if test "x$MANDOC" != "x" ; then
5060 MANFMT="$MANDOC"
5061elif test "x$NROFF" != "x" ; then
5062 MANFMT="$NROFF -mandoc"
5063elif test "x$GROFF" != "x" ; then
5064 MANFMT="$GROFF -mandoc -Tascii"
5065else
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatted found" >&5
5067$as_echo "$as_me: WARNING: no manpage formatted found" >&2;}
5068 MANFMT="false"
5069fi
5070
5071
5072# Extract the first word of "groupadd", so it can be a program name with args.
5073set dummy groupadd; ac_word=$2
5074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5075$as_echo_n "checking for $ac_word... " >&6; }
5076if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
5077 $as_echo_n "(cached) " >&6
5078else
5079 case $PATH_GROUPADD_PROG in
5080 [\\/]* | ?:[\\/]*)
5081 ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
5082 ;;
5083 *)
5084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
5089 for ac_exec_ext in '' $ac_executable_extensions; do
5090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093 break 2
5094 fi
5095done
5096 done
5097IFS=$as_save_IFS
5098
5099 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
5100 ;;
5101esac
5102fi
5103PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5104if test -n "$PATH_GROUPADD_PROG"; then
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
5106$as_echo "$PATH_GROUPADD_PROG" >&6; }
5107else
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5109$as_echo "no" >&6; }
5110fi
5111
5112
5113# Extract the first word of "useradd", so it can be a program name with args.
5114set dummy useradd; ac_word=$2
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5116$as_echo_n "checking for $ac_word... " >&6; }
5117if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
5118 $as_echo_n "(cached) " >&6
5119else
5120 case $PATH_USERADD_PROG in
5121 [\\/]* | ?:[\\/]*)
5122 ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
5123 ;;
5124 *)
5125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
5130 for ac_exec_ext in '' $ac_executable_extensions; do
5131 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5132 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5134 break 2
5135 fi
5136done
5137 done
5138IFS=$as_save_IFS
5139
5140 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
5141 ;;
5142esac
5143fi
5144PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5145if test -n "$PATH_USERADD_PROG"; then
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
5147$as_echo "$PATH_USERADD_PROG" >&6; }
5148else
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5150$as_echo "no" >&6; }
5151fi
5152
5153
5154# Extract the first word of "pkgmk", so it can be a program name with args.
5155set dummy pkgmk; ac_word=$2
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
5158if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
5159 $as_echo_n "(cached) " >&6
5160else
5161 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5162 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
5163else
5164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167 IFS=$as_save_IFS
5168 test -z "$as_dir" && as_dir=.
5169 for ac_exec_ext in '' $ac_executable_extensions; do
5170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5171 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
5172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173 break 2
5174 fi
5175done
5176 done
5177IFS=$as_save_IFS
5178
5179 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
5180fi
5181fi
5182MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5183if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
5185$as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
5186else
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188$as_echo "no" >&6; }
5189fi
5190
5191
5192if test -x /sbin/sh; then
5193 STARTUP_SCRIPT_SHELL=/sbin/sh
5194
5195else
5196 STARTUP_SCRIPT_SHELL=/bin/sh
5197
5198fi
5199
5200# System features
5201# Check whether --enable-largefile was given.
5202if test "${enable_largefile+set}" = set; then :
5203 enableval=$enable_largefile;
5204fi
5205
5206if test "$enable_largefile" != no; then
5207
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5209$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5210if ${ac_cv_sys_largefile_CC+:} false; then :
5211 $as_echo_n "(cached) " >&6
5212else
5213 ac_cv_sys_largefile_CC=no
5214 if test "$GCC" != yes; then
5215 ac_save_CC=$CC
5216 while :; do
5217 # IRIX 6.2 and later do not support large files by default,
5218 # so use the C compiler's -n32 option if that helps.
5219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5220/* end confdefs.h. */
5221#include <sys/types.h>
5222 /* Check that off_t can represent 2**63 - 1 correctly.
5223 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5224 since some C++ compilers masquerading as C compilers
5225 incorrectly reject 9223372036854775807. */
5226#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5227 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5228 && LARGE_OFF_T % 2147483647 == 1)
5229 ? 1 : -1];
5230int
5231main ()
5232{
5233
5234 ;
5235 return 0;
5236}
5237_ACEOF
5238 if ac_fn_c_try_compile "$LINENO"; then :
5239 break
5240fi
5241rm -f core conftest.err conftest.$ac_objext
5242 CC="$CC -n32"
5243 if ac_fn_c_try_compile "$LINENO"; then :
5244 ac_cv_sys_largefile_CC=' -n32'; break
5245fi
5246rm -f core conftest.err conftest.$ac_objext
5247 break
5248 done
5249 CC=$ac_save_CC
5250 rm -f conftest.$ac_ext
5251 fi
5252fi
5253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5254$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5255 if test "$ac_cv_sys_largefile_CC" != no; then
5256 CC=$CC$ac_cv_sys_largefile_CC
5257 fi
5258
5259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5260$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5261if ${ac_cv_sys_file_offset_bits+:} false; then :
5262 $as_echo_n "(cached) " >&6
5263else
5264 while :; do
5265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5266/* end confdefs.h. */
5267#include <sys/types.h>
5268 /* Check that off_t can represent 2**63 - 1 correctly.
5269 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5270 since some C++ compilers masquerading as C compilers
5271 incorrectly reject 9223372036854775807. */
5272#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5273 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5274 && LARGE_OFF_T % 2147483647 == 1)
5275 ? 1 : -1];
5276int
5277main ()
5278{
5279
5280 ;
5281 return 0;
5282}
5283_ACEOF
5284if ac_fn_c_try_compile "$LINENO"; then :
5285 ac_cv_sys_file_offset_bits=no; break
5286fi
5287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5289/* end confdefs.h. */
5290#define _FILE_OFFSET_BITS 64
5291#include <sys/types.h>
5292 /* Check that off_t can represent 2**63 - 1 correctly.
5293 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5294 since some C++ compilers masquerading as C compilers
5295 incorrectly reject 9223372036854775807. */
5296#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5297 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5298 && LARGE_OFF_T % 2147483647 == 1)
5299 ? 1 : -1];
5300int
5301main ()
5302{
5303
5304 ;
5305 return 0;
5306}
5307_ACEOF
5308if ac_fn_c_try_compile "$LINENO"; then :
5309 ac_cv_sys_file_offset_bits=64; break
5310fi
5311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5312 ac_cv_sys_file_offset_bits=unknown
5313 break
5314done
5315fi
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5317$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5318case $ac_cv_sys_file_offset_bits in #(
5319 no | unknown) ;;
5320 *)
5321cat >>confdefs.h <<_ACEOF
5322#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5323_ACEOF
5324;;
5325esac
5326rm -rf conftest*
5327 if test $ac_cv_sys_file_offset_bits = unknown; then
5328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5329$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5330if ${ac_cv_sys_large_files+:} false; then :
5331 $as_echo_n "(cached) " >&6
5332else
5333 while :; do
5334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335/* end confdefs.h. */
5336#include <sys/types.h>
5337 /* Check that off_t can represent 2**63 - 1 correctly.
5338 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5339 since some C++ compilers masquerading as C compilers
5340 incorrectly reject 9223372036854775807. */
5341#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5342 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5343 && LARGE_OFF_T % 2147483647 == 1)
5344 ? 1 : -1];
5345int
5346main ()
5347{
5348
5349 ;
5350 return 0;
5351}
5352_ACEOF
5353if ac_fn_c_try_compile "$LINENO"; then :
5354 ac_cv_sys_large_files=no; break
5355fi
5356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5358/* end confdefs.h. */
5359#define _LARGE_FILES 1
5360#include <sys/types.h>
5361 /* Check that off_t can represent 2**63 - 1 correctly.
5362 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5363 since some C++ compilers masquerading as C compilers
5364 incorrectly reject 9223372036854775807. */
5365#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5366 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5367 && LARGE_OFF_T % 2147483647 == 1)
5368 ? 1 : -1];
5369int
5370main ()
5371{
5372
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377if ac_fn_c_try_compile "$LINENO"; then :
5378 ac_cv_sys_large_files=1; break
5379fi
5380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5381 ac_cv_sys_large_files=unknown
5382 break
5383done
5384fi
5385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5386$as_echo "$ac_cv_sys_large_files" >&6; }
5387case $ac_cv_sys_large_files in #(
5388 no | unknown) ;;
5389 *)
5390cat >>confdefs.h <<_ACEOF
5391#define _LARGE_FILES $ac_cv_sys_large_files
5392_ACEOF
5393;;
5394esac
5395rm -rf conftest*
5396 fi
5397fi
5398
5399
5400if test -z "$AR" ; then
5401 as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
5402fi
5403
5404# Use LOGIN_PROGRAM from environment if possible
5405if test ! -z "$LOGIN_PROGRAM" ; then
5406
5407cat >>confdefs.h <<_ACEOF
5408#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
5409_ACEOF
5410
5411else
5412 # Search for login
5413 # Extract the first word of "login", so it can be a program name with args.
5414set dummy login; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if ${ac_cv_path_LOGIN_PROGRAM_FALLBACK+:} false; then :
5418 $as_echo_n "(cached) " >&6
5419else
5420 case $LOGIN_PROGRAM_FALLBACK in
5421 [\\/]* | ?:[\\/]*)
5422 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path.
5423 ;;
5424 *)
5425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428 IFS=$as_save_IFS
5429 test -z "$as_dir" && as_dir=.
5430 for ac_exec_ext in '' $ac_executable_extensions; do
5431 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5432 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
5433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434 break 2
5435 fi
5436done
5437 done
5438IFS=$as_save_IFS
5439
5440 ;;
5441esac
5442fi
5443LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
5444if test -n "$LOGIN_PROGRAM_FALLBACK"; then
5445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOGIN_PROGRAM_FALLBACK" >&5
5446$as_echo "$LOGIN_PROGRAM_FALLBACK" >&6; }
5447else
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
5454 cat >>confdefs.h <<_ACEOF
5455#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
5456_ACEOF
5457
5458 fi
5459fi
5460
5461# Extract the first word of "passwd", so it can be a program name with args.
5462set dummy passwd; ac_word=$2
5463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5464$as_echo_n "checking for $ac_word... " >&6; }
5465if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5466 $as_echo_n "(cached) " >&6
5467else
5468 case $PATH_PASSWD_PROG in
5469 [\\/]* | ?:[\\/]*)
5470 ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
5471 ;;
5472 *)
5473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH
5475do
5476 IFS=$as_save_IFS
5477 test -z "$as_dir" && as_dir=.
5478 for ac_exec_ext in '' $ac_executable_extensions; do
5479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5480 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5482 break 2
5483 fi
5484done
5485 done
5486IFS=$as_save_IFS
5487
5488 ;;
5489esac
5490fi
5491PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5492if test -n "$PATH_PASSWD_PROG"; then
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5494$as_echo "$PATH_PASSWD_PROG" >&6; }
5495else
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497$as_echo "no" >&6; }
5498fi
5499
5500
5501if test ! -z "$PATH_PASSWD_PROG" ; then
5502
5503cat >>confdefs.h <<_ACEOF
5504#define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
5505_ACEOF
5506
5507fi
5508
5509if test -z "$LD" ; then
5510 LD=$CC
5511fi
5512
5513
5514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5515$as_echo_n "checking for inline... " >&6; }
5516if ${ac_cv_c_inline+:} false; then :
5517 $as_echo_n "(cached) " >&6
5518else
5519 ac_cv_c_inline=no
5520for ac_kw in inline __inline__ __inline; do
5521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5522/* end confdefs.h. */
5523#ifndef __cplusplus
5524typedef int foo_t;
5525static $ac_kw foo_t static_foo () {return 0; }
5526$ac_kw foo_t foo () {return 0; }
5527#endif
5528
5529_ACEOF
5530if ac_fn_c_try_compile "$LINENO"; then :
5531 ac_cv_c_inline=$ac_kw
5532fi
5533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5534 test "$ac_cv_c_inline" != no && break
5535done
5536
5537fi
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5539$as_echo "$ac_cv_c_inline" >&6; }
5540
5541case $ac_cv_c_inline in
5542 inline | yes) ;;
5543 *)
5544 case $ac_cv_c_inline in
5545 no) ac_val=;;
5546 *) ac_val=$ac_cv_c_inline;;
5547 esac
5548 cat >>confdefs.h <<_ACEOF
5549#ifndef __cplusplus
5550#define inline $ac_val
5551#endif
5552_ACEOF
5553 ;;
5554esac
5555
5556
5557ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5558"
5559if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
5560 have_llong_max=1
5561fi
5562
5563ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
5564 #include <sys/types.h>
5565 #include <sys/param.h>
5566 #include <dev/systrace.h>
5567
5568"
5569if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
5570 have_systr_policy_kill=1
5571fi
5572
5573ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
5574 #include <sys/types.h>
5575 #include <sys/resource.h>
5576
5577"
5578if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
5579
5580$as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
5581
5582fi
5583
5584ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
5585 #include <sys/types.h>
5586 #include <linux/prctl.h>
5587
5588"
5589if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
5590 have_linux_no_new_privs=1
5591fi
5592
5593use_stack_protector=1
5594
5595# Check whether --with-stackprotect was given.
5596if test "${with_stackprotect+set}" = set; then :
5597 withval=$with_stackprotect;
5598 if test "x$withval" = "xno"; then
5599 use_stack_protector=0
5600 fi
5601fi
5602
5603
5604
5605if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5606 {
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Qunused-arguments -Werror" >&5
5608$as_echo_n "checking if $CC supports -Qunused-arguments -Werror... " >&6; }
5609 saved_CFLAGS="$CFLAGS"
5610 CFLAGS="$CFLAGS -Qunused-arguments -Werror"
5611 _define_flag="-Qunused-arguments"
5612 test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments -Werror"
5613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5614/* end confdefs.h. */
5615int main(void) { return 0; }
5616_ACEOF
5617if ac_fn_c_try_compile "$LINENO"; then :
5618
5619if `grep -i "unrecognized option" conftest.err >/dev/null`
5620then
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
5623 CFLAGS="$saved_CFLAGS"
5624else
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5626$as_echo "yes" >&6; }
5627 CFLAGS="$saved_CFLAGS $_define_flag"
5628fi
5629else
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5631$as_echo "no" >&6; }
5632 CFLAGS="$saved_CFLAGS"
5633
5634fi
5635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5636}
5637 {
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunknown-warning-option -Werror" >&5
5639$as_echo_n "checking if $CC supports -Wunknown-warning-option -Werror... " >&6; }
5640 saved_CFLAGS="$CFLAGS"
5641 CFLAGS="$CFLAGS -Wunknown-warning-option -Werror"
5642 _define_flag="-Wno-unknown-warning-option"
5643 test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option -Werror"
5644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h. */
5646int main(void) { return 0; }
5647_ACEOF
5648if ac_fn_c_try_compile "$LINENO"; then :
5649
5650if `grep -i "unrecognized option" conftest.err >/dev/null`
5651then
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5653$as_echo "no" >&6; }
5654 CFLAGS="$saved_CFLAGS"
5655else
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5657$as_echo "yes" >&6; }
5658 CFLAGS="$saved_CFLAGS $_define_flag"
5659fi
5660else
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
5663 CFLAGS="$saved_CFLAGS"
5664
5665fi
5666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5667}
5668 {
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
5670$as_echo_n "checking if $CC supports -Wall... " >&6; }
5671 saved_CFLAGS="$CFLAGS"
5672 CFLAGS="$CFLAGS -Wall"
5673 _define_flag=""
5674 test "x$_define_flag" = "x" && _define_flag="-Wall"
5675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5676/* end confdefs.h. */
5677int main(void) { return 0; }
5678_ACEOF
5679if ac_fn_c_try_compile "$LINENO"; then :
5680
5681if `grep -i "unrecognized option" conftest.err >/dev/null`
5682then
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685 CFLAGS="$saved_CFLAGS"
5686else
5687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5688$as_echo "yes" >&6; }
5689 CFLAGS="$saved_CFLAGS $_define_flag"
5690fi
5691else
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
5694 CFLAGS="$saved_CFLAGS"
5695
5696fi
5697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5698}
5699 {
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
5701$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; }
5702 saved_CFLAGS="$CFLAGS"
5703 CFLAGS="$CFLAGS -Wpointer-arith"
5704 _define_flag=""
5705 test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
5706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5707/* end confdefs.h. */
5708int main(void) { return 0; }
5709_ACEOF
5710if ac_fn_c_try_compile "$LINENO"; then :
5711
5712if `grep -i "unrecognized option" conftest.err >/dev/null`
5713then
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715$as_echo "no" >&6; }
5716 CFLAGS="$saved_CFLAGS"
5717else
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5719$as_echo "yes" >&6; }
5720 CFLAGS="$saved_CFLAGS $_define_flag"
5721fi
5722else
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725 CFLAGS="$saved_CFLAGS"
5726
5727fi
5728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729}
5730 {
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
5732$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; }
5733 saved_CFLAGS="$CFLAGS"
5734 CFLAGS="$CFLAGS -Wuninitialized"
5735 _define_flag=""
5736 test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
5737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5738/* end confdefs.h. */
5739int main(void) { return 0; }
5740_ACEOF
5741if ac_fn_c_try_compile "$LINENO"; then :
5742
5743if `grep -i "unrecognized option" conftest.err >/dev/null`
5744then
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5746$as_echo "no" >&6; }
5747 CFLAGS="$saved_CFLAGS"
5748else
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5750$as_echo "yes" >&6; }
5751 CFLAGS="$saved_CFLAGS $_define_flag"
5752fi
5753else
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755$as_echo "no" >&6; }
5756 CFLAGS="$saved_CFLAGS"
5757
5758fi
5759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5760}
5761 {
5762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsign-compare" >&5
5763$as_echo_n "checking if $CC supports -Wsign-compare... " >&6; }
5764 saved_CFLAGS="$CFLAGS"
5765 CFLAGS="$CFLAGS -Wsign-compare"
5766 _define_flag=""
5767 test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
5768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5769/* end confdefs.h. */
5770int main(void) { return 0; }
5771_ACEOF
5772if ac_fn_c_try_compile "$LINENO"; then :
5773
5774if `grep -i "unrecognized option" conftest.err >/dev/null`
5775then
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
5778 CFLAGS="$saved_CFLAGS"
5779else
5780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5781$as_echo "yes" >&6; }
5782 CFLAGS="$saved_CFLAGS $_define_flag"
5783fi
5784else
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786$as_echo "no" >&6; }
5787 CFLAGS="$saved_CFLAGS"
5788
5789fi
5790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5791}
5792 {
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-security" >&5
5794$as_echo_n "checking if $CC supports -Wformat-security... " >&6; }
5795 saved_CFLAGS="$CFLAGS"
5796 CFLAGS="$CFLAGS -Wformat-security"
5797 _define_flag=""
5798 test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
5799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800/* end confdefs.h. */
5801int main(void) { return 0; }
5802_ACEOF
5803if ac_fn_c_try_compile "$LINENO"; then :
5804
5805if `grep -i "unrecognized option" conftest.err >/dev/null`
5806then
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809 CFLAGS="$saved_CFLAGS"
5810else
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5812$as_echo "yes" >&6; }
5813 CFLAGS="$saved_CFLAGS $_define_flag"
5814fi
5815else
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817$as_echo "no" >&6; }
5818 CFLAGS="$saved_CFLAGS"
5819
5820fi
5821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822}
5823 {
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsizeof-pointer-memaccess" >&5
5825$as_echo_n "checking if $CC supports -Wsizeof-pointer-memaccess... " >&6; }
5826 saved_CFLAGS="$CFLAGS"
5827 CFLAGS="$CFLAGS -Wsizeof-pointer-memaccess"
5828 _define_flag=""
5829 test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
5830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5831/* end confdefs.h. */
5832int main(void) { return 0; }
5833_ACEOF
5834if ac_fn_c_try_compile "$LINENO"; then :
5835
5836if `grep -i "unrecognized option" conftest.err >/dev/null`
5837then
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839$as_echo "no" >&6; }
5840 CFLAGS="$saved_CFLAGS"
5841else
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5843$as_echo "yes" >&6; }
5844 CFLAGS="$saved_CFLAGS $_define_flag"
5845fi
5846else
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5848$as_echo "no" >&6; }
5849 CFLAGS="$saved_CFLAGS"
5850
5851fi
5852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5853}
5854 {
5855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-sign" >&5
5856$as_echo_n "checking if $CC supports -Wpointer-sign... " >&6; }
5857 saved_CFLAGS="$CFLAGS"
5858 CFLAGS="$CFLAGS -Wpointer-sign"
5859 _define_flag="-Wno-pointer-sign"
5860 test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
5861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5862/* end confdefs.h. */
5863int main(void) { return 0; }
5864_ACEOF
5865if ac_fn_c_try_compile "$LINENO"; then :
5866
5867if `grep -i "unrecognized option" conftest.err >/dev/null`
5868then
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871 CFLAGS="$saved_CFLAGS"
5872else
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5874$as_echo "yes" >&6; }
5875 CFLAGS="$saved_CFLAGS $_define_flag"
5876fi
5877else
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879$as_echo "no" >&6; }
5880 CFLAGS="$saved_CFLAGS"
5881
5882fi
5883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5884}
5885 {
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused-result" >&5
5887$as_echo_n "checking if $CC supports -Wunused-result... " >&6; }
5888 saved_CFLAGS="$CFLAGS"
5889 CFLAGS="$CFLAGS -Wunused-result"
5890 _define_flag="-Wno-unused-result"
5891 test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
5892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5893/* end confdefs.h. */
5894int main(void) { return 0; }
5895_ACEOF
5896if ac_fn_c_try_compile "$LINENO"; then :
5897
5898if `grep -i "unrecognized option" conftest.err >/dev/null`
5899then
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901$as_echo "no" >&6; }
5902 CFLAGS="$saved_CFLAGS"
5903else
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5905$as_echo "yes" >&6; }
5906 CFLAGS="$saved_CFLAGS $_define_flag"
5907fi
5908else
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910$as_echo "no" >&6; }
5911 CFLAGS="$saved_CFLAGS"
5912
5913fi
5914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5915}
5916 {
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fno-strict-aliasing" >&5
5918$as_echo_n "checking if $CC supports -fno-strict-aliasing... " >&6; }
5919 saved_CFLAGS="$CFLAGS"
5920 CFLAGS="$CFLAGS -fno-strict-aliasing"
5921 _define_flag=""
5922 test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
5923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5924/* end confdefs.h. */
5925int main(void) { return 0; }
5926_ACEOF
5927if ac_fn_c_try_compile "$LINENO"; then :
5928
5929if `grep -i "unrecognized option" conftest.err >/dev/null`
5930then
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933 CFLAGS="$saved_CFLAGS"
5934else
5935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5936$as_echo "yes" >&6; }
5937 CFLAGS="$saved_CFLAGS $_define_flag"
5938fi
5939else
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941$as_echo "no" >&6; }
5942 CFLAGS="$saved_CFLAGS"
5943
5944fi
5945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5946}
5947 {
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -D_FORTIFY_SOURCE=2" >&5
5949$as_echo_n "checking if $CC supports -D_FORTIFY_SOURCE=2... " >&6; }
5950 saved_CFLAGS="$CFLAGS"
5951 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
5952 _define_flag=""
5953 test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
5954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5955/* end confdefs.h. */
5956int main(void) { return 0; }
5957_ACEOF
5958if ac_fn_c_try_compile "$LINENO"; then :
5959
5960if `grep -i "unrecognized option" conftest.err >/dev/null`
5961then
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
5964 CFLAGS="$saved_CFLAGS"
5965else
5966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5967$as_echo "yes" >&6; }
5968 CFLAGS="$saved_CFLAGS $_define_flag"
5969fi
5970else
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
5973 CFLAGS="$saved_CFLAGS"
5974
5975fi
5976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5977}
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
5979$as_echo_n "checking gcc version... " >&6; }
5980 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
5981 case $GCC_VER in
5982 1.*) no_attrib_nonnull=1 ;;
5983 2.8* | 2.9*)
5984 no_attrib_nonnull=1
5985 ;;
5986 2.*) no_attrib_nonnull=1 ;;
5987 *) ;;
5988 esac
5989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
5990$as_echo "$GCC_VER" >&6; }
5991
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
5993$as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
5994 saved_CFLAGS="$CFLAGS"
5995 CFLAGS="$CFLAGS -fno-builtin-memset"
5996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5997/* end confdefs.h. */
5998 #include <string.h>
5999int
6000main ()
6001{
6002 char b[10]; memset(b, 0, sizeof(b));
6003 ;
6004 return 0;
6005}
6006_ACEOF
6007if ac_fn_c_try_link "$LINENO"; then :
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6009$as_echo "yes" >&6; }
6010else
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012$as_echo "no" >&6; }
6013 CFLAGS="$saved_CFLAGS"
6014
6015fi
6016rm -f core conftest.err conftest.$ac_objext \
6017 conftest$ac_exeext conftest.$ac_ext
6018
6019 # -fstack-protector-all doesn't always work for some GCC versions
6020 # and/or platforms, so we test if we can. If it's not supported
6021 # on a given platform gcc will emit a warning so we use -Werror.
6022 if test "x$use_stack_protector" = "x1"; then
6023 for t in -fstack-protector-all -fstack-protector; do
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
6025$as_echo_n "checking if $CC supports $t... " >&6; }
6026 saved_CFLAGS="$CFLAGS"
6027 saved_LDFLAGS="$LDFLAGS"
6028 CFLAGS="$CFLAGS $t -Werror"
6029 LDFLAGS="$LDFLAGS $t -Werror"
6030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6031/* end confdefs.h. */
6032 #include <stdio.h>
6033int
6034main ()
6035{
6036
6037 char x[256];
6038 snprintf(x, sizeof(x), "XXX");
6039
6040 ;
6041 return 0;
6042}
6043_ACEOF
6044if ac_fn_c_try_link "$LINENO"; then :
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6046$as_echo "yes" >&6; }
6047 CFLAGS="$saved_CFLAGS $t"
6048 LDFLAGS="$saved_LDFLAGS $t"
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
6050$as_echo_n "checking if $t works... " >&6; }
6051 if test "$cross_compiling" = yes; then :
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
6053$as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
6054 break
6055
6056else
6057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6058/* end confdefs.h. */
6059 #include <stdio.h>
6060int
6061main ()
6062{
6063
6064 char x[256];
6065 snprintf(x, sizeof(x), "XXX");
6066
6067 ;
6068 return 0;
6069}
6070_ACEOF
6071if ac_fn_c_try_run "$LINENO"; then :
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6073$as_echo "yes" >&6; }
6074 break
6075else
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6080 conftest.$ac_objext conftest.beam conftest.$ac_ext
6081fi
6082
6083
6084else
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086$as_echo "no" >&6; }
6087
6088fi
6089rm -f core conftest.err conftest.$ac_objext \
6090 conftest$ac_exeext conftest.$ac_ext
6091 CFLAGS="$saved_CFLAGS"
6092 LDFLAGS="$saved_LDFLAGS"
6093 done
6094 fi
6095
6096 if test -z "$have_llong_max"; then
6097 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
6098 unset ac_cv_have_decl_LLONG_MAX
6099 saved_CFLAGS="$CFLAGS"
6100 CFLAGS="$CFLAGS -std=gnu99"
6101 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
6102
6103"
6104if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
6105 have_llong_max=1
6106else
6107 CFLAGS="$saved_CFLAGS"
6108fi
6109
6110 fi
6111fi
6112
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
6114$as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
6115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6116/* end confdefs.h. */
6117
6118#include <stdlib.h>
6119__attribute__((__unused__)) static void foo(void){return;}
6120int
6121main ()
6122{
6123 exit(0);
6124 ;
6125 return 0;
6126}
6127_ACEOF
6128if ac_fn_c_try_compile "$LINENO"; then :
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6130$as_echo "yes" >&6; }
6131else
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6133$as_echo "no" >&6; }
6134
6135$as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
6136
6137
6138fi
6139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6140
6141if test "x$no_attrib_nonnull" != "x1" ; then
6142
6143$as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
6144
6145fi
6146
6147
6148# Check whether --with-rpath was given.
6149if test "${with_rpath+set}" = set; then :
6150 withval=$with_rpath;
6151 if test "x$withval" = "xno" ; then
6152 need_dash_r=""
6153 fi
6154 if test "x$withval" = "xyes" ; then
6155 need_dash_r=1
6156 fi
6157
6158
6159fi
6160
6161
6162# Allow user to specify flags
6163
6164# Check whether --with-cflags was given.
6165if test "${with_cflags+set}" = set; then :
6166 withval=$with_cflags;
6167 if test -n "$withval" && test "x$withval" != "xno" && \
6168 test "x${withval}" != "xyes"; then
6169 CFLAGS="$CFLAGS $withval"
6170 fi
6171
6172
6173fi
6174
6175
6176# Check whether --with-cppflags was given.
6177if test "${with_cppflags+set}" = set; then :
6178 withval=$with_cppflags;
6179 if test -n "$withval" && test "x$withval" != "xno" && \
6180 test "x${withval}" != "xyes"; then
6181 CPPFLAGS="$CPPFLAGS $withval"
6182 fi
6183
6184
6185fi
6186
6187
6188# Check whether --with-ldflags was given.
6189if test "${with_ldflags+set}" = set; then :
6190 withval=$with_ldflags;
6191 if test -n "$withval" && test "x$withval" != "xno" && \
6192 test "x${withval}" != "xyes"; then
6193 LDFLAGS="$LDFLAGS $withval"
6194 fi
6195
6196
6197fi
6198
6199
6200# Check whether --with-libs was given.
6201if test "${with_libs+set}" = set; then :
6202 withval=$with_libs;
6203 if test -n "$withval" && test "x$withval" != "xno" && \
6204 test "x${withval}" != "xyes"; then
6205 LIBS="$LIBS $withval"
6206 fi
6207
6208
6209fi
6210
6211
6212# Check whether --with-Werror was given.
6213if test "${with_Werror+set}" = set; then :
6214 withval=$with_Werror;
6215 if test -n "$withval" && test "x$withval" != "xno"; then
6216 werror_flags="-Werror"
6217 if test "x${withval}" != "xyes"; then
6218 werror_flags="$withval"
6219 fi
6220 fi
6221
6222
6223fi
6224
6225
6226for ac_header in \
6227 bstring.h \
6228 crypt.h \
6229 crypto/sha2.h \
6230 dirent.h \
6231 endian.h \
6232 elf.h \
6233 features.h \
6234 fcntl.h \
6235 floatingpoint.h \
6236 getopt.h \
6237 glob.h \
6238 ia.h \
6239 iaf.h \
6240 limits.h \
6241 locale.h \
6242 login.h \
6243 maillock.h \
6244 ndir.h \
6245 net/if_tun.h \
6246 netdb.h \
6247 netgroup.h \
6248 pam/pam_appl.h \
6249 paths.h \
6250 poll.h \
6251 pty.h \
6252 readpassphrase.h \
6253 rpc/types.h \
6254 security/pam_appl.h \
6255 sha2.h \
6256 shadow.h \
6257 stddef.h \
6258 stdint.h \
6259 string.h \
6260 strings.h \
6261 sys/audit.h \
6262 sys/bitypes.h \
6263 sys/bsdtty.h \
6264 sys/cdefs.h \
6265 sys/dir.h \
6266 sys/mman.h \
6267 sys/ndir.h \
6268 sys/poll.h \
6269 sys/prctl.h \
6270 sys/pstat.h \
6271 sys/select.h \
6272 sys/stat.h \
6273 sys/stream.h \
6274 sys/stropts.h \
6275 sys/strtio.h \
6276 sys/statvfs.h \
6277 sys/sysmacros.h \
6278 sys/time.h \
6279 sys/timers.h \
6280 time.h \
6281 tmpdir.h \
6282 ttyent.h \
6283 ucred.h \
6284 unistd.h \
6285 usersec.h \
6286 util.h \
6287 utime.h \
6288 utmp.h \
6289 utmpx.h \
6290 vis.h \
6291
6292do :
6293 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6294ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6295if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6296 cat >>confdefs.h <<_ACEOF
6297#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6298_ACEOF
6299
6300fi
6301
6302done
6303
6304
6305# lastlog.h requires sys/time.h to be included first on Solaris
6306for ac_header in lastlog.h
6307do :
6308 ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
6309#ifdef HAVE_SYS_TIME_H
6310# include <sys/time.h>
6311#endif
6312
6313"
6314if test "x$ac_cv_header_lastlog_h" = xyes; then :
6315 cat >>confdefs.h <<_ACEOF
6316#define HAVE_LASTLOG_H 1
6317_ACEOF
6318
6319fi
6320
6321done
6322
6323
6324# sys/ptms.h requires sys/stream.h to be included first on Solaris
6325for ac_header in sys/ptms.h
6326do :
6327 ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
6328#ifdef HAVE_SYS_STREAM_H
6329# include <sys/stream.h>
6330#endif
6331
6332"
6333if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
6334 cat >>confdefs.h <<_ACEOF
6335#define HAVE_SYS_PTMS_H 1
6336_ACEOF
6337
6338fi
6339
6340done
6341
6342
6343# login_cap.h requires sys/types.h on NetBSD
6344for ac_header in login_cap.h
6345do :
6346 ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
6347#include <sys/types.h>
6348
6349"
6350if test "x$ac_cv_header_login_cap_h" = xyes; then :
6351 cat >>confdefs.h <<_ACEOF
6352#define HAVE_LOGIN_CAP_H 1
6353_ACEOF
6354
6355fi
6356
6357done
6358
6359
6360# older BSDs need sys/param.h before sys/mount.h
6361for ac_header in sys/mount.h
6362do :
6363 ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
6364#include <sys/param.h>
6365
6366"
6367if test "x$ac_cv_header_sys_mount_h" = xyes; then :
6368 cat >>confdefs.h <<_ACEOF
6369#define HAVE_SYS_MOUNT_H 1
6370_ACEOF
6371
6372fi
6373
6374done
6375
6376
6377# Android requires sys/socket.h to be included before sys/un.h
6378for ac_header in sys/un.h
6379do :
6380 ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
6381#include <sys/types.h>
6382#include <sys/socket.h>
6383
6384"
6385if test "x$ac_cv_header_sys_un_h" = xyes; then :
6386 cat >>confdefs.h <<_ACEOF
6387#define HAVE_SYS_UN_H 1
6388_ACEOF
6389
6390fi
6391
6392done
6393
6394
6395# Messages for features tested for in target-specific section
6396SIA_MSG="no"
6397SPC_MSG="no"
6398SP_MSG="no"
6399
6400# Check for some target-specific stuff
6401case "$host" in
6402*-*-aix*)
6403 # Some versions of VAC won't allow macro redefinitions at
6404 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
6405 # particularly with older versions of vac or xlc.
6406 # It also throws errors about null macro argments, but these are
6407 # not fatal.
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
6409$as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
6410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6411/* end confdefs.h. */
6412
6413#define testmacro foo
6414#define testmacro bar
6415int
6416main ()
6417{
6418 exit(0);
6419 ;
6420 return 0;
6421}
6422_ACEOF
6423if ac_fn_c_try_compile "$LINENO"; then :
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6425$as_echo "yes" >&6; }
6426else
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428$as_echo "no" >&6; }
6429 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
6430 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
6431 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6432 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6433
6434
6435fi
6436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6437
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
6439$as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
6440 if (test -z "$blibpath"); then
6441 blibpath="/usr/lib:/lib"
6442 fi
6443 saved_LDFLAGS="$LDFLAGS"
6444 if test "$GCC" = "yes"; then
6445 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
6446 else
6447 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
6448 fi
6449 for tryflags in $flags ;do
6450 if (test -z "$blibflags"); then
6451 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
6452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6453/* end confdefs.h. */
6454
6455int
6456main ()
6457{
6458
6459 ;
6460 return 0;
6461}
6462_ACEOF
6463if ac_fn_c_try_link "$LINENO"; then :
6464 blibflags=$tryflags
6465fi
6466rm -f core conftest.err conftest.$ac_objext \
6467 conftest$ac_exeext conftest.$ac_ext
6468 fi
6469 done
6470 if (test -z "$blibflags"); then
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6472$as_echo "not found" >&6; }
6473 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
6474 else
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
6476$as_echo "$blibflags" >&6; }
6477 fi
6478 LDFLAGS="$saved_LDFLAGS"
6479 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
6480if test "x$ac_cv_func_authenticate" = xyes; then :
6481
6482$as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6483
6484else
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
6486$as_echo_n "checking for authenticate in -ls... " >&6; }
6487if ${ac_cv_lib_s_authenticate+:} false; then :
6488 $as_echo_n "(cached) " >&6
6489else
6490 ac_check_lib_save_LIBS=$LIBS
6491LIBS="-ls $LIBS"
6492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6493/* end confdefs.h. */
6494
6495/* Override any GCC internal prototype to avoid an error.
6496 Use char because int might match the return type of a GCC
6497 builtin and then its argument prototype would still apply. */
6498#ifdef __cplusplus
6499extern "C"
6500#endif
6501char authenticate ();
6502int
6503main ()
6504{
6505return authenticate ();
6506 ;
6507 return 0;
6508}
6509_ACEOF
6510if ac_fn_c_try_link "$LINENO"; then :
6511 ac_cv_lib_s_authenticate=yes
6512else
6513 ac_cv_lib_s_authenticate=no
6514fi
6515rm -f core conftest.err conftest.$ac_objext \
6516 conftest$ac_exeext conftest.$ac_ext
6517LIBS=$ac_check_lib_save_LIBS
6518fi
6519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
6520$as_echo "$ac_cv_lib_s_authenticate" >&6; }
6521if test "x$ac_cv_lib_s_authenticate" = xyes; then :
6522 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6523
6524 LIBS="$LIBS -ls"
6525
6526fi
6527
6528
6529fi
6530
6531 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
6532"
6533if test "x$ac_cv_have_decl_authenticate" = xyes; then :
6534 ac_have_decl=1
6535else
6536 ac_have_decl=0
6537fi
6538
6539cat >>confdefs.h <<_ACEOF
6540#define HAVE_DECL_AUTHENTICATE $ac_have_decl
6541_ACEOF
6542ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
6543"
6544if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
6545 ac_have_decl=1
6546else
6547 ac_have_decl=0
6548fi
6549
6550cat >>confdefs.h <<_ACEOF
6551#define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
6552_ACEOF
6553ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
6554"
6555if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
6556 ac_have_decl=1
6557else
6558 ac_have_decl=0
6559fi
6560
6561cat >>confdefs.h <<_ACEOF
6562#define HAVE_DECL_LOGINSUCCESS $ac_have_decl
6563_ACEOF
6564ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
6565"
6566if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
6567 ac_have_decl=1
6568else
6569 ac_have_decl=0
6570fi
6571
6572cat >>confdefs.h <<_ACEOF
6573#define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
6574_ACEOF
6575ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
6576"
6577if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
6578 ac_have_decl=1
6579else
6580 ac_have_decl=0
6581fi
6582
6583cat >>confdefs.h <<_ACEOF
6584#define HAVE_DECL_SETAUTHDB $ac_have_decl
6585_ACEOF
6586
6587 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
6588
6589"
6590if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
6591 ac_have_decl=1
6592else
6593 ac_have_decl=0
6594fi
6595
6596cat >>confdefs.h <<_ACEOF
6597#define HAVE_DECL_LOGINFAILED $ac_have_decl
6598_ACEOF
6599if test $ac_have_decl = 1; then :
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
6601$as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
6602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6603/* end confdefs.h. */
6604 #include <usersec.h>
6605int
6606main ()
6607{
6608 (void)loginfailed("user","host","tty",0);
6609 ;
6610 return 0;
6611}
6612_ACEOF
6613if ac_fn_c_try_compile "$LINENO"; then :
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6615$as_echo "yes" >&6; }
6616
6617$as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
6618
6619else
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6621$as_echo "no" >&6; }
6622
6623fi
6624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6625fi
6626
6627 for ac_func in getgrset setauthdb
6628do :
6629 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6630ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6631if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6632 cat >>confdefs.h <<_ACEOF
6633#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6634_ACEOF
6635
6636fi
6637done
6638
6639 ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
6640 #include <fcntl.h>
6641
6642"
6643if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
6644
6645$as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
6646
6647fi
6648
6649 check_for_aix_broken_getaddrinfo=1
6650
6651$as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
6652
6653
6654$as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6655
6656
6657$as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6658
6659
6660$as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6661
6662
6663$as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
6664
6665
6666$as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
6667
6668
6669$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
6670
6671
6672$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
6673
6674
6675$as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
6676
6677
6678$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
6679
6680 ;;
6681*-*-android*)
6682
6683$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
6684
6685
6686$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
6687
6688 ;;
6689*-*-cygwin*)
6690 check_for_libcrypt_later=1
6691 LIBS="$LIBS /usr/lib/textreadmode.o"
6692
6693$as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
6694
6695
6696$as_echo "#define USE_PIPES 1" >>confdefs.h
6697
6698
6699$as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
6700
6701
6702$as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
6703
6704
6705$as_echo "#define NO_IPPORT_RESERVED_CONCEPT 1" >>confdefs.h
6706
6707
6708$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
6709
6710
6711$as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
6712
6713
6714$as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
6715
6716 ;;
6717*-*-dgux*)
6718
6719$as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
6720
6721 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6722
6723 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6724
6725 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6726
6727 ;;
6728*-*-darwin*)
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
6730$as_echo_n "checking if we have working getaddrinfo... " >&6; }
6731 if test "$cross_compiling" = yes; then :
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
6733$as_echo "assume it is working" >&6; }
6734else
6735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6736/* end confdefs.h. */
6737 #include <mach-o/dyld.h>
6738main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
6739 exit(0);
6740 else
6741 exit(1);
6742}
6743
6744_ACEOF
6745if ac_fn_c_try_run "$LINENO"; then :
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
6747$as_echo "working" >&6; }
6748else
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
6750$as_echo "buggy" >&6; }
6751
6752$as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
6753
6754
6755fi
6756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6757 conftest.$ac_objext conftest.beam conftest.$ac_ext
6758fi
6759
6760 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6761
6762 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6763
6764 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6765
6766
6767$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
6768
6769
6770cat >>confdefs.h <<_ACEOF
6771#define BIND_8_COMPAT 1
6772_ACEOF
6773
6774
6775$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
6776
6777
6778$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
6779
6780
6781$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
6782
6783
6784 ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
6785if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
6786
6787else
6788
6789$as_echo "#define AU_IPv4 0" >>confdefs.h
6790
6791 #include <bsm/audit.h>
6792
6793$as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
6794
6795
6796fi
6797
6798
6799$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
6800
6801 for ac_func in sandbox_init
6802do :
6803 ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
6804if test "x$ac_cv_func_sandbox_init" = xyes; then :
6805 cat >>confdefs.h <<_ACEOF
6806#define HAVE_SANDBOX_INIT 1
6807_ACEOF
6808
6809fi
6810done
6811
6812 for ac_header in sandbox.h
6813do :
6814 ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
6815if test "x$ac_cv_header_sandbox_h" = xyes; then :
6816 cat >>confdefs.h <<_ACEOF
6817#define HAVE_SANDBOX_H 1
6818_ACEOF
6819
6820fi
6821
6822done
6823
6824 ;;
6825*-*-dragonfly*)
6826 SSHDLIBS="$SSHDLIBS -lcrypt"
6827 ;;
6828*-*-haiku*)
6829 LIBS="$LIBS -lbsd "
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
6831$as_echo_n "checking for socket in -lnetwork... " >&6; }
6832if ${ac_cv_lib_network_socket+:} false; then :
6833 $as_echo_n "(cached) " >&6
6834else
6835 ac_check_lib_save_LIBS=$LIBS
6836LIBS="-lnetwork $LIBS"
6837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838/* end confdefs.h. */
6839
6840/* Override any GCC internal prototype to avoid an error.
6841 Use char because int might match the return type of a GCC
6842 builtin and then its argument prototype would still apply. */
6843#ifdef __cplusplus
6844extern "C"
6845#endif
6846char socket ();
6847int
6848main ()
6849{
6850return socket ();
6851 ;
6852 return 0;
6853}
6854_ACEOF
6855if ac_fn_c_try_link "$LINENO"; then :
6856 ac_cv_lib_network_socket=yes
6857else
6858 ac_cv_lib_network_socket=no
6859fi
6860rm -f core conftest.err conftest.$ac_objext \
6861 conftest$ac_exeext conftest.$ac_ext
6862LIBS=$ac_check_lib_save_LIBS
6863fi
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
6865$as_echo "$ac_cv_lib_network_socket" >&6; }
6866if test "x$ac_cv_lib_network_socket" = xyes; then :
6867 cat >>confdefs.h <<_ACEOF
6868#define HAVE_LIBNETWORK 1
6869_ACEOF
6870
6871 LIBS="-lnetwork $LIBS"
6872
6873fi
6874
6875 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
6876
6877 MANTYPE=man
6878 ;;
6879*-*-hpux*)
6880 # first we define all of the options common to all HP-UX releases
6881 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
6882 IPADDR_IN_DISPLAY=yes
6883 $as_echo "#define USE_PIPES 1" >>confdefs.h
6884
6885
6886$as_echo "#define LOGIN_NO_ENDOPT 1" >>confdefs.h
6887
6888 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
6889
6890
6891$as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
6892
6893 $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
6894
6895
6896$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
6897
6898 maildir="/var/mail"
6899 LIBS="$LIBS -lsec"
6900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
6901$as_echo_n "checking for t_error in -lxnet... " >&6; }
6902if ${ac_cv_lib_xnet_t_error+:} false; then :
6903 $as_echo_n "(cached) " >&6
6904else
6905 ac_check_lib_save_LIBS=$LIBS
6906LIBS="-lxnet $LIBS"
6907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6908/* end confdefs.h. */
6909
6910/* Override any GCC internal prototype to avoid an error.
6911 Use char because int might match the return type of a GCC
6912 builtin and then its argument prototype would still apply. */
6913#ifdef __cplusplus
6914extern "C"
6915#endif
6916char t_error ();
6917int
6918main ()
6919{
6920return t_error ();
6921 ;
6922 return 0;
6923}
6924_ACEOF
6925if ac_fn_c_try_link "$LINENO"; then :
6926 ac_cv_lib_xnet_t_error=yes
6927else
6928 ac_cv_lib_xnet_t_error=no
6929fi
6930rm -f core conftest.err conftest.$ac_objext \
6931 conftest$ac_exeext conftest.$ac_ext
6932LIBS=$ac_check_lib_save_LIBS
6933fi
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
6935$as_echo "$ac_cv_lib_xnet_t_error" >&6; }
6936if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
6937 cat >>confdefs.h <<_ACEOF
6938#define HAVE_LIBXNET 1
6939_ACEOF
6940
6941 LIBS="-lxnet $LIBS"
6942
6943else
6944 as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
6945fi
6946
6947
6948 # next, we define all of the options specific to major releases
6949 case "$host" in
6950 *-*-hpux10*)
6951 if test -z "$GCC"; then
6952 CFLAGS="$CFLAGS -Ae"
6953 fi
6954 ;;
6955 *-*-hpux11*)
6956
6957$as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
6958
6959
6960$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
6961
6962
6963$as_echo "#define USE_BTMP 1" >>confdefs.h
6964
6965 check_for_hpux_broken_getaddrinfo=1
6966 check_for_conflicting_getspnam=1
6967 ;;
6968 esac
6969
6970 # lastly, we define options specific to minor releases
6971 case "$host" in
6972 *-*-hpux10.26)
6973
6974$as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
6975
6976 disable_ptmx_check=yes
6977 LIBS="$LIBS -lsecpw"
6978 ;;
6979 esac
6980 ;;
6981*-*-irix5*)
6982 PATH="$PATH:/usr/etc"
6983
6984$as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
6985
6986 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6987
6988 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6989
6990 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6991
6992
6993$as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
6994
6995 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
6996
6997 ;;
6998*-*-irix6*)
6999 PATH="$PATH:/usr/etc"
7000
7001$as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
7002
7003
7004$as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
7005
7006
7007$as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
7008
7009 ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
7010if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
7011
7012$as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
7013
7014fi
7015
7016 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7017
7018 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7019
7020 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7021
7022 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7023
7024
7025$as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7026
7027 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7028
7029 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7030
7031 ;;
7032*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
7033 check_for_libcrypt_later=1
7034 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7035
7036 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7037
7038 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7039
7040
7041$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7042
7043
7044$as_echo "#define USE_BTMP 1" >>confdefs.h
7045
7046 ;;
7047*-*-linux*)
7048 no_dev_ptmx=1
7049 check_for_libcrypt_later=1
7050 check_for_openpty_ctty_bug=1
7051
7052$as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7053
7054
7055$as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7056
7057 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7058
7059
7060$as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
7061
7062
7063$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7064
7065 $as_echo "#define USE_BTMP 1" >>confdefs.h
7066
7067
7068$as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
7069
7070 inet6_default_4in6=yes
7071 case `uname -r` in
7072 1.*|2.0.*)
7073
7074$as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
7075
7076 ;;
7077 esac
7078 # tun(4) forwarding compat code
7079 for ac_header in linux/if_tun.h
7080do :
7081 ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
7082if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
7083 cat >>confdefs.h <<_ACEOF
7084#define HAVE_LINUX_IF_TUN_H 1
7085_ACEOF
7086
7087fi
7088
7089done
7090
7091 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
7092
7093$as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
7094
7095
7096$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7097
7098
7099$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7100
7101 fi
7102 for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
7103do :
7104 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7105ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
7106"
7107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7108 cat >>confdefs.h <<_ACEOF
7109#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7110_ACEOF
7111
7112fi
7113
7114done
7115
7116 for ac_func in prctl
7117do :
7118 ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
7119if test "x$ac_cv_func_prctl" = xyes; then :
7120 cat >>confdefs.h <<_ACEOF
7121#define HAVE_PRCTL 1
7122_ACEOF
7123
7124fi
7125done
7126
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
7128$as_echo_n "checking for seccomp architecture... " >&6; }
7129 seccomp_audit_arch=
7130 case "$host" in
7131 x86_64-*)
7132 seccomp_audit_arch=AUDIT_ARCH_X86_64
7133 ;;
7134 i*86-*)
7135 seccomp_audit_arch=AUDIT_ARCH_I386
7136 ;;
7137 arm*-*)
7138 seccomp_audit_arch=AUDIT_ARCH_ARM
7139 ;;
7140 esac
7141 if test "x$seccomp_audit_arch" != "x" ; then
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
7143$as_echo "\"$seccomp_audit_arch\"" >&6; }
7144
7145cat >>confdefs.h <<_ACEOF
7146#define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
7147_ACEOF
7148
7149 else
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
7151$as_echo "architecture not supported" >&6; }
7152 fi
7153 ;;
7154mips-sony-bsd|mips-sony-newsos4)
7155
7156$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
7157
7158 SONY=1
7159 ;;
7160*-*-netbsd*)
7161 check_for_libcrypt_before=1
7162 if test "x$withval" != "xno" ; then
7163 need_dash_r=1
7164 fi
7165
7166$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7167
7168 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7169if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
7170
7171else
7172
7173$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
7174
7175fi
7176
7177
7178
7179$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7180
7181 ;;
7182*-*-freebsd*)
7183 check_for_libcrypt_later=1
7184
7185$as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
7186
7187
7188$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7189
7190 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7191if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
7192
7193else
7194
7195$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
7196
7197fi
7198
7199
7200
7201$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7202
7203
7204$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
7205
7206 ;;
7207*-*-bsdi*)
7208 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7209
7210 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7211
7212 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7213
7214 ;;
7215*-next-*)
7216 conf_lastlog_location="/usr/adm/lastlog"
7217 conf_utmp_location=/etc/utmp
7218 conf_wtmp_location=/usr/adm/wtmp
7219 maildir=/usr/spool/mail
7220
7221$as_echo "#define HAVE_NEXT 1" >>confdefs.h
7222
7223 $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
7224
7225 $as_echo "#define USE_PIPES 1" >>confdefs.h
7226
7227
7228$as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
7229
7230 ;;
7231*-*-openbsd*)
7232
7233$as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
7234
7235
7236$as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
7237
7238
7239$as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
7240
7241
7242$as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
7243
7244 ;;
7245*-*-solaris*)
7246 if test "x$withval" != "xno" ; then
7247 need_dash_r=1
7248 fi
7249 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7250
7251 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7252
7253
7254$as_echo "#define LOGIN_NEEDS_TERM 1" >>confdefs.h
7255
7256 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7257
7258
7259$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7260
7261 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7262
7263 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
7264
7265$as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7266
7267
7268$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7269
7270
7271$as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
7272
7273 external_path_file=/etc/default/login
7274 # hardwire lastlog location (can't detect it on some versions)
7275 conf_lastlog_location="/var/adm/lastlog"
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
7277$as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
7278 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
7279 if test "$sol2ver" -ge 8; then
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7281$as_echo "yes" >&6; }
7282 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7283
7284
7285$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
7286
7287 else
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7289$as_echo "no" >&6; }
7290 fi
7291
7292# Check whether --with-solaris-contracts was given.
7293if test "${with_solaris_contracts+set}" = set; then :
7294 withval=$with_solaris_contracts;
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
7296$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
7297if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
7298 $as_echo_n "(cached) " >&6
7299else
7300 ac_check_lib_save_LIBS=$LIBS
7301LIBS="-lcontract $LIBS"
7302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7303/* end confdefs.h. */
7304
7305/* Override any GCC internal prototype to avoid an error.
7306 Use char because int might match the return type of a GCC
7307 builtin and then its argument prototype would still apply. */
7308#ifdef __cplusplus
7309extern "C"
7310#endif
7311char ct_tmpl_activate ();
7312int
7313main ()
7314{
7315return ct_tmpl_activate ();
7316 ;
7317 return 0;
7318}
7319_ACEOF
7320if ac_fn_c_try_link "$LINENO"; then :
7321 ac_cv_lib_contract_ct_tmpl_activate=yes
7322else
7323 ac_cv_lib_contract_ct_tmpl_activate=no
7324fi
7325rm -f core conftest.err conftest.$ac_objext \
7326 conftest$ac_exeext conftest.$ac_ext
7327LIBS=$ac_check_lib_save_LIBS
7328fi
7329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
7330$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
7331if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
7332
7333$as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
7334
7335 SSHDLIBS="$SSHDLIBS -lcontract"
7336 SPC_MSG="yes"
7337fi
7338
7339
7340fi
7341
7342
7343# Check whether --with-solaris-projects was given.
7344if test "${with_solaris_projects+set}" = set; then :
7345 withval=$with_solaris_projects;
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
7347$as_echo_n "checking for setproject in -lproject... " >&6; }
7348if ${ac_cv_lib_project_setproject+:} false; then :
7349 $as_echo_n "(cached) " >&6
7350else
7351 ac_check_lib_save_LIBS=$LIBS
7352LIBS="-lproject $LIBS"
7353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7354/* end confdefs.h. */
7355
7356/* Override any GCC internal prototype to avoid an error.
7357 Use char because int might match the return type of a GCC
7358 builtin and then its argument prototype would still apply. */
7359#ifdef __cplusplus
7360extern "C"
7361#endif
7362char setproject ();
7363int
7364main ()
7365{
7366return setproject ();
7367 ;
7368 return 0;
7369}
7370_ACEOF
7371if ac_fn_c_try_link "$LINENO"; then :
7372 ac_cv_lib_project_setproject=yes
7373else
7374 ac_cv_lib_project_setproject=no
7375fi
7376rm -f core conftest.err conftest.$ac_objext \
7377 conftest$ac_exeext conftest.$ac_ext
7378LIBS=$ac_check_lib_save_LIBS
7379fi
7380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
7381$as_echo "$ac_cv_lib_project_setproject" >&6; }
7382if test "x$ac_cv_lib_project_setproject" = xyes; then :
7383
7384$as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
7385
7386 SSHDLIBS="$SSHDLIBS -lproject"
7387 SP_MSG="yes"
7388fi
7389
7390
7391fi
7392
7393 TEST_SHELL=$SHELL # let configure find us a capable shell
7394 ;;
7395*-*-sunos4*)
7396 CPPFLAGS="$CPPFLAGS -DSUNOS4"
7397 for ac_func in getpwanam
7398do :
7399 ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
7400if test "x$ac_cv_func_getpwanam" = xyes; then :
7401 cat >>confdefs.h <<_ACEOF
7402#define HAVE_GETPWANAM 1
7403_ACEOF
7404
7405fi
7406done
7407
7408 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7409
7410 conf_utmp_location=/etc/utmp
7411 conf_wtmp_location=/var/adm/wtmp
7412 conf_lastlog_location=/var/adm/lastlog
7413 $as_echo "#define USE_PIPES 1" >>confdefs.h
7414
7415 ;;
7416*-ncr-sysv*)
7417 LIBS="$LIBS -lc89"
7418 $as_echo "#define USE_PIPES 1" >>confdefs.h
7419
7420 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7421
7422 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7423
7424 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7425
7426 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7427
7428 ;;
7429*-sni-sysv*)
7430 # /usr/ucblib MUST NOT be searched on ReliantUNIX
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
7432$as_echo_n "checking for dlsym in -ldl... " >&6; }
7433if ${ac_cv_lib_dl_dlsym+:} false; then :
7434 $as_echo_n "(cached) " >&6
7435else
7436 ac_check_lib_save_LIBS=$LIBS
7437LIBS="-ldl $LIBS"
7438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7439/* end confdefs.h. */
7440
7441/* Override any GCC internal prototype to avoid an error.
7442 Use char because int might match the return type of a GCC
7443 builtin and then its argument prototype would still apply. */
7444#ifdef __cplusplus
7445extern "C"
7446#endif
7447char dlsym ();
7448int
7449main ()
7450{
7451return dlsym ();
7452 ;
7453 return 0;
7454}
7455_ACEOF
7456if ac_fn_c_try_link "$LINENO"; then :
7457 ac_cv_lib_dl_dlsym=yes
7458else
7459 ac_cv_lib_dl_dlsym=no
7460fi
7461rm -f core conftest.err conftest.$ac_objext \
7462 conftest$ac_exeext conftest.$ac_ext
7463LIBS=$ac_check_lib_save_LIBS
7464fi
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
7466$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
7467if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
7468 cat >>confdefs.h <<_ACEOF
7469#define HAVE_LIBDL 1
7470_ACEOF
7471
7472 LIBS="-ldl $LIBS"
7473
7474fi
7475
7476 # -lresolv needs to be at the end of LIBS or DNS lookups break
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
7478$as_echo_n "checking for res_query in -lresolv... " >&6; }
7479if ${ac_cv_lib_resolv_res_query+:} false; then :
7480 $as_echo_n "(cached) " >&6
7481else
7482 ac_check_lib_save_LIBS=$LIBS
7483LIBS="-lresolv $LIBS"
7484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7485/* end confdefs.h. */
7486
7487/* Override any GCC internal prototype to avoid an error.
7488 Use char because int might match the return type of a GCC
7489 builtin and then its argument prototype would still apply. */
7490#ifdef __cplusplus
7491extern "C"
7492#endif
7493char res_query ();
7494int
7495main ()
7496{
7497return res_query ();
7498 ;
7499 return 0;
7500}
7501_ACEOF
7502if ac_fn_c_try_link "$LINENO"; then :
7503 ac_cv_lib_resolv_res_query=yes
7504else
7505 ac_cv_lib_resolv_res_query=no
7506fi
7507rm -f core conftest.err conftest.$ac_objext \
7508 conftest$ac_exeext conftest.$ac_ext
7509LIBS=$ac_check_lib_save_LIBS
7510fi
7511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
7512$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
7513if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
7514 LIBS="$LIBS -lresolv"
7515fi
7516
7517 IPADDR_IN_DISPLAY=yes
7518 $as_echo "#define USE_PIPES 1" >>confdefs.h
7519
7520 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7521
7522 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7523
7524 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7525
7526 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7527
7528 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7529
7530 external_path_file=/etc/default/login
7531 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
7532 # Attention: always take care to bind libsocket and libnsl before libc,
7533 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
7534 ;;
7535# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
7536*-*-sysv4.2*)
7537 $as_echo "#define USE_PIPES 1" >>confdefs.h
7538
7539 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7540
7541 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7542
7543 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7544
7545
7546$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7547
7548 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7549
7550 TEST_SHELL=$SHELL # let configure find us a capable shell
7551 ;;
7552# UnixWare 7.x, OpenUNIX 8
7553*-*-sysv5*)
7554 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
7555
7556$as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
7557
7558 $as_echo "#define USE_PIPES 1" >>confdefs.h
7559
7560 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7561
7562 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7563
7564 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7565
7566 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7567
7568 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7569
7570 TEST_SHELL=$SHELL # let configure find us a capable shell
7571 case "$host" in
7572 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
7573 maildir=/var/spool/mail
7574
7575$as_echo "#define BROKEN_LIBIAF 1" >>confdefs.h
7576
7577 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7578
7579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
7580$as_echo_n "checking for getluid in -lprot... " >&6; }
7581if ${ac_cv_lib_prot_getluid+:} false; then :
7582 $as_echo_n "(cached) " >&6
7583else
7584 ac_check_lib_save_LIBS=$LIBS
7585LIBS="-lprot $LIBS"
7586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7587/* end confdefs.h. */
7588
7589/* Override any GCC internal prototype to avoid an error.
7590 Use char because int might match the return type of a GCC
7591 builtin and then its argument prototype would still apply. */
7592#ifdef __cplusplus
7593extern "C"
7594#endif
7595char getluid ();
7596int
7597main ()
7598{
7599return getluid ();
7600 ;
7601 return 0;
7602}
7603_ACEOF
7604if ac_fn_c_try_link "$LINENO"; then :
7605 ac_cv_lib_prot_getluid=yes
7606else
7607 ac_cv_lib_prot_getluid=no
7608fi
7609rm -f core conftest.err conftest.$ac_objext \
7610 conftest$ac_exeext conftest.$ac_ext
7611LIBS=$ac_check_lib_save_LIBS
7612fi
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
7614$as_echo "$ac_cv_lib_prot_getluid" >&6; }
7615if test "x$ac_cv_lib_prot_getluid" = xyes; then :
7616 LIBS="$LIBS -lprot"
7617 for ac_func in getluid setluid
7618do :
7619 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7620ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7621if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7622 cat >>confdefs.h <<_ACEOF
7623#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7624_ACEOF
7625
7626fi
7627done
7628
7629 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7630
7631 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7632
7633
7634fi
7635
7636 ;;
7637 *) $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7638
7639 check_for_libcrypt_later=1
7640 ;;
7641 esac
7642 ;;
7643*-*-sysv*)
7644 ;;
7645# SCO UNIX and OEM versions of SCO UNIX
7646*-*-sco3.2v4*)
7647 as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
7648 ;;
7649# SCO OpenServer 5.x
7650*-*-sco3.2v5*)
7651 if test -z "$GCC"; then
7652 CFLAGS="$CFLAGS -belf"
7653 fi
7654 LIBS="$LIBS -lprot -lx -ltinfo -lm"
7655 no_dev_ptmx=1
7656 $as_echo "#define USE_PIPES 1" >>confdefs.h
7657
7658 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7659
7660 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7661
7662 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7663
7664 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7665
7666 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7667
7668 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7669
7670 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7671
7672 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7673
7674 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7675
7676 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7677
7678 for ac_func in getluid setluid
7679do :
7680 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7681ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7682if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7683 cat >>confdefs.h <<_ACEOF
7684#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7685_ACEOF
7686
7687fi
7688done
7689
7690 MANTYPE=man
7691 TEST_SHELL=$SHELL # let configure find us a capable shell
7692 SKIP_DISABLE_LASTLOG_DEFINE=yes
7693 ;;
7694*-*-unicosmk*)
7695
7696$as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
7697
7698 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7699
7700 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7701
7702 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7703
7704 $as_echo "#define USE_PIPES 1" >>confdefs.h
7705
7706 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7707
7708 LDFLAGS="$LDFLAGS"
7709 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
7710 MANTYPE=cat
7711 ;;
7712*-*-unicosmp*)
7713 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7714
7715 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7716
7717 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7718
7719 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7720
7721 $as_echo "#define USE_PIPES 1" >>confdefs.h
7722
7723 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7724
7725 LDFLAGS="$LDFLAGS"
7726 LIBS="$LIBS -lgen -lacid -ldb"
7727 MANTYPE=cat
7728 ;;
7729*-*-unicos*)
7730 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7731
7732 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7733
7734 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7735
7736 $as_echo "#define USE_PIPES 1" >>confdefs.h
7737
7738 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7739
7740 $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
7741
7742 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
7743 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
7744 MANTYPE=cat
7745 ;;
7746*-dec-osf*)
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
7748$as_echo_n "checking for Digital Unix SIA... " >&6; }
7749 no_osfsia=""
7750
7751# Check whether --with-osfsia was given.
7752if test "${with_osfsia+set}" = set; then :
7753 withval=$with_osfsia;
7754 if test "x$withval" = "xno" ; then
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7756$as_echo "disabled" >&6; }
7757 no_osfsia=1
7758 fi
7759
7760fi
7761
7762 if test -z "$no_osfsia" ; then
7763 if test -f /etc/sia/matrix.conf; then
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7765$as_echo "yes" >&6; }
7766
7767$as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
7768
7769
7770$as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
7771
7772 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7773
7774 LIBS="$LIBS -lsecurity -ldb -lm -laud"
7775 SIA_MSG="yes"
7776 else
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7778$as_echo "no" >&6; }
7779
7780$as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
7781
7782 fi
7783 fi
7784 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7785
7786 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7787
7788 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7789
7790 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7791
7792
7793$as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
7794
7795 ;;
7796
7797*-*-nto-qnx*)
7798 $as_echo "#define USE_PIPES 1" >>confdefs.h
7799
7800 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
7801
7802 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
7803
7804 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7805
7806
7807$as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
7808
7809 enable_etc_default_login=no # has incompatible /etc/default/login
7810 case "$host" in
7811 *-*-nto-qnx6*)
7812 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7813
7814 ;;
7815 esac
7816 ;;
7817
7818*-*-ultrix*)
7819
7820$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
7821
7822
7823$as_echo "#define BROKEN_MMAP 1" >>confdefs.h
7824
7825 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
7826
7827
7828$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
7829
7830 ;;
7831
7832*-*-lynxos)
7833 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
7834
7835$as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
7836
7837 ;;
7838esac
7839
7840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
7841$as_echo_n "checking compiler and flags for sanity... " >&6; }
7842if test "$cross_compiling" = yes; then :
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
7844$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
7845
7846else
7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848/* end confdefs.h. */
7849 #include <stdio.h>
7850int
7851main ()
7852{
7853 exit(0);
7854 ;
7855 return 0;
7856}
7857_ACEOF
7858if ac_fn_c_try_run "$LINENO"; then :
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7860$as_echo "yes" >&6; }
7861else
7862
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7864$as_echo "no" >&6; }
7865 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
7866
7867fi
7868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7869 conftest.$ac_objext conftest.beam conftest.$ac_ext
7870fi
7871
7872
7873# Checks for libraries.
7874ac_fn_c_check_func "$LINENO" "yp_match" "ac_cv_func_yp_match"
7875if test "x$ac_cv_func_yp_match" = xyes; then :
7876
7877else
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_match in -lnsl" >&5
7879$as_echo_n "checking for yp_match in -lnsl... " >&6; }
7880if ${ac_cv_lib_nsl_yp_match+:} false; then :
7881 $as_echo_n "(cached) " >&6
7882else
7883 ac_check_lib_save_LIBS=$LIBS
7884LIBS="-lnsl $LIBS"
7885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886/* end confdefs.h. */
7887
7888/* Override any GCC internal prototype to avoid an error.
7889 Use char because int might match the return type of a GCC
7890 builtin and then its argument prototype would still apply. */
7891#ifdef __cplusplus
7892extern "C"
7893#endif
7894char yp_match ();
7895int
7896main ()
7897{
7898return yp_match ();
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903if ac_fn_c_try_link "$LINENO"; then :
7904 ac_cv_lib_nsl_yp_match=yes
7905else
7906 ac_cv_lib_nsl_yp_match=no
7907fi
7908rm -f core conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext
7910LIBS=$ac_check_lib_save_LIBS
7911fi
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_match" >&5
7913$as_echo "$ac_cv_lib_nsl_yp_match" >&6; }
7914if test "x$ac_cv_lib_nsl_yp_match" = xyes; then :
7915 cat >>confdefs.h <<_ACEOF
7916#define HAVE_LIBNSL 1
7917_ACEOF
7918
7919 LIBS="-lnsl $LIBS"
7920
7921fi
7922
7923fi
7924
7925ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
7926if test "x$ac_cv_func_setsockopt" = xyes; then :
7927
7928else
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
7930$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
7931if ${ac_cv_lib_socket_setsockopt+:} false; then :
7932 $as_echo_n "(cached) " >&6
7933else
7934 ac_check_lib_save_LIBS=$LIBS
7935LIBS="-lsocket $LIBS"
7936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7937/* end confdefs.h. */
7938
7939/* Override any GCC internal prototype to avoid an error.
7940 Use char because int might match the return type of a GCC
7941 builtin and then its argument prototype would still apply. */
7942#ifdef __cplusplus
7943extern "C"
7944#endif
7945char setsockopt ();
7946int
7947main ()
7948{
7949return setsockopt ();
7950 ;
7951 return 0;
7952}
7953_ACEOF
7954if ac_fn_c_try_link "$LINENO"; then :
7955 ac_cv_lib_socket_setsockopt=yes
7956else
7957 ac_cv_lib_socket_setsockopt=no
7958fi
7959rm -f core conftest.err conftest.$ac_objext \
7960 conftest$ac_exeext conftest.$ac_ext
7961LIBS=$ac_check_lib_save_LIBS
7962fi
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
7964$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
7965if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
7966 cat >>confdefs.h <<_ACEOF
7967#define HAVE_LIBSOCKET 1
7968_ACEOF
7969
7970 LIBS="-lsocket $LIBS"
7971
7972fi
7973
7974fi
7975
7976
7977for ac_func in dirname
7978do :
7979 ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
7980if test "x$ac_cv_func_dirname" = xyes; then :
7981 cat >>confdefs.h <<_ACEOF
7982#define HAVE_DIRNAME 1
7983_ACEOF
7984 for ac_header in libgen.h
7985do :
7986 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
7987if test "x$ac_cv_header_libgen_h" = xyes; then :
7988 cat >>confdefs.h <<_ACEOF
7989#define HAVE_LIBGEN_H 1
7990_ACEOF
7991
7992fi
7993
7994done
7995
7996else
7997
7998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
7999$as_echo_n "checking for dirname in -lgen... " >&6; }
8000if ${ac_cv_lib_gen_dirname+:} false; then :
8001 $as_echo_n "(cached) " >&6
8002else
8003 ac_check_lib_save_LIBS=$LIBS
8004LIBS="-lgen $LIBS"
8005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8006/* end confdefs.h. */
8007
8008/* Override any GCC internal prototype to avoid an error.
8009 Use char because int might match the return type of a GCC
8010 builtin and then its argument prototype would still apply. */
8011#ifdef __cplusplus
8012extern "C"
8013#endif
8014char dirname ();
8015int
8016main ()
8017{
8018return dirname ();
8019 ;
8020 return 0;
8021}
8022_ACEOF
8023if ac_fn_c_try_link "$LINENO"; then :
8024 ac_cv_lib_gen_dirname=yes
8025else
8026 ac_cv_lib_gen_dirname=no
8027fi
8028rm -f core conftest.err conftest.$ac_objext \
8029 conftest$ac_exeext conftest.$ac_ext
8030LIBS=$ac_check_lib_save_LIBS
8031fi
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
8033$as_echo "$ac_cv_lib_gen_dirname" >&6; }
8034if test "x$ac_cv_lib_gen_dirname" = xyes; then :
8035
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
8037$as_echo_n "checking for broken dirname... " >&6; }
8038if ${ac_cv_have_broken_dirname+:} false; then :
8039 $as_echo_n "(cached) " >&6
8040else
8041
8042 save_LIBS="$LIBS"
8043 LIBS="$LIBS -lgen"
8044 if test "$cross_compiling" = yes; then :
8045 ac_cv_have_broken_dirname="no"
8046else
8047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8048/* end confdefs.h. */
8049
8050#include <libgen.h>
8051#include <string.h>
8052
8053int main(int argc, char **argv) {
8054 char *s, buf[32];
8055
8056 strncpy(buf,"/etc", 32);
8057 s = dirname(buf);
8058 if (!s || strncmp(s, "/", 32) != 0) {
8059 exit(1);
8060 } else {
8061 exit(0);
8062 }
8063}
8064
8065_ACEOF
8066if ac_fn_c_try_run "$LINENO"; then :
8067 ac_cv_have_broken_dirname="no"
8068else
8069 ac_cv_have_broken_dirname="yes"
8070fi
8071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8072 conftest.$ac_objext conftest.beam conftest.$ac_ext
8073fi
8074
8075 LIBS="$save_LIBS"
8076
8077fi
8078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
8079$as_echo "$ac_cv_have_broken_dirname" >&6; }
8080 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
8081 LIBS="$LIBS -lgen"
8082 $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
8083
8084 for ac_header in libgen.h
8085do :
8086 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8087if test "x$ac_cv_header_libgen_h" = xyes; then :
8088 cat >>confdefs.h <<_ACEOF
8089#define HAVE_LIBGEN_H 1
8090_ACEOF
8091
8092fi
8093
8094done
8095
8096 fi
8097
8098fi
8099
8100
8101fi
8102done
8103
8104
8105ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8106if test "x$ac_cv_func_getspnam" = xyes; then :
8107
8108else
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
8110$as_echo_n "checking for getspnam in -lgen... " >&6; }
8111if ${ac_cv_lib_gen_getspnam+:} false; then :
8112 $as_echo_n "(cached) " >&6
8113else
8114 ac_check_lib_save_LIBS=$LIBS
8115LIBS="-lgen $LIBS"
8116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8117/* end confdefs.h. */
8118
8119/* Override any GCC internal prototype to avoid an error.
8120 Use char because int might match the return type of a GCC
8121 builtin and then its argument prototype would still apply. */
8122#ifdef __cplusplus
8123extern "C"
8124#endif
8125char getspnam ();
8126int
8127main ()
8128{
8129return getspnam ();
8130 ;
8131 return 0;
8132}
8133_ACEOF
8134if ac_fn_c_try_link "$LINENO"; then :
8135 ac_cv_lib_gen_getspnam=yes
8136else
8137 ac_cv_lib_gen_getspnam=no
8138fi
8139rm -f core conftest.err conftest.$ac_objext \
8140 conftest$ac_exeext conftest.$ac_ext
8141LIBS=$ac_check_lib_save_LIBS
8142fi
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
8144$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
8145if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
8146 LIBS="$LIBS -lgen"
8147fi
8148
8149fi
8150
8151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
8152$as_echo_n "checking for library containing basename... " >&6; }
8153if ${ac_cv_search_basename+:} false; then :
8154 $as_echo_n "(cached) " >&6
8155else
8156 ac_func_search_save_LIBS=$LIBS
8157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158/* end confdefs.h. */
8159
8160/* Override any GCC internal prototype to avoid an error.
8161 Use char because int might match the return type of a GCC
8162 builtin and then its argument prototype would still apply. */
8163#ifdef __cplusplus
8164extern "C"
8165#endif
8166char basename ();
8167int
8168main ()
8169{
8170return basename ();
8171 ;
8172 return 0;
8173}
8174_ACEOF
8175for ac_lib in '' gen; do
8176 if test -z "$ac_lib"; then
8177 ac_res="none required"
8178 else
8179 ac_res=-l$ac_lib
8180 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8181 fi
8182 if ac_fn_c_try_link "$LINENO"; then :
8183 ac_cv_search_basename=$ac_res
8184fi
8185rm -f core conftest.err conftest.$ac_objext \
8186 conftest$ac_exeext
8187 if ${ac_cv_search_basename+:} false; then :
8188 break
8189fi
8190done
8191if ${ac_cv_search_basename+:} false; then :
8192
8193else
8194 ac_cv_search_basename=no
8195fi
8196rm conftest.$ac_ext
8197LIBS=$ac_func_search_save_LIBS
8198fi
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
8200$as_echo "$ac_cv_search_basename" >&6; }
8201ac_res=$ac_cv_search_basename
8202if test "$ac_res" != no; then :
8203 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8204
8205$as_echo "#define HAVE_BASENAME 1" >>confdefs.h
8206
8207fi
8208
8209
8210
8211# Check whether --with-zlib was given.
8212if test "${with_zlib+set}" = set; then :
8213 withval=$with_zlib; if test "x$withval" = "xno" ; then
8214 as_fn_error $? "*** zlib is required ***" "$LINENO" 5
8215 elif test "x$withval" != "xyes"; then
8216 if test -d "$withval/lib"; then
8217 if test -n "${need_dash_r}"; then
8218 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
8219 else
8220 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
8221 fi
8222 else
8223 if test -n "${need_dash_r}"; then
8224 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
8225 else
8226 LDFLAGS="-L${withval} ${LDFLAGS}"
8227 fi
8228 fi
8229 if test -d "$withval/include"; then
8230 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
8231 else
8232 CPPFLAGS="-I${withval} ${CPPFLAGS}"
8233 fi
8234 fi
8235
8236fi
8237
8238
8239ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
8240if test "x$ac_cv_header_zlib_h" = xyes; then :
8241
8242else
8243 as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
8244fi
8245
8246
8247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
8248$as_echo_n "checking for deflate in -lz... " >&6; }
8249if ${ac_cv_lib_z_deflate+:} false; then :
8250 $as_echo_n "(cached) " >&6
8251else
8252 ac_check_lib_save_LIBS=$LIBS
8253LIBS="-lz $LIBS"
8254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8255/* end confdefs.h. */
8256
8257/* Override any GCC internal prototype to avoid an error.
8258 Use char because int might match the return type of a GCC
8259 builtin and then its argument prototype would still apply. */
8260#ifdef __cplusplus
8261extern "C"
8262#endif
8263char deflate ();
8264int
8265main ()
8266{
8267return deflate ();
8268 ;
8269 return 0;
8270}
8271_ACEOF
8272if ac_fn_c_try_link "$LINENO"; then :
8273 ac_cv_lib_z_deflate=yes
8274else
8275 ac_cv_lib_z_deflate=no
8276fi
8277rm -f core conftest.err conftest.$ac_objext \
8278 conftest$ac_exeext conftest.$ac_ext
8279LIBS=$ac_check_lib_save_LIBS
8280fi
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
8282$as_echo "$ac_cv_lib_z_deflate" >&6; }
8283if test "x$ac_cv_lib_z_deflate" = xyes; then :
8284 cat >>confdefs.h <<_ACEOF
8285#define HAVE_LIBZ 1
8286_ACEOF
8287
8288 LIBS="-lz $LIBS"
8289
8290else
8291
8292 saved_CPPFLAGS="$CPPFLAGS"
8293 saved_LDFLAGS="$LDFLAGS"
8294 save_LIBS="$LIBS"
8295 if test -n "${need_dash_r}"; then
8296 LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
8297 else
8298 LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
8299 fi
8300 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
8301 LIBS="$LIBS -lz"
8302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8303/* end confdefs.h. */
8304
8305/* Override any GCC internal prototype to avoid an error.
8306 Use char because int might match the return type of a GCC
8307 builtin and then its argument prototype would still apply. */
8308#ifdef __cplusplus
8309extern "C"
8310#endif
8311char deflate ();
8312int
8313main ()
8314{
8315return deflate ();
8316 ;
8317 return 0;
8318}
8319_ACEOF
8320if ac_fn_c_try_link "$LINENO"; then :
8321 $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
8322
8323else
8324
8325 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
8326
8327
8328fi
8329rm -f core conftest.err conftest.$ac_objext \
8330 conftest$ac_exeext conftest.$ac_ext
8331
8332
8333fi
8334
8335
8336
8337# Check whether --with-zlib-version-check was given.
8338if test "${with_zlib_version_check+set}" = set; then :
8339 withval=$with_zlib_version_check; if test "x$withval" = "xno" ; then
8340 zlib_check_nonfatal=1
8341 fi
8342
8343
8344fi
8345
8346
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
8348$as_echo_n "checking for possibly buggy zlib... " >&6; }
8349if test "$cross_compiling" = yes; then :
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
8351$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
8352
8353else
8354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8355/* end confdefs.h. */
8356
8357#include <stdio.h>
8358#include <stdlib.h>
8359#include <zlib.h>
8360
8361int
8362main ()
8363{
8364
8365 int a=0, b=0, c=0, d=0, n, v;
8366 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
8367 if (n != 3 && n != 4)
8368 exit(1);
8369 v = a*1000000 + b*10000 + c*100 + d;
8370 fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
8371
8372 /* 1.1.4 is OK */
8373 if (a == 1 && b == 1 && c >= 4)
8374 exit(0);
8375
8376 /* 1.2.3 and up are OK */
8377 if (v >= 1020300)
8378 exit(0);
8379
8380 exit(2);
8381
8382 ;
8383 return 0;
8384}
8385_ACEOF
8386if ac_fn_c_try_run "$LINENO"; then :
8387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8388$as_echo "no" >&6; }
8389else
8390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8391$as_echo "yes" >&6; }
8392 if test -z "$zlib_check_nonfatal" ; then
8393 as_fn_error $? "*** zlib too old - check config.log ***
8394Your reported zlib version has known security problems. It's possible your
8395vendor has fixed these problems without changing the version number. If you
8396are sure this is the case, you can disable the check by running
8397\"./configure --without-zlib-version-check\".
8398If you are in doubt, upgrade zlib to version 1.2.3 or greater.
8399See http://www.gzip.org/zlib/ for details." "$LINENO" 5
8400 else
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
8402$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
8403 fi
8404
8405fi
8406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8407 conftest.$ac_objext conftest.beam conftest.$ac_ext
8408fi
8409
8410
8411ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
8412if test "x$ac_cv_func_strcasecmp" = xyes; then :
8413
8414else
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
8416$as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
8417if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
8418 $as_echo_n "(cached) " >&6
8419else
8420 ac_check_lib_save_LIBS=$LIBS
8421LIBS="-lresolv $LIBS"
8422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423/* end confdefs.h. */
8424
8425/* Override any GCC internal prototype to avoid an error.
8426 Use char because int might match the return type of a GCC
8427 builtin and then its argument prototype would still apply. */
8428#ifdef __cplusplus
8429extern "C"
8430#endif
8431char strcasecmp ();
8432int
8433main ()
8434{
8435return strcasecmp ();
8436 ;
8437 return 0;
8438}
8439_ACEOF
8440if ac_fn_c_try_link "$LINENO"; then :
8441 ac_cv_lib_resolv_strcasecmp=yes
8442else
8443 ac_cv_lib_resolv_strcasecmp=no
8444fi
8445rm -f core conftest.err conftest.$ac_objext \
8446 conftest$ac_exeext conftest.$ac_ext
8447LIBS=$ac_check_lib_save_LIBS
8448fi
8449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
8450$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
8451if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
8452 LIBS="$LIBS -lresolv"
8453fi
8454
8455
8456fi
8457
8458for ac_func in utimes
8459do :
8460 ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
8461if test "x$ac_cv_func_utimes" = xyes; then :
8462 cat >>confdefs.h <<_ACEOF
8463#define HAVE_UTIMES 1
8464_ACEOF
8465
8466else
8467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
8468$as_echo_n "checking for utimes in -lc89... " >&6; }
8469if ${ac_cv_lib_c89_utimes+:} false; then :
8470 $as_echo_n "(cached) " >&6
8471else
8472 ac_check_lib_save_LIBS=$LIBS
8473LIBS="-lc89 $LIBS"
8474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8475/* end confdefs.h. */
8476
8477/* Override any GCC internal prototype to avoid an error.
8478 Use char because int might match the return type of a GCC
8479 builtin and then its argument prototype would still apply. */
8480#ifdef __cplusplus
8481extern "C"
8482#endif
8483char utimes ();
8484int
8485main ()
8486{
8487return utimes ();
8488 ;
8489 return 0;
8490}
8491_ACEOF
8492if ac_fn_c_try_link "$LINENO"; then :
8493 ac_cv_lib_c89_utimes=yes
8494else
8495 ac_cv_lib_c89_utimes=no
8496fi
8497rm -f core conftest.err conftest.$ac_objext \
8498 conftest$ac_exeext conftest.$ac_ext
8499LIBS=$ac_check_lib_save_LIBS
8500fi
8501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
8502$as_echo "$ac_cv_lib_c89_utimes" >&6; }
8503if test "x$ac_cv_lib_c89_utimes" = xyes; then :
8504 $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
8505
8506 LIBS="$LIBS -lc89"
8507fi
8508
8509
8510fi
8511done
8512
8513
8514for ac_header in bsd/libutil.h libutil.h
8515do :
8516 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8517ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8518if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8519 cat >>confdefs.h <<_ACEOF
8520#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8521_ACEOF
8522
8523fi
8524
8525done
8526
8527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
8528$as_echo_n "checking for library containing fmt_scaled... " >&6; }
8529if ${ac_cv_search_fmt_scaled+:} false; then :
8530 $as_echo_n "(cached) " >&6
8531else
8532 ac_func_search_save_LIBS=$LIBS
8533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8534/* end confdefs.h. */
8535
8536/* Override any GCC internal prototype to avoid an error.
8537 Use char because int might match the return type of a GCC
8538 builtin and then its argument prototype would still apply. */
8539#ifdef __cplusplus
8540extern "C"
8541#endif
8542char fmt_scaled ();
8543int
8544main ()
8545{
8546return fmt_scaled ();
8547 ;
8548 return 0;
8549}
8550_ACEOF
8551for ac_lib in '' util bsd; do
8552 if test -z "$ac_lib"; then
8553 ac_res="none required"
8554 else
8555 ac_res=-l$ac_lib
8556 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8557 fi
8558 if ac_fn_c_try_link "$LINENO"; then :
8559 ac_cv_search_fmt_scaled=$ac_res
8560fi
8561rm -f core conftest.err conftest.$ac_objext \
8562 conftest$ac_exeext
8563 if ${ac_cv_search_fmt_scaled+:} false; then :
8564 break
8565fi
8566done
8567if ${ac_cv_search_fmt_scaled+:} false; then :
8568
8569else
8570 ac_cv_search_fmt_scaled=no
8571fi
8572rm conftest.$ac_ext
8573LIBS=$ac_func_search_save_LIBS
8574fi
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
8576$as_echo "$ac_cv_search_fmt_scaled" >&6; }
8577ac_res=$ac_cv_search_fmt_scaled
8578if test "$ac_res" != no; then :
8579 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8580
8581fi
8582
8583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
8584$as_echo_n "checking for library containing scan_scaled... " >&6; }
8585if ${ac_cv_search_scan_scaled+:} false; then :
8586 $as_echo_n "(cached) " >&6
8587else
8588 ac_func_search_save_LIBS=$LIBS
8589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8590/* end confdefs.h. */
8591
8592/* Override any GCC internal prototype to avoid an error.
8593 Use char because int might match the return type of a GCC
8594 builtin and then its argument prototype would still apply. */
8595#ifdef __cplusplus
8596extern "C"
8597#endif
8598char scan_scaled ();
8599int
8600main ()
8601{
8602return scan_scaled ();
8603 ;
8604 return 0;
8605}
8606_ACEOF
8607for ac_lib in '' util bsd; do
8608 if test -z "$ac_lib"; then
8609 ac_res="none required"
8610 else
8611 ac_res=-l$ac_lib
8612 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8613 fi
8614 if ac_fn_c_try_link "$LINENO"; then :
8615 ac_cv_search_scan_scaled=$ac_res
8616fi
8617rm -f core conftest.err conftest.$ac_objext \
8618 conftest$ac_exeext
8619 if ${ac_cv_search_scan_scaled+:} false; then :
8620 break
8621fi
8622done
8623if ${ac_cv_search_scan_scaled+:} false; then :
8624
8625else
8626 ac_cv_search_scan_scaled=no
8627fi
8628rm conftest.$ac_ext
8629LIBS=$ac_func_search_save_LIBS
8630fi
8631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
8632$as_echo "$ac_cv_search_scan_scaled" >&6; }
8633ac_res=$ac_cv_search_scan_scaled
8634if test "$ac_res" != no; then :
8635 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8636
8637fi
8638
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
8640$as_echo_n "checking for library containing login... " >&6; }
8641if ${ac_cv_search_login+:} false; then :
8642 $as_echo_n "(cached) " >&6
8643else
8644 ac_func_search_save_LIBS=$LIBS
8645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8646/* end confdefs.h. */
8647
8648/* Override any GCC internal prototype to avoid an error.
8649 Use char because int might match the return type of a GCC
8650 builtin and then its argument prototype would still apply. */
8651#ifdef __cplusplus
8652extern "C"
8653#endif
8654char login ();
8655int
8656main ()
8657{
8658return login ();
8659 ;
8660 return 0;
8661}
8662_ACEOF
8663for ac_lib in '' util bsd; do
8664 if test -z "$ac_lib"; then
8665 ac_res="none required"
8666 else
8667 ac_res=-l$ac_lib
8668 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8669 fi
8670 if ac_fn_c_try_link "$LINENO"; then :
8671 ac_cv_search_login=$ac_res
8672fi
8673rm -f core conftest.err conftest.$ac_objext \
8674 conftest$ac_exeext
8675 if ${ac_cv_search_login+:} false; then :
8676 break
8677fi
8678done
8679if ${ac_cv_search_login+:} false; then :
8680
8681else
8682 ac_cv_search_login=no
8683fi
8684rm conftest.$ac_ext
8685LIBS=$ac_func_search_save_LIBS
8686fi
8687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
8688$as_echo "$ac_cv_search_login" >&6; }
8689ac_res=$ac_cv_search_login
8690if test "$ac_res" != no; then :
8691 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8692
8693fi
8694
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
8696$as_echo_n "checking for library containing logout... " >&6; }
8697if ${ac_cv_search_logout+:} false; then :
8698 $as_echo_n "(cached) " >&6
8699else
8700 ac_func_search_save_LIBS=$LIBS
8701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8702/* end confdefs.h. */
8703
8704/* Override any GCC internal prototype to avoid an error.
8705 Use char because int might match the return type of a GCC
8706 builtin and then its argument prototype would still apply. */
8707#ifdef __cplusplus
8708extern "C"
8709#endif
8710char logout ();
8711int
8712main ()
8713{
8714return logout ();
8715 ;
8716 return 0;
8717}
8718_ACEOF
8719for ac_lib in '' util bsd; do
8720 if test -z "$ac_lib"; then
8721 ac_res="none required"
8722 else
8723 ac_res=-l$ac_lib
8724 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8725 fi
8726 if ac_fn_c_try_link "$LINENO"; then :
8727 ac_cv_search_logout=$ac_res
8728fi
8729rm -f core conftest.err conftest.$ac_objext \
8730 conftest$ac_exeext
8731 if ${ac_cv_search_logout+:} false; then :
8732 break
8733fi
8734done
8735if ${ac_cv_search_logout+:} false; then :
8736
8737else
8738 ac_cv_search_logout=no
8739fi
8740rm conftest.$ac_ext
8741LIBS=$ac_func_search_save_LIBS
8742fi
8743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
8744$as_echo "$ac_cv_search_logout" >&6; }
8745ac_res=$ac_cv_search_logout
8746if test "$ac_res" != no; then :
8747 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8748
8749fi
8750
8751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
8752$as_echo_n "checking for library containing logwtmp... " >&6; }
8753if ${ac_cv_search_logwtmp+:} false; then :
8754 $as_echo_n "(cached) " >&6
8755else
8756 ac_func_search_save_LIBS=$LIBS
8757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8758/* end confdefs.h. */
8759
8760/* Override any GCC internal prototype to avoid an error.
8761 Use char because int might match the return type of a GCC
8762 builtin and then its argument prototype would still apply. */
8763#ifdef __cplusplus
8764extern "C"
8765#endif
8766char logwtmp ();
8767int
8768main ()
8769{
8770return logwtmp ();
8771 ;
8772 return 0;
8773}
8774_ACEOF
8775for ac_lib in '' util bsd; do
8776 if test -z "$ac_lib"; then
8777 ac_res="none required"
8778 else
8779 ac_res=-l$ac_lib
8780 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8781 fi
8782 if ac_fn_c_try_link "$LINENO"; then :
8783 ac_cv_search_logwtmp=$ac_res
8784fi
8785rm -f core conftest.err conftest.$ac_objext \
8786 conftest$ac_exeext
8787 if ${ac_cv_search_logwtmp+:} false; then :
8788 break
8789fi
8790done
8791if ${ac_cv_search_logwtmp+:} false; then :
8792
8793else
8794 ac_cv_search_logwtmp=no
8795fi
8796rm conftest.$ac_ext
8797LIBS=$ac_func_search_save_LIBS
8798fi
8799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
8800$as_echo "$ac_cv_search_logwtmp" >&6; }
8801ac_res=$ac_cv_search_logwtmp
8802if test "$ac_res" != no; then :
8803 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8804
8805fi
8806
8807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
8808$as_echo_n "checking for library containing openpty... " >&6; }
8809if ${ac_cv_search_openpty+:} false; then :
8810 $as_echo_n "(cached) " >&6
8811else
8812 ac_func_search_save_LIBS=$LIBS
8813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8814/* end confdefs.h. */
8815
8816/* Override any GCC internal prototype to avoid an error.
8817 Use char because int might match the return type of a GCC
8818 builtin and then its argument prototype would still apply. */
8819#ifdef __cplusplus
8820extern "C"
8821#endif
8822char openpty ();
8823int
8824main ()
8825{
8826return openpty ();
8827 ;
8828 return 0;
8829}
8830_ACEOF
8831for ac_lib in '' util bsd; do
8832 if test -z "$ac_lib"; then
8833 ac_res="none required"
8834 else
8835 ac_res=-l$ac_lib
8836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8837 fi
8838 if ac_fn_c_try_link "$LINENO"; then :
8839 ac_cv_search_openpty=$ac_res
8840fi
8841rm -f core conftest.err conftest.$ac_objext \
8842 conftest$ac_exeext
8843 if ${ac_cv_search_openpty+:} false; then :
8844 break
8845fi
8846done
8847if ${ac_cv_search_openpty+:} false; then :
8848
8849else
8850 ac_cv_search_openpty=no
8851fi
8852rm conftest.$ac_ext
8853LIBS=$ac_func_search_save_LIBS
8854fi
8855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
8856$as_echo "$ac_cv_search_openpty" >&6; }
8857ac_res=$ac_cv_search_openpty
8858if test "$ac_res" != no; then :
8859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8860
8861fi
8862
8863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
8864$as_echo_n "checking for library containing updwtmp... " >&6; }
8865if ${ac_cv_search_updwtmp+:} false; then :
8866 $as_echo_n "(cached) " >&6
8867else
8868 ac_func_search_save_LIBS=$LIBS
8869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870/* end confdefs.h. */
8871
8872/* Override any GCC internal prototype to avoid an error.
8873 Use char because int might match the return type of a GCC
8874 builtin and then its argument prototype would still apply. */
8875#ifdef __cplusplus
8876extern "C"
8877#endif
8878char updwtmp ();
8879int
8880main ()
8881{
8882return updwtmp ();
8883 ;
8884 return 0;
8885}
8886_ACEOF
8887for ac_lib in '' util bsd; do
8888 if test -z "$ac_lib"; then
8889 ac_res="none required"
8890 else
8891 ac_res=-l$ac_lib
8892 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8893 fi
8894 if ac_fn_c_try_link "$LINENO"; then :
8895 ac_cv_search_updwtmp=$ac_res
8896fi
8897rm -f core conftest.err conftest.$ac_objext \
8898 conftest$ac_exeext
8899 if ${ac_cv_search_updwtmp+:} false; then :
8900 break
8901fi
8902done
8903if ${ac_cv_search_updwtmp+:} false; then :
8904
8905else
8906 ac_cv_search_updwtmp=no
8907fi
8908rm conftest.$ac_ext
8909LIBS=$ac_func_search_save_LIBS
8910fi
8911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
8912$as_echo "$ac_cv_search_updwtmp" >&6; }
8913ac_res=$ac_cv_search_updwtmp
8914if test "$ac_res" != no; then :
8915 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8916
8917fi
8918
8919for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
8920do :
8921 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8922ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8923if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8924 cat >>confdefs.h <<_ACEOF
8925#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8926_ACEOF
8927
8928fi
8929done
8930
8931
8932for ac_func in strftime
8933do :
8934 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
8935if test "x$ac_cv_func_strftime" = xyes; then :
8936 cat >>confdefs.h <<_ACEOF
8937#define HAVE_STRFTIME 1
8938_ACEOF
8939
8940else
8941 # strftime is in -lintl on SCO UNIX.
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
8943$as_echo_n "checking for strftime in -lintl... " >&6; }
8944if ${ac_cv_lib_intl_strftime+:} false; then :
8945 $as_echo_n "(cached) " >&6
8946else
8947 ac_check_lib_save_LIBS=$LIBS
8948LIBS="-lintl $LIBS"
8949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8950/* end confdefs.h. */
8951
8952/* Override any GCC internal prototype to avoid an error.
8953 Use char because int might match the return type of a GCC
8954 builtin and then its argument prototype would still apply. */
8955#ifdef __cplusplus
8956extern "C"
8957#endif
8958char strftime ();
8959int
8960main ()
8961{
8962return strftime ();
8963 ;
8964 return 0;
8965}
8966_ACEOF
8967if ac_fn_c_try_link "$LINENO"; then :
8968 ac_cv_lib_intl_strftime=yes
8969else
8970 ac_cv_lib_intl_strftime=no
8971fi
8972rm -f core conftest.err conftest.$ac_objext \
8973 conftest$ac_exeext conftest.$ac_ext
8974LIBS=$ac_check_lib_save_LIBS
8975fi
8976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
8977$as_echo "$ac_cv_lib_intl_strftime" >&6; }
8978if test "x$ac_cv_lib_intl_strftime" = xyes; then :
8979 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
8980
8981LIBS="-lintl $LIBS"
8982fi
8983
8984fi
8985done
8986
8987
8988# Check for ALTDIRFUNC glob() extension
8989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
8990$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
8991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8992/* end confdefs.h. */
8993
8994 #include <glob.h>
8995 #ifdef GLOB_ALTDIRFUNC
8996 FOUNDIT
8997 #endif
8998
8999_ACEOF
9000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9001 $EGREP "FOUNDIT" >/dev/null 2>&1; then :
9002
9003
9004$as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
9005
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9007$as_echo "yes" >&6; }
9008
9009else
9010
9011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012$as_echo "no" >&6; }
9013
9014
9015fi
9016rm -f conftest*
9017
9018
9019# Check for g.gl_matchc glob() extension
9020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
9021$as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
9022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9023/* end confdefs.h. */
9024 #include <glob.h>
9025int
9026main ()
9027{
9028 glob_t g; g.gl_matchc = 1;
9029 ;
9030 return 0;
9031}
9032_ACEOF
9033if ac_fn_c_try_compile "$LINENO"; then :
9034
9035
9036$as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
9037
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9039$as_echo "yes" >&6; }
9040
9041else
9042
9043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9044$as_echo "no" >&6; }
9045
9046fi
9047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9048
9049# Check for g.gl_statv glob() extension
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
9051$as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
9052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9053/* end confdefs.h. */
9054 #include <glob.h>
9055int
9056main ()
9057{
9058
9059#ifndef GLOB_KEEPSTAT
9060#error "glob does not support GLOB_KEEPSTAT extension"
9061#endif
9062glob_t g;
9063g.gl_statv = NULL;
9064
9065 ;
9066 return 0;
9067}
9068_ACEOF
9069if ac_fn_c_try_compile "$LINENO"; then :
9070
9071
9072$as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
9073
9074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9075$as_echo "yes" >&6; }
9076
9077else
9078
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
9081
9082
9083fi
9084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9085
9086ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
9087"
9088if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
9089 ac_have_decl=1
9090else
9091 ac_have_decl=0
9092fi
9093
9094cat >>confdefs.h <<_ACEOF
9095#define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
9096_ACEOF
9097
9098
9099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
9100$as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
9101if test "$cross_compiling" = yes; then :
9102
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
9104$as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
9105 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
9106
9107
9108
9109else
9110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9111/* end confdefs.h. */
9112
9113#include <sys/types.h>
9114#include <dirent.h>
9115int
9116main ()
9117{
9118
9119 struct dirent d;
9120 exit(sizeof(d.d_name)<=sizeof(char));
9121
9122 ;
9123 return 0;
9124}
9125_ACEOF
9126if ac_fn_c_try_run "$LINENO"; then :
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9128$as_echo "yes" >&6; }
9129else
9130
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132$as_echo "no" >&6; }
9133
9134$as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
9135
9136
9137fi
9138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9139 conftest.$ac_objext conftest.beam conftest.$ac_ext
9140fi
9141
9142
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
9144$as_echo_n "checking for /proc/pid/fd directory... " >&6; }
9145if test -d "/proc/$$/fd" ; then
9146
9147$as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
9148
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9150$as_echo "yes" >&6; }
9151else
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156# Check whether user wants S/Key support
9157SKEY_MSG="no"
9158
9159# Check whether --with-skey was given.
9160if test "${with_skey+set}" = set; then :
9161 withval=$with_skey;
9162 if test "x$withval" != "xno" ; then
9163
9164 if test "x$withval" != "xyes" ; then
9165 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9166 LDFLAGS="$LDFLAGS -L${withval}/lib"
9167 fi
9168
9169
9170$as_echo "#define SKEY 1" >>confdefs.h
9171
9172 LIBS="-lskey $LIBS"
9173 SKEY_MSG="yes"
9174
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s/key support" >&5
9176$as_echo_n "checking for s/key support... " >&6; }
9177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9178/* end confdefs.h. */
9179
9180#include <stdio.h>
9181#include <skey.h>
9182
9183int
9184main ()
9185{
9186
9187 char *ff = skey_keyinfo(""); ff="";
9188 exit(0);
9189
9190 ;
9191 return 0;
9192}
9193_ACEOF
9194if ac_fn_c_try_link "$LINENO"; then :
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9196$as_echo "yes" >&6; }
9197else
9198
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200$as_echo "no" >&6; }
9201 as_fn_error $? "** Incomplete or missing s/key libraries." "$LINENO" 5
9202
9203fi
9204rm -f core conftest.err conftest.$ac_objext \
9205 conftest$ac_exeext conftest.$ac_ext
9206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if skeychallenge takes 4 arguments" >&5
9207$as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; }
9208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9209/* end confdefs.h. */
9210
9211#include <stdio.h>
9212#include <skey.h>
9213
9214int
9215main ()
9216{
9217
9218 (void)skeychallenge(NULL,"name","",0);
9219
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224if ac_fn_c_try_compile "$LINENO"; then :
9225
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9227$as_echo "yes" >&6; }
9228
9229$as_echo "#define SKEYCHALLENGE_4ARG 1" >>confdefs.h
9230
9231else
9232
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234$as_echo "no" >&6; }
9235
9236fi
9237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9238 fi
9239
9240
9241fi
9242
9243
9244# Check whether user wants TCP wrappers support
9245TCPW_MSG="no"
9246
9247# Check whether --with-tcp-wrappers was given.
9248if test "${with_tcp_wrappers+set}" = set; then :
9249 withval=$with_tcp_wrappers;
9250 if test "x$withval" != "xno" ; then
9251 saved_LIBS="$LIBS"
9252 saved_LDFLAGS="$LDFLAGS"
9253 saved_CPPFLAGS="$CPPFLAGS"
9254 if test -n "${withval}" && \
9255 test "x${withval}" != "xyes"; then
9256 if test -d "${withval}/lib"; then
9257 if test -n "${need_dash_r}"; then
9258 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
9259 else
9260 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9261 fi
9262 else
9263 if test -n "${need_dash_r}"; then
9264 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
9265 else
9266 LDFLAGS="-L${withval} ${LDFLAGS}"
9267 fi
9268 fi
9269 if test -d "${withval}/include"; then
9270 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
9271 else
9272 CPPFLAGS="-I${withval} ${CPPFLAGS}"
9273 fi
9274 fi
9275 LIBS="-lwrap $LIBS"
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwrap" >&5
9277$as_echo_n "checking for libwrap... " >&6; }
9278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9279/* end confdefs.h. */
9280
9281#include <sys/types.h>
9282#include <sys/socket.h>
9283#include <netinet/in.h>
9284#include <tcpd.h>
9285int deny_severity = 0, allow_severity = 0;
9286
9287int
9288main ()
9289{
9290
9291 hosts_access(0);
9292
9293 ;
9294 return 0;
9295}
9296_ACEOF
9297if ac_fn_c_try_link "$LINENO"; then :
9298
9299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9300$as_echo "yes" >&6; }
9301
9302$as_echo "#define LIBWRAP 1" >>confdefs.h
9303
9304 SSHDLIBS="$SSHDLIBS -lwrap"
9305 TCPW_MSG="yes"
9306
9307else
9308
9309 as_fn_error $? "*** libwrap missing" "$LINENO" 5
9310
9311
9312fi
9313rm -f core conftest.err conftest.$ac_objext \
9314 conftest$ac_exeext conftest.$ac_ext
9315 LIBS="$saved_LIBS"
9316 fi
9317
9318
9319fi
9320
9321
9322# Check whether user wants to use ldns
9323LDNS_MSG="no"
9324
9325# Check whether --with-ldns was given.
9326if test "${with_ldns+set}" = set; then :
9327 withval=$with_ldns;
9328 if test "x$withval" != "xno" ; then
9329
9330 if test "x$withval" != "xyes" ; then
9331 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9332 LDFLAGS="$LDFLAGS -L${withval}/lib"
9333 fi
9334
9335
9336$as_echo "#define HAVE_LDNS 1" >>confdefs.h
9337
9338 LIBS="-lldns $LIBS"
9339 LDNS_MSG="yes"
9340
9341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
9342$as_echo_n "checking for ldns support... " >&6; }
9343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9344/* end confdefs.h. */
9345
9346#include <stdio.h>
9347#include <stdlib.h>
9348#include <stdint.h>
9349#include <ldns/ldns.h>
9350int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
9351
9352
9353_ACEOF
9354if ac_fn_c_try_link "$LINENO"; then :
9355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9356$as_echo "yes" >&6; }
9357else
9358
9359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9360$as_echo "no" >&6; }
9361 as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
9362
9363fi
9364rm -f core conftest.err conftest.$ac_objext \
9365 conftest$ac_exeext conftest.$ac_ext
9366 fi
9367
9368
9369fi
9370
9371
9372# Check whether user wants libedit support
9373LIBEDIT_MSG="no"
9374
9375# Check whether --with-libedit was given.
9376if test "${with_libedit+set}" = set; then :
9377 withval=$with_libedit; if test "x$withval" != "xno" ; then
9378 if test "x$withval" = "xyes" ; then
9379 if test -n "$ac_tool_prefix"; then
9380 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9381set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383$as_echo_n "checking for $ac_word... " >&6; }
9384if ${ac_cv_path_PKGCONFIG+:} false; then :
9385 $as_echo_n "(cached) " >&6
9386else
9387 case $PKGCONFIG in
9388 [\\/]* | ?:[\\/]*)
9389 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
9390 ;;
9391 *)
9392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393for as_dir in $PATH
9394do
9395 IFS=$as_save_IFS
9396 test -z "$as_dir" && as_dir=.
9397 for ac_exec_ext in '' $ac_executable_extensions; do
9398 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9399 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
9400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401 break 2
9402 fi
9403done
9404 done
9405IFS=$as_save_IFS
9406
9407 ;;
9408esac
9409fi
9410PKGCONFIG=$ac_cv_path_PKGCONFIG
9411if test -n "$PKGCONFIG"; then
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
9413$as_echo "$PKGCONFIG" >&6; }
9414else
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
9417fi
9418
9419
9420fi
9421if test -z "$ac_cv_path_PKGCONFIG"; then
9422 ac_pt_PKGCONFIG=$PKGCONFIG
9423 # Extract the first word of "pkg-config", so it can be a program name with args.
9424set dummy pkg-config; ac_word=$2
9425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9426$as_echo_n "checking for $ac_word... " >&6; }
9427if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
9428 $as_echo_n "(cached) " >&6
9429else
9430 case $ac_pt_PKGCONFIG in
9431 [\\/]* | ?:[\\/]*)
9432 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
9433 ;;
9434 *)
9435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9436for as_dir in $PATH
9437do
9438 IFS=$as_save_IFS
9439 test -z "$as_dir" && as_dir=.
9440 for ac_exec_ext in '' $ac_executable_extensions; do
9441 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9442 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
9443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9444 break 2
9445 fi
9446done
9447 done
9448IFS=$as_save_IFS
9449
9450 ;;
9451esac
9452fi
9453ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
9454if test -n "$ac_pt_PKGCONFIG"; then
9455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
9456$as_echo "$ac_pt_PKGCONFIG" >&6; }
9457else
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459$as_echo "no" >&6; }
9460fi
9461
9462 if test "x$ac_pt_PKGCONFIG" = x; then
9463 PKGCONFIG="no"
9464 else
9465 case $cross_compiling:$ac_tool_warned in
9466yes:)
9467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9469ac_tool_warned=yes ;;
9470esac
9471 PKGCONFIG=$ac_pt_PKGCONFIG
9472 fi
9473else
9474 PKGCONFIG="$ac_cv_path_PKGCONFIG"
9475fi
9476
9477 if test "x$PKGCONFIG" != "xno"; then
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
9479$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
9480 if "$PKGCONFIG" libedit; then
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9482$as_echo "yes" >&6; }
9483 use_pkgconfig_for_libedit=yes
9484 else
9485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
9487 fi
9488 fi
9489 else
9490 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9491 if test -n "${need_dash_r}"; then
9492 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
9493 else
9494 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9495 fi
9496 fi
9497 if test "x$use_pkgconfig_for_libedit" = "xyes"; then
9498 LIBEDIT=`$PKGCONFIG --libs-only-l libedit`
9499 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
9500 else
9501 LIBEDIT="-ledit -lcurses"
9502 fi
9503 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
9504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
9505$as_echo_n "checking for el_init in -ledit... " >&6; }
9506if ${ac_cv_lib_edit_el_init+:} false; then :
9507 $as_echo_n "(cached) " >&6
9508else
9509 ac_check_lib_save_LIBS=$LIBS
9510LIBS="-ledit $OTHERLIBS
9511 $LIBS"
9512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9513/* end confdefs.h. */
9514
9515/* Override any GCC internal prototype to avoid an error.
9516 Use char because int might match the return type of a GCC
9517 builtin and then its argument prototype would still apply. */
9518#ifdef __cplusplus
9519extern "C"
9520#endif
9521char el_init ();
9522int
9523main ()
9524{
9525return el_init ();
9526 ;
9527 return 0;
9528}
9529_ACEOF
9530if ac_fn_c_try_link "$LINENO"; then :
9531 ac_cv_lib_edit_el_init=yes
9532else
9533 ac_cv_lib_edit_el_init=no
9534fi
9535rm -f core conftest.err conftest.$ac_objext \
9536 conftest$ac_exeext conftest.$ac_ext
9537LIBS=$ac_check_lib_save_LIBS
9538fi
9539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
9540$as_echo "$ac_cv_lib_edit_el_init" >&6; }
9541if test "x$ac_cv_lib_edit_el_init" = xyes; then :
9542
9543$as_echo "#define USE_LIBEDIT 1" >>confdefs.h
9544
9545 LIBEDIT_MSG="yes"
9546
9547
9548else
9549 as_fn_error $? "libedit not found" "$LINENO" 5
9550fi
9551
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
9553$as_echo_n "checking if libedit version is compatible... " >&6; }
9554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9555/* end confdefs.h. */
9556 #include <histedit.h>
9557int
9558main ()
9559{
9560
9561 int i = H_SETSIZE;
9562 el_init("", NULL, NULL, NULL);
9563 exit(0);
9564
9565 ;
9566 return 0;
9567}
9568_ACEOF
9569if ac_fn_c_try_compile "$LINENO"; then :
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9571$as_echo "yes" >&6; }
9572else
9573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9574$as_echo "no" >&6; }
9575 as_fn_error $? "libedit version is not compatible" "$LINENO" 5
9576
9577fi
9578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9579 fi
9580
9581fi
9582
9583
9584AUDIT_MODULE=none
9585
9586# Check whether --with-audit was given.
9587if test "${with_audit+set}" = set; then :
9588 withval=$with_audit;
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
9590$as_echo_n "checking for supported audit module... " >&6; }
9591 case "$withval" in
9592 bsm)
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
9594$as_echo "bsm" >&6; }
9595 AUDIT_MODULE=bsm
9596 for ac_header in bsm/audit.h
9597do :
9598 ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
9599#ifdef HAVE_TIME_H
9600# include <time.h>
9601#endif
9602
9603
9604"
9605if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
9606 cat >>confdefs.h <<_ACEOF
9607#define HAVE_BSM_AUDIT_H 1
9608_ACEOF
9609
9610else
9611 as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
9612fi
9613
9614done
9615
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
9617$as_echo_n "checking for getaudit in -lbsm... " >&6; }
9618if ${ac_cv_lib_bsm_getaudit+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620else
9621 ac_check_lib_save_LIBS=$LIBS
9622LIBS="-lbsm $LIBS"
9623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9624/* end confdefs.h. */
9625
9626/* Override any GCC internal prototype to avoid an error.
9627 Use char because int might match the return type of a GCC
9628 builtin and then its argument prototype would still apply. */
9629#ifdef __cplusplus
9630extern "C"
9631#endif
9632char getaudit ();
9633int
9634main ()
9635{
9636return getaudit ();
9637 ;
9638 return 0;
9639}
9640_ACEOF
9641if ac_fn_c_try_link "$LINENO"; then :
9642 ac_cv_lib_bsm_getaudit=yes
9643else
9644 ac_cv_lib_bsm_getaudit=no
9645fi
9646rm -f core conftest.err conftest.$ac_objext \
9647 conftest$ac_exeext conftest.$ac_ext
9648LIBS=$ac_check_lib_save_LIBS
9649fi
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
9651$as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
9652if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
9653 cat >>confdefs.h <<_ACEOF
9654#define HAVE_LIBBSM 1
9655_ACEOF
9656
9657 LIBS="-lbsm $LIBS"
9658
9659else
9660 as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
9661fi
9662
9663 for ac_func in getaudit
9664do :
9665 ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
9666if test "x$ac_cv_func_getaudit" = xyes; then :
9667 cat >>confdefs.h <<_ACEOF
9668#define HAVE_GETAUDIT 1
9669_ACEOF
9670
9671else
9672 as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
9673fi
9674done
9675
9676 # These are optional
9677 for ac_func in getaudit_addr aug_get_machine
9678do :
9679 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9680ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9681if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9682 cat >>confdefs.h <<_ACEOF
9683#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9684_ACEOF
9685
9686fi
9687done
9688
9689
9690$as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
9691
9692 if test "$sol2ver" -eq 11; then
9693 SSHDLIBS="$SSHDLIBS -lscf"
9694
9695$as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
9696
9697 fi
9698 ;;
9699 linux)
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
9701$as_echo "linux" >&6; }
9702 AUDIT_MODULE=linux
9703 for ac_header in libaudit.h
9704do :
9705 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
9706if test "x$ac_cv_header_libaudit_h" = xyes; then :
9707 cat >>confdefs.h <<_ACEOF
9708#define HAVE_LIBAUDIT_H 1
9709_ACEOF
9710
9711fi
9712
9713done
9714
9715 SSHDLIBS="$SSHDLIBS -laudit"
9716
9717$as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
9718
9719 ;;
9720 debug)
9721 AUDIT_MODULE=debug
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
9723$as_echo "debug" >&6; }
9724
9725$as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
9726
9727 ;;
9728 no)
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9730$as_echo "no" >&6; }
9731 ;;
9732 *)
9733 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
9734 ;;
9735 esac
9736
9737fi
9738
9739
9740for ac_func in \
9741 arc4random \
9742 arc4random_buf \
9743 arc4random_uniform \
9744 asprintf \
9745 b64_ntop \
9746 __b64_ntop \
9747 b64_pton \
9748 __b64_pton \
9749 bcopy \
9750 bindresvport_sa \
9751 clock \
9752 closefrom \
9753 dirfd \
9754 endgrent \
9755 fchmod \
9756 fchown \
9757 freeaddrinfo \
9758 fstatvfs \
9759 futimes \
9760 getaddrinfo \
9761 getcwd \
9762 getgrouplist \
9763 getnameinfo \
9764 getopt \
9765 getpeereid \
9766 getpeerucred \
9767 getpgid \
9768 getpgrp \
9769 _getpty \
9770 getrlimit \
9771 getttyent \
9772 glob \
9773 group_from_gid \
9774 inet_aton \
9775 inet_ntoa \
9776 inet_ntop \
9777 innetgr \
9778 login_getcapbool \
9779 mblen \
9780 md5_crypt \
9781 memmove \
9782 mkdtemp \
9783 mmap \
9784 ngetaddrinfo \
9785 nsleep \
9786 ogetaddrinfo \
9787 openlog_r \
9788 poll \
9789 prctl \
9790 pstat \
9791 readpassphrase \
9792 realpath \
9793 recvmsg \
9794 rresvport_af \
9795 sendmsg \
9796 setdtablesize \
9797 setegid \
9798 setenv \
9799 seteuid \
9800 setgroupent \
9801 setgroups \
9802 setlinebuf \
9803 setlogin \
9804 setpassent\
9805 setpcred \
9806 setproctitle \
9807 setregid \
9808 setreuid \
9809 setrlimit \
9810 setsid \
9811 setvbuf \
9812 sigaction \
9813 sigvec \
9814 snprintf \
9815 socketpair \
9816 statfs \
9817 statvfs \
9818 strdup \
9819 strerror \
9820 strlcat \
9821 strlcpy \
9822 strmode \
9823 strnlen \
9824 strnvis \
9825 strptime \
9826 strtonum \
9827 strtoll \
9828 strtoul \
9829 strtoull \
9830 swap32 \
9831 sysconf \
9832 tcgetpgrp \
9833 timingsafe_bcmp \
9834 truncate \
9835 unsetenv \
9836 updwtmpx \
9837 user_from_uid \
9838 usleep \
9839 vasprintf \
9840 vhangup \
9841 vsnprintf \
9842 waitpid \
9843
9844do :
9845 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9846ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9847if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9848 cat >>confdefs.h <<_ACEOF
9849#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9850_ACEOF
9851
9852fi
9853done
9854
9855
9856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857/* end confdefs.h. */
9858 #include <ctype.h>
9859int
9860main ()
9861{
9862 return (isblank('a'));
9863 ;
9864 return 0;
9865}
9866_ACEOF
9867if ac_fn_c_try_link "$LINENO"; then :
9868
9869$as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
9870
9871
9872fi
9873rm -f core conftest.err conftest.$ac_objext \
9874 conftest$ac_exeext conftest.$ac_ext
9875
9876# PKCS#11 support requires dlopen() and co
9877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9878$as_echo_n "checking for library containing dlopen... " >&6; }
9879if ${ac_cv_search_dlopen+:} false; then :
9880 $as_echo_n "(cached) " >&6
9881else
9882 ac_func_search_save_LIBS=$LIBS
9883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9884/* end confdefs.h. */
9885
9886/* Override any GCC internal prototype to avoid an error.
9887 Use char because int might match the return type of a GCC
9888 builtin and then its argument prototype would still apply. */
9889#ifdef __cplusplus
9890extern "C"
9891#endif
9892char dlopen ();
9893int
9894main ()
9895{
9896return dlopen ();
9897 ;
9898 return 0;
9899}
9900_ACEOF
9901for ac_lib in '' dl; do
9902 if test -z "$ac_lib"; then
9903 ac_res="none required"
9904 else
9905 ac_res=-l$ac_lib
9906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9907 fi
9908 if ac_fn_c_try_link "$LINENO"; then :
9909 ac_cv_search_dlopen=$ac_res
9910fi
9911rm -f core conftest.err conftest.$ac_objext \
9912 conftest$ac_exeext
9913 if ${ac_cv_search_dlopen+:} false; then :
9914 break
9915fi
9916done
9917if ${ac_cv_search_dlopen+:} false; then :
9918
9919else
9920 ac_cv_search_dlopen=no
9921fi
9922rm conftest.$ac_ext
9923LIBS=$ac_func_search_save_LIBS
9924fi
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9926$as_echo "$ac_cv_search_dlopen" >&6; }
9927ac_res=$ac_cv_search_dlopen
9928if test "$ac_res" != no; then :
9929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9930
9931$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
9932
9933
9934fi
9935
9936
9937# IRIX has a const char return value for gai_strerror()
9938for ac_func in gai_strerror
9939do :
9940 ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
9941if test "x$ac_cv_func_gai_strerror" = xyes; then :
9942 cat >>confdefs.h <<_ACEOF
9943#define HAVE_GAI_STRERROR 1
9944_ACEOF
9945
9946 $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
9947
9948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9949/* end confdefs.h. */
9950
9951#include <sys/types.h>
9952#include <sys/socket.h>
9953#include <netdb.h>
9954
9955const char *gai_strerror(int);
9956
9957int
9958main ()
9959{
9960
9961 char *str;
9962 str = gai_strerror(0);
9963
9964 ;
9965 return 0;
9966}
9967_ACEOF
9968if ac_fn_c_try_compile "$LINENO"; then :
9969
9970
9971$as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
9972
9973fi
9974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9975fi
9976done
9977
9978
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
9980$as_echo_n "checking for library containing nanosleep... " >&6; }
9981if ${ac_cv_search_nanosleep+:} false; then :
9982 $as_echo_n "(cached) " >&6
9983else
9984 ac_func_search_save_LIBS=$LIBS
9985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9986/* end confdefs.h. */
9987
9988/* Override any GCC internal prototype to avoid an error.
9989 Use char because int might match the return type of a GCC
9990 builtin and then its argument prototype would still apply. */
9991#ifdef __cplusplus
9992extern "C"
9993#endif
9994char nanosleep ();
9995int
9996main ()
9997{
9998return nanosleep ();
9999 ;
10000 return 0;
10001}
10002_ACEOF
10003for ac_lib in '' rt posix4; do
10004 if test -z "$ac_lib"; then
10005 ac_res="none required"
10006 else
10007 ac_res=-l$ac_lib
10008 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10009 fi
10010 if ac_fn_c_try_link "$LINENO"; then :
10011 ac_cv_search_nanosleep=$ac_res
10012fi
10013rm -f core conftest.err conftest.$ac_objext \
10014 conftest$ac_exeext
10015 if ${ac_cv_search_nanosleep+:} false; then :
10016 break
10017fi
10018done
10019if ${ac_cv_search_nanosleep+:} false; then :
10020
10021else
10022 ac_cv_search_nanosleep=no
10023fi
10024rm conftest.$ac_ext
10025LIBS=$ac_func_search_save_LIBS
10026fi
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
10028$as_echo "$ac_cv_search_nanosleep" >&6; }
10029ac_res=$ac_cv_search_nanosleep
10030if test "$ac_res" != no; then :
10031 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10032
10033$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
10034
10035fi
10036
10037
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
10039$as_echo_n "checking for library containing clock_gettime... " >&6; }
10040if ${ac_cv_search_clock_gettime+:} false; then :
10041 $as_echo_n "(cached) " >&6
10042else
10043 ac_func_search_save_LIBS=$LIBS
10044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10045/* end confdefs.h. */
10046
10047/* Override any GCC internal prototype to avoid an error.
10048 Use char because int might match the return type of a GCC
10049 builtin and then its argument prototype would still apply. */
10050#ifdef __cplusplus
10051extern "C"
10052#endif
10053char clock_gettime ();
10054int
10055main ()
10056{
10057return clock_gettime ();
10058 ;
10059 return 0;
10060}
10061_ACEOF
10062for ac_lib in '' rt; do
10063 if test -z "$ac_lib"; then
10064 ac_res="none required"
10065 else
10066 ac_res=-l$ac_lib
10067 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10068 fi
10069 if ac_fn_c_try_link "$LINENO"; then :
10070 ac_cv_search_clock_gettime=$ac_res
10071fi
10072rm -f core conftest.err conftest.$ac_objext \
10073 conftest$ac_exeext
10074 if ${ac_cv_search_clock_gettime+:} false; then :
10075 break
10076fi
10077done
10078if ${ac_cv_search_clock_gettime+:} false; then :
10079
10080else
10081 ac_cv_search_clock_gettime=no
10082fi
10083rm conftest.$ac_ext
10084LIBS=$ac_func_search_save_LIBS
10085fi
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
10087$as_echo "$ac_cv_search_clock_gettime" >&6; }
10088ac_res=$ac_cv_search_clock_gettime
10089if test "$ac_res" != no; then :
10090 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10091
10092$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10093
10094fi
10095
10096
10097ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default"
10098if test "x$ac_cv_have_decl_getrusage" = xyes; then :
10099 for ac_func in getrusage
10100do :
10101 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
10102if test "x$ac_cv_func_getrusage" = xyes; then :
10103 cat >>confdefs.h <<_ACEOF
10104#define HAVE_GETRUSAGE 1
10105_ACEOF
10106
10107fi
10108done
10109
10110fi
10111
10112ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
10113#ifdef HAVE_STRING_H
10114# include <string.h>
10115#endif
10116
10117"
10118if test "x$ac_cv_have_decl_strsep" = xyes; then :
10119 for ac_func in strsep
10120do :
10121 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
10122if test "x$ac_cv_func_strsep" = xyes; then :
10123 cat >>confdefs.h <<_ACEOF
10124#define HAVE_STRSEP 1
10125_ACEOF
10126
10127fi
10128done
10129
10130fi
10131
10132
10133ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
10134
10135"
10136if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
10137 $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
10138
10139else
10140 for ac_func in tcsendbreak
10141do :
10142 ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
10143if test "x$ac_cv_func_tcsendbreak" = xyes; then :
10144 cat >>confdefs.h <<_ACEOF
10145#define HAVE_TCSENDBREAK 1
10146_ACEOF
10147
10148fi
10149done
10150
10151fi
10152
10153
10154ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
10155"
10156if test "x$ac_cv_have_decl_h_errno" = xyes; then :
10157 ac_have_decl=1
10158else
10159 ac_have_decl=0
10160fi
10161
10162cat >>confdefs.h <<_ACEOF
10163#define HAVE_DECL_H_ERRNO $ac_have_decl
10164_ACEOF
10165
10166
10167ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
10168#include <sys/types.h>
10169#include <sys/socket.h>
10170
10171"
10172if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
10173 ac_have_decl=1
10174else
10175 ac_have_decl=0
10176fi
10177
10178cat >>confdefs.h <<_ACEOF
10179#define HAVE_DECL_SHUT_RD $ac_have_decl
10180_ACEOF
10181
10182
10183ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
10184#include <sys/types.h>
10185#ifdef HAVE_SYS_STAT_H
10186# include <sys/stat.h>
10187#endif
10188#ifdef HAVE_FCNTL_H
10189# include <fcntl.h>
10190#endif
10191
10192"
10193if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
10194 ac_have_decl=1
10195else
10196 ac_have_decl=0
10197fi
10198
10199cat >>confdefs.h <<_ACEOF
10200#define HAVE_DECL_O_NONBLOCK $ac_have_decl
10201_ACEOF
10202
10203
10204ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
10205#include <sys/types.h>
10206#include <sys/uio.h>
10207#include <unistd.h>
10208
10209"
10210if test "x$ac_cv_have_decl_writev" = xyes; then :
10211 ac_have_decl=1
10212else
10213 ac_have_decl=0
10214fi
10215
10216cat >>confdefs.h <<_ACEOF
10217#define HAVE_DECL_WRITEV $ac_have_decl
10218_ACEOF
10219
10220
10221ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
10222#include <sys/param.h>
10223
10224"
10225if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
10226 ac_have_decl=1
10227else
10228 ac_have_decl=0
10229fi
10230
10231cat >>confdefs.h <<_ACEOF
10232#define HAVE_DECL_MAXSYMLINKS $ac_have_decl
10233_ACEOF
10234
10235
10236ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
10237#include <stddef.h>
10238
10239"
10240if test "x$ac_cv_have_decl_offsetof" = xyes; then :
10241 ac_have_decl=1
10242else
10243 ac_have_decl=0
10244fi
10245
10246cat >>confdefs.h <<_ACEOF
10247#define HAVE_DECL_OFFSETOF $ac_have_decl
10248_ACEOF
10249
10250
10251# extra bits for select(2)
10252ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
10253#include <sys/param.h>
10254#include <sys/types.h>
10255#ifdef HAVE_SYS_SYSMACROS_H
10256#include <sys/sysmacros.h>
10257#endif
10258#ifdef HAVE_SYS_SELECT_H
10259#include <sys/select.h>
10260#endif
10261#ifdef HAVE_SYS_TIME_H
10262#include <sys/time.h>
10263#endif
10264#ifdef HAVE_UNISTD_H
10265#include <unistd.h>
10266#endif
10267
10268"
10269if test "x$ac_cv_have_decl_howmany" = xyes; then :
10270 ac_have_decl=1
10271else
10272 ac_have_decl=0
10273fi
10274
10275cat >>confdefs.h <<_ACEOF
10276#define HAVE_DECL_HOWMANY $ac_have_decl
10277_ACEOF
10278ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
10279#include <sys/param.h>
10280#include <sys/types.h>
10281#ifdef HAVE_SYS_SYSMACROS_H
10282#include <sys/sysmacros.h>
10283#endif
10284#ifdef HAVE_SYS_SELECT_H
10285#include <sys/select.h>
10286#endif
10287#ifdef HAVE_SYS_TIME_H
10288#include <sys/time.h>
10289#endif
10290#ifdef HAVE_UNISTD_H
10291#include <unistd.h>
10292#endif
10293
10294"
10295if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
10296 ac_have_decl=1
10297else
10298 ac_have_decl=0
10299fi
10300
10301cat >>confdefs.h <<_ACEOF
10302#define HAVE_DECL_NFDBITS $ac_have_decl
10303_ACEOF
10304
10305ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
10306#include <sys/param.h>
10307#include <sys/types.h>
10308#ifdef HAVE_SYS_SELECT_H
10309#include <sys/select.h>
10310#endif
10311#ifdef HAVE_SYS_TIME_H
10312#include <sys/time.h>
10313#endif
10314#ifdef HAVE_UNISTD_H
10315#include <unistd.h>
10316#endif
10317
10318"
10319if test "x$ac_cv_type_fd_mask" = xyes; then :
10320
10321cat >>confdefs.h <<_ACEOF
10322#define HAVE_FD_MASK 1
10323_ACEOF
10324
10325
10326fi
10327
10328
10329for ac_func in setresuid
10330do :
10331 ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
10332if test "x$ac_cv_func_setresuid" = xyes; then :
10333 cat >>confdefs.h <<_ACEOF
10334#define HAVE_SETRESUID 1
10335_ACEOF
10336
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
10338$as_echo_n "checking if setresuid seems to work... " >&6; }
10339 if test "$cross_compiling" = yes; then :
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
10341$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
10342
10343else
10344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10345/* end confdefs.h. */
10346
10347#include <stdlib.h>
10348#include <errno.h>
10349
10350int
10351main ()
10352{
10353
10354 errno=0;
10355 setresuid(0,0,0);
10356 if (errno==ENOSYS)
10357 exit(1);
10358 else
10359 exit(0);
10360
10361 ;
10362 return 0;
10363}
10364_ACEOF
10365if ac_fn_c_try_run "$LINENO"; then :
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10367$as_echo "yes" >&6; }
10368else
10369
10370$as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
10371
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
10373$as_echo "not implemented" >&6; }
10374fi
10375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10376 conftest.$ac_objext conftest.beam conftest.$ac_ext
10377fi
10378
10379
10380fi
10381done
10382
10383
10384for ac_func in setresgid
10385do :
10386 ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
10387if test "x$ac_cv_func_setresgid" = xyes; then :
10388 cat >>confdefs.h <<_ACEOF
10389#define HAVE_SETRESGID 1
10390_ACEOF
10391
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
10393$as_echo_n "checking if setresgid seems to work... " >&6; }
10394 if test "$cross_compiling" = yes; then :
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
10396$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
10397
10398else
10399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10400/* end confdefs.h. */
10401
10402#include <stdlib.h>
10403#include <errno.h>
10404
10405int
10406main ()
10407{
10408
10409 errno=0;
10410 setresgid(0,0,0);
10411 if (errno==ENOSYS)
10412 exit(1);
10413 else
10414 exit(0);
10415
10416 ;
10417 return 0;
10418}
10419_ACEOF
10420if ac_fn_c_try_run "$LINENO"; then :
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10422$as_echo "yes" >&6; }
10423else
10424
10425$as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
10426
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
10428$as_echo "not implemented" >&6; }
10429fi
10430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10431 conftest.$ac_objext conftest.beam conftest.$ac_ext
10432fi
10433
10434
10435fi
10436done
10437
10438
10439for ac_func in gettimeofday time
10440do :
10441 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10442ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10443if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10444 cat >>confdefs.h <<_ACEOF
10445#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10446_ACEOF
10447
10448fi
10449done
10450
10451for ac_func in endutent getutent getutid getutline pututline setutent
10452do :
10453 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10454ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10455if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10456 cat >>confdefs.h <<_ACEOF
10457#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10458_ACEOF
10459
10460fi
10461done
10462
10463for ac_func in utmpname
10464do :
10465 ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
10466if test "x$ac_cv_func_utmpname" = xyes; then :
10467 cat >>confdefs.h <<_ACEOF
10468#define HAVE_UTMPNAME 1
10469_ACEOF
10470
10471fi
10472done
10473
10474for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
10475do :
10476 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10477ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10478if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10479 cat >>confdefs.h <<_ACEOF
10480#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10481_ACEOF
10482
10483fi
10484done
10485
10486for ac_func in setutxdb setutxent utmpxname
10487do :
10488 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10489ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10490if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10491 cat >>confdefs.h <<_ACEOF
10492#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10493_ACEOF
10494
10495fi
10496done
10497
10498for ac_func in getlastlogxbyname
10499do :
10500 ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
10501if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
10502 cat >>confdefs.h <<_ACEOF
10503#define HAVE_GETLASTLOGXBYNAME 1
10504_ACEOF
10505
10506fi
10507done
10508
10509
10510ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
10511if test "x$ac_cv_func_daemon" = xyes; then :
10512
10513$as_echo "#define HAVE_DAEMON 1" >>confdefs.h
10514
10515else
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
10517$as_echo_n "checking for daemon in -lbsd... " >&6; }
10518if ${ac_cv_lib_bsd_daemon+:} false; then :
10519 $as_echo_n "(cached) " >&6
10520else
10521 ac_check_lib_save_LIBS=$LIBS
10522LIBS="-lbsd $LIBS"
10523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10524/* end confdefs.h. */
10525
10526/* Override any GCC internal prototype to avoid an error.
10527 Use char because int might match the return type of a GCC
10528 builtin and then its argument prototype would still apply. */
10529#ifdef __cplusplus
10530extern "C"
10531#endif
10532char daemon ();
10533int
10534main ()
10535{
10536return daemon ();
10537 ;
10538 return 0;
10539}
10540_ACEOF
10541if ac_fn_c_try_link "$LINENO"; then :
10542 ac_cv_lib_bsd_daemon=yes
10543else
10544 ac_cv_lib_bsd_daemon=no
10545fi
10546rm -f core conftest.err conftest.$ac_objext \
10547 conftest$ac_exeext conftest.$ac_ext
10548LIBS=$ac_check_lib_save_LIBS
10549fi
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
10551$as_echo "$ac_cv_lib_bsd_daemon" >&6; }
10552if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
10553 LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
10554
10555fi
10556
10557
10558fi
10559
10560
10561ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10562if test "x$ac_cv_func_getpagesize" = xyes; then :
10563
10564$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
10565
10566else
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
10568$as_echo_n "checking for getpagesize in -lucb... " >&6; }
10569if ${ac_cv_lib_ucb_getpagesize+:} false; then :
10570 $as_echo_n "(cached) " >&6
10571else
10572 ac_check_lib_save_LIBS=$LIBS
10573LIBS="-lucb $LIBS"
10574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10575/* end confdefs.h. */
10576
10577/* Override any GCC internal prototype to avoid an error.
10578 Use char because int might match the return type of a GCC
10579 builtin and then its argument prototype would still apply. */
10580#ifdef __cplusplus
10581extern "C"
10582#endif
10583char getpagesize ();
10584int
10585main ()
10586{
10587return getpagesize ();
10588 ;
10589 return 0;
10590}
10591_ACEOF
10592if ac_fn_c_try_link "$LINENO"; then :
10593 ac_cv_lib_ucb_getpagesize=yes
10594else
10595 ac_cv_lib_ucb_getpagesize=no
10596fi
10597rm -f core conftest.err conftest.$ac_objext \
10598 conftest$ac_exeext conftest.$ac_ext
10599LIBS=$ac_check_lib_save_LIBS
10600fi
10601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
10602$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
10603if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
10604 LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
10605
10606fi
10607
10608
10609fi
10610
10611
10612# Check for broken snprintf
10613if test "x$ac_cv_func_snprintf" = "xyes" ; then
10614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
10615$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
10616 if test "$cross_compiling" = yes; then :
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
10618$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
10619
10620else
10621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10622/* end confdefs.h. */
10623 #include <stdio.h>
10624int
10625main ()
10626{
10627
10628 char b[5];
10629 snprintf(b,5,"123456789");
10630 exit(b[4]!='\0');
10631
10632 ;
10633 return 0;
10634}
10635_ACEOF
10636if ac_fn_c_try_run "$LINENO"; then :
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10638$as_echo "yes" >&6; }
10639else
10640
10641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
10643
10644$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
10645
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
10647$as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
10648
10649fi
10650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10651 conftest.$ac_objext conftest.beam conftest.$ac_ext
10652fi
10653
10654fi
10655
10656# If we don't have a working asprintf, then we strongly depend on vsnprintf
10657# returning the right thing on overflow: the number of characters it tried to
10658# create (as per SUSv3)
10659if test "x$ac_cv_func_asprintf" != "xyes" && \
10660 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
10662$as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
10663 if test "$cross_compiling" = yes; then :
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
10665$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
10666
10667else
10668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669/* end confdefs.h. */
10670
10671#include <sys/types.h>
10672#include <stdio.h>
10673#include <stdarg.h>
10674
10675int x_snprintf(char *str,size_t count,const char *fmt,...)
10676{
10677 size_t ret; va_list ap;
10678 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
10679 return ret;
10680}
10681
10682int
10683main ()
10684{
10685
10686 char x[1];
10687 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
10688
10689 ;
10690 return 0;
10691}
10692_ACEOF
10693if ac_fn_c_try_run "$LINENO"; then :
10694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10695$as_echo "yes" >&6; }
10696else
10697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699$as_echo "no" >&6; }
10700
10701$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
10702
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
10704$as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
10705
10706fi
10707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10708 conftest.$ac_objext conftest.beam conftest.$ac_ext
10709fi
10710
10711fi
10712
10713# On systems where [v]snprintf is broken, but is declared in stdio,
10714# check that the fmt argument is const char * or just char *.
10715# This is only useful for when BROKEN_SNPRINTF
10716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
10717$as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
10718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10719/* end confdefs.h. */
10720
10721#include <stdio.h>
10722int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
10723
10724int
10725main ()
10726{
10727
10728 snprintf(0, 0, 0);
10729
10730 ;
10731 return 0;
10732}
10733_ACEOF
10734if ac_fn_c_try_compile "$LINENO"; then :
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10736$as_echo "yes" >&6; }
10737
10738$as_echo "#define SNPRINTF_CONST const" >>confdefs.h
10739
10740else
10741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
10743 $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
10744
10745fi
10746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10747
10748# Check for missing getpeereid (or equiv) support
10749NO_PEERCHECK=""
10750if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
10752$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
10753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754/* end confdefs.h. */
10755
10756#include <sys/types.h>
10757#include <sys/socket.h>
10758int
10759main ()
10760{
10761int i = SO_PEERCRED;
10762 ;
10763 return 0;
10764}
10765_ACEOF
10766if ac_fn_c_try_compile "$LINENO"; then :
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10768$as_echo "yes" >&6; }
10769
10770$as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
10771
10772
10773else
10774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10775$as_echo "no" >&6; }
10776 NO_PEERCHECK=1
10777
10778fi
10779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10780fi
10781
10782if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
10783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
10784$as_echo_n "checking for (overly) strict mkstemp... " >&6; }
10785if test "$cross_compiling" = yes; then :
10786
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10788$as_echo "yes" >&6; }
10789 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
10790
10791
10792
10793else
10794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10795/* end confdefs.h. */
10796
10797#include <stdlib.h>
10798
10799int
10800main ()
10801{
10802
10803 char template[]="conftest.mkstemp-test";
10804 if (mkstemp(template) == -1)
10805 exit(1);
10806 unlink(template);
10807 exit(0);
10808
10809 ;
10810 return 0;
10811}
10812_ACEOF
10813if ac_fn_c_try_run "$LINENO"; then :
10814
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10816$as_echo "no" >&6; }
10817
10818else
10819
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10821$as_echo "yes" >&6; }
10822
10823$as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
10824
10825
10826fi
10827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10828 conftest.$ac_objext conftest.beam conftest.$ac_ext
10829fi
10830
10831fi
10832
10833if test ! -z "$check_for_openpty_ctty_bug"; then
10834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
10835$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
10836 if test "$cross_compiling" = yes; then :
10837
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
10839$as_echo "cross-compiling, assuming yes" >&6; }
10840
10841
10842else
10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844/* end confdefs.h. */
10845
10846#include <stdio.h>
10847#include <sys/fcntl.h>
10848#include <sys/types.h>
10849#include <sys/wait.h>
10850
10851int
10852main ()
10853{
10854
10855 pid_t pid;
10856 int fd, ptyfd, ttyfd, status;
10857
10858 pid = fork();
10859 if (pid < 0) { /* failed */
10860 exit(1);
10861 } else if (pid > 0) { /* parent */
10862 waitpid(pid, &status, 0);
10863 if (WIFEXITED(status))
10864 exit(WEXITSTATUS(status));
10865 else
10866 exit(2);
10867 } else { /* child */
10868 close(0); close(1); close(2);
10869 setsid();
10870 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
10871 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
10872 if (fd >= 0)
10873 exit(3); /* Acquired ctty: broken */
10874 else
10875 exit(0); /* Did not acquire ctty: OK */
10876 }
10877
10878 ;
10879 return 0;
10880}
10881_ACEOF
10882if ac_fn_c_try_run "$LINENO"; then :
10883
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10885$as_echo "yes" >&6; }
10886
10887else
10888
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
10891 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
10892
10893
10894fi
10895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10896 conftest.$ac_objext conftest.beam conftest.$ac_ext
10897fi
10898
10899fi
10900
10901if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
10902 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
10904$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
10905 if test "$cross_compiling" = yes; then :
10906
10907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
10908$as_echo "cross-compiling, assuming yes" >&6; }
10909
10910
10911else
10912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913/* end confdefs.h. */
10914
10915#include <stdio.h>
10916#include <sys/socket.h>
10917#include <netdb.h>
10918#include <errno.h>
10919#include <netinet/in.h>
10920
10921#define TEST_PORT "2222"
10922
10923int
10924main ()
10925{
10926
10927 int err, sock;
10928 struct addrinfo *gai_ai, *ai, hints;
10929 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
10930
10931 memset(&hints, 0, sizeof(hints));
10932 hints.ai_family = PF_UNSPEC;
10933 hints.ai_socktype = SOCK_STREAM;
10934 hints.ai_flags = AI_PASSIVE;
10935
10936 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
10937 if (err != 0) {
10938 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
10939 exit(1);
10940 }
10941
10942 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
10943 if (ai->ai_family != AF_INET6)
10944 continue;
10945
10946 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
10947 sizeof(ntop), strport, sizeof(strport),
10948 NI_NUMERICHOST|NI_NUMERICSERV);
10949
10950 if (err != 0) {
10951 if (err == EAI_SYSTEM)
10952 perror("getnameinfo EAI_SYSTEM");
10953 else
10954 fprintf(stderr, "getnameinfo failed: %s\n",
10955 gai_strerror(err));
10956 exit(2);
10957 }
10958
10959 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
10960 if (sock < 0)
10961 perror("socket");
10962 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
10963 if (errno == EBADF)
10964 exit(3);
10965 }
10966 }
10967 exit(0);
10968
10969 ;
10970 return 0;
10971}
10972_ACEOF
10973if ac_fn_c_try_run "$LINENO"; then :
10974
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10976$as_echo "yes" >&6; }
10977
10978else
10979
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981$as_echo "no" >&6; }
10982 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
10983
10984
10985fi
10986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10987 conftest.$ac_objext conftest.beam conftest.$ac_ext
10988fi
10989
10990fi
10991
10992if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
10993 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
10995$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
10996 if test "$cross_compiling" = yes; then :
10997
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
10999$as_echo "cross-compiling, assuming no" >&6; }
11000
11001
11002else
11003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11004/* end confdefs.h. */
11005
11006#include <stdio.h>
11007#include <sys/socket.h>
11008#include <netdb.h>
11009#include <errno.h>
11010#include <netinet/in.h>
11011
11012#define TEST_PORT "2222"
11013
11014int
11015main ()
11016{
11017
11018 int err, sock;
11019 struct addrinfo *gai_ai, *ai, hints;
11020 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
11021
11022 memset(&hints, 0, sizeof(hints));
11023 hints.ai_family = PF_UNSPEC;
11024 hints.ai_socktype = SOCK_STREAM;
11025 hints.ai_flags = AI_PASSIVE;
11026
11027 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
11028 if (err != 0) {
11029 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
11030 exit(1);
11031 }
11032
11033 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
11034 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
11035 continue;
11036
11037 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
11038 sizeof(ntop), strport, sizeof(strport),
11039 NI_NUMERICHOST|NI_NUMERICSERV);
11040
11041 if (ai->ai_family == AF_INET && err != 0) {
11042 perror("getnameinfo");
11043 exit(2);
11044 }
11045 }
11046 exit(0);
11047
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052if ac_fn_c_try_run "$LINENO"; then :
11053
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11055$as_echo "yes" >&6; }
11056
11057$as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
11058
11059
11060else
11061
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11063$as_echo "no" >&6; }
11064 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
11065
11066
11067fi
11068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11069 conftest.$ac_objext conftest.beam conftest.$ac_ext
11070fi
11071
11072fi
11073
11074if test "x$check_for_conflicting_getspnam" = "x1"; then
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
11076$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
11077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11078/* end confdefs.h. */
11079 #include <shadow.h>
11080int
11081main ()
11082{
11083 exit(0);
11084 ;
11085 return 0;
11086}
11087_ACEOF
11088if ac_fn_c_try_compile "$LINENO"; then :
11089
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091$as_echo "no" >&6; }
11092
11093else
11094
11095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11096$as_echo "yes" >&6; }
11097
11098$as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
11099
11100
11101
11102fi
11103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11104fi
11105
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
11107$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
11108if ${ac_cv_func_getpgrp_void+:} false; then :
11109 $as_echo_n "(cached) " >&6
11110else
11111 # Use it with a single arg.
11112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11113/* end confdefs.h. */
11114$ac_includes_default
11115int
11116main ()
11117{
11118getpgrp (0);
11119 ;
11120 return 0;
11121}
11122_ACEOF
11123if ac_fn_c_try_compile "$LINENO"; then :
11124 ac_cv_func_getpgrp_void=no
11125else
11126 ac_cv_func_getpgrp_void=yes
11127fi
11128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11129
11130fi
11131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
11132$as_echo "$ac_cv_func_getpgrp_void" >&6; }
11133if test $ac_cv_func_getpgrp_void = yes; then
11134
11135$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
11136
11137fi
11138
11139
11140# Search for OpenSSL
11141saved_CPPFLAGS="$CPPFLAGS"
11142saved_LDFLAGS="$LDFLAGS"
11143
11144# Check whether --with-ssl-dir was given.
11145if test "${with_ssl_dir+set}" = set; then :
11146 withval=$with_ssl_dir;
11147 if test "x$withval" != "xno" ; then
11148 case "$withval" in
11149 # Relative paths
11150 ./*|../*) withval="`pwd`/$withval"
11151 esac
11152 if test -d "$withval/lib"; then
11153 if test -n "${need_dash_r}"; then
11154 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
11155 else
11156 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
11157 fi
11158 elif test -d "$withval/lib64"; then
11159 if test -n "${need_dash_r}"; then
11160 LDFLAGS="-L${withval}/lib64 -R${withval}/lib64 ${LDFLAGS}"
11161 else
11162 LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
11163 fi
11164 else
11165 if test -n "${need_dash_r}"; then
11166 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
11167 else
11168 LDFLAGS="-L${withval} ${LDFLAGS}"
11169 fi
11170 fi
11171 if test -d "$withval/include"; then
11172 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
11173 else
11174 CPPFLAGS="-I${withval} ${CPPFLAGS}"
11175 fi
11176 fi
11177
11178
11179fi
11180
11181LIBS="-lcrypto $LIBS"
11182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183/* end confdefs.h. */
11184
11185/* Override any GCC internal prototype to avoid an error.
11186 Use char because int might match the return type of a GCC
11187 builtin and then its argument prototype would still apply. */
11188#ifdef __cplusplus
11189extern "C"
11190#endif
11191char RAND_add ();
11192int
11193main ()
11194{
11195return RAND_add ();
11196 ;
11197 return 0;
11198}
11199_ACEOF
11200if ac_fn_c_try_link "$LINENO"; then :
11201
11202$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
11203
11204else
11205
11206 if test -n "${need_dash_r}"; then
11207 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
11208 else
11209 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
11210 fi
11211 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
11212 ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
11213if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
11214
11215else
11216 as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
11217fi
11218
11219
11220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11221/* end confdefs.h. */
11222
11223/* Override any GCC internal prototype to avoid an error.
11224 Use char because int might match the return type of a GCC
11225 builtin and then its argument prototype would still apply. */
11226#ifdef __cplusplus
11227extern "C"
11228#endif
11229char RAND_add ();
11230int
11231main ()
11232{
11233return RAND_add ();
11234 ;
11235 return 0;
11236}
11237_ACEOF
11238if ac_fn_c_try_link "$LINENO"; then :
11239 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
11240
11241else
11242
11243 as_fn_error $? "*** Can't find recent OpenSSL libcrypto (see config.log for details) ***" "$LINENO" 5
11244
11245
11246fi
11247rm -f core conftest.err conftest.$ac_objext \
11248 conftest$ac_exeext conftest.$ac_ext
11249
11250
11251fi
11252rm -f core conftest.err conftest.$ac_objext \
11253 conftest$ac_exeext conftest.$ac_ext
11254
11255# Determine OpenSSL header version
11256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
11257$as_echo_n "checking OpenSSL header version... " >&6; }
11258if test "$cross_compiling" = yes; then :
11259
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11261$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11262
11263
11264else
11265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11266/* end confdefs.h. */
11267
11268#include <stdio.h>
11269#include <string.h>
11270#include <openssl/opensslv.h>
11271#define DATA "conftest.sslincver"
11272
11273int
11274main ()
11275{
11276
11277 FILE *fd;
11278 int rc;
11279
11280 fd = fopen(DATA,"w");
11281 if(fd == NULL)
11282 exit(1);
11283
11284 if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
11285 exit(1);
11286
11287 exit(0);
11288
11289 ;
11290 return 0;
11291}
11292_ACEOF
11293if ac_fn_c_try_run "$LINENO"; then :
11294
11295 ssl_header_ver=`cat conftest.sslincver`
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
11297$as_echo "$ssl_header_ver" >&6; }
11298
11299else
11300
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11302$as_echo "not found" >&6; }
11303 as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
11304
11305fi
11306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11307 conftest.$ac_objext conftest.beam conftest.$ac_ext
11308fi
11309
11310
11311# Determine OpenSSL library version
11312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
11313$as_echo_n "checking OpenSSL library version... " >&6; }
11314if test "$cross_compiling" = yes; then :
11315
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11317$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11318
11319
11320else
11321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11322/* end confdefs.h. */
11323
11324#include <stdio.h>
11325#include <string.h>
11326#include <openssl/opensslv.h>
11327#include <openssl/crypto.h>
11328#define DATA "conftest.ssllibver"
11329
11330int
11331main ()
11332{
11333
11334 FILE *fd;
11335 int rc;
11336
11337 fd = fopen(DATA,"w");
11338 if(fd == NULL)
11339 exit(1);
11340
11341 if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
11342 exit(1);
11343
11344 exit(0);
11345
11346 ;
11347 return 0;
11348}
11349_ACEOF
11350if ac_fn_c_try_run "$LINENO"; then :
11351
11352 ssl_library_ver=`cat conftest.ssllibver`
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
11354$as_echo "$ssl_library_ver" >&6; }
11355
11356else
11357
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11359$as_echo "not found" >&6; }
11360 as_fn_error $? "OpenSSL library not found." "$LINENO" 5
11361
11362fi
11363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11364 conftest.$ac_objext conftest.beam conftest.$ac_ext
11365fi
11366
11367
11368
11369# Check whether --with-openssl-header-check was given.
11370if test "${with_openssl_header_check+set}" = set; then :
11371 withval=$with_openssl_header_check; if test "x$withval" = "xno" ; then
11372 openssl_check_nonfatal=1
11373 fi
11374
11375
11376fi
11377
11378
11379# Sanity check OpenSSL headers
11380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
11381$as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
11382if test "$cross_compiling" = yes; then :
11383
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11385$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11386
11387
11388else
11389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11390/* end confdefs.h. */
11391
11392#include <string.h>
11393#include <openssl/opensslv.h>
11394
11395int
11396main ()
11397{
11398
11399 exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
11400
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405if ac_fn_c_try_run "$LINENO"; then :
11406
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11408$as_echo "yes" >&6; }
11409
11410else
11411
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
11414 if test "x$openssl_check_nonfatal" = "x"; then
11415 as_fn_error $? "Your OpenSSL headers do not match your
11416library. Check config.log for details.
11417If you are sure your installation is consistent, you can disable the check
11418by running \"./configure --without-openssl-header-check\".
11419Also see contrib/findssl.sh for help identifying header/library mismatches.
11420" "$LINENO" 5
11421 else
11422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
11423library. Check config.log for details.
11424Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
11425$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
11426library. Check config.log for details.
11427Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
11428 fi
11429
11430fi
11431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11432 conftest.$ac_objext conftest.beam conftest.$ac_ext
11433fi
11434
11435
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
11437$as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439/* end confdefs.h. */
11440 #include <openssl/evp.h>
11441int
11442main ()
11443{
11444 SSLeay_add_all_algorithms();
11445 ;
11446 return 0;
11447}
11448_ACEOF
11449if ac_fn_c_try_link "$LINENO"; then :
11450
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11452$as_echo "yes" >&6; }
11453
11454else
11455
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11457$as_echo "no" >&6; }
11458 saved_LIBS="$LIBS"
11459 LIBS="$LIBS -ldl"
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
11461$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
11462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463/* end confdefs.h. */
11464 #include <openssl/evp.h>
11465int
11466main ()
11467{
11468 SSLeay_add_all_algorithms();
11469 ;
11470 return 0;
11471}
11472_ACEOF
11473if ac_fn_c_try_link "$LINENO"; then :
11474
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11476$as_echo "yes" >&6; }
11477
11478else
11479
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11481$as_echo "no" >&6; }
11482 LIBS="$saved_LIBS"
11483
11484
11485fi
11486rm -f core conftest.err conftest.$ac_objext \
11487 conftest$ac_exeext conftest.$ac_ext
11488
11489
11490fi
11491rm -f core conftest.err conftest.$ac_objext \
11492 conftest$ac_exeext conftest.$ac_ext
11493
11494for ac_func in RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method HMAC_CTX_init
11495do :
11496 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11497ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11498if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11499 cat >>confdefs.h <<_ACEOF
11500#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11501_ACEOF
11502
11503fi
11504done
11505
11506
11507
11508# Check whether --with-ssl-engine was given.
11509if test "${with_ssl_engine+set}" = set; then :
11510 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
11512$as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
11513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514/* end confdefs.h. */
11515
11516#include <openssl/engine.h>
11517
11518int
11519main ()
11520{
11521
11522 ENGINE_load_builtin_engines();
11523 ENGINE_register_all_complete();
11524
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529if ac_fn_c_try_compile "$LINENO"; then :
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11531$as_echo "yes" >&6; }
11532
11533$as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
11534
11535
11536else
11537 as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
11538
11539fi
11540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11541 fi
11542
11543fi
11544
11545
11546# Check for OpenSSL without EVP_aes_{192,256}_cbc
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
11548$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11550/* end confdefs.h. */
11551
11552#include <string.h>
11553#include <openssl/evp.h>
11554
11555int
11556main ()
11557{
11558
11559 exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
11560
11561 ;
11562 return 0;
11563}
11564_ACEOF
11565if ac_fn_c_try_link "$LINENO"; then :
11566
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568$as_echo "no" >&6; }
11569
11570else
11571
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11573$as_echo "yes" >&6; }
11574
11575$as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
11576
11577
11578
11579fi
11580rm -f core conftest.err conftest.$ac_objext \
11581 conftest$ac_exeext conftest.$ac_ext
11582
11583# Check for OpenSSL with EVP_aes_*ctr
11584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
11585$as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
11586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11587/* end confdefs.h. */
11588
11589#include <string.h>
11590#include <openssl/evp.h>
11591
11592int
11593main ()
11594{
11595
11596 exit(EVP_aes_128_ctr() == NULL ||
11597 EVP_aes_192_cbc() == NULL ||
11598 EVP_aes_256_cbc() == NULL);
11599
11600 ;
11601 return 0;
11602}
11603_ACEOF
11604if ac_fn_c_try_link "$LINENO"; then :
11605
11606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11607$as_echo "yes" >&6; }
11608
11609$as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
11610
11611
11612else
11613
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615$as_echo "no" >&6; }
11616
11617
11618fi
11619rm -f core conftest.err conftest.$ac_objext \
11620 conftest$ac_exeext conftest.$ac_ext
11621
11622# Check for OpenSSL with EVP_aes_*gcm
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
11624$as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
11625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11626/* end confdefs.h. */
11627
11628#include <string.h>
11629#include <openssl/evp.h>
11630
11631int
11632main ()
11633{
11634
11635 exit(EVP_aes_128_gcm() == NULL ||
11636 EVP_aes_256_gcm() == NULL ||
11637 EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
11638 EVP_CTRL_GCM_IV_GEN == 0 ||
11639 EVP_CTRL_GCM_SET_TAG == 0 ||
11640 EVP_CTRL_GCM_GET_TAG == 0 ||
11641 EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
11642
11643 ;
11644 return 0;
11645}
11646_ACEOF
11647if ac_fn_c_try_link "$LINENO"; then :
11648
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11650$as_echo "yes" >&6; }
11651
11652$as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
11653
11654
11655else
11656
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11658$as_echo "no" >&6; }
11659 unsupported_algorithms="$unsupported_cipers \
11660 aes128-gcm@openssh.com aes256-gcm@openssh.com"
11661
11662
11663fi
11664rm -f core conftest.err conftest.$ac_objext \
11665 conftest$ac_exeext conftest.$ac_ext
11666
11667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing EVP_CIPHER_CTX_ctrl" >&5
11668$as_echo_n "checking for library containing EVP_CIPHER_CTX_ctrl... " >&6; }
11669if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
11670 $as_echo_n "(cached) " >&6
11671else
11672 ac_func_search_save_LIBS=$LIBS
11673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11674/* end confdefs.h. */
11675
11676/* Override any GCC internal prototype to avoid an error.
11677 Use char because int might match the return type of a GCC
11678 builtin and then its argument prototype would still apply. */
11679#ifdef __cplusplus
11680extern "C"
11681#endif
11682char EVP_CIPHER_CTX_ctrl ();
11683int
11684main ()
11685{
11686return EVP_CIPHER_CTX_ctrl ();
11687 ;
11688 return 0;
11689}
11690_ACEOF
11691for ac_lib in '' crypto; do
11692 if test -z "$ac_lib"; then
11693 ac_res="none required"
11694 else
11695 ac_res=-l$ac_lib
11696 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11697 fi
11698 if ac_fn_c_try_link "$LINENO"; then :
11699 ac_cv_search_EVP_CIPHER_CTX_ctrl=$ac_res
11700fi
11701rm -f core conftest.err conftest.$ac_objext \
11702 conftest$ac_exeext
11703 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
11704 break
11705fi
11706done
11707if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
11708
11709else
11710 ac_cv_search_EVP_CIPHER_CTX_ctrl=no
11711fi
11712rm conftest.$ac_ext
11713LIBS=$ac_func_search_save_LIBS
11714fi
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_CIPHER_CTX_ctrl" >&5
11716$as_echo "$ac_cv_search_EVP_CIPHER_CTX_ctrl" >&6; }
11717ac_res=$ac_cv_search_EVP_CIPHER_CTX_ctrl
11718if test "$ac_res" != no; then :
11719 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11720
11721$as_echo "#define HAVE_EVP_CIPHER_CTX_CTRL 1" >>confdefs.h
11722
11723fi
11724
11725
11726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
11727$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
11728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11729/* end confdefs.h. */
11730
11731#include <string.h>
11732#include <openssl/evp.h>
11733
11734int
11735main ()
11736{
11737
11738 if(EVP_DigestUpdate(NULL, NULL,0))
11739 exit(0);
11740
11741 ;
11742 return 0;
11743}
11744_ACEOF
11745if ac_fn_c_try_link "$LINENO"; then :
11746
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11748$as_echo "yes" >&6; }
11749
11750else
11751
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11753$as_echo "no" >&6; }
11754
11755$as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
11756
11757
11758
11759fi
11760rm -f core conftest.err conftest.$ac_objext \
11761 conftest$ac_exeext conftest.$ac_ext
11762
11763# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
11764# because the system crypt() is more featureful.
11765if test "x$check_for_libcrypt_before" = "x1"; then
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11767$as_echo_n "checking for crypt in -lcrypt... " >&6; }
11768if ${ac_cv_lib_crypt_crypt+:} false; then :
11769 $as_echo_n "(cached) " >&6
11770else
11771 ac_check_lib_save_LIBS=$LIBS
11772LIBS="-lcrypt $LIBS"
11773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11774/* end confdefs.h. */
11775
11776/* Override any GCC internal prototype to avoid an error.
11777 Use char because int might match the return type of a GCC
11778 builtin and then its argument prototype would still apply. */
11779#ifdef __cplusplus
11780extern "C"
11781#endif
11782char crypt ();
11783int
11784main ()
11785{
11786return crypt ();
11787 ;
11788 return 0;
11789}
11790_ACEOF
11791if ac_fn_c_try_link "$LINENO"; then :
11792 ac_cv_lib_crypt_crypt=yes
11793else
11794 ac_cv_lib_crypt_crypt=no
11795fi
11796rm -f core conftest.err conftest.$ac_objext \
11797 conftest$ac_exeext conftest.$ac_ext
11798LIBS=$ac_check_lib_save_LIBS
11799fi
11800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11801$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11802if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11803 cat >>confdefs.h <<_ACEOF
11804#define HAVE_LIBCRYPT 1
11805_ACEOF
11806
11807 LIBS="-lcrypt $LIBS"
11808
11809fi
11810
11811fi
11812
11813# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
11814# version in OpenSSL.
11815if test "x$check_for_libcrypt_later" = "x1"; then
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11817$as_echo_n "checking for crypt in -lcrypt... " >&6; }
11818if ${ac_cv_lib_crypt_crypt+:} false; then :
11819 $as_echo_n "(cached) " >&6
11820else
11821 ac_check_lib_save_LIBS=$LIBS
11822LIBS="-lcrypt $LIBS"
11823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11824/* end confdefs.h. */
11825
11826/* Override any GCC internal prototype to avoid an error.
11827 Use char because int might match the return type of a GCC
11828 builtin and then its argument prototype would still apply. */
11829#ifdef __cplusplus
11830extern "C"
11831#endif
11832char crypt ();
11833int
11834main ()
11835{
11836return crypt ();
11837 ;
11838 return 0;
11839}
11840_ACEOF
11841if ac_fn_c_try_link "$LINENO"; then :
11842 ac_cv_lib_crypt_crypt=yes
11843else
11844 ac_cv_lib_crypt_crypt=no
11845fi
11846rm -f core conftest.err conftest.$ac_objext \
11847 conftest$ac_exeext conftest.$ac_ext
11848LIBS=$ac_check_lib_save_LIBS
11849fi
11850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11851$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11852if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11853 LIBS="$LIBS -lcrypt"
11854fi
11855
11856fi
11857for ac_func in crypt DES_crypt
11858do :
11859 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11860ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11861if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11862 cat >>confdefs.h <<_ACEOF
11863#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11864_ACEOF
11865
11866fi
11867done
11868
11869
11870# Search for SHA256 support in libc and/or OpenSSL
11871for ac_func in SHA256_Update EVP_sha256
11872do :
11873 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11874ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11875if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11876 cat >>confdefs.h <<_ACEOF
11877#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11878_ACEOF
11879 TEST_SSH_SHA256=yes
11880else
11881 TEST_SSH_SHA256=no
11882 unsupported_algorithms="$unsupported_algorithms \
11883 hmac-sha2-256 hmac-sha2-512 \
11884 diffie-hellman-group-exchange-sha256 \
11885 hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com"
11886
11887
11888fi
11889done
11890
11891
11892
11893# Check complete ECC support in OpenSSL
11894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has complete ECC support" >&5
11895$as_echo_n "checking whether OpenSSL has complete ECC support... " >&6; }
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11897/* end confdefs.h. */
11898
11899#include <openssl/ec.h>
11900#include <openssl/ecdh.h>
11901#include <openssl/ecdsa.h>
11902#include <openssl/evp.h>
11903#include <openssl/objects.h>
11904#include <openssl/opensslv.h>
11905#if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
11906# error "OpenSSL < 0.9.8g has unreliable ECC code"
11907#endif
11908
11909int
11910main ()
11911{
11912
11913 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
11914 const EVP_MD *m = EVP_sha512(); /* We need this too */
11915
11916 ;
11917 return 0;
11918}
11919_ACEOF
11920if ac_fn_c_try_link "$LINENO"; then :
11921
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11923$as_echo "yes" >&6; }
11924
11925$as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
11926
11927 TEST_SSH_ECC=yes
11928 COMMENT_OUT_ECC=""
11929
11930else
11931
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
11934 TEST_SSH_ECC=no
11935 COMMENT_OUT_ECC="#no ecc#"
11936 unsupported_algorithms="$unsupported_algorithms \
11937 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 \
11938 ecdsa-sha2-nistp256-cert-v01@openssh.com \
11939 ecdsa-sha2-nistp384-cert-v01@openssh.com \
11940 ecdsa-sha2-nistp521-cert-v01@openssh.com \
11941 ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521"
11942
11943
11944fi
11945rm -f core conftest.err conftest.$ac_objext \
11946 conftest$ac_exeext conftest.$ac_ext
11947
11948
11949
11950saved_LIBS="$LIBS"
11951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
11952$as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
11953if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
11954 $as_echo_n "(cached) " >&6
11955else
11956 ac_check_lib_save_LIBS=$LIBS
11957LIBS="-liaf $LIBS"
11958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959/* end confdefs.h. */
11960
11961/* Override any GCC internal prototype to avoid an error.
11962 Use char because int might match the return type of a GCC
11963 builtin and then its argument prototype would still apply. */
11964#ifdef __cplusplus
11965extern "C"
11966#endif
11967char ia_openinfo ();
11968int
11969main ()
11970{
11971return ia_openinfo ();
11972 ;
11973 return 0;
11974}
11975_ACEOF
11976if ac_fn_c_try_link "$LINENO"; then :
11977 ac_cv_lib_iaf_ia_openinfo=yes
11978else
11979 ac_cv_lib_iaf_ia_openinfo=no
11980fi
11981rm -f core conftest.err conftest.$ac_objext \
11982 conftest$ac_exeext conftest.$ac_ext
11983LIBS=$ac_check_lib_save_LIBS
11984fi
11985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
11986$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
11987if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
11988
11989 LIBS="$LIBS -liaf"
11990 for ac_func in set_id
11991do :
11992 ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
11993if test "x$ac_cv_func_set_id" = xyes; then :
11994 cat >>confdefs.h <<_ACEOF
11995#define HAVE_SET_ID 1
11996_ACEOF
11997 SSHDLIBS="$SSHDLIBS -liaf"
11998
11999$as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
12000
12001
12002fi
12003done
12004
12005
12006fi
12007
12008LIBS="$saved_LIBS"
12009
12010### Configure cryptographic random number support
12011
12012# Check wheter OpenSSL seeds itself
12013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
12014$as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
12015if test "$cross_compiling" = yes; then :
12016
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12018$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12019 # This is safe, since we will fatal() at runtime if
12020 # OpenSSL is not seeded correctly.
12021 OPENSSL_SEEDS_ITSELF=yes
12022
12023
12024else
12025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12026/* end confdefs.h. */
12027
12028#include <string.h>
12029#include <openssl/rand.h>
12030
12031int
12032main ()
12033{
12034
12035 exit(RAND_status() == 1 ? 0 : 1);
12036
12037 ;
12038 return 0;
12039}
12040_ACEOF
12041if ac_fn_c_try_run "$LINENO"; then :
12042
12043 OPENSSL_SEEDS_ITSELF=yes
12044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12045$as_echo "yes" >&6; }
12046
12047else
12048
12049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12050$as_echo "no" >&6; }
12051
12052fi
12053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12054 conftest.$ac_objext conftest.beam conftest.$ac_ext
12055fi
12056
12057
12058# PRNGD TCP socket
12059
12060# Check whether --with-prngd-port was given.
12061if test "${with_prngd_port+set}" = set; then :
12062 withval=$with_prngd_port;
12063 case "$withval" in
12064 no)
12065 withval=""
12066 ;;
12067 [0-9]*)
12068 ;;
12069 *)
12070 as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
12071 ;;
12072 esac
12073 if test ! -z "$withval" ; then
12074 PRNGD_PORT="$withval"
12075
12076cat >>confdefs.h <<_ACEOF
12077#define PRNGD_PORT $PRNGD_PORT
12078_ACEOF
12079
12080 fi
12081
12082
12083fi
12084
12085
12086# PRNGD Unix domain socket
12087
12088# Check whether --with-prngd-socket was given.
12089if test "${with_prngd_socket+set}" = set; then :
12090 withval=$with_prngd_socket;
12091 case "$withval" in
12092 yes)
12093 withval="/var/run/egd-pool"
12094 ;;
12095 no)
12096 withval=""
12097 ;;
12098 /*)
12099 ;;
12100 *)
12101 as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
12102 ;;
12103 esac
12104
12105 if test ! -z "$withval" ; then
12106 if test ! -z "$PRNGD_PORT" ; then
12107 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
12108 fi
12109 if test ! -r "$withval" ; then
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
12111$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
12112 fi
12113 PRNGD_SOCKET="$withval"
12114
12115cat >>confdefs.h <<_ACEOF
12116#define PRNGD_SOCKET "$PRNGD_SOCKET"
12117_ACEOF
12118
12119 fi
12120
12121else
12122
12123 # Check for existing socket only if we don't have a random device already
12124 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
12126$as_echo_n "checking for PRNGD/EGD socket... " >&6; }
12127 # Insert other locations here
12128 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
12129 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
12130 PRNGD_SOCKET="$sock"
12131 cat >>confdefs.h <<_ACEOF
12132#define PRNGD_SOCKET "$PRNGD_SOCKET"
12133_ACEOF
12134
12135 break;
12136 fi
12137 done
12138 if test ! -z "$PRNGD_SOCKET" ; then
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
12140$as_echo "$PRNGD_SOCKET" >&6; }
12141 else
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12143$as_echo "not found" >&6; }
12144 fi
12145 fi
12146
12147
12148fi
12149
12150
12151# Which randomness source do we use?
12152if test ! -z "$PRNGD_PORT" ; then
12153 RAND_MSG="PRNGd port $PRNGD_PORT"
12154elif test ! -z "$PRNGD_SOCKET" ; then
12155 RAND_MSG="PRNGd socket $PRNGD_SOCKET"
12156elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
12157
12158$as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
12159
12160 RAND_MSG="OpenSSL internal ONLY"
12161else
12162 as_fn_error $? "OpenSSH has no source of random numbers. Please configure OpenSSL with an entropy source or re-run configure using one of the --with-prngd-port or --with-prngd-socket options" "$LINENO" 5
12163fi
12164
12165# Check for PAM libs
12166PAM_MSG="no"
12167
12168# Check whether --with-pam was given.
12169if test "${with_pam+set}" = set; then :
12170 withval=$with_pam;
12171 if test "x$withval" != "xno" ; then
12172 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
12173 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
12174 as_fn_error $? "PAM headers not found" "$LINENO" 5
12175 fi
12176
12177 saved_LIBS="$LIBS"
12178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12179$as_echo_n "checking for dlopen in -ldl... " >&6; }
12180if ${ac_cv_lib_dl_dlopen+:} false; then :
12181 $as_echo_n "(cached) " >&6
12182else
12183 ac_check_lib_save_LIBS=$LIBS
12184LIBS="-ldl $LIBS"
12185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186/* end confdefs.h. */
12187
12188/* Override any GCC internal prototype to avoid an error.
12189 Use char because int might match the return type of a GCC
12190 builtin and then its argument prototype would still apply. */
12191#ifdef __cplusplus
12192extern "C"
12193#endif
12194char dlopen ();
12195int
12196main ()
12197{
12198return dlopen ();
12199 ;
12200 return 0;
12201}
12202_ACEOF
12203if ac_fn_c_try_link "$LINENO"; then :
12204 ac_cv_lib_dl_dlopen=yes
12205else
12206 ac_cv_lib_dl_dlopen=no
12207fi
12208rm -f core conftest.err conftest.$ac_objext \
12209 conftest$ac_exeext conftest.$ac_ext
12210LIBS=$ac_check_lib_save_LIBS
12211fi
12212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12213$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12214if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12215 cat >>confdefs.h <<_ACEOF
12216#define HAVE_LIBDL 1
12217_ACEOF
12218
12219 LIBS="-ldl $LIBS"
12220
12221fi
12222
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
12224$as_echo_n "checking for pam_set_item in -lpam... " >&6; }
12225if ${ac_cv_lib_pam_pam_set_item+:} false; then :
12226 $as_echo_n "(cached) " >&6
12227else
12228 ac_check_lib_save_LIBS=$LIBS
12229LIBS="-lpam $LIBS"
12230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12231/* end confdefs.h. */
12232
12233/* Override any GCC internal prototype to avoid an error.
12234 Use char because int might match the return type of a GCC
12235 builtin and then its argument prototype would still apply. */
12236#ifdef __cplusplus
12237extern "C"
12238#endif
12239char pam_set_item ();
12240int
12241main ()
12242{
12243return pam_set_item ();
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248if ac_fn_c_try_link "$LINENO"; then :
12249 ac_cv_lib_pam_pam_set_item=yes
12250else
12251 ac_cv_lib_pam_pam_set_item=no
12252fi
12253rm -f core conftest.err conftest.$ac_objext \
12254 conftest$ac_exeext conftest.$ac_ext
12255LIBS=$ac_check_lib_save_LIBS
12256fi
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
12258$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
12259if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
12260 cat >>confdefs.h <<_ACEOF
12261#define HAVE_LIBPAM 1
12262_ACEOF
12263
12264 LIBS="-lpam $LIBS"
12265
12266else
12267 as_fn_error $? "*** libpam missing" "$LINENO" 5
12268fi
12269
12270 for ac_func in pam_getenvlist
12271do :
12272 ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
12273if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
12274 cat >>confdefs.h <<_ACEOF
12275#define HAVE_PAM_GETENVLIST 1
12276_ACEOF
12277
12278fi
12279done
12280
12281 for ac_func in pam_putenv
12282do :
12283 ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
12284if test "x$ac_cv_func_pam_putenv" = xyes; then :
12285 cat >>confdefs.h <<_ACEOF
12286#define HAVE_PAM_PUTENV 1
12287_ACEOF
12288
12289fi
12290done
12291
12292 LIBS="$saved_LIBS"
12293
12294 PAM_MSG="yes"
12295
12296 SSHDLIBS="$SSHDLIBS -lpam"
12297
12298$as_echo "#define USE_PAM 1" >>confdefs.h
12299
12300
12301 if test $ac_cv_lib_dl_dlopen = yes; then
12302 case "$LIBS" in
12303 *-ldl*)
12304 # libdl already in LIBS
12305 ;;
12306 *)
12307 SSHDLIBS="$SSHDLIBS -ldl"
12308 ;;
12309 esac
12310 fi
12311 fi
12312
12313
12314fi
12315
12316
12317# Check for older PAM
12318if test "x$PAM_MSG" = "xyes" ; then
12319 # Check PAM strerror arguments (old PAM)
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
12321$as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
12322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12323/* end confdefs.h. */
12324
12325#include <stdlib.h>
12326#if defined(HAVE_SECURITY_PAM_APPL_H)
12327#include <security/pam_appl.h>
12328#elif defined (HAVE_PAM_PAM_APPL_H)
12329#include <pam/pam_appl.h>
12330#endif
12331
12332int
12333main ()
12334{
12335
12336(void)pam_strerror((pam_handle_t *)NULL, -1);
12337
12338 ;
12339 return 0;
12340}
12341_ACEOF
12342if ac_fn_c_try_compile "$LINENO"; then :
12343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12344$as_echo "no" >&6; }
12345else
12346
12347
12348$as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
12349
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12351$as_echo "yes" >&6; }
12352 PAM_MSG="yes (old library)"
12353
12354
12355fi
12356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12357fi
12358
12359SSH_PRIVSEP_USER=sshd
12360
12361# Check whether --with-privsep-user was given.
12362if test "${with_privsep_user+set}" = set; then :
12363 withval=$with_privsep_user;
12364 if test -n "$withval" && test "x$withval" != "xno" && \
12365 test "x${withval}" != "xyes"; then
12366 SSH_PRIVSEP_USER=$withval
12367 fi
12368
12369
12370fi
12371
12372
12373cat >>confdefs.h <<_ACEOF
12374#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
12375_ACEOF
12376
12377
12378
12379if test "x$have_linux_no_new_privs" = "x1" ; then
12380ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
12381 #include <sys/types.h>
12382 #include <linux/seccomp.h>
12383
12384"
12385if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
12386 have_seccomp_filter=1
12387fi
12388
12389fi
12390if test "x$have_seccomp_filter" = "x1" ; then
12391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
12392$as_echo_n "checking kernel for seccomp_filter support... " >&6; }
12393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394/* end confdefs.h. */
12395
12396 #include <errno.h>
12397 #include <elf.h>
12398 #include <linux/audit.h>
12399 #include <linux/seccomp.h>
12400 #include <stdlib.h>
12401 #include <sys/prctl.h>
12402
12403int
12404main ()
12405{
12406 int i = $seccomp_audit_arch;
12407 errno = 0;
12408 prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
12409 exit(errno == EFAULT ? 0 : 1);
12410 ;
12411 return 0;
12412}
12413_ACEOF
12414if ac_fn_c_try_link "$LINENO"; then :
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12416$as_echo "yes" >&6; }
12417else
12418
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12420$as_echo "no" >&6; }
12421 # Disable seccomp filter as a target
12422 have_seccomp_filter=0
12423
12424
12425fi
12426rm -f core conftest.err conftest.$ac_objext \
12427 conftest$ac_exeext conftest.$ac_ext
12428fi
12429
12430# Decide which sandbox style to use
12431sandbox_arg=""
12432
12433# Check whether --with-sandbox was given.
12434if test "${with_sandbox+set}" = set; then :
12435 withval=$with_sandbox;
12436 if test "x$withval" = "xyes" ; then
12437 sandbox_arg=""
12438 else
12439 sandbox_arg="$withval"
12440 fi
12441
12442
12443fi
12444
12445
12446# Some platforms (seems to be the ones that have a kernel poll(2)-type
12447# function with which they implement select(2)) use an extra file descriptor
12448# when calling select(2), which means we can't use the rlimit sandbox.
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
12450$as_echo_n "checking if select works with descriptor rlimit... " >&6; }
12451if test "$cross_compiling" = yes; then :
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12453$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12454
12455else
12456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457/* end confdefs.h. */
12458
12459#include <sys/types.h>
12460#ifdef HAVE_SYS_TIME_H
12461# include <sys/time.h>
12462#endif
12463#include <sys/resource.h>
12464#ifdef HAVE_SYS_SELECT_H
12465# include <sys/select.h>
12466#endif
12467#include <errno.h>
12468#include <fcntl.h>
12469#include <stdlib.h>
12470
12471int
12472main ()
12473{
12474
12475 struct rlimit rl_zero;
12476 int fd, r;
12477 fd_set fds;
12478 struct timeval tv;
12479
12480 fd = open("/dev/null", O_RDONLY);
12481 FD_ZERO(&fds);
12482 FD_SET(fd, &fds);
12483 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
12484 setrlimit(RLIMIT_FSIZE, &rl_zero);
12485 setrlimit(RLIMIT_NOFILE, &rl_zero);
12486 tv.tv_sec = 1;
12487 tv.tv_usec = 0;
12488 r = select(fd+1, &fds, NULL, NULL, &tv);
12489 exit (r == -1 ? 1 : 0);
12490
12491 ;
12492 return 0;
12493}
12494_ACEOF
12495if ac_fn_c_try_run "$LINENO"; then :
12496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12497$as_echo "yes" >&6; }
12498 select_works_with_rlimit=yes
12499else
12500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12501$as_echo "no" >&6; }
12502 select_works_with_rlimit=no
12503fi
12504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12505 conftest.$ac_objext conftest.beam conftest.$ac_ext
12506fi
12507
12508
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
12510$as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
12511if test "$cross_compiling" = yes; then :
12512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12513$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12514
12515else
12516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517/* end confdefs.h. */
12518
12519#include <sys/types.h>
12520#ifdef HAVE_SYS_TIME_H
12521# include <sys/time.h>
12522#endif
12523#include <sys/resource.h>
12524#include <errno.h>
12525#include <stdlib.h>
12526
12527int
12528main ()
12529{
12530
12531 struct rlimit rl_zero;
12532 int fd, r;
12533 fd_set fds;
12534
12535 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
12536 r = setrlimit(RLIMIT_NOFILE, &rl_zero);
12537 exit (r == -1 ? 1 : 0);
12538
12539 ;
12540 return 0;
12541}
12542_ACEOF
12543if ac_fn_c_try_run "$LINENO"; then :
12544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12545$as_echo "yes" >&6; }
12546 rlimit_nofile_zero_works=yes
12547else
12548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12549$as_echo "no" >&6; }
12550 rlimit_nofile_zero_works=no
12551fi
12552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12553 conftest.$ac_objext conftest.beam conftest.$ac_ext
12554fi
12555
12556
12557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
12558$as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
12559if test "$cross_compiling" = yes; then :
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12561$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12562
12563else
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565/* end confdefs.h. */
12566
12567#include <sys/types.h>
12568#include <sys/resource.h>
12569#include <stdlib.h>
12570
12571int
12572main ()
12573{
12574
12575 struct rlimit rl_zero;
12576
12577 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
12578 exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
12579
12580 ;
12581 return 0;
12582}
12583_ACEOF
12584if ac_fn_c_try_run "$LINENO"; then :
12585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12586$as_echo "yes" >&6; }
12587else
12588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12589$as_echo "no" >&6; }
12590
12591$as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
12592
12593fi
12594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12595 conftest.$ac_objext conftest.beam conftest.$ac_ext
12596fi
12597
12598
12599if test "x$sandbox_arg" = "xsystrace" || \
12600 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
12601 test "x$have_systr_policy_kill" != "x1" && \
12602 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
12603 SANDBOX_STYLE="systrace"
12604
12605$as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
12606
12607elif test "x$sandbox_arg" = "xdarwin" || \
12608 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
12609 test "x$ac_cv_header_sandbox_h" = "xyes") ; then
12610 test "x$ac_cv_func_sandbox_init" != "xyes" -o \
12611 "x$ac_cv_header_sandbox_h" != "xyes" && \
12612 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
12613 SANDBOX_STYLE="darwin"
12614
12615$as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
12616
12617elif test "x$sandbox_arg" = "xseccomp_filter" || \
12618 ( test -z "$sandbox_arg" && \
12619 test "x$have_seccomp_filter" = "x1" && \
12620 test "x$ac_cv_header_elf_h" = "xyes" && \
12621 test "x$ac_cv_header_linux_audit_h" = "xyes" && \
12622 test "x$ac_cv_header_linux_filter_h" = "xyes" && \
12623 test "x$seccomp_audit_arch" != "x" && \
12624 test "x$have_linux_no_new_privs" = "x1" && \
12625 test "x$ac_cv_func_prctl" = "xyes" ) ; then
12626 test "x$seccomp_audit_arch" = "x" && \
12627 as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
12628 test "x$have_linux_no_new_privs" != "x1" && \
12629 as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
12630 test "x$have_seccomp_filter" != "x1" && \
12631 as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
12632 test "x$ac_cv_func_prctl" != "xyes" && \
12633 as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
12634 SANDBOX_STYLE="seccomp_filter"
12635
12636$as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
12637
12638elif test "x$sandbox_arg" = "xrlimit" || \
12639 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
12640 test "x$select_works_with_rlimit" = "xyes" && \
12641 test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
12642 test "x$ac_cv_func_setrlimit" != "xyes" && \
12643 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
12644 test "x$select_works_with_rlimit" != "xyes" && \
12645 as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
12646 SANDBOX_STYLE="rlimit"
12647
12648$as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
12649
12650elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
12651 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
12652 SANDBOX_STYLE="none"
12653
12654$as_echo "#define SANDBOX_NULL 1" >>confdefs.h
12655
12656else
12657 as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
12658fi
12659
12660# Cheap hack to ensure NEWS-OS libraries are arranged right.
12661if test ! -z "$SONY" ; then
12662 LIBS="$LIBS -liberty";
12663fi
12664
12665# Check for long long datatypes
12666ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12667if test "x$ac_cv_type_long_long" = xyes; then :
12668
12669cat >>confdefs.h <<_ACEOF
12670#define HAVE_LONG_LONG 1
12671_ACEOF
12672
12673
12674fi
12675ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
12676if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
12677
12678cat >>confdefs.h <<_ACEOF
12679#define HAVE_UNSIGNED_LONG_LONG 1
12680_ACEOF
12681
12682
12683fi
12684ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
12685if test "x$ac_cv_type_long_double" = xyes; then :
12686
12687cat >>confdefs.h <<_ACEOF
12688#define HAVE_LONG_DOUBLE 1
12689_ACEOF
12690
12691
12692fi
12693
12694
12695# Check datatype sizes
12696# The cast to long int works around a bug in the HP C Compiler
12697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12699# This bug is HP SR number 8606223364.
12700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
12701$as_echo_n "checking size of short int... " >&6; }
12702if ${ac_cv_sizeof_short_int+:} false; then :
12703 $as_echo_n "(cached) " >&6
12704else
12705 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then :
12706
12707else
12708 if test "$ac_cv_type_short_int" = yes; then
12709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12711as_fn_error 77 "cannot compute sizeof (short int)
12712See \`config.log' for more details" "$LINENO" 5; }
12713 else
12714 ac_cv_sizeof_short_int=0
12715 fi
12716fi
12717
12718fi
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
12720$as_echo "$ac_cv_sizeof_short_int" >&6; }
12721
12722
12723
12724cat >>confdefs.h <<_ACEOF
12725#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
12726_ACEOF
12727
12728
12729# The cast to long int works around a bug in the HP C Compiler
12730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12732# This bug is HP SR number 8606223364.
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
12734$as_echo_n "checking size of int... " >&6; }
12735if ${ac_cv_sizeof_int+:} false; then :
12736 $as_echo_n "(cached) " >&6
12737else
12738 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
12739
12740else
12741 if test "$ac_cv_type_int" = yes; then
12742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12744as_fn_error 77 "cannot compute sizeof (int)
12745See \`config.log' for more details" "$LINENO" 5; }
12746 else
12747 ac_cv_sizeof_int=0
12748 fi
12749fi
12750
12751fi
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
12753$as_echo "$ac_cv_sizeof_int" >&6; }
12754
12755
12756
12757cat >>confdefs.h <<_ACEOF
12758#define SIZEOF_INT $ac_cv_sizeof_int
12759_ACEOF
12760
12761
12762# The cast to long int works around a bug in the HP C Compiler
12763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12765# This bug is HP SR number 8606223364.
12766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
12767$as_echo_n "checking size of long int... " >&6; }
12768if ${ac_cv_sizeof_long_int+:} false; then :
12769 $as_echo_n "(cached) " >&6
12770else
12771 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
12772
12773else
12774 if test "$ac_cv_type_long_int" = yes; then
12775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12777as_fn_error 77 "cannot compute sizeof (long int)
12778See \`config.log' for more details" "$LINENO" 5; }
12779 else
12780 ac_cv_sizeof_long_int=0
12781 fi
12782fi
12783
12784fi
12785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
12786$as_echo "$ac_cv_sizeof_long_int" >&6; }
12787
12788
12789
12790cat >>confdefs.h <<_ACEOF
12791#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
12792_ACEOF
12793
12794
12795# The cast to long int works around a bug in the HP C Compiler
12796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12798# This bug is HP SR number 8606223364.
12799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
12800$as_echo_n "checking size of long long int... " >&6; }
12801if ${ac_cv_sizeof_long_long_int+:} false; then :
12802 $as_echo_n "(cached) " >&6
12803else
12804 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
12805
12806else
12807 if test "$ac_cv_type_long_long_int" = yes; then
12808 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12810as_fn_error 77 "cannot compute sizeof (long long int)
12811See \`config.log' for more details" "$LINENO" 5; }
12812 else
12813 ac_cv_sizeof_long_long_int=0
12814 fi
12815fi
12816
12817fi
12818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
12819$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
12820
12821
12822
12823cat >>confdefs.h <<_ACEOF
12824#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
12825_ACEOF
12826
12827
12828
12829# Sanity check long long for some platforms (AIX)
12830if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
12831 ac_cv_sizeof_long_long_int=0
12832fi
12833
12834# compute LLONG_MIN and LLONG_MAX if we don't know them.
12835if test -z "$have_llong_max"; then
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
12837$as_echo_n "checking for max value of long long... " >&6; }
12838 if test "$cross_compiling" = yes; then :
12839
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12841$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12842
12843
12844else
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846/* end confdefs.h. */
12847
12848#include <stdio.h>
12849/* Why is this so damn hard? */
12850#ifdef __GNUC__
12851# undef __GNUC__
12852#endif
12853#define __USE_ISOC99
12854#include <limits.h>
12855#define DATA "conftest.llminmax"
12856#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
12857
12858/*
12859 * printf in libc on some platforms (eg old Tru64) does not understand %lld so
12860 * we do this the hard way.
12861 */
12862static int
12863fprint_ll(FILE *f, long long n)
12864{
12865 unsigned int i;
12866 int l[sizeof(long long) * 8];
12867
12868 if (n < 0)
12869 if (fprintf(f, "-") < 0)
12870 return -1;
12871 for (i = 0; n != 0; i++) {
12872 l[i] = my_abs(n % 10);
12873 n /= 10;
12874 }
12875 do {
12876 if (fprintf(f, "%d", l[--i]) < 0)
12877 return -1;
12878 } while (i != 0);
12879 if (fprintf(f, " ") < 0)
12880 return -1;
12881 return 0;
12882}
12883
12884int
12885main ()
12886{
12887
12888 FILE *f;
12889 long long i, llmin, llmax = 0;
12890
12891 if((f = fopen(DATA,"w")) == NULL)
12892 exit(1);
12893
12894#if defined(LLONG_MIN) && defined(LLONG_MAX)
12895 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
12896 llmin = LLONG_MIN;
12897 llmax = LLONG_MAX;
12898#else
12899 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
12900 /* This will work on one's complement and two's complement */
12901 for (i = 1; i > llmax; i <<= 1, i++)
12902 llmax = i;
12903 llmin = llmax + 1LL; /* wrap */
12904#endif
12905
12906 /* Sanity check */
12907 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
12908 || llmax - 1 > llmax || llmin == llmax || llmin == 0
12909 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
12910 fprintf(f, "unknown unknown\n");
12911 exit(2);
12912 }
12913
12914 if (fprint_ll(f, llmin) < 0)
12915 exit(3);
12916 if (fprint_ll(f, llmax) < 0)
12917 exit(4);
12918 if (fclose(f) < 0)
12919 exit(5);
12920 exit(0);
12921
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926if ac_fn_c_try_run "$LINENO"; then :
12927
12928 llong_min=`$AWK '{print $1}' conftest.llminmax`
12929 llong_max=`$AWK '{print $2}' conftest.llminmax`
12930
12931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
12932$as_echo "$llong_max" >&6; }
12933
12934cat >>confdefs.h <<_ACEOF
12935#define LLONG_MAX ${llong_max}LL
12936_ACEOF
12937
12938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
12939$as_echo_n "checking for min value of long long... " >&6; }
12940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
12941$as_echo "$llong_min" >&6; }
12942
12943cat >>confdefs.h <<_ACEOF
12944#define LLONG_MIN ${llong_min}LL
12945_ACEOF
12946
12947
12948else
12949
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12951$as_echo "not found" >&6; }
12952
12953fi
12954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12955 conftest.$ac_objext conftest.beam conftest.$ac_ext
12956fi
12957
12958fi
12959
12960
12961# More checks for data types
12962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
12963$as_echo_n "checking for u_int type... " >&6; }
12964if ${ac_cv_have_u_int+:} false; then :
12965 $as_echo_n "(cached) " >&6
12966else
12967
12968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12969/* end confdefs.h. */
12970 #include <sys/types.h>
12971int
12972main ()
12973{
12974 u_int a; a = 1;
12975 ;
12976 return 0;
12977}
12978_ACEOF
12979if ac_fn_c_try_compile "$LINENO"; then :
12980 ac_cv_have_u_int="yes"
12981else
12982 ac_cv_have_u_int="no"
12983
12984fi
12985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12986
12987fi
12988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
12989$as_echo "$ac_cv_have_u_int" >&6; }
12990if test "x$ac_cv_have_u_int" = "xyes" ; then
12991
12992$as_echo "#define HAVE_U_INT 1" >>confdefs.h
12993
12994 have_u_int=1
12995fi
12996
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
12998$as_echo_n "checking for intXX_t types... " >&6; }
12999if ${ac_cv_have_intxx_t+:} false; then :
13000 $as_echo_n "(cached) " >&6
13001else
13002
13003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13004/* end confdefs.h. */
13005 #include <sys/types.h>
13006int
13007main ()
13008{
13009 int8_t a; int16_t b; int32_t c; a = b = c = 1;
13010 ;
13011 return 0;
13012}
13013_ACEOF
13014if ac_fn_c_try_compile "$LINENO"; then :
13015 ac_cv_have_intxx_t="yes"
13016else
13017 ac_cv_have_intxx_t="no"
13018
13019fi
13020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13021
13022fi
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
13024$as_echo "$ac_cv_have_intxx_t" >&6; }
13025if test "x$ac_cv_have_intxx_t" = "xyes" ; then
13026
13027$as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13028
13029 have_intxx_t=1
13030fi
13031
13032if (test -z "$have_intxx_t" && \
13033 test "x$ac_cv_header_stdint_h" = "xyes")
13034then
13035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
13036$as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038/* end confdefs.h. */
13039 #include <stdint.h>
13040int
13041main ()
13042{
13043 int8_t a; int16_t b; int32_t c; a = b = c = 1;
13044 ;
13045 return 0;
13046}
13047_ACEOF
13048if ac_fn_c_try_compile "$LINENO"; then :
13049
13050 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13051
13052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13053$as_echo "yes" >&6; }
13054
13055else
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13057$as_echo "no" >&6; }
13058
13059fi
13060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13061fi
13062
13063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
13064$as_echo_n "checking for int64_t type... " >&6; }
13065if ${ac_cv_have_int64_t+:} false; then :
13066 $as_echo_n "(cached) " >&6
13067else
13068
13069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13070/* end confdefs.h. */
13071
13072#include <sys/types.h>
13073#ifdef HAVE_STDINT_H
13074# include <stdint.h>
13075#endif
13076#include <sys/socket.h>
13077#ifdef HAVE_SYS_BITYPES_H
13078# include <sys/bitypes.h>
13079#endif
13080
13081int
13082main ()
13083{
13084
13085int64_t a; a = 1;
13086
13087 ;
13088 return 0;
13089}
13090_ACEOF
13091if ac_fn_c_try_compile "$LINENO"; then :
13092 ac_cv_have_int64_t="yes"
13093else
13094 ac_cv_have_int64_t="no"
13095
13096fi
13097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13098
13099fi
13100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
13101$as_echo "$ac_cv_have_int64_t" >&6; }
13102if test "x$ac_cv_have_int64_t" = "xyes" ; then
13103
13104$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
13105
13106fi
13107
13108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
13109$as_echo_n "checking for u_intXX_t types... " >&6; }
13110if ${ac_cv_have_u_intxx_t+:} false; then :
13111 $as_echo_n "(cached) " >&6
13112else
13113
13114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115/* end confdefs.h. */
13116 #include <sys/types.h>
13117int
13118main ()
13119{
13120 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
13121 ;
13122 return 0;
13123}
13124_ACEOF
13125if ac_fn_c_try_compile "$LINENO"; then :
13126 ac_cv_have_u_intxx_t="yes"
13127else
13128 ac_cv_have_u_intxx_t="no"
13129
13130fi
13131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13132
13133fi
13134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
13135$as_echo "$ac_cv_have_u_intxx_t" >&6; }
13136if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
13137
13138$as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
13139
13140 have_u_intxx_t=1
13141fi
13142
13143if test -z "$have_u_intxx_t" ; then
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
13145$as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
13146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13147/* end confdefs.h. */
13148 #include <sys/socket.h>
13149int
13150main ()
13151{
13152 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
13153 ;
13154 return 0;
13155}
13156_ACEOF
13157if ac_fn_c_try_compile "$LINENO"; then :
13158
13159 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
13160
13161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13162$as_echo "yes" >&6; }
13163
13164else
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13166$as_echo "no" >&6; }
13167
13168fi
13169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13170fi
13171
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
13173$as_echo_n "checking for u_int64_t types... " >&6; }
13174if ${ac_cv_have_u_int64_t+:} false; then :
13175 $as_echo_n "(cached) " >&6
13176else
13177
13178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13179/* end confdefs.h. */
13180 #include <sys/types.h>
13181int
13182main ()
13183{
13184 u_int64_t a; a = 1;
13185 ;
13186 return 0;
13187}
13188_ACEOF
13189if ac_fn_c_try_compile "$LINENO"; then :
13190 ac_cv_have_u_int64_t="yes"
13191else
13192 ac_cv_have_u_int64_t="no"
13193
13194fi
13195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13196
13197fi
13198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
13199$as_echo "$ac_cv_have_u_int64_t" >&6; }
13200if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
13201
13202$as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
13203
13204 have_u_int64_t=1
13205fi
13206
13207if test -z "$have_u_int64_t" ; then
13208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
13209$as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
13210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13211/* end confdefs.h. */
13212 #include <sys/bitypes.h>
13213int
13214main ()
13215{
13216 u_int64_t a; a = 1
13217 ;
13218 return 0;
13219}
13220_ACEOF
13221if ac_fn_c_try_compile "$LINENO"; then :
13222
13223 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
13224
13225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13226$as_echo "yes" >&6; }
13227
13228else
13229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13230$as_echo "no" >&6; }
13231
13232fi
13233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13234fi
13235
13236if test -z "$have_u_intxx_t" ; then
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
13238$as_echo_n "checking for uintXX_t types... " >&6; }
13239if ${ac_cv_have_uintxx_t+:} false; then :
13240 $as_echo_n "(cached) " >&6
13241else
13242
13243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13244/* end confdefs.h. */
13245
13246#include <sys/types.h>
13247
13248int
13249main ()
13250{
13251
13252 uint8_t a;
13253 uint16_t b;
13254 uint32_t c;
13255 a = b = c = 1;
13256
13257 ;
13258 return 0;
13259}
13260_ACEOF
13261if ac_fn_c_try_compile "$LINENO"; then :
13262 ac_cv_have_uintxx_t="yes"
13263else
13264 ac_cv_have_uintxx_t="no"
13265
13266fi
13267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13268
13269fi
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
13271$as_echo "$ac_cv_have_uintxx_t" >&6; }
13272 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
13273
13274$as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
13275
13276 fi
13277fi
13278
13279if test -z "$have_uintxx_t" ; then
13280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
13281$as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
13282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13283/* end confdefs.h. */
13284 #include <stdint.h>
13285int
13286main ()
13287{
13288 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
13289 ;
13290 return 0;
13291}
13292_ACEOF
13293if ac_fn_c_try_compile "$LINENO"; then :
13294
13295 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
13296
13297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13298$as_echo "yes" >&6; }
13299
13300else
13301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13302$as_echo "no" >&6; }
13303
13304fi
13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306fi
13307
13308if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
13309 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
13310then
13311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
13312$as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
13313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13314/* end confdefs.h. */
13315
13316#include <sys/bitypes.h>
13317
13318int
13319main ()
13320{
13321
13322 int8_t a; int16_t b; int32_t c;
13323 u_int8_t e; u_int16_t f; u_int32_t g;
13324 a = b = c = e = f = g = 1;
13325
13326 ;
13327 return 0;
13328}
13329_ACEOF
13330if ac_fn_c_try_compile "$LINENO"; then :
13331
13332 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
13333
13334 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13335
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13337$as_echo "yes" >&6; }
13338
13339else
13340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13341$as_echo "no" >&6; }
13342
13343fi
13344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345fi
13346
13347
13348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
13349$as_echo_n "checking for u_char... " >&6; }
13350if ${ac_cv_have_u_char+:} false; then :
13351 $as_echo_n "(cached) " >&6
13352else
13353
13354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13355/* end confdefs.h. */
13356 #include <sys/types.h>
13357int
13358main ()
13359{
13360 u_char foo; foo = 125;
13361 ;
13362 return 0;
13363}
13364_ACEOF
13365if ac_fn_c_try_compile "$LINENO"; then :
13366 ac_cv_have_u_char="yes"
13367else
13368 ac_cv_have_u_char="no"
13369
13370fi
13371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13372
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
13375$as_echo "$ac_cv_have_u_char" >&6; }
13376if test "x$ac_cv_have_u_char" = "xyes" ; then
13377
13378$as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
13379
13380fi
13381
13382
13383 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
13384#include <sys/socket.h>
13385"
13386if test "x$ac_cv_type_socklen_t" = xyes; then :
13387
13388else
13389
13390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
13391$as_echo_n "checking for socklen_t equivalent... " >&6; }
13392 if ${curl_cv_socklen_t_equiv+:} false; then :
13393 $as_echo_n "(cached) " >&6
13394else
13395
13396 # Systems have either "struct sockaddr *" or
13397 # "void *" as the second argument to getpeername
13398 curl_cv_socklen_t_equiv=
13399 for arg2 in "struct sockaddr" void; do
13400 for t in int size_t unsigned long "unsigned long"; do
13401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13402/* end confdefs.h. */
13403
13404 #include <sys/types.h>
13405 #include <sys/socket.h>
13406
13407 int getpeername (int, $arg2 *, $t *);
13408
13409int
13410main ()
13411{
13412
13413 $t len;
13414 getpeername(0,0,&len);
13415
13416 ;
13417 return 0;
13418}
13419_ACEOF
13420if ac_fn_c_try_compile "$LINENO"; then :
13421
13422 curl_cv_socklen_t_equiv="$t"
13423 break
13424
13425fi
13426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13427 done
13428 done
13429
13430 if test "x$curl_cv_socklen_t_equiv" = x; then
13431 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
13432 fi
13433
13434fi
13435
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
13437$as_echo "$curl_cv_socklen_t_equiv" >&6; }
13438
13439cat >>confdefs.h <<_ACEOF
13440#define socklen_t $curl_cv_socklen_t_equiv
13441_ACEOF
13442
13443fi
13444
13445
13446
13447ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13448"
13449if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13450
13451cat >>confdefs.h <<_ACEOF
13452#define HAVE_SIG_ATOMIC_T 1
13453_ACEOF
13454
13455
13456fi
13457
13458ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
13459#include <sys/types.h>
13460#ifdef HAVE_SYS_BITYPES_H
13461#include <sys/bitypes.h>
13462#endif
13463#ifdef HAVE_SYS_STATFS_H
13464#include <sys/statfs.h>
13465#endif
13466#ifdef HAVE_SYS_STATVFS_H
13467#include <sys/statvfs.h>
13468#endif
13469
13470"
13471if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
13472
13473cat >>confdefs.h <<_ACEOF
13474#define HAVE_FSBLKCNT_T 1
13475_ACEOF
13476
13477
13478fi
13479ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
13480#include <sys/types.h>
13481#ifdef HAVE_SYS_BITYPES_H
13482#include <sys/bitypes.h>
13483#endif
13484#ifdef HAVE_SYS_STATFS_H
13485#include <sys/statfs.h>
13486#endif
13487#ifdef HAVE_SYS_STATVFS_H
13488#include <sys/statvfs.h>
13489#endif
13490
13491"
13492if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
13493
13494cat >>confdefs.h <<_ACEOF
13495#define HAVE_FSFILCNT_T 1
13496_ACEOF
13497
13498
13499fi
13500
13501
13502ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
13503#include <netinet/in.h>
13504"
13505if test "x$ac_cv_type_in_addr_t" = xyes; then :
13506
13507cat >>confdefs.h <<_ACEOF
13508#define HAVE_IN_ADDR_T 1
13509_ACEOF
13510
13511
13512fi
13513ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
13514#include <netinet/in.h>
13515"
13516if test "x$ac_cv_type_in_port_t" = xyes; then :
13517
13518cat >>confdefs.h <<_ACEOF
13519#define HAVE_IN_PORT_T 1
13520_ACEOF
13521
13522
13523fi
13524
13525
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
13527$as_echo_n "checking for size_t... " >&6; }
13528if ${ac_cv_have_size_t+:} false; then :
13529 $as_echo_n "(cached) " >&6
13530else
13531
13532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13533/* end confdefs.h. */
13534 #include <sys/types.h>
13535int
13536main ()
13537{
13538 size_t foo; foo = 1235;
13539 ;
13540 return 0;
13541}
13542_ACEOF
13543if ac_fn_c_try_compile "$LINENO"; then :
13544 ac_cv_have_size_t="yes"
13545else
13546 ac_cv_have_size_t="no"
13547
13548fi
13549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13550
13551fi
13552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
13553$as_echo "$ac_cv_have_size_t" >&6; }
13554if test "x$ac_cv_have_size_t" = "xyes" ; then
13555
13556$as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
13557
13558fi
13559
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
13561$as_echo_n "checking for ssize_t... " >&6; }
13562if ${ac_cv_have_ssize_t+:} false; then :
13563 $as_echo_n "(cached) " >&6
13564else
13565
13566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13567/* end confdefs.h. */
13568 #include <sys/types.h>
13569int
13570main ()
13571{
13572 ssize_t foo; foo = 1235;
13573 ;
13574 return 0;
13575}
13576_ACEOF
13577if ac_fn_c_try_compile "$LINENO"; then :
13578 ac_cv_have_ssize_t="yes"
13579else
13580 ac_cv_have_ssize_t="no"
13581
13582fi
13583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13584
13585fi
13586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
13587$as_echo "$ac_cv_have_ssize_t" >&6; }
13588if test "x$ac_cv_have_ssize_t" = "xyes" ; then
13589
13590$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
13591
13592fi
13593
13594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
13595$as_echo_n "checking for clock_t... " >&6; }
13596if ${ac_cv_have_clock_t+:} false; then :
13597 $as_echo_n "(cached) " >&6
13598else
13599
13600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13601/* end confdefs.h. */
13602 #include <time.h>
13603int
13604main ()
13605{
13606 clock_t foo; foo = 1235;
13607 ;
13608 return 0;
13609}
13610_ACEOF
13611if ac_fn_c_try_compile "$LINENO"; then :
13612 ac_cv_have_clock_t="yes"
13613else
13614 ac_cv_have_clock_t="no"
13615
13616fi
13617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13618
13619fi
13620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
13621$as_echo "$ac_cv_have_clock_t" >&6; }
13622if test "x$ac_cv_have_clock_t" = "xyes" ; then
13623
13624$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
13625
13626fi
13627
13628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
13629$as_echo_n "checking for sa_family_t... " >&6; }
13630if ${ac_cv_have_sa_family_t+:} false; then :
13631 $as_echo_n "(cached) " >&6
13632else
13633
13634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13635/* end confdefs.h. */
13636
13637#include <sys/types.h>
13638#include <sys/socket.h>
13639
13640int
13641main ()
13642{
13643 sa_family_t foo; foo = 1235;
13644 ;
13645 return 0;
13646}
13647_ACEOF
13648if ac_fn_c_try_compile "$LINENO"; then :
13649 ac_cv_have_sa_family_t="yes"
13650else
13651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h. */
13653
13654#include <sys/types.h>
13655#include <sys/socket.h>
13656#include <netinet/in.h>
13657
13658int
13659main ()
13660{
13661 sa_family_t foo; foo = 1235;
13662 ;
13663 return 0;
13664}
13665_ACEOF
13666if ac_fn_c_try_compile "$LINENO"; then :
13667 ac_cv_have_sa_family_t="yes"
13668else
13669 ac_cv_have_sa_family_t="no"
13670
13671fi
13672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13673
13674fi
13675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676
13677fi
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
13679$as_echo "$ac_cv_have_sa_family_t" >&6; }
13680if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
13681
13682$as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
13683
13684fi
13685
13686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
13687$as_echo_n "checking for pid_t... " >&6; }
13688if ${ac_cv_have_pid_t+:} false; then :
13689 $as_echo_n "(cached) " >&6
13690else
13691
13692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693/* end confdefs.h. */
13694 #include <sys/types.h>
13695int
13696main ()
13697{
13698 pid_t foo; foo = 1235;
13699 ;
13700 return 0;
13701}
13702_ACEOF
13703if ac_fn_c_try_compile "$LINENO"; then :
13704 ac_cv_have_pid_t="yes"
13705else
13706 ac_cv_have_pid_t="no"
13707
13708fi
13709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13710
13711fi
13712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
13713$as_echo "$ac_cv_have_pid_t" >&6; }
13714if test "x$ac_cv_have_pid_t" = "xyes" ; then
13715
13716$as_echo "#define HAVE_PID_T 1" >>confdefs.h
13717
13718fi
13719
13720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
13721$as_echo_n "checking for mode_t... " >&6; }
13722if ${ac_cv_have_mode_t+:} false; then :
13723 $as_echo_n "(cached) " >&6
13724else
13725
13726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727/* end confdefs.h. */
13728 #include <sys/types.h>
13729int
13730main ()
13731{
13732 mode_t foo; foo = 1235;
13733 ;
13734 return 0;
13735}
13736_ACEOF
13737if ac_fn_c_try_compile "$LINENO"; then :
13738 ac_cv_have_mode_t="yes"
13739else
13740 ac_cv_have_mode_t="no"
13741
13742fi
13743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13744
13745fi
13746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
13747$as_echo "$ac_cv_have_mode_t" >&6; }
13748if test "x$ac_cv_have_mode_t" = "xyes" ; then
13749
13750$as_echo "#define HAVE_MODE_T 1" >>confdefs.h
13751
13752fi
13753
13754
13755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
13756$as_echo_n "checking for struct sockaddr_storage... " >&6; }
13757if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
13758 $as_echo_n "(cached) " >&6
13759else
13760
13761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13762/* end confdefs.h. */
13763
13764#include <sys/types.h>
13765#include <sys/socket.h>
13766
13767int
13768main ()
13769{
13770 struct sockaddr_storage s;
13771 ;
13772 return 0;
13773}
13774_ACEOF
13775if ac_fn_c_try_compile "$LINENO"; then :
13776 ac_cv_have_struct_sockaddr_storage="yes"
13777else
13778 ac_cv_have_struct_sockaddr_storage="no"
13779
13780fi
13781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13782
13783fi
13784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
13785$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
13786if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
13787
13788$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
13789
13790fi
13791
13792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
13793$as_echo_n "checking for struct sockaddr_in6... " >&6; }
13794if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
13795 $as_echo_n "(cached) " >&6
13796else
13797
13798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13799/* end confdefs.h. */
13800
13801#include <sys/types.h>
13802#include <netinet/in.h>
13803
13804int
13805main ()
13806{
13807 struct sockaddr_in6 s; s.sin6_family = 0;
13808 ;
13809 return 0;
13810}
13811_ACEOF
13812if ac_fn_c_try_compile "$LINENO"; then :
13813 ac_cv_have_struct_sockaddr_in6="yes"
13814else
13815 ac_cv_have_struct_sockaddr_in6="no"
13816
13817fi
13818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13819
13820fi
13821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
13822$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
13823if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
13824
13825$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
13826
13827fi
13828
13829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
13830$as_echo_n "checking for struct in6_addr... " >&6; }
13831if ${ac_cv_have_struct_in6_addr+:} false; then :
13832 $as_echo_n "(cached) " >&6
13833else
13834
13835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13836/* end confdefs.h. */
13837
13838#include <sys/types.h>
13839#include <netinet/in.h>
13840
13841int
13842main ()
13843{
13844 struct in6_addr s; s.s6_addr[0] = 0;
13845 ;
13846 return 0;
13847}
13848_ACEOF
13849if ac_fn_c_try_compile "$LINENO"; then :
13850 ac_cv_have_struct_in6_addr="yes"
13851else
13852 ac_cv_have_struct_in6_addr="no"
13853
13854fi
13855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13856
13857fi
13858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
13859$as_echo "$ac_cv_have_struct_in6_addr" >&6; }
13860if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
13861
13862$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
13863
13864
13865 ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
13866#ifdef HAVE_SYS_TYPES_H
13867#include <sys/types.h>
13868#endif
13869#include <netinet/in.h>
13870
13871"
13872if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
13873
13874cat >>confdefs.h <<_ACEOF
13875#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
13876_ACEOF
13877
13878
13879fi
13880
13881fi
13882
13883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
13884$as_echo_n "checking for struct addrinfo... " >&6; }
13885if ${ac_cv_have_struct_addrinfo+:} false; then :
13886 $as_echo_n "(cached) " >&6
13887else
13888
13889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13890/* end confdefs.h. */
13891
13892#include <sys/types.h>
13893#include <sys/socket.h>
13894#include <netdb.h>
13895
13896int
13897main ()
13898{
13899 struct addrinfo s; s.ai_flags = AI_PASSIVE;
13900 ;
13901 return 0;
13902}
13903_ACEOF
13904if ac_fn_c_try_compile "$LINENO"; then :
13905 ac_cv_have_struct_addrinfo="yes"
13906else
13907 ac_cv_have_struct_addrinfo="no"
13908
13909fi
13910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13911
13912fi
13913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
13914$as_echo "$ac_cv_have_struct_addrinfo" >&6; }
13915if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
13916
13917$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
13918
13919fi
13920
13921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13922$as_echo_n "checking for struct timeval... " >&6; }
13923if ${ac_cv_have_struct_timeval+:} false; then :
13924 $as_echo_n "(cached) " >&6
13925else
13926
13927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13928/* end confdefs.h. */
13929 #include <sys/time.h>
13930int
13931main ()
13932{
13933 struct timeval tv; tv.tv_sec = 1;
13934 ;
13935 return 0;
13936}
13937_ACEOF
13938if ac_fn_c_try_compile "$LINENO"; then :
13939 ac_cv_have_struct_timeval="yes"
13940else
13941 ac_cv_have_struct_timeval="no"
13942
13943fi
13944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13945
13946fi
13947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
13948$as_echo "$ac_cv_have_struct_timeval" >&6; }
13949if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
13950
13951$as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
13952
13953 have_struct_timeval=1
13954fi
13955
13956ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
13957if test "x$ac_cv_type_struct_timespec" = xyes; then :
13958
13959cat >>confdefs.h <<_ACEOF
13960#define HAVE_STRUCT_TIMESPEC 1
13961_ACEOF
13962
13963
13964fi
13965
13966
13967# We need int64_t or else certian parts of the compile will fail.
13968if test "x$ac_cv_have_int64_t" = "xno" && \
13969 test "x$ac_cv_sizeof_long_int" != "x8" && \
13970 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
13971 echo "OpenSSH requires int64_t support. Contact your vendor or install"
13972 echo "an alternative compiler (I.E., GCC) before continuing."
13973 echo ""
13974 exit 1;
13975else
13976 if test "$cross_compiling" = yes; then :
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
13978$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
13979
13980else
13981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13982/* end confdefs.h. */
13983
13984#include <stdio.h>
13985#include <string.h>
13986#ifdef HAVE_SNPRINTF
13987main()
13988{
13989 char buf[50];
13990 char expected_out[50];
13991 int mazsize = 50 ;
13992#if (SIZEOF_LONG_INT == 8)
13993 long int num = 0x7fffffffffffffff;
13994#else
13995 long long num = 0x7fffffffffffffffll;
13996#endif
13997 strcpy(expected_out, "9223372036854775807");
13998 snprintf(buf, mazsize, "%lld", num);
13999 if(strcmp(buf, expected_out) != 0)
14000 exit(1);
14001 exit(0);
14002}
14003#else
14004main() { exit(0); }
14005#endif
14006
14007_ACEOF
14008if ac_fn_c_try_run "$LINENO"; then :
14009 true
14010else
14011 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
14012
14013fi
14014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14015 conftest.$ac_objext conftest.beam conftest.$ac_ext
14016fi
14017
14018fi
14019
14020
14021# look for field 'ut_host' in header 'utmp.h'
14022 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14023 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
14025$as_echo_n "checking for ut_host field in utmp.h... " >&6; }
14026 if eval \${$ossh_varname+:} false; then :
14027 $as_echo_n "(cached) " >&6
14028else
14029
14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031/* end confdefs.h. */
14032#include <utmp.h>
14033
14034_ACEOF
14035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14036 $EGREP "ut_host" >/dev/null 2>&1; then :
14037 eval "$ossh_varname=yes"
14038else
14039 eval "$ossh_varname=no"
14040fi
14041rm -f conftest*
14042
14043fi
14044
14045 ossh_result=`eval 'echo $'"$ossh_varname"`
14046 if test -n "`echo $ossh_varname`"; then
14047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14048$as_echo "$ossh_result" >&6; }
14049 if test "x$ossh_result" = "xyes"; then
14050
14051$as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
14052
14053 fi
14054 else
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14056$as_echo "no" >&6; }
14057 fi
14058
14059
14060# look for field 'ut_host' in header 'utmpx.h'
14061 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14062 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
14064$as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
14065 if eval \${$ossh_varname+:} false; then :
14066 $as_echo_n "(cached) " >&6
14067else
14068
14069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14070/* end confdefs.h. */
14071#include <utmpx.h>
14072
14073_ACEOF
14074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14075 $EGREP "ut_host" >/dev/null 2>&1; then :
14076 eval "$ossh_varname=yes"
14077else
14078 eval "$ossh_varname=no"
14079fi
14080rm -f conftest*
14081
14082fi
14083
14084 ossh_result=`eval 'echo $'"$ossh_varname"`
14085 if test -n "`echo $ossh_varname`"; then
14086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14087$as_echo "$ossh_result" >&6; }
14088 if test "x$ossh_result" = "xyes"; then
14089
14090$as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
14091
14092 fi
14093 else
14094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14095$as_echo "no" >&6; }
14096 fi
14097
14098
14099# look for field 'syslen' in header 'utmpx.h'
14100 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14101 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
14103$as_echo_n "checking for syslen field in utmpx.h... " >&6; }
14104 if eval \${$ossh_varname+:} false; then :
14105 $as_echo_n "(cached) " >&6
14106else
14107
14108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14109/* end confdefs.h. */
14110#include <utmpx.h>
14111
14112_ACEOF
14113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14114 $EGREP "syslen" >/dev/null 2>&1; then :
14115 eval "$ossh_varname=yes"
14116else
14117 eval "$ossh_varname=no"
14118fi
14119rm -f conftest*
14120
14121fi
14122
14123 ossh_result=`eval 'echo $'"$ossh_varname"`
14124 if test -n "`echo $ossh_varname`"; then
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14126$as_echo "$ossh_result" >&6; }
14127 if test "x$ossh_result" = "xyes"; then
14128
14129$as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
14130
14131 fi
14132 else
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14134$as_echo "no" >&6; }
14135 fi
14136
14137
14138# look for field 'ut_pid' in header 'utmp.h'
14139 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14140 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
14142$as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
14143 if eval \${$ossh_varname+:} false; then :
14144 $as_echo_n "(cached) " >&6
14145else
14146
14147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14148/* end confdefs.h. */
14149#include <utmp.h>
14150
14151_ACEOF
14152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14153 $EGREP "ut_pid" >/dev/null 2>&1; then :
14154 eval "$ossh_varname=yes"
14155else
14156 eval "$ossh_varname=no"
14157fi
14158rm -f conftest*
14159
14160fi
14161
14162 ossh_result=`eval 'echo $'"$ossh_varname"`
14163 if test -n "`echo $ossh_varname`"; then
14164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14165$as_echo "$ossh_result" >&6; }
14166 if test "x$ossh_result" = "xyes"; then
14167
14168$as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
14169
14170 fi
14171 else
14172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14173$as_echo "no" >&6; }
14174 fi
14175
14176
14177# look for field 'ut_type' in header 'utmp.h'
14178 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14179 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
14180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
14181$as_echo_n "checking for ut_type field in utmp.h... " >&6; }
14182 if eval \${$ossh_varname+:} false; then :
14183 $as_echo_n "(cached) " >&6
14184else
14185
14186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14187/* end confdefs.h. */
14188#include <utmp.h>
14189
14190_ACEOF
14191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14192 $EGREP "ut_type" >/dev/null 2>&1; then :
14193 eval "$ossh_varname=yes"
14194else
14195 eval "$ossh_varname=no"
14196fi
14197rm -f conftest*
14198
14199fi
14200
14201 ossh_result=`eval 'echo $'"$ossh_varname"`
14202 if test -n "`echo $ossh_varname`"; then
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14204$as_echo "$ossh_result" >&6; }
14205 if test "x$ossh_result" = "xyes"; then
14206
14207$as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
14208
14209 fi
14210 else
14211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14212$as_echo "no" >&6; }
14213 fi
14214
14215
14216# look for field 'ut_type' in header 'utmpx.h'
14217 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14218 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
14219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
14220$as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
14221 if eval \${$ossh_varname+:} false; then :
14222 $as_echo_n "(cached) " >&6
14223else
14224
14225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14226/* end confdefs.h. */
14227#include <utmpx.h>
14228
14229_ACEOF
14230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14231 $EGREP "ut_type" >/dev/null 2>&1; then :
14232 eval "$ossh_varname=yes"
14233else
14234 eval "$ossh_varname=no"
14235fi
14236rm -f conftest*
14237
14238fi
14239
14240 ossh_result=`eval 'echo $'"$ossh_varname"`
14241 if test -n "`echo $ossh_varname`"; then
14242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14243$as_echo "$ossh_result" >&6; }
14244 if test "x$ossh_result" = "xyes"; then
14245
14246$as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
14247
14248 fi
14249 else
14250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14251$as_echo "no" >&6; }
14252 fi
14253
14254
14255# look for field 'ut_tv' in header 'utmp.h'
14256 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14257 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
14258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
14259$as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
14260 if eval \${$ossh_varname+:} false; then :
14261 $as_echo_n "(cached) " >&6
14262else
14263
14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265/* end confdefs.h. */
14266#include <utmp.h>
14267
14268_ACEOF
14269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14270 $EGREP "ut_tv" >/dev/null 2>&1; then :
14271 eval "$ossh_varname=yes"
14272else
14273 eval "$ossh_varname=no"
14274fi
14275rm -f conftest*
14276
14277fi
14278
14279 ossh_result=`eval 'echo $'"$ossh_varname"`
14280 if test -n "`echo $ossh_varname`"; then
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14282$as_echo "$ossh_result" >&6; }
14283 if test "x$ossh_result" = "xyes"; then
14284
14285$as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
14286
14287 fi
14288 else
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14290$as_echo "no" >&6; }
14291 fi
14292
14293
14294# look for field 'ut_id' in header 'utmp.h'
14295 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14296 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
14298$as_echo_n "checking for ut_id field in utmp.h... " >&6; }
14299 if eval \${$ossh_varname+:} false; then :
14300 $as_echo_n "(cached) " >&6
14301else
14302
14303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14304/* end confdefs.h. */
14305#include <utmp.h>
14306
14307_ACEOF
14308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14309 $EGREP "ut_id" >/dev/null 2>&1; then :
14310 eval "$ossh_varname=yes"
14311else
14312 eval "$ossh_varname=no"
14313fi
14314rm -f conftest*
14315
14316fi
14317
14318 ossh_result=`eval 'echo $'"$ossh_varname"`
14319 if test -n "`echo $ossh_varname`"; then
14320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14321$as_echo "$ossh_result" >&6; }
14322 if test "x$ossh_result" = "xyes"; then
14323
14324$as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
14325
14326 fi
14327 else
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14329$as_echo "no" >&6; }
14330 fi
14331
14332
14333# look for field 'ut_id' in header 'utmpx.h'
14334 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14335 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
14336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
14337$as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
14338 if eval \${$ossh_varname+:} false; then :
14339 $as_echo_n "(cached) " >&6
14340else
14341
14342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14343/* end confdefs.h. */
14344#include <utmpx.h>
14345
14346_ACEOF
14347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14348 $EGREP "ut_id" >/dev/null 2>&1; then :
14349 eval "$ossh_varname=yes"
14350else
14351 eval "$ossh_varname=no"
14352fi
14353rm -f conftest*
14354
14355fi
14356
14357 ossh_result=`eval 'echo $'"$ossh_varname"`
14358 if test -n "`echo $ossh_varname`"; then
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14360$as_echo "$ossh_result" >&6; }
14361 if test "x$ossh_result" = "xyes"; then
14362
14363$as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
14364
14365 fi
14366 else
14367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14368$as_echo "no" >&6; }
14369 fi
14370
14371
14372# look for field 'ut_addr' in header 'utmp.h'
14373 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14374 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
14376$as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
14377 if eval \${$ossh_varname+:} false; then :
14378 $as_echo_n "(cached) " >&6
14379else
14380
14381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382/* end confdefs.h. */
14383#include <utmp.h>
14384
14385_ACEOF
14386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14387 $EGREP "ut_addr" >/dev/null 2>&1; then :
14388 eval "$ossh_varname=yes"
14389else
14390 eval "$ossh_varname=no"
14391fi
14392rm -f conftest*
14393
14394fi
14395
14396 ossh_result=`eval 'echo $'"$ossh_varname"`
14397 if test -n "`echo $ossh_varname`"; then
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14399$as_echo "$ossh_result" >&6; }
14400 if test "x$ossh_result" = "xyes"; then
14401
14402$as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
14403
14404 fi
14405 else
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14407$as_echo "no" >&6; }
14408 fi
14409
14410
14411# look for field 'ut_addr' in header 'utmpx.h'
14412 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14413 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
14415$as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
14416 if eval \${$ossh_varname+:} false; then :
14417 $as_echo_n "(cached) " >&6
14418else
14419
14420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14421/* end confdefs.h. */
14422#include <utmpx.h>
14423
14424_ACEOF
14425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14426 $EGREP "ut_addr" >/dev/null 2>&1; then :
14427 eval "$ossh_varname=yes"
14428else
14429 eval "$ossh_varname=no"
14430fi
14431rm -f conftest*
14432
14433fi
14434
14435 ossh_result=`eval 'echo $'"$ossh_varname"`
14436 if test -n "`echo $ossh_varname`"; then
14437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14438$as_echo "$ossh_result" >&6; }
14439 if test "x$ossh_result" = "xyes"; then
14440
14441$as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
14442
14443 fi
14444 else
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14446$as_echo "no" >&6; }
14447 fi
14448
14449
14450# look for field 'ut_addr_v6' in header 'utmp.h'
14451 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14452 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
14454$as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
14455 if eval \${$ossh_varname+:} false; then :
14456 $as_echo_n "(cached) " >&6
14457else
14458
14459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14460/* end confdefs.h. */
14461#include <utmp.h>
14462
14463_ACEOF
14464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14465 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
14466 eval "$ossh_varname=yes"
14467else
14468 eval "$ossh_varname=no"
14469fi
14470rm -f conftest*
14471
14472fi
14473
14474 ossh_result=`eval 'echo $'"$ossh_varname"`
14475 if test -n "`echo $ossh_varname`"; then
14476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14477$as_echo "$ossh_result" >&6; }
14478 if test "x$ossh_result" = "xyes"; then
14479
14480$as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
14481
14482 fi
14483 else
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14485$as_echo "no" >&6; }
14486 fi
14487
14488
14489# look for field 'ut_addr_v6' in header 'utmpx.h'
14490 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14491 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
14492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
14493$as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
14494 if eval \${$ossh_varname+:} false; then :
14495 $as_echo_n "(cached) " >&6
14496else
14497
14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499/* end confdefs.h. */
14500#include <utmpx.h>
14501
14502_ACEOF
14503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14504 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
14505 eval "$ossh_varname=yes"
14506else
14507 eval "$ossh_varname=no"
14508fi
14509rm -f conftest*
14510
14511fi
14512
14513 ossh_result=`eval 'echo $'"$ossh_varname"`
14514 if test -n "`echo $ossh_varname`"; then
14515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14516$as_echo "$ossh_result" >&6; }
14517 if test "x$ossh_result" = "xyes"; then
14518
14519$as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
14520
14521 fi
14522 else
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14524$as_echo "no" >&6; }
14525 fi
14526
14527
14528# look for field 'ut_exit' in header 'utmp.h'
14529 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14530 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
14531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
14532$as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
14533 if eval \${$ossh_varname+:} false; then :
14534 $as_echo_n "(cached) " >&6
14535else
14536
14537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538/* end confdefs.h. */
14539#include <utmp.h>
14540
14541_ACEOF
14542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14543 $EGREP "ut_exit" >/dev/null 2>&1; then :
14544 eval "$ossh_varname=yes"
14545else
14546 eval "$ossh_varname=no"
14547fi
14548rm -f conftest*
14549
14550fi
14551
14552 ossh_result=`eval 'echo $'"$ossh_varname"`
14553 if test -n "`echo $ossh_varname`"; then
14554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14555$as_echo "$ossh_result" >&6; }
14556 if test "x$ossh_result" = "xyes"; then
14557
14558$as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
14559
14560 fi
14561 else
14562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14563$as_echo "no" >&6; }
14564 fi
14565
14566
14567# look for field 'ut_time' in header 'utmp.h'
14568 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14569 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
14570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
14571$as_echo_n "checking for ut_time field in utmp.h... " >&6; }
14572 if eval \${$ossh_varname+:} false; then :
14573 $as_echo_n "(cached) " >&6
14574else
14575
14576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14577/* end confdefs.h. */
14578#include <utmp.h>
14579
14580_ACEOF
14581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14582 $EGREP "ut_time" >/dev/null 2>&1; then :
14583 eval "$ossh_varname=yes"
14584else
14585 eval "$ossh_varname=no"
14586fi
14587rm -f conftest*
14588
14589fi
14590
14591 ossh_result=`eval 'echo $'"$ossh_varname"`
14592 if test -n "`echo $ossh_varname`"; then
14593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14594$as_echo "$ossh_result" >&6; }
14595 if test "x$ossh_result" = "xyes"; then
14596
14597$as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
14598
14599 fi
14600 else
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14602$as_echo "no" >&6; }
14603 fi
14604
14605
14606# look for field 'ut_time' in header 'utmpx.h'
14607 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14608 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
14610$as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
14611 if eval \${$ossh_varname+:} false; then :
14612 $as_echo_n "(cached) " >&6
14613else
14614
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616/* end confdefs.h. */
14617#include <utmpx.h>
14618
14619_ACEOF
14620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14621 $EGREP "ut_time" >/dev/null 2>&1; then :
14622 eval "$ossh_varname=yes"
14623else
14624 eval "$ossh_varname=no"
14625fi
14626rm -f conftest*
14627
14628fi
14629
14630 ossh_result=`eval 'echo $'"$ossh_varname"`
14631 if test -n "`echo $ossh_varname`"; then
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14633$as_echo "$ossh_result" >&6; }
14634 if test "x$ossh_result" = "xyes"; then
14635
14636$as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
14637
14638 fi
14639 else
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14641$as_echo "no" >&6; }
14642 fi
14643
14644
14645# look for field 'ut_tv' in header 'utmpx.h'
14646 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14647 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
14649$as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
14650 if eval \${$ossh_varname+:} false; then :
14651 $as_echo_n "(cached) " >&6
14652else
14653
14654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655/* end confdefs.h. */
14656#include <utmpx.h>
14657
14658_ACEOF
14659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14660 $EGREP "ut_tv" >/dev/null 2>&1; then :
14661 eval "$ossh_varname=yes"
14662else
14663 eval "$ossh_varname=no"
14664fi
14665rm -f conftest*
14666
14667fi
14668
14669 ossh_result=`eval 'echo $'"$ossh_varname"`
14670 if test -n "`echo $ossh_varname`"; then
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14672$as_echo "$ossh_result" >&6; }
14673 if test "x$ossh_result" = "xyes"; then
14674
14675$as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
14676
14677 fi
14678 else
14679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14680$as_echo "no" >&6; }
14681 fi
14682
14683
14684ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
14685if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
14686
14687cat >>confdefs.h <<_ACEOF
14688#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14689_ACEOF
14690
14691
14692fi
14693
14694ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
14695#include <sys/types.h>
14696#include <pwd.h>
14697
14698"
14699if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
14700
14701cat >>confdefs.h <<_ACEOF
14702#define HAVE_STRUCT_PASSWD_PW_GECOS 1
14703_ACEOF
14704
14705
14706fi
14707ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
14708#include <sys/types.h>
14709#include <pwd.h>
14710
14711"
14712if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
14713
14714cat >>confdefs.h <<_ACEOF
14715#define HAVE_STRUCT_PASSWD_PW_CLASS 1
14716_ACEOF
14717
14718
14719fi
14720ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
14721#include <sys/types.h>
14722#include <pwd.h>
14723
14724"
14725if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
14726
14727cat >>confdefs.h <<_ACEOF
14728#define HAVE_STRUCT_PASSWD_PW_CHANGE 1
14729_ACEOF
14730
14731
14732fi
14733ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
14734#include <sys/types.h>
14735#include <pwd.h>
14736
14737"
14738if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
14739
14740cat >>confdefs.h <<_ACEOF
14741#define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
14742_ACEOF
14743
14744
14745fi
14746
14747
14748ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
14749#include <stdio.h>
14750#if HAVE_SYS_TYPES_H
14751# include <sys/types.h>
14752#endif
14753#include <netinet/in.h>
14754#include <arpa/nameser.h>
14755#include <resolv.h>
14756
14757"
14758if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
14759
14760else
14761
14762$as_echo "#define __res_state state" >>confdefs.h
14763
14764fi
14765
14766
14767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
14768$as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
14769if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
14770 $as_echo_n "(cached) " >&6
14771else
14772
14773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14774/* end confdefs.h. */
14775
14776#include <sys/types.h>
14777#include <sys/socket.h>
14778
14779int
14780main ()
14781{
14782 struct sockaddr_storage s; s.ss_family = 1;
14783 ;
14784 return 0;
14785}
14786_ACEOF
14787if ac_fn_c_try_compile "$LINENO"; then :
14788 ac_cv_have_ss_family_in_struct_ss="yes"
14789else
14790 ac_cv_have_ss_family_in_struct_ss="no"
14791fi
14792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14793
14794fi
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
14796$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
14797if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
14798
14799$as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
14800
14801fi
14802
14803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
14804$as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
14805if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
14806 $as_echo_n "(cached) " >&6
14807else
14808
14809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14810/* end confdefs.h. */
14811
14812#include <sys/types.h>
14813#include <sys/socket.h>
14814
14815int
14816main ()
14817{
14818 struct sockaddr_storage s; s.__ss_family = 1;
14819 ;
14820 return 0;
14821}
14822_ACEOF
14823if ac_fn_c_try_compile "$LINENO"; then :
14824 ac_cv_have___ss_family_in_struct_ss="yes"
14825else
14826 ac_cv_have___ss_family_in_struct_ss="no"
14827
14828fi
14829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14830
14831fi
14832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
14833$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
14834if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
14835
14836$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
14837
14838fi
14839
14840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
14841$as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
14842if ${ac_cv_have_accrights_in_msghdr+:} false; then :
14843 $as_echo_n "(cached) " >&6
14844else
14845
14846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14847/* end confdefs.h. */
14848
14849#include <sys/types.h>
14850#include <sys/socket.h>
14851#include <sys/uio.h>
14852
14853int
14854main ()
14855{
14856
14857#ifdef msg_accrights
14858#error "msg_accrights is a macro"
14859exit(1);
14860#endif
14861struct msghdr m;
14862m.msg_accrights = 0;
14863exit(0);
14864
14865 ;
14866 return 0;
14867}
14868_ACEOF
14869if ac_fn_c_try_compile "$LINENO"; then :
14870 ac_cv_have_accrights_in_msghdr="yes"
14871else
14872 ac_cv_have_accrights_in_msghdr="no"
14873
14874fi
14875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14876
14877fi
14878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
14879$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
14880if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
14881
14882$as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
14883
14884fi
14885
14886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
14887$as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
14888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14889/* end confdefs.h. */
14890
14891#include <sys/param.h>
14892#include <sys/stat.h>
14893#ifdef HAVE_SYS_TIME_H
14894# include <sys/time.h>
14895#endif
14896#ifdef HAVE_SYS_MOUNT_H
14897#include <sys/mount.h>
14898#endif
14899#ifdef HAVE_SYS_STATVFS_H
14900#include <sys/statvfs.h>
14901#endif
14902
14903int
14904main ()
14905{
14906 struct statvfs s; s.f_fsid = 0;
14907 ;
14908 return 0;
14909}
14910_ACEOF
14911if ac_fn_c_try_compile "$LINENO"; then :
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14913$as_echo "yes" >&6; }
14914else
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14916$as_echo "no" >&6; }
14917
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
14919$as_echo_n "checking if fsid_t has member val... " >&6; }
14920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14921/* end confdefs.h. */
14922
14923#include <sys/types.h>
14924#include <sys/statvfs.h>
14925
14926int
14927main ()
14928{
14929 fsid_t t; t.val[0] = 0;
14930 ;
14931 return 0;
14932}
14933_ACEOF
14934if ac_fn_c_try_compile "$LINENO"; then :
14935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14936$as_echo "yes" >&6; }
14937
14938$as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
14939
14940else
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14942$as_echo "no" >&6; }
14943fi
14944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14945
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
14947$as_echo_n "checking if f_fsid has member __val... " >&6; }
14948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949/* end confdefs.h. */
14950
14951#include <sys/types.h>
14952#include <sys/statvfs.h>
14953
14954int
14955main ()
14956{
14957 fsid_t t; t.__val[0] = 0;
14958 ;
14959 return 0;
14960}
14961_ACEOF
14962if ac_fn_c_try_compile "$LINENO"; then :
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14964$as_echo "yes" >&6; }
14965
14966$as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
14967
14968else
14969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14970$as_echo "no" >&6; }
14971fi
14972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14973
14974fi
14975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14976
14977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
14978$as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
14979if ${ac_cv_have_control_in_msghdr+:} false; then :
14980 $as_echo_n "(cached) " >&6
14981else
14982
14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984/* end confdefs.h. */
14985
14986#include <sys/types.h>
14987#include <sys/socket.h>
14988#include <sys/uio.h>
14989
14990int
14991main ()
14992{
14993
14994#ifdef msg_control
14995#error "msg_control is a macro"
14996exit(1);
14997#endif
14998struct msghdr m;
14999m.msg_control = 0;
15000exit(0);
15001
15002 ;
15003 return 0;
15004}
15005_ACEOF
15006if ac_fn_c_try_compile "$LINENO"; then :
15007 ac_cv_have_control_in_msghdr="yes"
15008else
15009 ac_cv_have_control_in_msghdr="no"
15010
15011fi
15012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15013
15014fi
15015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
15016$as_echo "$ac_cv_have_control_in_msghdr" >&6; }
15017if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
15018
15019$as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
15020
15021fi
15022
15023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
15024$as_echo_n "checking if libc defines __progname... " >&6; }
15025if ${ac_cv_libc_defines___progname+:} false; then :
15026 $as_echo_n "(cached) " >&6
15027else
15028
15029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030/* end confdefs.h. */
15031
15032int
15033main ()
15034{
15035 extern char *__progname; printf("%s", __progname);
15036 ;
15037 return 0;
15038}
15039_ACEOF
15040if ac_fn_c_try_link "$LINENO"; then :
15041 ac_cv_libc_defines___progname="yes"
15042else
15043 ac_cv_libc_defines___progname="no"
15044
15045fi
15046rm -f core conftest.err conftest.$ac_objext \
15047 conftest$ac_exeext conftest.$ac_ext
15048
15049fi
15050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
15051$as_echo "$ac_cv_libc_defines___progname" >&6; }
15052if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
15053
15054$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
15055
15056fi
15057
15058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
15059$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
15060if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
15061 $as_echo_n "(cached) " >&6
15062else
15063
15064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15065/* end confdefs.h. */
15066 #include <stdio.h>
15067int
15068main ()
15069{
15070 printf("%s", __FUNCTION__);
15071 ;
15072 return 0;
15073}
15074_ACEOF
15075if ac_fn_c_try_link "$LINENO"; then :
15076 ac_cv_cc_implements___FUNCTION__="yes"
15077else
15078 ac_cv_cc_implements___FUNCTION__="no"
15079
15080fi
15081rm -f core conftest.err conftest.$ac_objext \
15082 conftest$ac_exeext conftest.$ac_ext
15083
15084fi
15085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
15086$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
15087if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
15088
15089$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
15090
15091fi
15092
15093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
15094$as_echo_n "checking whether $CC implements __func__... " >&6; }
15095if ${ac_cv_cc_implements___func__+:} false; then :
15096 $as_echo_n "(cached) " >&6
15097else
15098
15099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15100/* end confdefs.h. */
15101 #include <stdio.h>
15102int
15103main ()
15104{
15105 printf("%s", __func__);
15106 ;
15107 return 0;
15108}
15109_ACEOF
15110if ac_fn_c_try_link "$LINENO"; then :
15111 ac_cv_cc_implements___func__="yes"
15112else
15113 ac_cv_cc_implements___func__="no"
15114
15115fi
15116rm -f core conftest.err conftest.$ac_objext \
15117 conftest$ac_exeext conftest.$ac_ext
15118
15119fi
15120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
15121$as_echo "$ac_cv_cc_implements___func__" >&6; }
15122if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
15123
15124$as_echo "#define HAVE___func__ 1" >>confdefs.h
15125
15126fi
15127
15128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
15129$as_echo_n "checking whether va_copy exists... " >&6; }
15130if ${ac_cv_have_va_copy+:} false; then :
15131 $as_echo_n "(cached) " >&6
15132else
15133
15134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15135/* end confdefs.h. */
15136
15137#include <stdarg.h>
15138va_list x,y;
15139
15140int
15141main ()
15142{
15143 va_copy(x,y);
15144 ;
15145 return 0;
15146}
15147_ACEOF
15148if ac_fn_c_try_link "$LINENO"; then :
15149 ac_cv_have_va_copy="yes"
15150else
15151 ac_cv_have_va_copy="no"
15152
15153fi
15154rm -f core conftest.err conftest.$ac_objext \
15155 conftest$ac_exeext conftest.$ac_ext
15156
15157fi
15158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
15159$as_echo "$ac_cv_have_va_copy" >&6; }
15160if test "x$ac_cv_have_va_copy" = "xyes" ; then
15161
15162$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
15163
15164fi
15165
15166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
15167$as_echo_n "checking whether __va_copy exists... " >&6; }
15168if ${ac_cv_have___va_copy+:} false; then :
15169 $as_echo_n "(cached) " >&6
15170else
15171
15172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15173/* end confdefs.h. */
15174
15175#include <stdarg.h>
15176va_list x,y;
15177
15178int
15179main ()
15180{
15181 __va_copy(x,y);
15182 ;
15183 return 0;
15184}
15185_ACEOF
15186if ac_fn_c_try_link "$LINENO"; then :
15187 ac_cv_have___va_copy="yes"
15188else
15189 ac_cv_have___va_copy="no"
15190
15191fi
15192rm -f core conftest.err conftest.$ac_objext \
15193 conftest$ac_exeext conftest.$ac_ext
15194
15195fi
15196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
15197$as_echo "$ac_cv_have___va_copy" >&6; }
15198if test "x$ac_cv_have___va_copy" = "xyes" ; then
15199
15200$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
15201
15202fi
15203
15204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
15205$as_echo_n "checking whether getopt has optreset support... " >&6; }
15206if ${ac_cv_have_getopt_optreset+:} false; then :
15207 $as_echo_n "(cached) " >&6
15208else
15209
15210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15211/* end confdefs.h. */
15212 #include <getopt.h>
15213int
15214main ()
15215{
15216 extern int optreset; optreset = 0;
15217 ;
15218 return 0;
15219}
15220_ACEOF
15221if ac_fn_c_try_link "$LINENO"; then :
15222 ac_cv_have_getopt_optreset="yes"
15223else
15224 ac_cv_have_getopt_optreset="no"
15225
15226fi
15227rm -f core conftest.err conftest.$ac_objext \
15228 conftest$ac_exeext conftest.$ac_ext
15229
15230fi
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
15232$as_echo "$ac_cv_have_getopt_optreset" >&6; }
15233if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
15234
15235$as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
15236
15237fi
15238
15239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
15240$as_echo_n "checking if libc defines sys_errlist... " >&6; }
15241if ${ac_cv_libc_defines_sys_errlist+:} false; then :
15242 $as_echo_n "(cached) " >&6
15243else
15244
15245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15246/* end confdefs.h. */
15247
15248int
15249main ()
15250{
15251 extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
15252 ;
15253 return 0;
15254}
15255_ACEOF
15256if ac_fn_c_try_link "$LINENO"; then :
15257 ac_cv_libc_defines_sys_errlist="yes"
15258else
15259 ac_cv_libc_defines_sys_errlist="no"
15260
15261fi
15262rm -f core conftest.err conftest.$ac_objext \
15263 conftest$ac_exeext conftest.$ac_ext
15264
15265fi
15266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
15267$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
15268if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
15269
15270$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
15271
15272fi
15273
15274
15275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
15276$as_echo_n "checking if libc defines sys_nerr... " >&6; }
15277if ${ac_cv_libc_defines_sys_nerr+:} false; then :
15278 $as_echo_n "(cached) " >&6
15279else
15280
15281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15282/* end confdefs.h. */
15283
15284int
15285main ()
15286{
15287 extern int sys_nerr; printf("%i", sys_nerr);
15288 ;
15289 return 0;
15290}
15291_ACEOF
15292if ac_fn_c_try_link "$LINENO"; then :
15293 ac_cv_libc_defines_sys_nerr="yes"
15294else
15295 ac_cv_libc_defines_sys_nerr="no"
15296
15297fi
15298rm -f core conftest.err conftest.$ac_objext \
15299 conftest$ac_exeext conftest.$ac_ext
15300
15301fi
15302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
15303$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
15304if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
15305
15306$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
15307
15308fi
15309
15310# Check libraries needed by DNS fingerprint support
15311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
15312$as_echo_n "checking for library containing getrrsetbyname... " >&6; }
15313if ${ac_cv_search_getrrsetbyname+:} false; then :
15314 $as_echo_n "(cached) " >&6
15315else
15316 ac_func_search_save_LIBS=$LIBS
15317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15318/* end confdefs.h. */
15319
15320/* Override any GCC internal prototype to avoid an error.
15321 Use char because int might match the return type of a GCC
15322 builtin and then its argument prototype would still apply. */
15323#ifdef __cplusplus
15324extern "C"
15325#endif
15326char getrrsetbyname ();
15327int
15328main ()
15329{
15330return getrrsetbyname ();
15331 ;
15332 return 0;
15333}
15334_ACEOF
15335for ac_lib in '' resolv; do
15336 if test -z "$ac_lib"; then
15337 ac_res="none required"
15338 else
15339 ac_res=-l$ac_lib
15340 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15341 fi
15342 if ac_fn_c_try_link "$LINENO"; then :
15343 ac_cv_search_getrrsetbyname=$ac_res
15344fi
15345rm -f core conftest.err conftest.$ac_objext \
15346 conftest$ac_exeext
15347 if ${ac_cv_search_getrrsetbyname+:} false; then :
15348 break
15349fi
15350done
15351if ${ac_cv_search_getrrsetbyname+:} false; then :
15352
15353else
15354 ac_cv_search_getrrsetbyname=no
15355fi
15356rm conftest.$ac_ext
15357LIBS=$ac_func_search_save_LIBS
15358fi
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
15360$as_echo "$ac_cv_search_getrrsetbyname" >&6; }
15361ac_res=$ac_cv_search_getrrsetbyname
15362if test "$ac_res" != no; then :
15363 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15364
15365$as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
15366
15367else
15368
15369 # Needed by our getrrsetbyname()
15370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
15371$as_echo_n "checking for library containing res_query... " >&6; }
15372if ${ac_cv_search_res_query+:} false; then :
15373 $as_echo_n "(cached) " >&6
15374else
15375 ac_func_search_save_LIBS=$LIBS
15376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15377/* end confdefs.h. */
15378
15379/* Override any GCC internal prototype to avoid an error.
15380 Use char because int might match the return type of a GCC
15381 builtin and then its argument prototype would still apply. */
15382#ifdef __cplusplus
15383extern "C"
15384#endif
15385char res_query ();
15386int
15387main ()
15388{
15389return res_query ();
15390 ;
15391 return 0;
15392}
15393_ACEOF
15394for ac_lib in '' resolv; do
15395 if test -z "$ac_lib"; then
15396 ac_res="none required"
15397 else
15398 ac_res=-l$ac_lib
15399 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15400 fi
15401 if ac_fn_c_try_link "$LINENO"; then :
15402 ac_cv_search_res_query=$ac_res
15403fi
15404rm -f core conftest.err conftest.$ac_objext \
15405 conftest$ac_exeext
15406 if ${ac_cv_search_res_query+:} false; then :
15407 break
15408fi
15409done
15410if ${ac_cv_search_res_query+:} false; then :
15411
15412else
15413 ac_cv_search_res_query=no
15414fi
15415rm conftest.$ac_ext
15416LIBS=$ac_func_search_save_LIBS
15417fi
15418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
15419$as_echo "$ac_cv_search_res_query" >&6; }
15420ac_res=$ac_cv_search_res_query
15421if test "$ac_res" != no; then :
15422 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15423
15424fi
15425
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
15427$as_echo_n "checking for library containing dn_expand... " >&6; }
15428if ${ac_cv_search_dn_expand+:} false; then :
15429 $as_echo_n "(cached) " >&6
15430else
15431 ac_func_search_save_LIBS=$LIBS
15432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15433/* end confdefs.h. */
15434
15435/* Override any GCC internal prototype to avoid an error.
15436 Use char because int might match the return type of a GCC
15437 builtin and then its argument prototype would still apply. */
15438#ifdef __cplusplus
15439extern "C"
15440#endif
15441char dn_expand ();
15442int
15443main ()
15444{
15445return dn_expand ();
15446 ;
15447 return 0;
15448}
15449_ACEOF
15450for ac_lib in '' resolv; do
15451 if test -z "$ac_lib"; then
15452 ac_res="none required"
15453 else
15454 ac_res=-l$ac_lib
15455 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15456 fi
15457 if ac_fn_c_try_link "$LINENO"; then :
15458 ac_cv_search_dn_expand=$ac_res
15459fi
15460rm -f core conftest.err conftest.$ac_objext \
15461 conftest$ac_exeext
15462 if ${ac_cv_search_dn_expand+:} false; then :
15463 break
15464fi
15465done
15466if ${ac_cv_search_dn_expand+:} false; then :
15467
15468else
15469 ac_cv_search_dn_expand=no
15470fi
15471rm conftest.$ac_ext
15472LIBS=$ac_func_search_save_LIBS
15473fi
15474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
15475$as_echo "$ac_cv_search_dn_expand" >&6; }
15476ac_res=$ac_cv_search_dn_expand
15477if test "$ac_res" != no; then :
15478 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15479
15480fi
15481
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
15483$as_echo_n "checking if res_query will link... " >&6; }
15484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15485/* end confdefs.h. */
15486
15487#include <sys/types.h>
15488#include <netinet/in.h>
15489#include <arpa/nameser.h>
15490#include <netdb.h>
15491#include <resolv.h>
15492
15493int
15494main ()
15495{
15496
15497 res_query (0, 0, 0, 0, 0);
15498
15499 ;
15500 return 0;
15501}
15502_ACEOF
15503if ac_fn_c_try_link "$LINENO"; then :
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15505$as_echo "yes" >&6; }
15506else
15507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15508$as_echo "no" >&6; }
15509 saved_LIBS="$LIBS"
15510 LIBS="$LIBS -lresolv"
15511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
15512$as_echo_n "checking for res_query in -lresolv... " >&6; }
15513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15514/* end confdefs.h. */
15515
15516#include <sys/types.h>
15517#include <netinet/in.h>
15518#include <arpa/nameser.h>
15519#include <netdb.h>
15520#include <resolv.h>
15521
15522int
15523main ()
15524{
15525
15526 res_query (0, 0, 0, 0, 0);
15527
15528 ;
15529 return 0;
15530}
15531_ACEOF
15532if ac_fn_c_try_link "$LINENO"; then :
15533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15534$as_echo "yes" >&6; }
15535else
15536 LIBS="$saved_LIBS"
15537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15538$as_echo "no" >&6; }
15539fi
15540rm -f core conftest.err conftest.$ac_objext \
15541 conftest$ac_exeext conftest.$ac_ext
15542
15543fi
15544rm -f core conftest.err conftest.$ac_objext \
15545 conftest$ac_exeext conftest.$ac_ext
15546 for ac_func in _getshort _getlong
15547do :
15548 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15549ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15550if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15551 cat >>confdefs.h <<_ACEOF
15552#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15553_ACEOF
15554
15555fi
15556done
15557
15558 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
15559 #include <arpa/nameser.h>
15560"
15561if test "x$ac_cv_have_decl__getshort" = xyes; then :
15562 ac_have_decl=1
15563else
15564 ac_have_decl=0
15565fi
15566
15567cat >>confdefs.h <<_ACEOF
15568#define HAVE_DECL__GETSHORT $ac_have_decl
15569_ACEOF
15570ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
15571 #include <arpa/nameser.h>
15572"
15573if test "x$ac_cv_have_decl__getlong" = xyes; then :
15574 ac_have_decl=1
15575else
15576 ac_have_decl=0
15577fi
15578
15579cat >>confdefs.h <<_ACEOF
15580#define HAVE_DECL__GETLONG $ac_have_decl
15581_ACEOF
15582
15583 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
15584"
15585if test "x$ac_cv_member_HEADER_ad" = xyes; then :
15586
15587$as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
15588
15589fi
15590
15591
15592fi
15593
15594
15595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
15596$as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
15597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15598/* end confdefs.h. */
15599
15600#include <stdio.h>
15601#if HAVE_SYS_TYPES_H
15602# include <sys/types.h>
15603#endif
15604#include <netinet/in.h>
15605#include <arpa/nameser.h>
15606#include <resolv.h>
15607extern struct __res_state _res;
15608
15609int
15610main ()
15611{
15612
15613 ;
15614 return 0;
15615}
15616_ACEOF
15617if ac_fn_c_try_link "$LINENO"; then :
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15619$as_echo "yes" >&6; }
15620
15621$as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
15622
15623
15624else
15625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15626$as_echo "no" >&6; }
15627
15628fi
15629rm -f core conftest.err conftest.$ac_objext \
15630 conftest$ac_exeext conftest.$ac_ext
15631
15632# Check whether user wants SELinux support
15633SELINUX_MSG="no"
15634LIBSELINUX=""
15635
15636# Check whether --with-selinux was given.
15637if test "${with_selinux+set}" = set; then :
15638 withval=$with_selinux; if test "x$withval" != "xno" ; then
15639 save_LIBS="$LIBS"
15640
15641$as_echo "#define WITH_SELINUX 1" >>confdefs.h
15642
15643 SELINUX_MSG="yes"
15644 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
15645if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
15646
15647else
15648 as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
15649fi
15650
15651
15652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
15653$as_echo_n "checking for setexeccon in -lselinux... " >&6; }
15654if ${ac_cv_lib_selinux_setexeccon+:} false; then :
15655 $as_echo_n "(cached) " >&6
15656else
15657 ac_check_lib_save_LIBS=$LIBS
15658LIBS="-lselinux $LIBS"
15659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15660/* end confdefs.h. */
15661
15662/* Override any GCC internal prototype to avoid an error.
15663 Use char because int might match the return type of a GCC
15664 builtin and then its argument prototype would still apply. */
15665#ifdef __cplusplus
15666extern "C"
15667#endif
15668char setexeccon ();
15669int
15670main ()
15671{
15672return setexeccon ();
15673 ;
15674 return 0;
15675}
15676_ACEOF
15677if ac_fn_c_try_link "$LINENO"; then :
15678 ac_cv_lib_selinux_setexeccon=yes
15679else
15680 ac_cv_lib_selinux_setexeccon=no
15681fi
15682rm -f core conftest.err conftest.$ac_objext \
15683 conftest$ac_exeext conftest.$ac_ext
15684LIBS=$ac_check_lib_save_LIBS
15685fi
15686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
15687$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
15688if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
15689 LIBSELINUX="-lselinux"
15690 LIBS="$LIBS -lselinux"
15691
15692else
15693 as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
15694fi
15695
15696 SSHLIBS="$SSHLIBS $LIBSELINUX"
15697 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
15698 for ac_func in getseuserbyname get_default_context_with_level
15699do :
15700 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15701ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15702if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15703 cat >>confdefs.h <<_ACEOF
15704#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15705_ACEOF
15706
15707fi
15708done
15709
15710 LIBS="$save_LIBS"
15711 fi
15712
15713fi
15714
15715
15716
15717
15718# Check whether user wants Kerberos 5 support
15719KRB5_MSG="no"
15720
15721# Check whether --with-kerberos5 was given.
15722if test "${with_kerberos5+set}" = set; then :
15723 withval=$with_kerberos5; if test "x$withval" != "xno" ; then
15724 if test "x$withval" = "xyes" ; then
15725 KRB5ROOT="/usr/local"
15726 else
15727 KRB5ROOT=${withval}
15728 fi
15729
15730
15731$as_echo "#define KRB5 1" >>confdefs.h
15732
15733 KRB5_MSG="yes"
15734
15735 # Extract the first word of "krb5-config", so it can be a program name with args.
15736set dummy krb5-config; ac_word=$2
15737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15738$as_echo_n "checking for $ac_word... " >&6; }
15739if ${ac_cv_path_KRB5CONF+:} false; then :
15740 $as_echo_n "(cached) " >&6
15741else
15742 case $KRB5CONF in
15743 [\\/]* | ?:[\\/]*)
15744 ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
15745 ;;
15746 *)
15747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15748as_dummy="$KRB5ROOT/bin:$PATH"
15749for as_dir in $as_dummy
15750do
15751 IFS=$as_save_IFS
15752 test -z "$as_dir" && as_dir=.
15753 for ac_exec_ext in '' $ac_executable_extensions; do
15754 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15755 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
15756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15757 break 2
15758 fi
15759done
15760 done
15761IFS=$as_save_IFS
15762
15763 test -z "$ac_cv_path_KRB5CONF" && ac_cv_path_KRB5CONF="$KRB5ROOT/bin/krb5-config"
15764 ;;
15765esac
15766fi
15767KRB5CONF=$ac_cv_path_KRB5CONF
15768if test -n "$KRB5CONF"; then
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
15770$as_echo "$KRB5CONF" >&6; }
15771else
15772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15773$as_echo "no" >&6; }
15774fi
15775
15776
15777 if test -x $KRB5CONF ; then
15778 K5CFLAGS="`$KRB5CONF --cflags`"
15779 K5LIBS="`$KRB5CONF --libs`"
15780 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
15781
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
15783$as_echo_n "checking for gssapi support... " >&6; }
15784 if $KRB5CONF | grep gssapi >/dev/null ; then
15785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15786$as_echo "yes" >&6; }
15787
15788$as_echo "#define GSSAPI 1" >>confdefs.h
15789
15790 GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
15791 GSSLIBS="`$KRB5CONF --libs gssapi`"
15792 CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
15793 else
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15795$as_echo "no" >&6; }
15796 fi
15797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
15798$as_echo_n "checking whether we are using Heimdal... " >&6; }
15799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15800/* end confdefs.h. */
15801 #include <krb5.h>
15802
15803int
15804main ()
15805{
15806 char *tmp = heimdal_version;
15807 ;
15808 return 0;
15809}
15810_ACEOF
15811if ac_fn_c_try_compile "$LINENO"; then :
15812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15813$as_echo "yes" >&6; }
15814
15815$as_echo "#define HEIMDAL 1" >>confdefs.h
15816
15817else
15818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15819$as_echo "no" >&6; }
15820
15821fi
15822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15823 else
15824 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
15825 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
15827$as_echo_n "checking whether we are using Heimdal... " >&6; }
15828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15829/* end confdefs.h. */
15830 #include <krb5.h>
15831
15832int
15833main ()
15834{
15835 char *tmp = heimdal_version;
15836 ;
15837 return 0;
15838}
15839_ACEOF
15840if ac_fn_c_try_compile "$LINENO"; then :
15841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15842$as_echo "yes" >&6; }
15843 $as_echo "#define HEIMDAL 1" >>confdefs.h
15844
15845 K5LIBS="-lkrb5"
15846 K5LIBS="$K5LIBS -lcom_err -lasn1"
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
15848$as_echo_n "checking for net_write in -lroken... " >&6; }
15849if ${ac_cv_lib_roken_net_write+:} false; then :
15850 $as_echo_n "(cached) " >&6
15851else
15852 ac_check_lib_save_LIBS=$LIBS
15853LIBS="-lroken $LIBS"
15854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15855/* end confdefs.h. */
15856
15857/* Override any GCC internal prototype to avoid an error.
15858 Use char because int might match the return type of a GCC
15859 builtin and then its argument prototype would still apply. */
15860#ifdef __cplusplus
15861extern "C"
15862#endif
15863char net_write ();
15864int
15865main ()
15866{
15867return net_write ();
15868 ;
15869 return 0;
15870}
15871_ACEOF
15872if ac_fn_c_try_link "$LINENO"; then :
15873 ac_cv_lib_roken_net_write=yes
15874else
15875 ac_cv_lib_roken_net_write=no
15876fi
15877rm -f core conftest.err conftest.$ac_objext \
15878 conftest$ac_exeext conftest.$ac_ext
15879LIBS=$ac_check_lib_save_LIBS
15880fi
15881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
15882$as_echo "$ac_cv_lib_roken_net_write" >&6; }
15883if test "x$ac_cv_lib_roken_net_write" = xyes; then :
15884 K5LIBS="$K5LIBS -lroken"
15885fi
15886
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15888$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15889if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
15890 $as_echo_n "(cached) " >&6
15891else
15892 ac_check_lib_save_LIBS=$LIBS
15893LIBS="-ldes $LIBS"
15894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15895/* end confdefs.h. */
15896
15897/* Override any GCC internal prototype to avoid an error.
15898 Use char because int might match the return type of a GCC
15899 builtin and then its argument prototype would still apply. */
15900#ifdef __cplusplus
15901extern "C"
15902#endif
15903char des_cbc_encrypt ();
15904int
15905main ()
15906{
15907return des_cbc_encrypt ();
15908 ;
15909 return 0;
15910}
15911_ACEOF
15912if ac_fn_c_try_link "$LINENO"; then :
15913 ac_cv_lib_des_des_cbc_encrypt=yes
15914else
15915 ac_cv_lib_des_des_cbc_encrypt=no
15916fi
15917rm -f core conftest.err conftest.$ac_objext \
15918 conftest$ac_exeext conftest.$ac_ext
15919LIBS=$ac_check_lib_save_LIBS
15920fi
15921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15922$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15923if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
15924 K5LIBS="$K5LIBS -ldes"
15925fi
15926
15927
15928else
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15930$as_echo "no" >&6; }
15931 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
15932
15933
15934fi
15935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
15937$as_echo_n "checking for library containing dn_expand... " >&6; }
15938if ${ac_cv_search_dn_expand+:} false; then :
15939 $as_echo_n "(cached) " >&6
15940else
15941 ac_func_search_save_LIBS=$LIBS
15942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15943/* end confdefs.h. */
15944
15945/* Override any GCC internal prototype to avoid an error.
15946 Use char because int might match the return type of a GCC
15947 builtin and then its argument prototype would still apply. */
15948#ifdef __cplusplus
15949extern "C"
15950#endif
15951char dn_expand ();
15952int
15953main ()
15954{
15955return dn_expand ();
15956 ;
15957 return 0;
15958}
15959_ACEOF
15960for ac_lib in '' resolv; do
15961 if test -z "$ac_lib"; then
15962 ac_res="none required"
15963 else
15964 ac_res=-l$ac_lib
15965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15966 fi
15967 if ac_fn_c_try_link "$LINENO"; then :
15968 ac_cv_search_dn_expand=$ac_res
15969fi
15970rm -f core conftest.err conftest.$ac_objext \
15971 conftest$ac_exeext
15972 if ${ac_cv_search_dn_expand+:} false; then :
15973 break
15974fi
15975done
15976if ${ac_cv_search_dn_expand+:} false; then :
15977
15978else
15979 ac_cv_search_dn_expand=no
15980fi
15981rm conftest.$ac_ext
15982LIBS=$ac_func_search_save_LIBS
15983fi
15984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
15985$as_echo "$ac_cv_search_dn_expand" >&6; }
15986ac_res=$ac_cv_search_dn_expand
15987if test "$ac_res" != no; then :
15988 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15989
15990fi
15991
15992
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
15994$as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
15995if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
15996 $as_echo_n "(cached) " >&6
15997else
15998 ac_check_lib_save_LIBS=$LIBS
15999LIBS="-lgssapi_krb5 $LIBS"
16000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16001/* end confdefs.h. */
16002
16003/* Override any GCC internal prototype to avoid an error.
16004 Use char because int might match the return type of a GCC
16005 builtin and then its argument prototype would still apply. */
16006#ifdef __cplusplus
16007extern "C"
16008#endif
16009char gss_init_sec_context ();
16010int
16011main ()
16012{
16013return gss_init_sec_context ();
16014 ;
16015 return 0;
16016}
16017_ACEOF
16018if ac_fn_c_try_link "$LINENO"; then :
16019 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
16020else
16021 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
16022fi
16023rm -f core conftest.err conftest.$ac_objext \
16024 conftest$ac_exeext conftest.$ac_ext
16025LIBS=$ac_check_lib_save_LIBS
16026fi
16027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
16028$as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
16029if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
16030 $as_echo "#define GSSAPI 1" >>confdefs.h
16031
16032 GSSLIBS="-lgssapi_krb5"
16033else
16034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
16035$as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
16036if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
16037 $as_echo_n "(cached) " >&6
16038else
16039 ac_check_lib_save_LIBS=$LIBS
16040LIBS="-lgssapi $LIBS"
16041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16042/* end confdefs.h. */
16043
16044/* Override any GCC internal prototype to avoid an error.
16045 Use char because int might match the return type of a GCC
16046 builtin and then its argument prototype would still apply. */
16047#ifdef __cplusplus
16048extern "C"
16049#endif
16050char gss_init_sec_context ();
16051int
16052main ()
16053{
16054return gss_init_sec_context ();
16055 ;
16056 return 0;
16057}
16058_ACEOF
16059if ac_fn_c_try_link "$LINENO"; then :
16060 ac_cv_lib_gssapi_gss_init_sec_context=yes
16061else
16062 ac_cv_lib_gssapi_gss_init_sec_context=no
16063fi
16064rm -f core conftest.err conftest.$ac_objext \
16065 conftest$ac_exeext conftest.$ac_ext
16066LIBS=$ac_check_lib_save_LIBS
16067fi
16068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
16069$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
16070if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
16071 $as_echo "#define GSSAPI 1" >>confdefs.h
16072
16073 GSSLIBS="-lgssapi"
16074else
16075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
16076$as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
16077if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
16078 $as_echo_n "(cached) " >&6
16079else
16080 ac_check_lib_save_LIBS=$LIBS
16081LIBS="-lgss $LIBS"
16082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16083/* end confdefs.h. */
16084
16085/* Override any GCC internal prototype to avoid an error.
16086 Use char because int might match the return type of a GCC
16087 builtin and then its argument prototype would still apply. */
16088#ifdef __cplusplus
16089extern "C"
16090#endif
16091char gss_init_sec_context ();
16092int
16093main ()
16094{
16095return gss_init_sec_context ();
16096 ;
16097 return 0;
16098}
16099_ACEOF
16100if ac_fn_c_try_link "$LINENO"; then :
16101 ac_cv_lib_gss_gss_init_sec_context=yes
16102else
16103 ac_cv_lib_gss_gss_init_sec_context=no
16104fi
16105rm -f core conftest.err conftest.$ac_objext \
16106 conftest$ac_exeext conftest.$ac_ext
16107LIBS=$ac_check_lib_save_LIBS
16108fi
16109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
16110$as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
16111if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
16112 $as_echo "#define GSSAPI 1" >>confdefs.h
16113
16114 GSSLIBS="-lgss"
16115else
16116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
16117$as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
16118fi
16119
16120
16121fi
16122
16123
16124fi
16125
16126
16127 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
16128if test "x$ac_cv_header_gssapi_h" = xyes; then :
16129
16130else
16131 unset ac_cv_header_gssapi_h
16132 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
16133 for ac_header in gssapi.h
16134do :
16135 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
16136if test "x$ac_cv_header_gssapi_h" = xyes; then :
16137 cat >>confdefs.h <<_ACEOF
16138#define HAVE_GSSAPI_H 1
16139_ACEOF
16140
16141else
16142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
16143$as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
16144
16145fi
16146
16147done
16148
16149
16150
16151fi
16152
16153
16154
16155 oldCPP="$CPPFLAGS"
16156 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
16157 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
16158if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
16159
16160else
16161 CPPFLAGS="$oldCPP"
16162fi
16163
16164
16165
16166 fi
16167 if test ! -z "$need_dash_r" ; then
16168 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
16169 fi
16170 if test ! -z "$blibpath" ; then
16171 blibpath="$blibpath:${KRB5ROOT}/lib"
16172 fi
16173
16174 for ac_header in gssapi.h gssapi/gssapi.h
16175do :
16176 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16177ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16178if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16179 cat >>confdefs.h <<_ACEOF
16180#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16181_ACEOF
16182
16183fi
16184
16185done
16186
16187 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
16188do :
16189 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16190ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16191if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16192 cat >>confdefs.h <<_ACEOF
16193#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16194_ACEOF
16195
16196fi
16197
16198done
16199
16200 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
16201do :
16202 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16203ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16204if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16205 cat >>confdefs.h <<_ACEOF
16206#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16207_ACEOF
16208
16209fi
16210
16211done
16212
16213
16214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
16215$as_echo_n "checking for library containing k_hasafs... " >&6; }
16216if ${ac_cv_search_k_hasafs+:} false; then :
16217 $as_echo_n "(cached) " >&6
16218else
16219 ac_func_search_save_LIBS=$LIBS
16220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16221/* end confdefs.h. */
16222
16223/* Override any GCC internal prototype to avoid an error.
16224 Use char because int might match the return type of a GCC
16225 builtin and then its argument prototype would still apply. */
16226#ifdef __cplusplus
16227extern "C"
16228#endif
16229char k_hasafs ();
16230int
16231main ()
16232{
16233return k_hasafs ();
16234 ;
16235 return 0;
16236}
16237_ACEOF
16238for ac_lib in '' kafs; do
16239 if test -z "$ac_lib"; then
16240 ac_res="none required"
16241 else
16242 ac_res=-l$ac_lib
16243 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16244 fi
16245 if ac_fn_c_try_link "$LINENO"; then :
16246 ac_cv_search_k_hasafs=$ac_res
16247fi
16248rm -f core conftest.err conftest.$ac_objext \
16249 conftest$ac_exeext
16250 if ${ac_cv_search_k_hasafs+:} false; then :
16251 break
16252fi
16253done
16254if ${ac_cv_search_k_hasafs+:} false; then :
16255
16256else
16257 ac_cv_search_k_hasafs=no
16258fi
16259rm conftest.$ac_ext
16260LIBS=$ac_func_search_save_LIBS
16261fi
16262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
16263$as_echo "$ac_cv_search_k_hasafs" >&6; }
16264ac_res=$ac_cv_search_k_hasafs
16265if test "$ac_res" != no; then :
16266 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16267
16268$as_echo "#define USE_AFS 1" >>confdefs.h
16269
16270fi
16271
16272
16273 ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
16274#ifdef HAVE_GSSAPI_H
16275# include <gssapi.h>
16276#elif defined(HAVE_GSSAPI_GSSAPI_H)
16277# include <gssapi/gssapi.h>
16278#endif
16279
16280#ifdef HAVE_GSSAPI_GENERIC_H
16281# include <gssapi_generic.h>
16282#elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
16283# include <gssapi/gssapi_generic.h>
16284#endif
16285
16286"
16287if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
16288 ac_have_decl=1
16289else
16290 ac_have_decl=0
16291fi
16292
16293cat >>confdefs.h <<_ACEOF
16294#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
16295_ACEOF
16296
16297 saved_LIBS="$LIBS"
16298 LIBS="$LIBS $K5LIBS"
16299 for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
16300do :
16301 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16302ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16303if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16304 cat >>confdefs.h <<_ACEOF
16305#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16306_ACEOF
16307
16308fi
16309done
16310
16311 LIBS="$saved_LIBS"
16312
16313 fi
16314
16315
16316fi
16317
16318
16319
16320
16321# Looking for programs, paths and files
16322
16323PRIVSEP_PATH=/var/empty
16324
16325# Check whether --with-privsep-path was given.
16326if test "${with_privsep_path+set}" = set; then :
16327 withval=$with_privsep_path;
16328 if test -n "$withval" && test "x$withval" != "xno" && \
16329 test "x${withval}" != "xyes"; then
16330 PRIVSEP_PATH=$withval
16331 fi
16332
16333
16334fi
16335
16336
16337
16338
16339# Check whether --with-xauth was given.
16340if test "${with_xauth+set}" = set; then :
16341 withval=$with_xauth;
16342 if test -n "$withval" && test "x$withval" != "xno" && \
16343 test "x${withval}" != "xyes"; then
16344 xauth_path=$withval
16345 fi
16346
16347else
16348
16349 TestPath="$PATH"
16350 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
16351 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
16352 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
16353 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
16354 # Extract the first word of "xauth", so it can be a program name with args.
16355set dummy xauth; ac_word=$2
16356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16357$as_echo_n "checking for $ac_word... " >&6; }
16358if ${ac_cv_path_xauth_path+:} false; then :
16359 $as_echo_n "(cached) " >&6
16360else
16361 case $xauth_path in
16362 [\\/]* | ?:[\\/]*)
16363 ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
16364 ;;
16365 *)
16366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16367for as_dir in $TestPath
16368do
16369 IFS=$as_save_IFS
16370 test -z "$as_dir" && as_dir=.
16371 for ac_exec_ext in '' $ac_executable_extensions; do
16372 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16373 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
16374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16375 break 2
16376 fi
16377done
16378 done
16379IFS=$as_save_IFS
16380
16381 ;;
16382esac
16383fi
16384xauth_path=$ac_cv_path_xauth_path
16385if test -n "$xauth_path"; then
16386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
16387$as_echo "$xauth_path" >&6; }
16388else
16389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16390$as_echo "no" >&6; }
16391fi
16392
16393
16394 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
16395 xauth_path="/usr/openwin/bin/xauth"
16396 fi
16397
16398
16399fi
16400
16401
16402STRIP_OPT=-s
16403# Check whether --enable-strip was given.
16404if test "${enable_strip+set}" = set; then :
16405 enableval=$enable_strip;
16406 if test "x$enableval" = "xno" ; then
16407 STRIP_OPT=
16408 fi
16409
16410
16411fi
16412
16413
16414
16415if test -z "$xauth_path" ; then
16416 XAUTH_PATH="undefined"
16417
16418else
16419
16420cat >>confdefs.h <<_ACEOF
16421#define XAUTH_PATH "$xauth_path"
16422_ACEOF
16423
16424 XAUTH_PATH=$xauth_path
16425
16426fi
16427
16428# Check for mail directory
16429
16430# Check whether --with-maildir was given.
16431if test "${with_maildir+set}" = set; then :
16432 withval=$with_maildir;
16433 if test "X$withval" != X && test "x$withval" != xno && \
16434 test "x${withval}" != xyes; then
16435
16436cat >>confdefs.h <<_ACEOF
16437#define MAIL_DIRECTORY "$withval"
16438_ACEOF
16439
16440 fi
16441
16442else
16443
16444 if test "X$maildir" != "X"; then
16445 cat >>confdefs.h <<_ACEOF
16446#define MAIL_DIRECTORY "$maildir"
16447_ACEOF
16448
16449 else
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
16451$as_echo_n "checking Discovering system mail directory... " >&6; }
16452 if test "$cross_compiling" = yes; then :
16453
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
16455$as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
16456
16457
16458else
16459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16460/* end confdefs.h. */
16461
16462#include <stdio.h>
16463#include <string.h>
16464#ifdef HAVE_PATHS_H
16465#include <paths.h>
16466#endif
16467#ifdef HAVE_MAILLOCK_H
16468#include <maillock.h>
16469#endif
16470#define DATA "conftest.maildir"
16471
16472int
16473main ()
16474{
16475
16476 FILE *fd;
16477 int rc;
16478
16479 fd = fopen(DATA,"w");
16480 if(fd == NULL)
16481 exit(1);
16482
16483#if defined (_PATH_MAILDIR)
16484 if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
16485 exit(1);
16486#elif defined (MAILDIR)
16487 if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
16488 exit(1);
16489#elif defined (_PATH_MAIL)
16490 if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
16491 exit(1);
16492#else
16493 exit (2);
16494#endif
16495
16496 exit(0);
16497
16498 ;
16499 return 0;
16500}
16501_ACEOF
16502if ac_fn_c_try_run "$LINENO"; then :
16503
16504 maildir_what=`awk -F: '{print $1}' conftest.maildir`
16505 maildir=`awk -F: '{print $2}' conftest.maildir \
16506 | sed 's|/$||'`
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
16508$as_echo "Using: $maildir from $maildir_what" >&6; }
16509 if test "x$maildir_what" != "x_PATH_MAILDIR"; then
16510 cat >>confdefs.h <<_ACEOF
16511#define MAIL_DIRECTORY "$maildir"
16512_ACEOF
16513
16514 fi
16515
16516else
16517
16518 if test "X$ac_status" = "X2";then
16519# our test program didn't find it. Default to /var/spool/mail
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
16521$as_echo "Using: default value of /var/spool/mail" >&6; }
16522 cat >>confdefs.h <<_ACEOF
16523#define MAIL_DIRECTORY "/var/spool/mail"
16524_ACEOF
16525
16526 else
16527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
16528$as_echo "*** not found ***" >&6; }
16529 fi
16530
16531fi
16532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16533 conftest.$ac_objext conftest.beam conftest.$ac_ext
16534fi
16535
16536 fi
16537
16538
16539fi
16540 # maildir
16541
16542if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
16544$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
16545 disable_ptmx_check=yes
16546fi
16547if test -z "$no_dev_ptmx" ; then
16548 if test "x$disable_ptmx_check" != "xyes" ; then
16549 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
16550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
16551$as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
16552if eval \${$as_ac_File+:} false; then :
16553 $as_echo_n "(cached) " >&6
16554else
16555 test "$cross_compiling" = yes &&
16556 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16557if test -r ""/dev/ptmx""; then
16558 eval "$as_ac_File=yes"
16559else
16560 eval "$as_ac_File=no"
16561fi
16562fi
16563eval ac_res=\$$as_ac_File
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16565$as_echo "$ac_res" >&6; }
16566if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
16567
16568
16569cat >>confdefs.h <<_ACEOF
16570#define HAVE_DEV_PTMX 1
16571_ACEOF
16572
16573 have_dev_ptmx=1
16574
16575
16576fi
16577
16578 fi
16579fi
16580
16581if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
16582 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
16583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
16584$as_echo_n "checking for \"/dev/ptc\"... " >&6; }
16585if eval \${$as_ac_File+:} false; then :
16586 $as_echo_n "(cached) " >&6
16587else
16588 test "$cross_compiling" = yes &&
16589 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16590if test -r ""/dev/ptc""; then
16591 eval "$as_ac_File=yes"
16592else
16593 eval "$as_ac_File=no"
16594fi
16595fi
16596eval ac_res=\$$as_ac_File
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16598$as_echo "$ac_res" >&6; }
16599if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
16600
16601
16602cat >>confdefs.h <<_ACEOF
16603#define HAVE_DEV_PTS_AND_PTC 1
16604_ACEOF
16605
16606 have_dev_ptc=1
16607
16608
16609fi
16610
16611else
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
16613$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
16614fi
16615
16616# Options from here on. Some of these are preset by platform above
16617
16618# Check whether --with-mantype was given.
16619if test "${with_mantype+set}" = set; then :
16620 withval=$with_mantype;
16621 case "$withval" in
16622 man|cat|doc)
16623 MANTYPE=$withval
16624 ;;
16625 *)
16626 as_fn_error $? "invalid man type: $withval" "$LINENO" 5
16627 ;;
16628 esac
16629
16630
16631fi
16632
16633if test -z "$MANTYPE"; then
16634 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
16635 for ac_prog in nroff awf
16636do
16637 # Extract the first word of "$ac_prog", so it can be a program name with args.
16638set dummy $ac_prog; ac_word=$2
16639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16640$as_echo_n "checking for $ac_word... " >&6; }
16641if ${ac_cv_path_NROFF+:} false; then :
16642 $as_echo_n "(cached) " >&6
16643else
16644 case $NROFF in
16645 [\\/]* | ?:[\\/]*)
16646 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
16647 ;;
16648 *)
16649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16650for as_dir in $TestPath
16651do
16652 IFS=$as_save_IFS
16653 test -z "$as_dir" && as_dir=.
16654 for ac_exec_ext in '' $ac_executable_extensions; do
16655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16656 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
16657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16658 break 2
16659 fi
16660done
16661 done
16662IFS=$as_save_IFS
16663
16664 ;;
16665esac
16666fi
16667NROFF=$ac_cv_path_NROFF
16668if test -n "$NROFF"; then
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
16670$as_echo "$NROFF" >&6; }
16671else
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16673$as_echo "no" >&6; }
16674fi
16675
16676
16677 test -n "$NROFF" && break
16678done
16679test -n "$NROFF" || NROFF="/bin/false"
16680
16681 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
16682 MANTYPE=doc
16683 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
16684 MANTYPE=man
16685 else
16686 MANTYPE=cat
16687 fi
16688fi
16689
16690if test "$MANTYPE" = "doc"; then
16691 mansubdir=man;
16692else
16693 mansubdir=$MANTYPE;
16694fi
16695
16696
16697# Check whether to enable MD5 passwords
16698MD5_MSG="no"
16699
16700# Check whether --with-md5-passwords was given.
16701if test "${with_md5_passwords+set}" = set; then :
16702 withval=$with_md5_passwords;
16703 if test "x$withval" != "xno" ; then
16704
16705$as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
16706
16707 MD5_MSG="yes"
16708 fi
16709
16710
16711fi
16712
16713
16714# Whether to disable shadow password support
16715
16716# Check whether --with-shadow was given.
16717if test "${with_shadow+set}" = set; then :
16718 withval=$with_shadow;
16719 if test "x$withval" = "xno" ; then
16720 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
16721
16722 disable_shadow=yes
16723 fi
16724
16725
16726fi
16727
16728
16729if test -z "$disable_shadow" ; then
16730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
16731$as_echo_n "checking if the systems has expire shadow information... " >&6; }
16732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16733/* end confdefs.h. */
16734
16735#include <sys/types.h>
16736#include <shadow.h>
16737struct spwd sp;
16738
16739int
16740main ()
16741{
16742 sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
16743 ;
16744 return 0;
16745}
16746_ACEOF
16747if ac_fn_c_try_compile "$LINENO"; then :
16748 sp_expire_available=yes
16749fi
16750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16751
16752 if test "x$sp_expire_available" = "xyes" ; then
16753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16754$as_echo "yes" >&6; }
16755
16756$as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
16757
16758 else
16759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16760$as_echo "no" >&6; }
16761 fi
16762fi
16763
16764# Use ip address instead of hostname in $DISPLAY
16765if test ! -z "$IPADDR_IN_DISPLAY" ; then
16766 DISPLAY_HACK_MSG="yes"
16767
16768$as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
16769
16770else
16771 DISPLAY_HACK_MSG="no"
16772
16773# Check whether --with-ipaddr-display was given.
16774if test "${with_ipaddr_display+set}" = set; then :
16775 withval=$with_ipaddr_display;
16776 if test "x$withval" != "xno" ; then
16777 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
16778
16779 DISPLAY_HACK_MSG="yes"
16780 fi
16781
16782
16783fi
16784
16785fi
16786
16787# check for /etc/default/login and use it if present.
16788# Check whether --enable-etc-default-login was given.
16789if test "${enable_etc_default_login+set}" = set; then :
16790 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
16791 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
16792$as_echo "$as_me: /etc/default/login handling disabled" >&6;}
16793 etc_default_login=no
16794 else
16795 etc_default_login=yes
16796 fi
16797else
16798 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
16799 then
16800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
16801$as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
16802 etc_default_login=no
16803 else
16804 etc_default_login=yes
16805 fi
16806
16807fi
16808
16809
16810if test "x$etc_default_login" != "xno"; then
16811 as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
16812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
16813$as_echo_n "checking for \"/etc/default/login\"... " >&6; }
16814if eval \${$as_ac_File+:} false; then :
16815 $as_echo_n "(cached) " >&6
16816else
16817 test "$cross_compiling" = yes &&
16818 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16819if test -r ""/etc/default/login""; then
16820 eval "$as_ac_File=yes"
16821else
16822 eval "$as_ac_File=no"
16823fi
16824fi
16825eval ac_res=\$$as_ac_File
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16827$as_echo "$ac_res" >&6; }
16828if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
16829 external_path_file=/etc/default/login
16830fi
16831
16832 if test "x$external_path_file" = "x/etc/default/login"; then
16833
16834$as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
16835
16836 fi
16837fi
16838
16839if test $ac_cv_func_login_getcapbool = "yes" && \
16840 test $ac_cv_header_login_cap_h = "yes" ; then
16841 external_path_file=/etc/login.conf
16842fi
16843
16844# Whether to mess with the default path
16845SERVER_PATH_MSG="(default)"
16846
16847# Check whether --with-default-path was given.
16848if test "${with_default_path+set}" = set; then :
16849 withval=$with_default_path;
16850 if test "x$external_path_file" = "x/etc/login.conf" ; then
16851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16852--with-default-path=PATH has no effect on this system.
16853Edit /etc/login.conf instead." >&5
16854$as_echo "$as_me: WARNING:
16855--with-default-path=PATH has no effect on this system.
16856Edit /etc/login.conf instead." >&2;}
16857 elif test "x$withval" != "xno" ; then
16858 if test ! -z "$external_path_file" ; then
16859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16860--with-default-path=PATH will only be used if PATH is not defined in
16861$external_path_file ." >&5
16862$as_echo "$as_me: WARNING:
16863--with-default-path=PATH will only be used if PATH is not defined in
16864$external_path_file ." >&2;}
16865 fi
16866 user_path="$withval"
16867 SERVER_PATH_MSG="$withval"
16868 fi
16869
16870else
16871 if test "x$external_path_file" = "x/etc/login.conf" ; then
16872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
16873$as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
16874 else
16875 if test ! -z "$external_path_file" ; then
16876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16877If PATH is defined in $external_path_file, ensure the path to scp is included,
16878otherwise scp will not work." >&5
16879$as_echo "$as_me: WARNING:
16880If PATH is defined in $external_path_file, ensure the path to scp is included,
16881otherwise scp will not work." >&2;}
16882 fi
16883 if test "$cross_compiling" = yes; then :
16884 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
16885
16886else
16887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16888/* end confdefs.h. */
16889
16890/* find out what STDPATH is */
16891#include <stdio.h>
16892#ifdef HAVE_PATHS_H
16893# include <paths.h>
16894#endif
16895#ifndef _PATH_STDPATH
16896# ifdef _PATH_USERPATH /* Irix */
16897# define _PATH_STDPATH _PATH_USERPATH
16898# else
16899# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
16900# endif
16901#endif
16902#include <sys/types.h>
16903#include <sys/stat.h>
16904#include <fcntl.h>
16905#define DATA "conftest.stdpath"
16906
16907int
16908main ()
16909{
16910
16911 FILE *fd;
16912 int rc;
16913
16914 fd = fopen(DATA,"w");
16915 if(fd == NULL)
16916 exit(1);
16917
16918 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
16919 exit(1);
16920
16921 exit(0);
16922
16923 ;
16924 return 0;
16925}
16926_ACEOF
16927if ac_fn_c_try_run "$LINENO"; then :
16928 user_path=`cat conftest.stdpath`
16929else
16930 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
16931fi
16932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16933 conftest.$ac_objext conftest.beam conftest.$ac_ext
16934fi
16935
16936# make sure $bindir is in USER_PATH so scp will work
16937 t_bindir="${bindir}"
16938 while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
16939 t_bindir=`eval echo ${t_bindir}`
16940 case $t_bindir in
16941 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
16942 esac
16943 case $t_bindir in
16944 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
16945 esac
16946 done
16947 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
16948 if test $? -ne 0 ; then
16949 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
16950 if test $? -ne 0 ; then
16951 user_path=$user_path:$t_bindir
16952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
16953$as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
16954 fi
16955 fi
16956 fi
16957
16958fi
16959
16960if test "x$external_path_file" != "x/etc/login.conf" ; then
16961
16962cat >>confdefs.h <<_ACEOF
16963#define USER_PATH "$user_path"
16964_ACEOF
16965
16966
16967fi
16968
16969# Set superuser path separately to user path
16970
16971# Check whether --with-superuser-path was given.
16972if test "${with_superuser_path+set}" = set; then :
16973 withval=$with_superuser_path;
16974 if test -n "$withval" && test "x$withval" != "xno" && \
16975 test "x${withval}" != "xyes"; then
16976
16977cat >>confdefs.h <<_ACEOF
16978#define SUPERUSER_PATH "$withval"
16979_ACEOF
16980
16981 superuser_path=$withval
16982 fi
16983
16984
16985fi
16986
16987
16988
16989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
16990$as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
16991IPV4_IN6_HACK_MSG="no"
16992
16993# Check whether --with-4in6 was given.
16994if test "${with_4in6+set}" = set; then :
16995 withval=$with_4in6;
16996 if test "x$withval" != "xno" ; then
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16998$as_echo "yes" >&6; }
16999
17000$as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
17001
17002 IPV4_IN6_HACK_MSG="yes"
17003 else
17004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17005$as_echo "no" >&6; }
17006 fi
17007
17008else
17009
17010 if test "x$inet6_default_4in6" = "xyes"; then
17011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
17012$as_echo "yes (default)" >&6; }
17013 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
17014
17015 IPV4_IN6_HACK_MSG="yes"
17016 else
17017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
17018$as_echo "no (default)" >&6; }
17019 fi
17020
17021
17022fi
17023
17024
17025# Whether to enable BSD auth support
17026BSD_AUTH_MSG=no
17027
17028# Check whether --with-bsd-auth was given.
17029if test "${with_bsd_auth+set}" = set; then :
17030 withval=$with_bsd_auth;
17031 if test "x$withval" != "xno" ; then
17032
17033$as_echo "#define BSD_AUTH 1" >>confdefs.h
17034
17035 BSD_AUTH_MSG=yes
17036 fi
17037
17038
17039fi
17040
17041
17042# Where to place sshd.pid
17043piddir=/var/run
17044# make sure the directory exists
17045if test ! -d $piddir ; then
17046 piddir=`eval echo ${sysconfdir}`
17047 case $piddir in
17048 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
17049 esac
17050fi
17051
17052
17053# Check whether --with-pid-dir was given.
17054if test "${with_pid_dir+set}" = set; then :
17055 withval=$with_pid_dir;
17056 if test -n "$withval" && test "x$withval" != "xno" && \
17057 test "x${withval}" != "xyes"; then
17058 piddir=$withval
17059 if test ! -d $piddir ; then
17060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
17061$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
17062 fi
17063 fi
17064
17065
17066fi
17067
17068
17069
17070cat >>confdefs.h <<_ACEOF
17071#define _PATH_SSH_PIDDIR "$piddir"
17072_ACEOF
17073
17074
17075
17076# Check whether --enable-lastlog was given.
17077if test "${enable_lastlog+set}" = set; then :
17078 enableval=$enable_lastlog;
17079 if test "x$enableval" = "xno" ; then
17080 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
17081
17082 fi
17083
17084
17085fi
17086
17087# Check whether --enable-utmp was given.
17088if test "${enable_utmp+set}" = set; then :
17089 enableval=$enable_utmp;
17090 if test "x$enableval" = "xno" ; then
17091 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
17092
17093 fi
17094
17095
17096fi
17097
17098# Check whether --enable-utmpx was given.
17099if test "${enable_utmpx+set}" = set; then :
17100 enableval=$enable_utmpx;
17101 if test "x$enableval" = "xno" ; then
17102
17103$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
17104
17105 fi
17106
17107
17108fi
17109
17110# Check whether --enable-wtmp was given.
17111if test "${enable_wtmp+set}" = set; then :
17112 enableval=$enable_wtmp;
17113 if test "x$enableval" = "xno" ; then
17114 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
17115
17116 fi
17117
17118
17119fi
17120
17121# Check whether --enable-wtmpx was given.
17122if test "${enable_wtmpx+set}" = set; then :
17123 enableval=$enable_wtmpx;
17124 if test "x$enableval" = "xno" ; then
17125
17126$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
17127
17128 fi
17129
17130
17131fi
17132
17133# Check whether --enable-libutil was given.
17134if test "${enable_libutil+set}" = set; then :
17135 enableval=$enable_libutil;
17136 if test "x$enableval" = "xno" ; then
17137 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
17138
17139 fi
17140
17141
17142fi
17143
17144# Check whether --enable-pututline was given.
17145if test "${enable_pututline+set}" = set; then :
17146 enableval=$enable_pututline;
17147 if test "x$enableval" = "xno" ; then
17148
17149$as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
17150
17151 fi
17152
17153
17154fi
17155
17156# Check whether --enable-pututxline was given.
17157if test "${enable_pututxline+set}" = set; then :
17158 enableval=$enable_pututxline;
17159 if test "x$enableval" = "xno" ; then
17160
17161$as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
17162
17163 fi
17164
17165
17166fi
17167
17168
17169# Check whether --with-lastlog was given.
17170if test "${with_lastlog+set}" = set; then :
17171 withval=$with_lastlog;
17172 if test "x$withval" = "xno" ; then
17173 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
17174
17175 elif test -n "$withval" && test "x${withval}" != "xyes"; then
17176 conf_lastlog_location=$withval
17177 fi
17178
17179
17180fi
17181
17182
17183
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
17185$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
17186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17187/* end confdefs.h. */
17188
17189#include <sys/types.h>
17190#include <utmp.h>
17191#ifdef HAVE_LASTLOG_H
17192# include <lastlog.h>
17193#endif
17194#ifdef HAVE_PATHS_H
17195# include <paths.h>
17196#endif
17197#ifdef HAVE_LOGIN_H
17198# include <login.h>
17199#endif
17200
17201int
17202main ()
17203{
17204 char *lastlog = LASTLOG_FILE;
17205 ;
17206 return 0;
17207}
17208_ACEOF
17209if ac_fn_c_try_compile "$LINENO"; then :
17210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17211$as_echo "yes" >&6; }
17212else
17213
17214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17215$as_echo "no" >&6; }
17216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
17217$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
17218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17219/* end confdefs.h. */
17220
17221#include <sys/types.h>
17222#include <utmp.h>
17223#ifdef HAVE_LASTLOG_H
17224# include <lastlog.h>
17225#endif
17226#ifdef HAVE_PATHS_H
17227# include <paths.h>
17228#endif
17229
17230int
17231main ()
17232{
17233 char *lastlog = _PATH_LASTLOG;
17234 ;
17235 return 0;
17236}
17237_ACEOF
17238if ac_fn_c_try_compile "$LINENO"; then :
17239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17240$as_echo "yes" >&6; }
17241else
17242
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17244$as_echo "no" >&6; }
17245 system_lastlog_path=no
17246
17247fi
17248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17249
17250fi
17251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17252
17253if test -z "$conf_lastlog_location"; then
17254 if test x"$system_lastlog_path" = x"no" ; then
17255 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
17256 if (test -d "$f" || test -f "$f") ; then
17257 conf_lastlog_location=$f
17258 fi
17259 done
17260 if test -z "$conf_lastlog_location"; then
17261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
17262$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
17263 fi
17264 fi
17265fi
17266
17267if test -n "$conf_lastlog_location"; then
17268
17269cat >>confdefs.h <<_ACEOF
17270#define CONF_LASTLOG_FILE "$conf_lastlog_location"
17271_ACEOF
17272
17273fi
17274
17275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
17276$as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
17277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278/* end confdefs.h. */
17279
17280#include <sys/types.h>
17281#include <utmp.h>
17282#ifdef HAVE_PATHS_H
17283# include <paths.h>
17284#endif
17285
17286int
17287main ()
17288{
17289 char *utmp = UTMP_FILE;
17290 ;
17291 return 0;
17292}
17293_ACEOF
17294if ac_fn_c_try_compile "$LINENO"; then :
17295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17296$as_echo "yes" >&6; }
17297else
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17299$as_echo "no" >&6; }
17300 system_utmp_path=no
17301
17302fi
17303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17304if test -z "$conf_utmp_location"; then
17305 if test x"$system_utmp_path" = x"no" ; then
17306 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
17307 if test -f $f ; then
17308 conf_utmp_location=$f
17309 fi
17310 done
17311 if test -z "$conf_utmp_location"; then
17312 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
17313
17314 fi
17315 fi
17316fi
17317if test -n "$conf_utmp_location"; then
17318
17319cat >>confdefs.h <<_ACEOF
17320#define CONF_UTMP_FILE "$conf_utmp_location"
17321_ACEOF
17322
17323fi
17324
17325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
17326$as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
17327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17328/* end confdefs.h. */
17329
17330#include <sys/types.h>
17331#include <utmp.h>
17332#ifdef HAVE_PATHS_H
17333# include <paths.h>
17334#endif
17335
17336int
17337main ()
17338{
17339 char *wtmp = WTMP_FILE;
17340 ;
17341 return 0;
17342}
17343_ACEOF
17344if ac_fn_c_try_compile "$LINENO"; then :
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17346$as_echo "yes" >&6; }
17347else
17348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17349$as_echo "no" >&6; }
17350 system_wtmp_path=no
17351
17352fi
17353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17354if test -z "$conf_wtmp_location"; then
17355 if test x"$system_wtmp_path" = x"no" ; then
17356 for f in /usr/adm/wtmp /var/log/wtmp; do
17357 if test -f $f ; then
17358 conf_wtmp_location=$f
17359 fi
17360 done
17361 if test -z "$conf_wtmp_location"; then
17362 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
17363
17364 fi
17365 fi
17366fi
17367if test -n "$conf_wtmp_location"; then
17368
17369cat >>confdefs.h <<_ACEOF
17370#define CONF_WTMP_FILE "$conf_wtmp_location"
17371_ACEOF
17372
17373fi
17374
17375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
17376$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
17377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17378/* end confdefs.h. */
17379
17380#include <sys/types.h>
17381#include <utmp.h>
17382#ifdef HAVE_UTMPX_H
17383#include <utmpx.h>
17384#endif
17385#ifdef HAVE_PATHS_H
17386# include <paths.h>
17387#endif
17388
17389int
17390main ()
17391{
17392 char *wtmpx = WTMPX_FILE;
17393 ;
17394 return 0;
17395}
17396_ACEOF
17397if ac_fn_c_try_compile "$LINENO"; then :
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17399$as_echo "yes" >&6; }
17400else
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17402$as_echo "no" >&6; }
17403 system_wtmpx_path=no
17404
17405fi
17406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17407if test -z "$conf_wtmpx_location"; then
17408 if test x"$system_wtmpx_path" = x"no" ; then
17409 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
17410
17411 fi
17412else
17413
17414cat >>confdefs.h <<_ACEOF
17415#define CONF_WTMPX_FILE "$conf_wtmpx_location"
17416_ACEOF
17417
17418fi
17419
17420
17421if test ! -z "$blibpath" ; then
17422 LDFLAGS="$LDFLAGS $blibflags$blibpath"
17423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
17424$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
17425fi
17426
17427ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
17428#ifdef HAVE_SYS_TYPES_H
17429#include <sys/types.h>
17430#endif
17431#ifdef HAVE_UTMP_H
17432#include <utmp.h>
17433#endif
17434#ifdef HAVE_UTMPX_H
17435#include <utmpx.h>
17436#endif
17437#ifdef HAVE_LASTLOG_H
17438#include <lastlog.h>
17439#endif
17440
17441"
17442if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
17443
17444else
17445
17446 if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
17447 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
17448
17449 fi
17450
17451fi
17452
17453
17454ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
17455#ifdef HAVE_SYS_TYPES_H
17456#include <sys/types.h>
17457#endif
17458#ifdef HAVE_UTMP_H
17459#include <utmp.h>
17460#endif
17461#ifdef HAVE_UTMPX_H
17462#include <utmpx.h>
17463#endif
17464#ifdef HAVE_LASTLOG_H
17465#include <lastlog.h>
17466#endif
17467
17468"
17469if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
17470
17471else
17472
17473 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
17474
17475 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
17476
17477
17478fi
17479
17480
17481CFLAGS="$CFLAGS $werror_flags"
17482
17483if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
17484 TEST_SSH_IPV6=no
17485else
17486 TEST_SSH_IPV6=yes
17487fi
17488ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
17489if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
17490 TEST_SSH_IPV6=no
17491fi
17492
17493TEST_SSH_IPV6=$TEST_SSH_IPV6
17494
17495UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
17496
17497
17498
17499ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
17500
17501cat >confcache <<\_ACEOF
17502# This file is a shell script that caches the results of configure
17503# tests run on this system so they can be shared between configure
17504# scripts and configure runs, see configure's option --config-cache.
17505# It is not useful on other systems. If it contains results you don't
17506# want to keep, you may remove or edit it.
17507#
17508# config.status only pays attention to the cache file if you give it
17509# the --recheck option to rerun configure.
17510#
17511# `ac_cv_env_foo' variables (set or unset) will be overridden when
17512# loading this file, other *unset* `ac_cv_foo' will be assigned the
17513# following values.
17514
17515_ACEOF
17516
17517# The following way of writing the cache mishandles newlines in values,
17518# but we know of no workaround that is simple, portable, and efficient.
17519# So, we kill variables containing newlines.
17520# Ultrix sh set writes to stderr and can't be redirected directly,
17521# and sets the high bit in the cache file unless we assign to the vars.
17522(
17523 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17524 eval ac_val=\$$ac_var
17525 case $ac_val in #(
17526 *${as_nl}*)
17527 case $ac_var in #(
17528 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17529$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17530 esac
17531 case $ac_var in #(
17532 _ | IFS | as_nl) ;; #(
17533 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17534 *) { eval $ac_var=; unset $ac_var;} ;;
17535 esac ;;
17536 esac
17537 done
17538
17539 (set) 2>&1 |
17540 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17541 *${as_nl}ac_space=\ *)
17542 # `set' does not quote correctly, so add quotes: double-quote
17543 # substitution turns \\\\ into \\, and sed turns \\ into \.
17544 sed -n \
17545 "s/'/'\\\\''/g;
17546 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17547 ;; #(
17548 *)
17549 # `set' quotes correctly as required by POSIX, so do not add quotes.
17550 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17551 ;;
17552 esac |
17553 sort
17554) |
17555 sed '
17556 /^ac_cv_env_/b end
17557 t clear
17558 :clear
17559 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17560 t end
17561 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17562 :end' >>confcache
17563if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17564 if test -w "$cache_file"; then
17565 if test "x$cache_file" != "x/dev/null"; then
17566 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17567$as_echo "$as_me: updating cache $cache_file" >&6;}
17568 if test ! -f "$cache_file" || test -h "$cache_file"; then
17569 cat confcache >"$cache_file"
17570 else
17571 case $cache_file in #(
17572 */* | ?:*)
17573 mv -f confcache "$cache_file"$$ &&
17574 mv -f "$cache_file"$$ "$cache_file" ;; #(
17575 *)
17576 mv -f confcache "$cache_file" ;;
17577 esac
17578 fi
17579 fi
17580 else
17581 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17582$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17583 fi
17584fi
17585rm -f confcache
17586
17587test "x$prefix" = xNONE && prefix=$ac_default_prefix
17588# Let make expand exec_prefix.
17589test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17590
17591DEFS=-DHAVE_CONFIG_H
17592
17593ac_libobjs=
17594ac_ltlibobjs=
17595U=
17596for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17597 # 1. Remove the extension, and $U if already installed.
17598 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17599 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17600 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17601 # will be set to the directory where LIBOBJS objects are built.
17602 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17603 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17604done
17605LIBOBJS=$ac_libobjs
17606
17607LTLIBOBJS=$ac_ltlibobjs
17608
17609
17610
17611
17612: "${CONFIG_STATUS=./config.status}"
17613ac_write_fail=0
17614ac_clean_files_save=$ac_clean_files
17615ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17616{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17617$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17618as_write_fail=0
17619cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17620#! $SHELL
17621# Generated by $as_me.
17622# Run this file to recreate the current configuration.
17623# Compiler output produced by configure, useful for debugging
17624# configure, is in config.log if it exists.
17625
17626debug=false
17627ac_cs_recheck=false
17628ac_cs_silent=false
17629
17630SHELL=\${CONFIG_SHELL-$SHELL}
17631export SHELL
17632_ASEOF
17633cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17634## -------------------- ##
17635## M4sh Initialization. ##
17636## -------------------- ##
17637
17638# Be more Bourne compatible
17639DUALCASE=1; export DUALCASE # for MKS sh
17640if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17641 emulate sh
17642 NULLCMD=:
17643 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17644 # is contrary to our usage. Disable this feature.
17645 alias -g '${1+"$@"}'='"$@"'
17646 setopt NO_GLOB_SUBST
17647else
17648 case `(set -o) 2>/dev/null` in #(
17649 *posix*) :
17650 set -o posix ;; #(
17651 *) :
17652 ;;
17653esac
17654fi
17655
17656
17657as_nl='
17658'
17659export as_nl
17660# Printing a long string crashes Solaris 7 /usr/bin/printf.
17661as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17662as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17663as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17664# Prefer a ksh shell builtin over an external printf program on Solaris,
17665# but without wasting forks for bash or zsh.
17666if test -z "$BASH_VERSION$ZSH_VERSION" \
17667 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17668 as_echo='print -r --'
17669 as_echo_n='print -rn --'
17670elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17671 as_echo='printf %s\n'
17672 as_echo_n='printf %s'
17673else
17674 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17675 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17676 as_echo_n='/usr/ucb/echo -n'
17677 else
17678 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17679 as_echo_n_body='eval
17680 arg=$1;
17681 case $arg in #(
17682 *"$as_nl"*)
17683 expr "X$arg" : "X\\(.*\\)$as_nl";
17684 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17685 esac;
17686 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17687 '
17688 export as_echo_n_body
17689 as_echo_n='sh -c $as_echo_n_body as_echo'
17690 fi
17691 export as_echo_body
17692 as_echo='sh -c $as_echo_body as_echo'
17693fi
17694
17695# The user is always right.
17696if test "${PATH_SEPARATOR+set}" != set; then
17697 PATH_SEPARATOR=:
17698 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17699 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17700 PATH_SEPARATOR=';'
17701 }
17702fi
17703
17704
17705# IFS
17706# We need space, tab and new line, in precisely that order. Quoting is
17707# there to prevent editors from complaining about space-tab.
17708# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17709# splitting by setting IFS to empty value.)
17710IFS=" "" $as_nl"
17711
17712# Find who we are. Look in the path if we contain no directory separator.
17713as_myself=
17714case $0 in #((
17715 *[\\/]* ) as_myself=$0 ;;
17716 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17717for as_dir in $PATH
17718do
17719 IFS=$as_save_IFS
17720 test -z "$as_dir" && as_dir=.
17721 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17722 done
17723IFS=$as_save_IFS
17724
17725 ;;
17726esac
17727# We did not find ourselves, most probably we were run as `sh COMMAND'
17728# in which case we are not to be found in the path.
17729if test "x$as_myself" = x; then
17730 as_myself=$0
17731fi
17732if test ! -f "$as_myself"; then
17733 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17734 exit 1
17735fi
17736
17737# Unset variables that we do not need and which cause bugs (e.g. in
17738# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17739# suppresses any "Segmentation fault" message there. '((' could
17740# trigger a bug in pdksh 5.2.14.
17741for as_var in BASH_ENV ENV MAIL MAILPATH
17742do eval test x\${$as_var+set} = xset \
17743 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17744done
17745PS1='$ '
17746PS2='> '
17747PS4='+ '
17748
17749# NLS nuisances.
17750LC_ALL=C
17751export LC_ALL
17752LANGUAGE=C
17753export LANGUAGE
17754
17755# CDPATH.
17756(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17757
17758
17759# as_fn_error STATUS ERROR [LINENO LOG_FD]
17760# ----------------------------------------
17761# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17762# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17763# script with STATUS, using 1 if that was 0.
17764as_fn_error ()
17765{
17766 as_status=$1; test $as_status -eq 0 && as_status=1
17767 if test "$4"; then
17768 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17769 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17770 fi
17771 $as_echo "$as_me: error: $2" >&2
17772 as_fn_exit $as_status
17773} # as_fn_error
17774
17775
17776# as_fn_set_status STATUS
17777# -----------------------
17778# Set $? to STATUS, without forking.
17779as_fn_set_status ()
17780{
17781 return $1
17782} # as_fn_set_status
17783
17784# as_fn_exit STATUS
17785# -----------------
17786# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17787as_fn_exit ()
17788{
17789 set +e
17790 as_fn_set_status $1
17791 exit $1
17792} # as_fn_exit
17793
17794# as_fn_unset VAR
17795# ---------------
17796# Portably unset VAR.
17797as_fn_unset ()
17798{
17799 { eval $1=; unset $1;}
17800}
17801as_unset=as_fn_unset
17802# as_fn_append VAR VALUE
17803# ----------------------
17804# Append the text in VALUE to the end of the definition contained in VAR. Take
17805# advantage of any shell optimizations that allow amortized linear growth over
17806# repeated appends, instead of the typical quadratic growth present in naive
17807# implementations.
17808if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17809 eval 'as_fn_append ()
17810 {
17811 eval $1+=\$2
17812 }'
17813else
17814 as_fn_append ()
17815 {
17816 eval $1=\$$1\$2
17817 }
17818fi # as_fn_append
17819
17820# as_fn_arith ARG...
17821# ------------------
17822# Perform arithmetic evaluation on the ARGs, and store the result in the
17823# global $as_val. Take advantage of shells that can avoid forks. The arguments
17824# must be portable across $(()) and expr.
17825if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17826 eval 'as_fn_arith ()
17827 {
17828 as_val=$(( $* ))
17829 }'
17830else
17831 as_fn_arith ()
17832 {
17833 as_val=`expr "$@" || test $? -eq 1`
17834 }
17835fi # as_fn_arith
17836
17837
17838if expr a : '\(a\)' >/dev/null 2>&1 &&
17839 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17840 as_expr=expr
17841else
17842 as_expr=false
17843fi
17844
17845if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17846 as_basename=basename
17847else
17848 as_basename=false
17849fi
17850
17851if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17852 as_dirname=dirname
17853else
17854 as_dirname=false
17855fi
17856
17857as_me=`$as_basename -- "$0" ||
17858$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17859 X"$0" : 'X\(//\)$' \| \
17860 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17861$as_echo X/"$0" |
17862 sed '/^.*\/\([^/][^/]*\)\/*$/{
17863 s//\1/
17864 q
17865 }
17866 /^X\/\(\/\/\)$/{
17867 s//\1/
17868 q
17869 }
17870 /^X\/\(\/\).*/{
17871 s//\1/
17872 q
17873 }
17874 s/.*/./; q'`
17875
17876# Avoid depending upon Character Ranges.
17877as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17878as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17879as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17880as_cr_digits='0123456789'
17881as_cr_alnum=$as_cr_Letters$as_cr_digits
17882
17883ECHO_C= ECHO_N= ECHO_T=
17884case `echo -n x` in #(((((
17885-n*)
17886 case `echo 'xy\c'` in
17887 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17888 xy) ECHO_C='\c';;
17889 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17890 ECHO_T=' ';;
17891 esac;;
17892*)
17893 ECHO_N='-n';;
17894esac
17895
17896rm -f conf$$ conf$$.exe conf$$.file
17897if test -d conf$$.dir; then
17898 rm -f conf$$.dir/conf$$.file
17899else
17900 rm -f conf$$.dir
17901 mkdir conf$$.dir 2>/dev/null
17902fi
17903if (echo >conf$$.file) 2>/dev/null; then
17904 if ln -s conf$$.file conf$$ 2>/dev/null; then
17905 as_ln_s='ln -s'
17906 # ... but there are two gotchas:
17907 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17908 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17909 # In both cases, we have to default to `cp -p'.
17910 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17911 as_ln_s='cp -p'
17912 elif ln conf$$.file conf$$ 2>/dev/null; then
17913 as_ln_s=ln
17914 else
17915 as_ln_s='cp -p'
17916 fi
17917else
17918 as_ln_s='cp -p'
17919fi
17920rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17921rmdir conf$$.dir 2>/dev/null
17922
17923
17924# as_fn_mkdir_p
17925# -------------
17926# Create "$as_dir" as a directory, including parents if necessary.
17927as_fn_mkdir_p ()
17928{
17929
17930 case $as_dir in #(
17931 -*) as_dir=./$as_dir;;
17932 esac
17933 test -d "$as_dir" || eval $as_mkdir_p || {
17934 as_dirs=
17935 while :; do
17936 case $as_dir in #(
17937 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17938 *) as_qdir=$as_dir;;
17939 esac
17940 as_dirs="'$as_qdir' $as_dirs"
17941 as_dir=`$as_dirname -- "$as_dir" ||
17942$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17943 X"$as_dir" : 'X\(//\)[^/]' \| \
17944 X"$as_dir" : 'X\(//\)$' \| \
17945 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17946$as_echo X"$as_dir" |
17947 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17948 s//\1/
17949 q
17950 }
17951 /^X\(\/\/\)[^/].*/{
17952 s//\1/
17953 q
17954 }
17955 /^X\(\/\/\)$/{
17956 s//\1/
17957 q
17958 }
17959 /^X\(\/\).*/{
17960 s//\1/
17961 q
17962 }
17963 s/.*/./; q'`
17964 test -d "$as_dir" && break
17965 done
17966 test -z "$as_dirs" || eval "mkdir $as_dirs"
17967 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17968
17969
17970} # as_fn_mkdir_p
17971if mkdir -p . 2>/dev/null; then
17972 as_mkdir_p='mkdir -p "$as_dir"'
17973else
17974 test -d ./-p && rmdir ./-p
17975 as_mkdir_p=false
17976fi
17977
17978if test -x / >/dev/null 2>&1; then
17979 as_test_x='test -x'
17980else
17981 if ls -dL / >/dev/null 2>&1; then
17982 as_ls_L_option=L
17983 else
17984 as_ls_L_option=
17985 fi
17986 as_test_x='
17987 eval sh -c '\''
17988 if test -d "$1"; then
17989 test -d "$1/.";
17990 else
17991 case $1 in #(
17992 -*)set "./$1";;
17993 esac;
17994 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17995 ???[sx]*):;;*)false;;esac;fi
17996 '\'' sh
17997 '
17998fi
17999as_executable_p=$as_test_x
18000
18001# Sed expression to map a string onto a valid CPP name.
18002as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18003
18004# Sed expression to map a string onto a valid variable name.
18005as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18006
18007
18008exec 6>&1
18009## ----------------------------------- ##
18010## Main body of $CONFIG_STATUS script. ##
18011## ----------------------------------- ##
18012_ASEOF
18013test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18014
18015cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18016# Save the log message, to keep $0 and so on meaningful, and to
18017# report actual input values of CONFIG_FILES etc. instead of their
18018# values after options handling.
18019ac_log="
18020This file was extended by OpenSSH $as_me Portable, which was
18021generated by GNU Autoconf 2.68. Invocation command line was
18022
18023 CONFIG_FILES = $CONFIG_FILES
18024 CONFIG_HEADERS = $CONFIG_HEADERS
18025 CONFIG_LINKS = $CONFIG_LINKS
18026 CONFIG_COMMANDS = $CONFIG_COMMANDS
18027 $ $0 $@
18028
18029on `(hostname || uname -n) 2>/dev/null | sed 1q`
18030"
18031
18032_ACEOF
18033
18034case $ac_config_files in *"
18035"*) set x $ac_config_files; shift; ac_config_files=$*;;
18036esac
18037
18038case $ac_config_headers in *"
18039"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18040esac
18041
18042
18043cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18044# Files that config.status was made for.
18045config_files="$ac_config_files"
18046config_headers="$ac_config_headers"
18047
18048_ACEOF
18049
18050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18051ac_cs_usage="\
18052\`$as_me' instantiates files and other configuration actions
18053from templates according to the current configuration. Unless the files
18054and actions are specified as TAGs, all are instantiated by default.
18055
18056Usage: $0 [OPTION]... [TAG]...
18057
18058 -h, --help print this help, then exit
18059 -V, --version print version number and configuration settings, then exit
18060 --config print configuration, then exit
18061 -q, --quiet, --silent
18062 do not print progress messages
18063 -d, --debug don't remove temporary files
18064 --recheck update $as_me by reconfiguring in the same conditions
18065 --file=FILE[:TEMPLATE]
18066 instantiate the configuration file FILE
18067 --header=FILE[:TEMPLATE]
18068 instantiate the configuration header FILE
18069
18070Configuration files:
18071$config_files
18072
18073Configuration headers:
18074$config_headers
18075
18076Report bugs to <openssh-unix-dev@mindrot.org>."
18077
18078_ACEOF
18079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18080ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18081ac_cs_version="\\
18082OpenSSH config.status Portable
18083configured by $0, generated by GNU Autoconf 2.68,
18084 with options \\"\$ac_cs_config\\"
18085
18086Copyright (C) 2010 Free Software Foundation, Inc.
18087This config.status script is free software; the Free Software Foundation
18088gives unlimited permission to copy, distribute and modify it."
18089
18090ac_pwd='$ac_pwd'
18091srcdir='$srcdir'
18092INSTALL='$INSTALL'
18093AWK='$AWK'
18094test -n "\$AWK" || AWK=awk
18095_ACEOF
18096
18097cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18098# The default lists apply if the user does not specify any file.
18099ac_need_defaults=:
18100while test $# != 0
18101do
18102 case $1 in
18103 --*=?*)
18104 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18105 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18106 ac_shift=:
18107 ;;
18108 --*=)
18109 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18110 ac_optarg=
18111 ac_shift=:
18112 ;;
18113 *)
18114 ac_option=$1
18115 ac_optarg=$2
18116 ac_shift=shift
18117 ;;
18118 esac
18119
18120 case $ac_option in
18121 # Handling of the options.
18122 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18123 ac_cs_recheck=: ;;
18124 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18125 $as_echo "$ac_cs_version"; exit ;;
18126 --config | --confi | --conf | --con | --co | --c )
18127 $as_echo "$ac_cs_config"; exit ;;
18128 --debug | --debu | --deb | --de | --d | -d )
18129 debug=: ;;
18130 --file | --fil | --fi | --f )
18131 $ac_shift
18132 case $ac_optarg in
18133 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18134 '') as_fn_error $? "missing file argument" ;;
18135 esac
18136 as_fn_append CONFIG_FILES " '$ac_optarg'"
18137 ac_need_defaults=false;;
18138 --header | --heade | --head | --hea )
18139 $ac_shift
18140 case $ac_optarg in
18141 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18142 esac
18143 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18144 ac_need_defaults=false;;
18145 --he | --h)
18146 # Conflict between --help and --header
18147 as_fn_error $? "ambiguous option: \`$1'
18148Try \`$0 --help' for more information.";;
18149 --help | --hel | -h )
18150 $as_echo "$ac_cs_usage"; exit ;;
18151 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18152 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18153 ac_cs_silent=: ;;
18154
18155 # This is an error.
18156 -*) as_fn_error $? "unrecognized option: \`$1'
18157Try \`$0 --help' for more information." ;;
18158
18159 *) as_fn_append ac_config_targets " $1"
18160 ac_need_defaults=false ;;
18161
18162 esac
18163 shift
18164done
18165
18166ac_configure_extra_args=
18167
18168if $ac_cs_silent; then
18169 exec 6>/dev/null
18170 ac_configure_extra_args="$ac_configure_extra_args --silent"
18171fi
18172
18173_ACEOF
18174cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18175if \$ac_cs_recheck; then
18176 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18177 shift
18178 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18179 CONFIG_SHELL='$SHELL'
18180 export CONFIG_SHELL
18181 exec "\$@"
18182fi
18183
18184_ACEOF
18185cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18186exec 5>>config.log
18187{
18188 echo
18189 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18190## Running $as_me. ##
18191_ASBOX
18192 $as_echo "$ac_log"
18193} >&5
18194
18195_ACEOF
18196cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18197_ACEOF
18198
18199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18200
18201# Handling of arguments.
18202for ac_config_target in $ac_config_targets
18203do
18204 case $ac_config_target in
18205 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18206 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18207 "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
18208 "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
18209 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
18210 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
18211 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
18212 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
18213
18214 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18215 esac
18216done
18217
18218
18219# If the user did not use the arguments to specify the items to instantiate,
18220# then the envvar interface is used. Set only those that are not.
18221# We use the long form for the default assignment because of an extremely
18222# bizarre bug on SunOS 4.1.3.
18223if $ac_need_defaults; then
18224 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18225 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18226fi
18227
18228# Have a temporary directory for convenience. Make it in the build tree
18229# simply because there is no reason against having it here, and in addition,
18230# creating and moving files from /tmp can sometimes cause problems.
18231# Hook for its removal unless debugging.
18232# Note that there is a small window in which the directory will not be cleaned:
18233# after its creation but before its name has been assigned to `$tmp'.
18234$debug ||
18235{
18236 tmp= ac_tmp=
18237 trap 'exit_status=$?
18238 : "${ac_tmp:=$tmp}"
18239 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
18240' 0
18241 trap 'as_fn_exit 1' 1 2 13 15
18242}
18243# Create a (secure) tmp directory for tmp files.
18244
18245{
18246 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18247 test -d "$tmp"
18248} ||
18249{
18250 tmp=./conf$$-$RANDOM
18251 (umask 077 && mkdir "$tmp")
18252} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18253ac_tmp=$tmp
18254
18255# Set up the scripts for CONFIG_FILES section.
18256# No need to generate them if there are no CONFIG_FILES.
18257# This happens for instance with `./config.status config.h'.
18258if test -n "$CONFIG_FILES"; then
18259
18260
18261ac_cr=`echo X | tr X '\015'`
18262# On cygwin, bash can eat \r inside `` if the user requested igncr.
18263# But we know of no other shell where ac_cr would be empty at this
18264# point, so we can use a bashism as a fallback.
18265if test "x$ac_cr" = x; then
18266 eval ac_cr=\$\'\\r\'
18267fi
18268ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18269if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18270 ac_cs_awk_cr='\\r'
18271else
18272 ac_cs_awk_cr=$ac_cr
18273fi
18274
18275echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
18276_ACEOF
18277
18278
18279{
18280 echo "cat >conf$$subs.awk <<_ACEOF" &&
18281 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18282 echo "_ACEOF"
18283} >conf$$subs.sh ||
18284 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18285ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18286ac_delim='%!_!# '
18287for ac_last_try in false false false false false :; do
18288 . ./conf$$subs.sh ||
18289 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18290
18291 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18292 if test $ac_delim_n = $ac_delim_num; then
18293 break
18294 elif $ac_last_try; then
18295 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18296 else
18297 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18298 fi
18299done
18300rm -f conf$$subs.sh
18301
18302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18303cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18304_ACEOF
18305sed -n '
18306h
18307s/^/S["/; s/!.*/"]=/
18308p
18309g
18310s/^[^!]*!//
18311:repl
18312t repl
18313s/'"$ac_delim"'$//
18314t delim
18315:nl
18316h
18317s/\(.\{148\}\)..*/\1/
18318t more1
18319s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18320p
18321n
18322b repl
18323:more1
18324s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18325p
18326g
18327s/.\{148\}//
18328t nl
18329:delim
18330h
18331s/\(.\{148\}\)..*/\1/
18332t more2
18333s/["\\]/\\&/g; s/^/"/; s/$/"/
18334p
18335b
18336:more2
18337s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18338p
18339g
18340s/.\{148\}//
18341t delim
18342' <conf$$subs.awk | sed '
18343/^[^""]/{
18344 N
18345 s/\n//
18346}
18347' >>$CONFIG_STATUS || ac_write_fail=1
18348rm -f conf$$subs.awk
18349cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18350_ACAWK
18351cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18352 for (key in S) S_is_set[key] = 1
18353 FS = ""
18354
18355}
18356{
18357 line = $ 0
18358 nfields = split(line, field, "@")
18359 substed = 0
18360 len = length(field[1])
18361 for (i = 2; i < nfields; i++) {
18362 key = field[i]
18363 keylen = length(key)
18364 if (S_is_set[key]) {
18365 value = S[key]
18366 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18367 len += length(value) + length(field[++i])
18368 substed = 1
18369 } else
18370 len += 1 + keylen
18371 }
18372
18373 print line
18374}
18375
18376_ACAWK
18377_ACEOF
18378cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18379if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18380 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18381else
18382 cat
18383fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18384 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18385_ACEOF
18386
18387# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18388# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18389# trailing colons and then remove the whole line if VPATH becomes empty
18390# (actually we leave an empty line to preserve line numbers).
18391if test "x$srcdir" = x.; then
18392 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18393h
18394s///
18395s/^/:/
18396s/[ ]*$/:/
18397s/:\$(srcdir):/:/g
18398s/:\${srcdir}:/:/g
18399s/:@srcdir@:/:/g
18400s/^:*//
18401s/:*$//
18402x
18403s/\(=[ ]*\).*/\1/
18404G
18405s/\n//
18406s/^[^=]*=[ ]*$//
18407}'
18408fi
18409
18410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18411fi # test -n "$CONFIG_FILES"
18412
18413# Set up the scripts for CONFIG_HEADERS section.
18414# No need to generate them if there are no CONFIG_HEADERS.
18415# This happens for instance with `./config.status Makefile'.
18416if test -n "$CONFIG_HEADERS"; then
18417cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18418BEGIN {
18419_ACEOF
18420
18421# Transform confdefs.h into an awk script `defines.awk', embedded as
18422# here-document in config.status, that substitutes the proper values into
18423# config.h.in to produce config.h.
18424
18425# Create a delimiter string that does not exist in confdefs.h, to ease
18426# handling of long lines.
18427ac_delim='%!_!# '
18428for ac_last_try in false false :; do
18429 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18430 if test -z "$ac_tt"; then
18431 break
18432 elif $ac_last_try; then
18433 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18434 else
18435 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18436 fi
18437done
18438
18439# For the awk script, D is an array of macro values keyed by name,
18440# likewise P contains macro parameters if any. Preserve backslash
18441# newline sequences.
18442
18443ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18444sed -n '
18445s/.\{148\}/&'"$ac_delim"'/g
18446t rset
18447:rset
18448s/^[ ]*#[ ]*define[ ][ ]*/ /
18449t def
18450d
18451:def
18452s/\\$//
18453t bsnl
18454s/["\\]/\\&/g
18455s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18456D["\1"]=" \3"/p
18457s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18458d
18459:bsnl
18460s/["\\]/\\&/g
18461s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18462D["\1"]=" \3\\\\\\n"\\/p
18463t cont
18464s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18465t cont
18466d
18467:cont
18468n
18469s/.\{148\}/&'"$ac_delim"'/g
18470t clear
18471:clear
18472s/\\$//
18473t bsnlc
18474s/["\\]/\\&/g; s/^/"/; s/$/"/p
18475d
18476:bsnlc
18477s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18478b cont
18479' <confdefs.h | sed '
18480s/'"$ac_delim"'/"\\\
18481"/g' >>$CONFIG_STATUS || ac_write_fail=1
18482
18483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18484 for (key in D) D_is_set[key] = 1
18485 FS = ""
18486}
18487/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18488 line = \$ 0
18489 split(line, arg, " ")
18490 if (arg[1] == "#") {
18491 defundef = arg[2]
18492 mac1 = arg[3]
18493 } else {
18494 defundef = substr(arg[1], 2)
18495 mac1 = arg[2]
18496 }
18497 split(mac1, mac2, "(") #)
18498 macro = mac2[1]
18499 prefix = substr(line, 1, index(line, defundef) - 1)
18500 if (D_is_set[macro]) {
18501 # Preserve the white space surrounding the "#".
18502 print prefix "define", macro P[macro] D[macro]
18503 next
18504 } else {
18505 # Replace #undef with comments. This is necessary, for example,
18506 # in the case of _POSIX_SOURCE, which is predefined and required
18507 # on some systems where configure will not decide to define it.
18508 if (defundef == "undef") {
18509 print "/*", prefix defundef, macro, "*/"
18510 next
18511 }
18512 }
18513}
18514{ print }
18515_ACAWK
18516_ACEOF
18517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18518 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18519fi # test -n "$CONFIG_HEADERS"
18520
18521
18522eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18523shift
18524for ac_tag
18525do
18526 case $ac_tag in
18527 :[FHLC]) ac_mode=$ac_tag; continue;;
18528 esac
18529 case $ac_mode$ac_tag in
18530 :[FHL]*:*);;
18531 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
18532 :[FH]-) ac_tag=-:-;;
18533 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18534 esac
18535 ac_save_IFS=$IFS
18536 IFS=:
18537 set x $ac_tag
18538 IFS=$ac_save_IFS
18539 shift
18540 ac_file=$1
18541 shift
18542
18543 case $ac_mode in
18544 :L) ac_source=$1;;
18545 :[FH])
18546 ac_file_inputs=
18547 for ac_f
18548 do
18549 case $ac_f in
18550 -) ac_f="$ac_tmp/stdin";;
18551 *) # Look for the file first in the build tree, then in the source tree
18552 # (if the path is not absolute). The absolute path cannot be DOS-style,
18553 # because $ac_f cannot contain `:'.
18554 test -f "$ac_f" ||
18555 case $ac_f in
18556 [\\/$]*) false;;
18557 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18558 esac ||
18559 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18560 esac
18561 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18562 as_fn_append ac_file_inputs " '$ac_f'"
18563 done
18564
18565 # Let's still pretend it is `configure' which instantiates (i.e., don't
18566 # use $as_me), people would be surprised to read:
18567 # /* config.h. Generated by config.status. */
18568 configure_input='Generated from '`
18569 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18570 `' by configure.'
18571 if test x"$ac_file" != x-; then
18572 configure_input="$ac_file. $configure_input"
18573 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18574$as_echo "$as_me: creating $ac_file" >&6;}
18575 fi
18576 # Neutralize special characters interpreted by sed in replacement strings.
18577 case $configure_input in #(
18578 *\&* | *\|* | *\\* )
18579 ac_sed_conf_input=`$as_echo "$configure_input" |
18580 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18581 *) ac_sed_conf_input=$configure_input;;
18582 esac
18583
18584 case $ac_tag in
18585 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18586 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
18587 esac
18588 ;;
18589 esac
18590
18591 ac_dir=`$as_dirname -- "$ac_file" ||
18592$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18593 X"$ac_file" : 'X\(//\)[^/]' \| \
18594 X"$ac_file" : 'X\(//\)$' \| \
18595 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18596$as_echo X"$ac_file" |
18597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18598 s//\1/
18599 q
18600 }
18601 /^X\(\/\/\)[^/].*/{
18602 s//\1/
18603 q
18604 }
18605 /^X\(\/\/\)$/{
18606 s//\1/
18607 q
18608 }
18609 /^X\(\/\).*/{
18610 s//\1/
18611 q
18612 }
18613 s/.*/./; q'`
18614 as_dir="$ac_dir"; as_fn_mkdir_p
18615 ac_builddir=.
18616
18617case "$ac_dir" in
18618.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18619*)
18620 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18621 # A ".." for each directory in $ac_dir_suffix.
18622 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18623 case $ac_top_builddir_sub in
18624 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18625 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18626 esac ;;
18627esac
18628ac_abs_top_builddir=$ac_pwd
18629ac_abs_builddir=$ac_pwd$ac_dir_suffix
18630# for backward compatibility:
18631ac_top_builddir=$ac_top_build_prefix
18632
18633case $srcdir in
18634 .) # We are building in place.
18635 ac_srcdir=.
18636 ac_top_srcdir=$ac_top_builddir_sub
18637 ac_abs_top_srcdir=$ac_pwd ;;
18638 [\\/]* | ?:[\\/]* ) # Absolute name.
18639 ac_srcdir=$srcdir$ac_dir_suffix;
18640 ac_top_srcdir=$srcdir
18641 ac_abs_top_srcdir=$srcdir ;;
18642 *) # Relative name.
18643 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18644 ac_top_srcdir=$ac_top_build_prefix$srcdir
18645 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18646esac
18647ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18648
18649
18650 case $ac_mode in
18651 :F)
18652 #
18653 # CONFIG_FILE
18654 #
18655
18656 case $INSTALL in
18657 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18658 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18659 esac
18660_ACEOF
18661
18662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18663# If the template does not know about datarootdir, expand it.
18664# FIXME: This hack should be removed a few years after 2.60.
18665ac_datarootdir_hack=; ac_datarootdir_seen=
18666ac_sed_dataroot='
18667/datarootdir/ {
18668 p
18669 q
18670}
18671/@datadir@/p
18672/@docdir@/p
18673/@infodir@/p
18674/@localedir@/p
18675/@mandir@/p'
18676case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18677*datarootdir*) ac_datarootdir_seen=yes;;
18678*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18680$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18681_ACEOF
18682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18683 ac_datarootdir_hack='
18684 s&@datadir@&$datadir&g
18685 s&@docdir@&$docdir&g
18686 s&@infodir@&$infodir&g
18687 s&@localedir@&$localedir&g
18688 s&@mandir@&$mandir&g
18689 s&\\\${datarootdir}&$datarootdir&g' ;;
18690esac
18691_ACEOF
18692
18693# Neutralize VPATH when `$srcdir' = `.'.
18694# Shell code in configure.ac might set extrasub.
18695# FIXME: do we really want to maintain this feature?
18696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18697ac_sed_extra="$ac_vpsub
18698$extrasub
18699_ACEOF
18700cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18701:t
18702/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18703s|@configure_input@|$ac_sed_conf_input|;t t
18704s&@top_builddir@&$ac_top_builddir_sub&;t t
18705s&@top_build_prefix@&$ac_top_build_prefix&;t t
18706s&@srcdir@&$ac_srcdir&;t t
18707s&@abs_srcdir@&$ac_abs_srcdir&;t t
18708s&@top_srcdir@&$ac_top_srcdir&;t t
18709s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18710s&@builddir@&$ac_builddir&;t t
18711s&@abs_builddir@&$ac_abs_builddir&;t t
18712s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18713s&@INSTALL@&$ac_INSTALL&;t t
18714$ac_datarootdir_hack
18715"
18716eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18717 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18718
18719test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18720 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18721 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18722 "$ac_tmp/out"`; test -z "$ac_out"; } &&
18723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18724which seems to be undefined. Please make sure it is defined" >&5
18725$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18726which seems to be undefined. Please make sure it is defined" >&2;}
18727
18728 rm -f "$ac_tmp/stdin"
18729 case $ac_file in
18730 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18731 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18732 esac \
18733 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18734 ;;
18735 :H)
18736 #
18737 # CONFIG_HEADER
18738 #
18739 if test x"$ac_file" != x-; then
18740 {
18741 $as_echo "/* $configure_input */" \
18742 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18743 } >"$ac_tmp/config.h" \
18744 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18745 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18747$as_echo "$as_me: $ac_file is unchanged" >&6;}
18748 else
18749 rm -f "$ac_file"
18750 mv "$ac_tmp/config.h" "$ac_file" \
18751 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18752 fi
18753 else
18754 $as_echo "/* $configure_input */" \
18755 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18756 || as_fn_error $? "could not create -" "$LINENO" 5
18757 fi
18758 ;;
18759
18760
18761 esac
18762
18763done # for ac_tag
18764
18765
18766as_fn_exit 0
18767_ACEOF
18768ac_clean_files=$ac_clean_files_save
18769
18770test $ac_write_fail = 0 ||
18771 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
18772
18773
18774# configure is writing to config.log, and then calls config.status.
18775# config.status does its own redirection, appending to config.log.
18776# Unfortunately, on DOS this fails, as config.log is still kept open
18777# by configure, so config.status won't be able to write to it; its
18778# output is simply discarded. So we exec the FD to /dev/null,
18779# effectively closing config.log, so it can be properly (re)opened and
18780# appended to by config.status. When coming back to configure, we
18781# need to make the FD available again.
18782if test "$no_create" != yes; then
18783 ac_cs_success=:
18784 ac_config_status_args=
18785 test "$silent" = yes &&
18786 ac_config_status_args="$ac_config_status_args --quiet"
18787 exec 5>/dev/null
18788 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18789 exec 5>>config.log
18790 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18791 # would make configure fail if this is the last instruction.
18792 $ac_cs_success || as_fn_exit 1
18793fi
18794if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18796$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18797fi
18798
18799
18800# Print summary of options
18801
18802# Someone please show me a better way :)
18803A=`eval echo ${prefix}` ; A=`eval echo ${A}`
18804B=`eval echo ${bindir}` ; B=`eval echo ${B}`
18805C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
18806D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
18807E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
18808F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
18809G=`eval echo ${piddir}` ; G=`eval echo ${G}`
18810H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
18811I=`eval echo ${user_path}` ; I=`eval echo ${I}`
18812J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
18813
18814echo ""
18815echo "OpenSSH has been configured with the following options:"
18816echo " User binaries: $B"
18817echo " System binaries: $C"
18818echo " Configuration files: $D"
18819echo " Askpass program: $E"
18820echo " Manual pages: $F"
18821echo " PID file: $G"
18822echo " Privilege separation chroot path: $H"
18823if test "x$external_path_file" = "x/etc/login.conf" ; then
18824echo " At runtime, sshd will use the path defined in $external_path_file"
18825echo " Make sure the path to scp is present, otherwise scp will not work"
18826else
18827echo " sshd default user PATH: $I"
18828 if test ! -z "$external_path_file"; then
18829echo " (If PATH is set in $external_path_file it will be used instead. If"
18830echo " used, ensure the path to scp is present, otherwise scp will not work.)"
18831 fi
18832fi
18833if test ! -z "$superuser_path" ; then
18834echo " sshd superuser user PATH: $J"
18835fi
18836echo " Manpage format: $MANTYPE"
18837echo " PAM support: $PAM_MSG"
18838echo " OSF SIA support: $SIA_MSG"
18839echo " KerberosV support: $KRB5_MSG"
18840echo " SELinux support: $SELINUX_MSG"
18841echo " Smartcard support: $SCARD_MSG"
18842echo " S/KEY support: $SKEY_MSG"
18843echo " TCP Wrappers support: $TCPW_MSG"
18844echo " MD5 password support: $MD5_MSG"
18845echo " libedit support: $LIBEDIT_MSG"
18846echo " Solaris process contract support: $SPC_MSG"
18847echo " Solaris project support: $SP_MSG"
18848echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
18849echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
18850echo " BSD Auth support: $BSD_AUTH_MSG"
18851echo " Random number source: $RAND_MSG"
18852echo " Privsep sandbox style: $SANDBOX_STYLE"
18853
18854echo ""
18855
18856echo " Host: ${host}"
18857echo " Compiler: ${CC}"
18858echo " Compiler flags: ${CFLAGS}"
18859echo "Preprocessor flags: ${CPPFLAGS}"
18860echo " Linker flags: ${LDFLAGS}"
18861echo " Libraries: ${LIBS}"
18862if test ! -z "${SSHDLIBS}"; then
18863echo " +for sshd: ${SSHDLIBS}"
18864fi
18865if test ! -z "${SSHLIBS}"; then
18866echo " +for ssh: ${SSHLIBS}"
18867fi
18868
18869echo ""
18870
18871if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
18872 echo "SVR4 style packages are supported with \"make package\""
18873 echo ""
18874fi
18875
18876if test "x$PAM_MSG" = "xyes" ; then
18877 echo "PAM is enabled. You may need to install a PAM control file "
18878 echo "for sshd, otherwise password authentication may fail. "
18879 echo "Example PAM control files can be found in the contrib/ "
18880 echo "subdirectory"
18881 echo ""
18882fi
18883
18884if test ! -z "$NO_PEERCHECK" ; then
18885 echo "WARNING: the operating system that you are using does not"
18886 echo "appear to support getpeereid(), getpeerucred() or the"
18887 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
18888 echo "enforce security checks to prevent unauthorised connections to"
18889 echo "ssh-agent. Their absence increases the risk that a malicious"
18890 echo "user can connect to your agent."
18891 echo ""
18892fi
18893
18894if test "$AUDIT_MODULE" = "bsm" ; then
18895 echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
18896 echo "See the Solaris section in README.platform for details."
18897fi
diff --git a/moduli.0 b/moduli.0
new file mode 100644
index 000000000..7dc2cd540
--- /dev/null
+++ b/moduli.0
@@ -0,0 +1,74 @@
1MODULI(5) OpenBSD Programmer's Manual MODULI(5)
2
3NAME
4 moduli - Diffie-Hellman moduli
5
6DESCRIPTION
7 The /etc/moduli file contains prime numbers and generators for use by
8 sshd(8) in the Diffie-Hellman Group Exchange key exchange method.
9
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
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
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.
16
17 The file consists of newline-separated records, one per modulus,
18 containing seven space-separated fields. These fields are as follows:
19
20 timestamp The time that the modulus was last processed as
21 YYYYMMDDHHMMSS.
22
23 type Decimal number specifying the internal structure of
24 the prime modulus. Supported types are:
25
26 0 Unknown, not tested.
27 2 "Safe" prime; (p-1)/2 is also prime.
28 4 Sophie Germain; 2p+1 is also prime.
29
30 Moduli candidates initially produced by ssh-keygen(1)
31 are Sophie Germain primes (type 4). Further primality
32 testing with ssh-keygen(1) produces safe prime moduli
33 (type 2) that are ready for use in sshd(8). Other
34 types are not used by OpenSSH.
35
36 tests Decimal number indicating the type of primality tests
37 that the number has been subjected to represented as a
38 bitmask of the following values:
39
40 0x00 Not tested.
41 0x01 Composite number - not prime.
42 0x02 Sieve of Eratosthenes.
43 0x04 Probabilistic Miller-Rabin primality tests.
44
45 The ssh-keygen(1) moduli candidate generation uses the
46 Sieve of Eratosthenes (flag 0x02). Subsequent
47 ssh-keygen(1) primality tests are Miller-Rabin tests
48 (flag 0x04).
49
50 trials Decimal number indicating the number of primality
51 trials that have been performed on the modulus.
52
53 size Decimal number indicating the size of the prime in
54 bits.
55
56 generator The recommended generator for use with this modulus
57 (hexadecimal).
58
59 modulus The modulus itself in hexadecimal.
60
61 When performing Diffie-Hellman Group Exchange, sshd(8) first estimates
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
64 selects a modulus from /etc/moduli that best meets the size requirement.
65
66SEE ALSO
67 ssh-keygen(1), sshd(8)
68
69STANDARDS
70 M. Friedl, N. Provos, and W. Simpson, Diffie-Hellman Group Exchange for
71 the Secure Shell (SSH) Transport Layer Protocol, RFC 4419, March 2006,
72 2006.
73
74OpenBSD 5.4 September 26, 2012 OpenBSD 5.4
diff --git a/openbsd-compat/.cvsignore b/openbsd-compat/.cvsignore
deleted file mode 100644
index f3c7a7c5d..000000000
--- a/openbsd-compat/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
1Makefile
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index 975991e7f..41d2be238 100644
--- a/openbsd-compat/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
@@ -160,8 +160,6 @@
160#define DP_C_LONG 2 160#define DP_C_LONG 2
161#define DP_C_LDOUBLE 3 161#define DP_C_LDOUBLE 3
162#define DP_C_LLONG 4 162#define DP_C_LLONG 4
163#define DP_C_SIZE 5
164#define DP_C_INTMAX 6
165 163
166#define char_to_int(p) ((p)- '0') 164#define char_to_int(p) ((p)- '0')
167#ifndef MAX 165#ifndef MAX
@@ -184,7 +182,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format,
184static int fmtstr(char *buffer, size_t *currlen, size_t maxlen, 182static int fmtstr(char *buffer, size_t *currlen, size_t maxlen,
185 char *value, int flags, int min, int max); 183 char *value, int flags, int min, int max);
186static int fmtint(char *buffer, size_t *currlen, size_t maxlen, 184static int fmtint(char *buffer, size_t *currlen, size_t maxlen,
187 intmax_t value, int base, int min, int max, int flags); 185 LLONG value, int base, int min, int max, int flags);
188static int fmtfp(char *buffer, size_t *currlen, size_t maxlen, 186static int fmtfp(char *buffer, size_t *currlen, size_t maxlen,
189 LDOUBLE fvalue, int min, int max, int flags); 187 LDOUBLE fvalue, int min, int max, int flags);
190 188
@@ -192,7 +190,7 @@ static int
192dopr(char *buffer, size_t maxlen, const char *format, va_list args_in) 190dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
193{ 191{
194 char ch; 192 char ch;
195 intmax_t value; 193 LLONG value;
196 LDOUBLE fvalue; 194 LDOUBLE fvalue;
197 char *strvalue; 195 char *strvalue;
198 int min; 196 int min;
@@ -289,10 +287,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
289 cflags = DP_C_SHORT; 287 cflags = DP_C_SHORT;
290 ch = *format++; 288 ch = *format++;
291 break; 289 break;
292 case 'j':
293 cflags = DP_C_INTMAX;
294 ch = *format++;
295 break;
296 case 'l': 290 case 'l':
297 cflags = DP_C_LONG; 291 cflags = DP_C_LONG;
298 ch = *format++; 292 ch = *format++;
@@ -305,10 +299,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
305 cflags = DP_C_LDOUBLE; 299 cflags = DP_C_LDOUBLE;
306 ch = *format++; 300 ch = *format++;
307 break; 301 break;
308 case 'z':
309 cflags = DP_C_SIZE;
310 ch = *format++;
311 break;
312 default: 302 default:
313 break; 303 break;
314 } 304 }
@@ -324,10 +314,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
324 value = va_arg (args, long int); 314 value = va_arg (args, long int);
325 else if (cflags == DP_C_LLONG) 315 else if (cflags == DP_C_LLONG)
326 value = va_arg (args, LLONG); 316 value = va_arg (args, LLONG);
327 else if (cflags == DP_C_SIZE)
328 value = va_arg (args, ssize_t);
329 else if (cflags == DP_C_INTMAX)
330 value = va_arg (args, intmax_t);
331 else 317 else
332 value = va_arg (args, int); 318 value = va_arg (args, int);
333 if (fmtint(buffer, &currlen, maxlen, 319 if (fmtint(buffer, &currlen, maxlen,
@@ -342,12 +328,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
342 value = (long)va_arg (args, unsigned long int); 328 value = (long)va_arg (args, unsigned long int);
343 else if (cflags == DP_C_LLONG) 329 else if (cflags == DP_C_LLONG)
344 value = (long)va_arg (args, unsigned LLONG); 330 value = (long)va_arg (args, unsigned LLONG);
345 else if (cflags == DP_C_SIZE)
346 value = va_arg (args, size_t);
347#ifdef notyet
348 else if (cflags == DP_C_INTMAX)
349 value = va_arg (args, uintmax_t);
350#endif
351 else 331 else
352 value = (long)va_arg (args, unsigned int); 332 value = (long)va_arg (args, unsigned int);
353 if (fmtint(buffer, &currlen, maxlen, value, 333 if (fmtint(buffer, &currlen, maxlen, value,
@@ -362,12 +342,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
362 value = (long)va_arg (args, unsigned long int); 342 value = (long)va_arg (args, unsigned long int);
363 else if (cflags == DP_C_LLONG) 343 else if (cflags == DP_C_LLONG)
364 value = (LLONG)va_arg (args, unsigned LLONG); 344 value = (LLONG)va_arg (args, unsigned LLONG);
365 else if (cflags == DP_C_SIZE)
366 value = va_arg (args, size_t);
367#ifdef notyet
368 else if (cflags == DP_C_INTMAX)
369 value = va_arg (args, uintmax_t);
370#endif
371 else 345 else
372 value = (long)va_arg (args, unsigned int); 346 value = (long)va_arg (args, unsigned int);
373 if (fmtint(buffer, &currlen, maxlen, value, 347 if (fmtint(buffer, &currlen, maxlen, value,
@@ -384,12 +358,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
384 value = (long)va_arg (args, unsigned long int); 358 value = (long)va_arg (args, unsigned long int);
385 else if (cflags == DP_C_LLONG) 359 else if (cflags == DP_C_LLONG)
386 value = (LLONG)va_arg (args, unsigned LLONG); 360 value = (LLONG)va_arg (args, unsigned LLONG);
387 else if (cflags == DP_C_SIZE)
388 value = va_arg (args, size_t);
389#ifdef notyet
390 else if (cflags == DP_C_INTMAX)
391 value = va_arg (args, uintmax_t);
392#endif
393 else 361 else
394 value = (long)va_arg (args, unsigned int); 362 value = (long)va_arg (args, unsigned int);
395 if (fmtint(buffer, &currlen, maxlen, value, 363 if (fmtint(buffer, &currlen, maxlen, value,
@@ -448,7 +416,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
448 (long) strvalue, 16, min, max, flags) == -1) 416 (long) strvalue, 16, min, max, flags) == -1)
449 return -1; 417 return -1;
450 break; 418 break;
451#if we_dont_want_this_in_openssh
452 case 'n': 419 case 'n':
453 if (cflags == DP_C_SHORT) { 420 if (cflags == DP_C_SHORT) {
454 short int *num; 421 short int *num;
@@ -462,21 +429,12 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
462 LLONG *num; 429 LLONG *num;
463 num = va_arg (args, LLONG *); 430 num = va_arg (args, LLONG *);
464 *num = (LLONG)currlen; 431 *num = (LLONG)currlen;
465 } else if (cflags == DP_C_SIZE) {
466 ssize_t *num;
467 num = va_arg (args, ssize_t *);
468 *num = (ssize_t)currlen;
469 } else if (cflags == DP_C_INTMAX) {
470 intmax_t *num;
471 num = va_arg (args, intmax_t *);
472 *num = (intmax_t)currlen;
473 } else { 432 } else {
474 int *num; 433 int *num;
475 num = va_arg (args, int *); 434 num = va_arg (args, int *);
476 *num = currlen; 435 *num = currlen;
477 } 436 }
478 break; 437 break;
479#endif
480 case '%': 438 case '%':
481 DOPR_OUTCH(buffer, currlen, maxlen, ch); 439 DOPR_OUTCH(buffer, currlen, maxlen, ch);
482 break; 440 break;
diff --git a/openbsd-compat/regress/.cvsignore b/openbsd-compat/regress/.cvsignore
deleted file mode 100644
index afbf7cc3f..000000000
--- a/openbsd-compat/regress/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
1Makefile
2snprintftest
3strduptest
4strtonumtest
5
diff --git a/readconf.c b/readconf.c
index 7450081cd..1464430a4 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.205 2013/08/20 00:11:37 djm Exp $ */ 1/* $OpenBSD: readconf.c,v 1.204 2013/06/10 19:19:44 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
@@ -137,7 +137,7 @@ typedef enum {
137 oHashKnownHosts, 137 oHashKnownHosts,
138 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 138 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
139 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, 139 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication,
140 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass, 140 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown,
141 oIgnoredUnknownOption, oDeprecated, oUnsupported 141 oIgnoredUnknownOption, oDeprecated, oUnsupported
142} OpCodes; 142} OpCodes;
143 143
@@ -249,7 +249,6 @@ static struct {
249 { "kexalgorithms", oKexAlgorithms }, 249 { "kexalgorithms", oKexAlgorithms },
250 { "ipqos", oIPQoS }, 250 { "ipqos", oIPQoS },
251 { "requesttty", oRequestTTY }, 251 { "requesttty", oRequestTTY },
252 { "proxyusefdpass", oProxyUseFdpass },
253 { "ignoreunknown", oIgnoreUnknown }, 252 { "ignoreunknown", oIgnoreUnknown },
254 253
255 { NULL, oBadOption } 254 { NULL, oBadOption }
@@ -1073,10 +1072,6 @@ parse_int:
1073 charptr = &options->ignored_unknown; 1072 charptr = &options->ignored_unknown;
1074 goto parse_string; 1073 goto parse_string;
1075 1074
1076 case oProxyUseFdpass:
1077 intptr = &options->proxy_use_fdpass;
1078 goto parse_flag;
1079
1080 case oDeprecated: 1075 case oDeprecated:
1081 debug("%s line %d: Deprecated option \"%s\"", 1076 debug("%s line %d: Deprecated option \"%s\"",
1082 filename, linenum, keyword); 1077 filename, linenum, keyword);
@@ -1238,7 +1233,6 @@ initialize_options(Options * options)
1238 options->ip_qos_interactive = -1; 1233 options->ip_qos_interactive = -1;
1239 options->ip_qos_bulk = -1; 1234 options->ip_qos_bulk = -1;
1240 options->request_tty = -1; 1235 options->request_tty = -1;
1241 options->proxy_use_fdpass = -1;
1242 options->ignored_unknown = NULL; 1236 options->ignored_unknown = NULL;
1243} 1237}
1244 1238
@@ -1391,8 +1385,6 @@ fill_default_options(Options * options)
1391 options->ip_qos_bulk = IPTOS_THROUGHPUT; 1385 options->ip_qos_bulk = IPTOS_THROUGHPUT;
1392 if (options->request_tty == -1) 1386 if (options->request_tty == -1)
1393 options->request_tty = REQUEST_TTY_AUTO; 1387 options->request_tty = REQUEST_TTY_AUTO;
1394 if (options->proxy_use_fdpass == -1)
1395 options->proxy_use_fdpass = 0;
1396 /* options->local_command should not be set by default */ 1388 /* options->local_command should not be set by default */
1397 /* options->proxy_command should not be set by default */ 1389 /* options->proxy_command should not be set by default */
1398 /* options->user will be set in the main program if appropriate */ 1390 /* options->user will be set in the main program if appropriate */
diff --git a/readconf.h b/readconf.h
index ca4a042ad..23fc500da 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.96 2013/08/20 00:11:38 djm Exp $ */ 1/* $OpenBSD: readconf.h,v 1.95 2013/05/16 04:27:50 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -138,8 +138,6 @@ typedef struct {
138 138
139 int request_tty; 139 int request_tty;
140 140
141 int proxy_use_fdpass;
142
143 char *ignored_unknown; /* Pattern list of unknown tokens to ignore */ 141 char *ignored_unknown; /* Pattern list of unknown tokens to ignore */
144} Options; 142} Options;
145 143
diff --git a/regress/.cvsignore b/regress/.cvsignore
deleted file mode 100644
index f3c7a7c5d..000000000
--- a/regress/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
1Makefile
diff --git a/scard/.cvsignore b/scard/.cvsignore
deleted file mode 100644
index 5349d34ae..000000000
--- a/scard/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
1Makefile
2Ssh.bin
diff --git a/scp.0 b/scp.0
new file mode 100644
index 000000000..fe7087bc4
--- /dev/null
+++ b/scp.0
@@ -0,0 +1,158 @@
1SCP(1) OpenBSD Reference Manual SCP(1)
2
3NAME
4 scp - secure copy (remote file copy program)
5
6SYNOPSIS
7 scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
8 [-l limit] [-o ssh_option] [-P port] [-S program]
9 [[user@]host1:]file1 ... [[user@]host2:]file2
10
11DESCRIPTION
12 scp copies files between hosts on a network. It uses ssh(1) for data
13 transfer, and uses the same authentication and provides the same security
14 as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if
15 they are needed for authentication.
16
17 File names may contain a user and host specification to indicate that the
18 file is to be copied to/from that host. Local file names can be made
19 explicit using absolute or relative pathnames to avoid scp treating file
20 names containing `:' as host specifiers. Copies between two remote hosts
21 are also permitted.
22
23 The options are as follows:
24
25 -1 Forces scp to use protocol 1.
26
27 -2 Forces scp to use protocol 2.
28
29 -3 Copies between two remote hosts are transferred through the local
30 host. Without this option the data is copied directly between
31 the two remote hosts. Note that this option disables the
32 progress meter.
33
34 -4 Forces scp to use IPv4 addresses only.
35
36 -6 Forces scp to use IPv6 addresses only.
37
38 -B Selects batch mode (prevents asking for passwords or
39 passphrases).
40
41 -C Compression enable. Passes the -C flag to ssh(1) to enable
42 compression.
43
44 -c cipher
45 Selects the cipher to use for encrypting the data transfer. This
46 option is directly passed to ssh(1).
47
48 -F ssh_config
49 Specifies an alternative per-user configuration file for ssh.
50 This option is directly passed to ssh(1).
51
52 -i identity_file
53 Selects the file from which the identity (private key) for public
54 key authentication is read. This option is directly passed to
55 ssh(1).
56
57 -l limit
58 Limits the used bandwidth, specified in Kbit/s.
59
60 -o ssh_option
61 Can be used to pass options to ssh in the format used in
62 ssh_config(5). This is useful for specifying options for which
63 there is no separate scp command-line flag. For full details of
64 the options listed below, and their possible values, see
65 ssh_config(5).
66
67 AddressFamily
68 BatchMode
69 BindAddress
70 ChallengeResponseAuthentication
71 CheckHostIP
72 Cipher
73 Ciphers
74 Compression
75 CompressionLevel
76 ConnectionAttempts
77 ConnectTimeout
78 ControlMaster
79 ControlPath
80 ControlPersist
81 GlobalKnownHostsFile
82 GSSAPIAuthentication
83 GSSAPIDelegateCredentials
84 HashKnownHosts
85 Host
86 HostbasedAuthentication
87 HostKeyAlgorithms
88 HostKeyAlias
89 HostName
90 IdentityFile
91 IdentitiesOnly
92 IPQoS
93 KbdInteractiveAuthentication
94 KbdInteractiveDevices
95 KexAlgorithms
96 LogLevel
97 MACs
98 NoHostAuthenticationForLocalhost
99 NumberOfPasswordPrompts
100 PasswordAuthentication
101 PKCS11Provider
102 Port
103 PreferredAuthentications
104 Protocol
105 ProxyCommand
106 PubkeyAuthentication
107 RekeyLimit
108 RhostsRSAAuthentication
109 RSAAuthentication
110 SendEnv
111 ServerAliveInterval
112 ServerAliveCountMax
113 StrictHostKeyChecking
114 TCPKeepAlive
115 UsePrivilegedPort
116 User
117 UserKnownHostsFile
118 VerifyHostKeyDNS
119
120 -P port
121 Specifies the port to connect to on the remote host. Note that
122 this option is written with a capital `P', because -p is already
123 reserved for preserving the times and modes of the file in
124 rcp(1).
125
126 -p Preserves modification times, access times, and modes from the
127 original file.
128
129 -q Quiet mode: disables the progress meter as well as warning and
130 diagnostic messages from ssh(1).
131
132 -r Recursively copy entire directories. Note that scp follows
133 symbolic links encountered in the tree traversal.
134
135 -S program
136 Name of program to use for the encrypted connection. The program
137 must understand ssh(1) options.
138
139 -v Verbose mode. Causes scp and ssh(1) to print debugging messages
140 about their progress. This is helpful in debugging connection,
141 authentication, and configuration problems.
142
143EXIT STATUS
144 The scp utility exits 0 on success, and >0 if an error occurs.
145
146SEE ALSO
147 rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
148 ssh_config(5), sshd(8)
149
150HISTORY
151 scp is based on the rcp(1) program in BSD source code from the Regents of
152 the University of California.
153
154AUTHORS
155 Timo Rinne <tri@iki.fi>
156 Tatu Ylonen <ylo@cs.hut.fi>
157
158OpenBSD 5.4 July 16, 2013 OpenBSD 5.4
diff --git a/scp.1 b/scp.1
index 595db3260..c83012c92 100644
--- a/scp.1
+++ b/scp.1
@@ -8,9 +8,9 @@
8.\" 8.\"
9.\" Created: Sun May 7 00:14:37 1995 ylo 9.\" Created: Sun May 7 00:14:37 1995 ylo
10.\" 10.\"
11.\" $OpenBSD: scp.1,v 1.60 2013/08/14 08:39:27 jmc Exp $ 11.\" $OpenBSD: scp.1,v 1.59 2013/07/16 00:07:52 schwarze Exp $
12.\" 12.\"
13.Dd $Mdocdate: August 14 2013 $ 13.Dd $Mdocdate: July 16 2013 $
14.Dt SCP 1 14.Dt SCP 1
15.Os 15.Os
16.Sh NAME 16.Sh NAME
@@ -232,9 +232,8 @@ debugging connection, authentication, and configuration problems.
232.Nm 232.Nm
233is based on the 233is based on the
234.Xr rcp 1 234.Xr rcp 1
235program in 235program in BSD source code from the Regents of the University of
236.Bx 236California.
237source code from the Regents of the University of California.
238.Sh AUTHORS 237.Sh AUTHORS
239.An Timo Rinne Aq Mt tri@iki.fi 238.An Timo Rinne Aq Mt tri@iki.fi
240.An Tatu Ylonen Aq Mt ylo@cs.hut.fi 239.An Tatu Ylonen Aq Mt ylo@cs.hut.fi
diff --git a/servconf.c b/servconf.c
index c761ff01c..747edde6c 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,5 +1,5 @@
1 1
2/* $OpenBSD: servconf.c,v 1.241 2013/08/06 23:06:01 djm Exp $ */ 2/* $OpenBSD: servconf.c,v 1.240 2013/07/19 07:37:48 markus Exp $ */
3/* 3/*
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved 5 * All rights reserved
@@ -2063,8 +2063,7 @@ dump_config(ServerOptions *o)
2063 printf("ipqos %s ", iptos2str(o->ip_qos_interactive)); 2063 printf("ipqos %s ", iptos2str(o->ip_qos_interactive));
2064 printf("%s\n", iptos2str(o->ip_qos_bulk)); 2064 printf("%s\n", iptos2str(o->ip_qos_bulk));
2065 2065
2066 printf("rekeylimit %lld %d\n", (long long)o->rekey_limit, 2066 printf("rekeylimit %lld %d\n", o->rekey_limit, o->rekey_interval);
2067 o->rekey_interval);
2068 2067
2069 channel_print_adm_permitted_opens(); 2068 channel_print_adm_permitted_opens();
2070} 2069}
diff --git a/sftp-client.c b/sftp-client.c
index f2ce9deb7..f4f1970b6 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.c,v 1.103 2013/08/09 03:39:13 djm Exp $ */ 1/* $OpenBSD: sftp-client.c,v 1.101 2013/07/25 00:56:51 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -337,8 +337,7 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests,
337 Buffer msg; 337 Buffer msg;
338 struct sftp_conn *ret; 338 struct sftp_conn *ret;
339 339
340 ret = xcalloc(1, sizeof(*ret)); 340 ret = xmalloc(sizeof(*ret));
341 ret->msg_id = 1;
342 ret->fd_in = fd_in; 341 ret->fd_in = fd_in;
343 ret->fd_out = fd_out; 342 ret->fd_out = fd_out;
344 ret->transfer_buflen = transfer_buflen; 343 ret->transfer_buflen = transfer_buflen;
@@ -769,18 +768,16 @@ do_realpath(struct sftp_conn *conn, char *path)
769} 768}
770 769
771int 770int
772do_rename(struct sftp_conn *conn, char *oldpath, char *newpath, 771do_rename(struct sftp_conn *conn, char *oldpath, char *newpath)
773 int force_legacy)
774{ 772{
775 Buffer msg; 773 Buffer msg;
776 u_int status, id; 774 u_int status, id;
777 int use_ext = (conn->exts & SFTP_EXT_POSIX_RENAME) && !force_legacy;
778 775
779 buffer_init(&msg); 776 buffer_init(&msg);
780 777
781 /* Send rename request */ 778 /* Send rename request */
782 id = conn->msg_id++; 779 id = conn->msg_id++;
783 if (use_ext) { 780 if ((conn->exts & SFTP_EXT_POSIX_RENAME)) {
784 buffer_put_char(&msg, SSH2_FXP_EXTENDED); 781 buffer_put_char(&msg, SSH2_FXP_EXTENDED);
785 buffer_put_int(&msg, id); 782 buffer_put_int(&msg, id);
786 buffer_put_cstring(&msg, "posix-rename@openssh.com"); 783 buffer_put_cstring(&msg, "posix-rename@openssh.com");
@@ -792,8 +789,8 @@ do_rename(struct sftp_conn *conn, char *oldpath, char *newpath,
792 buffer_put_cstring(&msg, newpath); 789 buffer_put_cstring(&msg, newpath);
793 send_msg(conn, &msg); 790 send_msg(conn, &msg);
794 debug3("Sent message %s \"%s\" -> \"%s\"", 791 debug3("Sent message %s \"%s\" -> \"%s\"",
795 use_ext ? "posix-rename@openssh.com" : "SSH2_FXP_RENAME", 792 (conn->exts & SFTP_EXT_POSIX_RENAME) ? "posix-rename@openssh.com" :
796 oldpath, newpath); 793 "SSH2_FXP_RENAME", oldpath, newpath);
797 buffer_free(&msg); 794 buffer_free(&msg);
798 795
799 status = get_status(conn, id); 796 status = get_status(conn, id);
@@ -1222,7 +1219,6 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
1222 if (read_error) { 1219 if (read_error) {
1223 error("Couldn't read from remote file \"%s\" : %s", 1220 error("Couldn't read from remote file \"%s\" : %s",
1224 remote_path, fx2txt(status)); 1221 remote_path, fx2txt(status));
1225 status = -1;
1226 do_close(conn, handle, handle_len); 1222 do_close(conn, handle, handle_len);
1227 } else if (write_error) { 1223 } else if (write_error) {
1228 error("Couldn't write to \"%s\": %s", local_path, 1224 error("Couldn't write to \"%s\": %s", local_path,
@@ -1231,7 +1227,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
1231 do_close(conn, handle, handle_len); 1227 do_close(conn, handle, handle_len);
1232 } else { 1228 } else {
1233 status = do_close(conn, handle, handle_len); 1229 status = do_close(conn, handle, handle_len);
1234 if (interrupted || status != SSH2_FX_OK) 1230 if (interrupted)
1235 status = -1; 1231 status = -1;
1236 /* Override umask and utimes if asked */ 1232 /* Override umask and utimes if asked */
1237#ifdef HAVE_FCHMOD 1233#ifdef HAVE_FCHMOD
diff --git a/sftp-client.h b/sftp-client.h
index dc54cfe3b..111a998c8 100644
--- a/sftp-client.h
+++ b/sftp-client.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.h,v 1.22 2013/08/08 05:04:03 djm Exp $ */ 1/* $OpenBSD: sftp-client.h,v 1.21 2013/07/25 00:56:51 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 4 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
@@ -92,7 +92,7 @@ char *do_realpath(struct sftp_conn *, char *);
92int do_statvfs(struct sftp_conn *, const char *, struct sftp_statvfs *, int); 92int do_statvfs(struct sftp_conn *, const char *, struct sftp_statvfs *, int);
93 93
94/* Rename 'oldpath' to 'newpath' */ 94/* Rename 'oldpath' to 'newpath' */
95int do_rename(struct sftp_conn *, char *, char *m, int force_legacy); 95int do_rename(struct sftp_conn *, char *, char *);
96 96
97/* Link 'oldpath' to 'newpath' */ 97/* Link 'oldpath' to 'newpath' */
98int do_hardlink(struct sftp_conn *, char *, char *); 98int do_hardlink(struct sftp_conn *, char *, char *);
diff --git a/sftp-server.0 b/sftp-server.0
new file mode 100644
index 000000000..bca318b38
--- /dev/null
+++ b/sftp-server.0
@@ -0,0 +1,74 @@
1SFTP-SERVER(8) OpenBSD System Manager's Manual SFTP-SERVER(8)
2
3NAME
4 sftp-server - SFTP server subsystem
5
6SYNOPSIS
7 sftp-server [-ehR] [-d start_directory] [-f log_facility] [-l log_level]
8 [-u umask]
9
10DESCRIPTION
11 sftp-server is a program that speaks the server side of SFTP protocol to
12 stdout and expects client requests from stdin. sftp-server is not
13 intended to be called directly, but from sshd(8) using the Subsystem
14 option.
15
16 Command-line flags to sftp-server should be specified in the Subsystem
17 declaration. See sshd_config(5) for more information.
18
19 Valid options are:
20
21 -d start_directory
22 specifies an alternate starting directory for users. The
23 pathname may contain the following tokens that are expanded at
24 runtime: %% is replaced by a literal '%', %h is replaced by the
25 home directory of the user being authenticated, and %u is
26 replaced by the username of that user. The default is to use the
27 user's home directory. This option is useful in conjunction with
28 the sshd_config(5) ChrootDirectory option.
29
30 -e Causes sftp-server to print logging information to stderr instead
31 of syslog for debugging.
32
33 -f log_facility
34 Specifies the facility code that is used when logging messages
35 from sftp-server. The possible values are: DAEMON, USER, AUTH,
36 LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
37 The default is AUTH.
38
39 -h Displays sftp-server usage information.
40
41 -l log_level
42 Specifies which messages will be logged by sftp-server. The
43 possible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG,
44 DEBUG1, DEBUG2, and DEBUG3. INFO and VERBOSE log transactions
45 that sftp-server performs on behalf of the client. DEBUG and
46 DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify higher
47 levels of debugging output. The default is ERROR.
48
49 -R Places this instance of sftp-server into a read-only mode.
50 Attempts to open files for writing, as well as other operations
51 that change the state of the filesystem, will be denied.
52
53 -u umask
54 Sets an explicit umask(2) to be applied to newly-created files
55 and directories, instead of the user's default mask.
56
57 For logging to work, sftp-server must be able to access /dev/log. Use of
58 sftp-server in a chroot configuration therefore requires that syslogd(8)
59 establish a logging socket inside the chroot directory.
60
61SEE ALSO
62 sftp(1), ssh(1), sshd_config(5), sshd(8)
63
64 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol,
65 draft-ietf-secsh-filexfer-02.txt, October 2001, work in progress
66 material.
67
68HISTORY
69 sftp-server first appeared in OpenBSD 2.8.
70
71AUTHORS
72 Markus Friedl <markus@openbsd.org>
73
74OpenBSD 5.4 July 16, 2013 OpenBSD 5.4
diff --git a/sftp.0 b/sftp.0
new file mode 100644
index 000000000..c5fa17892
--- /dev/null
+++ b/sftp.0
@@ -0,0 +1,349 @@
1SFTP(1) OpenBSD Reference Manual SFTP(1)
2
3NAME
4 sftp - secure file transfer program
5
6SYNOPSIS
7 sftp [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
8 [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
9 [-o ssh_option] [-P port] [-R num_requests] [-S program]
10 [-s subsystem | sftp_server] host
11 sftp [user@]host[:file ...]
12 sftp [user@]host[:dir[/]]
13 sftp -b batchfile [user@]host
14
15DESCRIPTION
16 sftp is an interactive file transfer program, similar to ftp(1), which
17 performs all operations over an encrypted ssh(1) transport. It may also
18 use many features of ssh, such as public key authentication and
19 compression. sftp connects and logs into the specified host, then enters
20 an interactive command mode.
21
22 The second usage format will retrieve files automatically if a non-
23 interactive authentication method is used; otherwise it will do so after
24 successful interactive authentication.
25
26 The third usage format allows sftp to start in a remote directory.
27
28 The final usage format allows for automated sessions using the -b option.
29 In such cases, it is necessary to configure non-interactive
30 authentication to obviate the need to enter a password at connection time
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:
38
39 -1 Specify the use of protocol version 1.
40
41 -2 Specify the use of protocol version 2.
42
43 -4 Forces sftp to use IPv4 addresses only.
44
45 -6 Forces sftp to use IPv6 addresses only.
46
47 -B buffer_size
48 Specify the size of the buffer that sftp uses when transferring
49 files. Larger buffers require fewer round trips at the cost of
50 higher memory consumption. The default is 32768 bytes.
51
52 -b batchfile
53 Batch mode reads a series of commands from an input batchfile
54 instead of stdin. Since it lacks user interaction it should be
55 used in conjunction with non-interactive authentication. A
56 batchfile of `-' may be used to indicate standard input. sftp
57 will abort if any of the following commands fail: get, put,
58 reget, rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown,
59 chgrp, lpwd, df, symlink, and lmkdir. Termination on error can
60 be suppressed on a command by command basis by prefixing the
61 command with a `-' character (for example, -rm /tmp/blah*).
62
63 -C Enables compression (via ssh's -C flag).
64
65 -c cipher
66 Selects the cipher to use for encrypting the data transfers.
67 This option is directly passed to ssh(1).
68
69 -D sftp_server_path
70 Connect directly to a local sftp server (rather than via ssh(1)).
71 This option may be useful in debugging the client and server.
72
73 -F ssh_config
74 Specifies an alternative per-user configuration file for ssh(1).
75 This option is directly passed to ssh(1).
76
77 -i identity_file
78 Selects the file from which the identity (private key) for public
79 key authentication is read. This option is directly passed to
80 ssh(1).
81
82 -l limit
83 Limits the used bandwidth, specified in Kbit/s.
84
85 -o ssh_option
86 Can be used to pass options to ssh in the format used in
87 ssh_config(5). This is useful for specifying options for which
88 there is no separate sftp command-line flag. For example, to
89 specify an alternate port use: sftp -oPort=24. For full details
90 of the options listed below, and their possible values, see
91 ssh_config(5).
92
93 AddressFamily
94 BatchMode
95 BindAddress
96 ChallengeResponseAuthentication
97 CheckHostIP
98 Cipher
99 Ciphers
100 Compression
101 CompressionLevel
102 ConnectionAttempts
103 ConnectTimeout
104 ControlMaster
105 ControlPath
106 ControlPersist
107 GlobalKnownHostsFile
108 GSSAPIAuthentication
109 GSSAPIDelegateCredentials
110 HashKnownHosts
111 Host
112 HostbasedAuthentication
113 HostKeyAlgorithms
114 HostKeyAlias
115 HostName
116 IdentityFile
117 IdentitiesOnly
118 IPQoS
119 KbdInteractiveAuthentication
120 KbdInteractiveDevices
121 KexAlgorithms
122 LogLevel
123 MACs
124 NoHostAuthenticationForLocalhost
125 NumberOfPasswordPrompts
126 PasswordAuthentication
127 PKCS11Provider
128 Port
129 PreferredAuthentications
130 Protocol
131 ProxyCommand
132 PubkeyAuthentication
133 RekeyLimit
134 RhostsRSAAuthentication
135 RSAAuthentication
136 SendEnv
137 ServerAliveInterval
138 ServerAliveCountMax
139 StrictHostKeyChecking
140 TCPKeepAlive
141 UsePrivilegedPort
142 User
143 UserKnownHostsFile
144 VerifyHostKeyDNS
145
146 -P port
147 Specifies the port to connect to on the remote host.
148
149 -p Preserves modification times, access times, and modes from the
150 original files transferred.
151
152 -q Quiet mode: disables the progress meter as well as warning and
153 diagnostic messages from ssh(1).
154
155 -R num_requests
156 Specify how many requests may be outstanding at any one time.
157 Increasing this may slightly improve file transfer speed but will
158 increase memory usage. The default is 64 outstanding requests.
159
160 -r Recursively copy entire directories when uploading and
161 downloading. Note that sftp does not follow symbolic links
162 encountered in the tree traversal.
163
164 -S program
165 Name of the program to use for the encrypted connection. The
166 program must understand ssh(1) options.
167
168 -s subsystem | sftp_server
169 Specifies the SSH2 subsystem or the path for an sftp server on
170 the remote host. A path is useful for using sftp over protocol
171 version 1, or when the remote sshd(8) does not have an sftp
172 subsystem configured.
173
174 -v Raise logging level. This option is also passed to ssh.
175
176INTERACTIVE COMMANDS
177 Once in interactive mode, sftp understands a set of commands similar to
178 those of ftp(1). Commands are case insensitive. Pathnames that contain
179 spaces must be enclosed in quotes. Any special characters contained
180 within pathnames that are recognized by glob(3) must be escaped with
181 backslashes (`\').
182
183 bye Quit sftp.
184
185 cd path
186 Change remote directory to path.
187
188 chgrp grp path
189 Change group of file path to grp. path may contain glob(3)
190 characters and may match multiple files. grp must be a numeric
191 GID.
192
193 chmod mode path
194 Change permissions of file path to mode. path may contain
195 glob(3) characters and may match multiple files.
196
197 chown own path
198 Change owner of file path to own. path may contain glob(3)
199 characters and may match multiple files. own must be a numeric
200 UID.
201
202 df [-hi] [path]
203 Display usage information for the filesystem holding the current
204 directory (or path if specified). If the -h flag is specified,
205 the capacity information will be displayed using "human-readable"
206 suffixes. The -i flag requests display of inode information in
207 addition to capacity information. This command is only supported
208 on servers that implement the ``statvfs@openssh.com'' extension.
209
210 exit Quit sftp.
211
212 get [-aPpr] remote-path [local-path]
213 Retrieve the remote-path and store it on the local machine. If
214 the local path name is not specified, it is given the same name
215 it has on the remote machine. remote-path may contain glob(3)
216 characters and may match multiple files. If it does and
217 local-path is specified, then local-path must specify a
218 directory.
219
220 If the -a flag is specified, then attempt to resume partial
221 transfers of existing files. Note that resumption assumes that
222 any partial copy of the local file matches the remote copy. If
223 the remote file differs from the partial local copy then the
224 resultant file is likely to be corrupt.
225
226 If either the -P or -p flag is specified, then full file
227 permissions and access times are copied too.
228
229 If the -r flag is specified then directories will be copied
230 recursively. Note that sftp does not follow symbolic links when
231 performing recursive transfers.
232
233 help Display help text.
234
235 lcd path
236 Change local directory to path.
237
238 lls [ls-options [path]]
239 Display local directory listing of either path or current
240 directory if path is not specified. ls-options may contain any
241 flags supported by the local system's ls(1) command. path may
242 contain glob(3) characters and may match multiple files.
243
244 lmkdir path
245 Create local directory specified by path.
246
247 ln [-s] oldpath newpath
248 Create a link from oldpath to newpath. If the -s flag is
249 specified the created link is a symbolic link, otherwise it is a
250 hard link.
251
252 lpwd Print local working directory.
253
254 ls [-1afhlnrSt] [path]
255 Display a remote directory listing of either path or the current
256 directory if path is not specified. path may contain glob(3)
257 characters and may match multiple files.
258
259 The following flags are recognized and alter the behaviour of ls
260 accordingly:
261
262 -1 Produce single columnar output.
263
264 -a List files beginning with a dot (`.').
265
266 -f Do not sort the listing. The default sort order is
267 lexicographical.
268
269 -h When used with a long format option, use unit suffixes:
270 Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte,
271 and Exabyte in order to reduce the number of digits to
272 four or fewer using powers of 2 for sizes (K=1024,
273 M=1048576, etc.).
274
275 -l Display additional details including permissions and
276 ownership information.
277
278 -n Produce a long listing with user and group information
279 presented numerically.
280
281 -r Reverse the sort order of the listing.
282
283 -S Sort the listing by file size.
284
285 -t Sort the listing by last modification time.
286
287 lumask umask
288 Set local umask to umask.
289
290 mkdir path
291 Create remote directory specified by path.
292
293 progress
294 Toggle display of progress meter.
295
296 put [-Ppr] local-path [remote-path]
297 Upload local-path and store it on the remote machine. If the
298 remote path name is not specified, it is given the same name it
299 has on the local machine. local-path may contain glob(3)
300 characters and may match multiple files. If it does and
301 remote-path is specified, then remote-path must specify a
302 directory.
303
304 If either the -P or -p flag is specified, then full file
305 permissions and access times are copied too.
306
307 If the -r flag is specified then directories will be copied
308 recursively. Note that sftp does not follow symbolic links when
309 performing recursive transfers.
310
311 pwd Display remote working directory.
312
313 quit Quit sftp.
314
315 reget [-Ppr] remote-path [local-path]
316 Resume download of remote-path. Equivalent to get with the -a
317 flag set.
318
319 rename oldpath newpath
320 Rename remote file from oldpath to newpath.
321
322 rm path
323 Delete remote file specified by path.
324
325 rmdir path
326 Remove remote directory specified by path.
327
328 symlink oldpath newpath
329 Create a symbolic link from oldpath to newpath.
330
331 version
332 Display the sftp protocol version.
333
334 !command
335 Execute command in local shell.
336
337 ! Escape to local shell.
338
339 ? Synonym for help.
340
341SEE ALSO
342 ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3),
343 ssh_config(5), sftp-server(8), sshd(8)
344
345 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol,
346 draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress
347 material.
348
349OpenBSD 5.4 July 25, 2013 OpenBSD 5.4
diff --git a/sftp.1 b/sftp.1
index 85d64a7fc..2577fe875 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.94 2013/08/07 06:24:51 jmc Exp $ 1.\" $OpenBSD: sftp.1,v 1.92 2013/07/25 00:56:51 djm 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: August 7 2013 $ 25.Dd $Mdocdate: July 25 2013 $
26.Dt SFTP 1 26.Dt SFTP 1
27.Os 27.Os
28.Sh NAME 28.Sh NAME
@@ -31,7 +31,7 @@
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm sftp 32.Nm sftp
33.Bk -words 33.Bk -words
34.Op Fl 1246aCpqrv 34.Op Fl 1246Cpqrv
35.Op Fl B Ar buffer_size 35.Op Fl B Ar buffer_size
36.Op Fl b Ar batchfile 36.Op Fl b Ar batchfile
37.Op Fl c Ar cipher 37.Op Fl c Ar cipher
@@ -107,11 +107,6 @@ to use IPv4 addresses only.
107Forces 107Forces
108.Nm 108.Nm
109to use IPv6 addresses only. 109to use IPv6 addresses only.
110.It Fl a
111Attempt to continue interrupted downloads rather than overwriting existing
112partial or complete copies of files.
113If the remote file contents differ from the partial local copy then the
114resultant file is likely to be corrupt.
115.It Fl B Ar buffer_size 110.It Fl B Ar buffer_size
116Specify the size of the buffer that 111Specify the size of the buffer that
117.Nm 112.Nm
@@ -373,8 +368,8 @@ If the
373flag is specified, then attempt to resume partial transfers of existing files. 368flag is specified, then attempt to resume partial transfers of existing files.
374Note that resumption assumes that any partial copy of the local file matches 369Note that resumption assumes that any partial copy of the local file matches
375the remote copy. 370the remote copy.
376If the remote file contents differ from the partial local copy then the 371If the remote file differs from the partial local copy then the resultant file
377resultant file is likely to be corrupt. 372is likely to be corrupt.
378.Pp 373.Pp
379If either the 374If either the
380.Fl P 375.Fl P
diff --git a/sftp.c b/sftp.c
index e21144064..969328de4 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.154 2013/08/09 03:56:42 djm Exp $ */ 1/* $OpenBSD: sftp.c,v 1.148 2013/07/25 00:56:52 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -129,34 +129,32 @@ extern char *__progname;
129#define SORT_FLAGS (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT) 129#define SORT_FLAGS (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT)
130 130
131/* Commands for interactive mode */ 131/* Commands for interactive mode */
132enum sftp_command { 132#define I_CHDIR 1
133 I_CHDIR = 1, 133#define I_CHGRP 2
134 I_CHGRP, 134#define I_CHMOD 3
135 I_CHMOD, 135#define I_CHOWN 4
136 I_CHOWN, 136#define I_DF 24
137 I_DF, 137#define I_GET 5
138 I_GET, 138#define I_HELP 6
139 I_HELP, 139#define I_LCHDIR 7
140 I_LCHDIR, 140#define I_LINK 25
141 I_LINK, 141#define I_LLS 8
142 I_LLS, 142#define I_LMKDIR 9
143 I_LMKDIR, 143#define I_LPWD 10
144 I_LPWD, 144#define I_LS 11
145 I_LS, 145#define I_LUMASK 12
146 I_LUMASK, 146#define I_MKDIR 13
147 I_MKDIR, 147#define I_PUT 14
148 I_PUT, 148#define I_PWD 15
149 I_PWD, 149#define I_QUIT 16
150 I_QUIT, 150#define I_RENAME 17
151 I_RENAME, 151#define I_RM 18
152 I_RM, 152#define I_RMDIR 19
153 I_RMDIR, 153#define I_SHELL 20
154 I_SHELL, 154#define I_SYMLINK 21
155 I_SYMLINK, 155#define I_VERSION 22
156 I_VERSION, 156#define I_PROGRESS 23
157 I_PROGRESS, 157#define I_REGET 26
158 I_REGET,
159};
160 158
161struct CMD { 159struct CMD {
162 const char *c; 160 const char *c;
@@ -415,30 +413,6 @@ parse_link_flags(const char *cmd, char **argv, int argc, int *sflag)
415} 413}
416 414
417static int 415static int
418parse_rename_flags(const char *cmd, char **argv, int argc, int *lflag)
419{
420 extern int opterr, optind, optopt, optreset;
421 int ch;
422
423 optind = optreset = 1;
424 opterr = 0;
425
426 *lflag = 0;
427 while ((ch = getopt(argc, argv, "l")) != -1) {
428 switch (ch) {
429 case 'l':
430 *lflag = 1;
431 break;
432 default:
433 error("%s: Invalid flag -%c", cmd, optopt);
434 return -1;
435 }
436 }
437
438 return optind;
439}
440
441static int
442parse_ls_flags(char **argv, int argc, int *lflag) 416parse_ls_flags(char **argv, int argc, int *lflag)
443{ 417{
444 extern int opterr, optind, optopt, optreset; 418 extern int opterr, optind, optopt, optreset;
@@ -519,26 +493,6 @@ parse_df_flags(const char *cmd, char **argv, int argc, int *hflag, int *iflag)
519} 493}
520 494
521static int 495static int
522parse_no_flags(const char *cmd, char **argv, int argc)
523{
524 extern int opterr, optind, optopt, optreset;
525 int ch;
526
527 optind = optreset = 1;
528 opterr = 0;
529
530 while ((ch = getopt(argc, argv, "")) != -1) {
531 switch (ch) {
532 default:
533 error("%s: Invalid flag -%c", cmd, optopt);
534 return -1;
535 }
536 }
537
538 return optind;
539}
540
541static int
542is_dir(char *path) 496is_dir(char *path)
543{ 497{
544 struct stat sb; 498 struct stat sb;
@@ -693,7 +647,7 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd,
693 error("stat %s: %s", g.gl_pathv[i], strerror(errno)); 647 error("stat %s: %s", g.gl_pathv[i], strerror(errno));
694 continue; 648 continue;
695 } 649 }
696 650
697 tmp = xstrdup(g.gl_pathv[i]); 651 tmp = xstrdup(g.gl_pathv[i]);
698 if ((filename = basename(tmp)) == NULL) { 652 if ((filename = basename(tmp)) == NULL) {
699 error("basename %s: %s", tmp, strerror(errno)); 653 error("basename %s: %s", tmp, strerror(errno));
@@ -1021,7 +975,7 @@ undo_glob_escape(char *s)
1021 * 975 *
1022 * If "lastquote" is not NULL, the quoting character used for the last 976 * If "lastquote" is not NULL, the quoting character used for the last
1023 * argument is placed in *lastquote ("\0", "'" or "\""). 977 * argument is placed in *lastquote ("\0", "'" or "\"").
1024 * 978 *
1025 * If "terminated" is not NULL, *terminated will be set to 1 when the 979 * If "terminated" is not NULL, *terminated will be set to 1 when the
1026 * last argument's quote has been properly terminated or 0 otherwise. 980 * last argument's quote has been properly terminated or 0 otherwise.
1027 * This parameter is only of use if "sloppy" is set. 981 * This parameter is only of use if "sloppy" is set.
@@ -1070,7 +1024,7 @@ makeargv(const char *arg, int *argcp, int sloppy, char *lastquote,
1070 state = q; 1024 state = q;
1071 if (lastquote != NULL) 1025 if (lastquote != NULL)
1072 *lastquote = arg[i]; 1026 *lastquote = arg[i];
1073 } else if (state == MA_UNQUOTED) 1027 } else if (state == MA_UNQUOTED)
1074 state = q; 1028 state = q;
1075 else if (state == q) 1029 else if (state == q)
1076 state = MA_UNQUOTED; 1030 state = MA_UNQUOTED;
@@ -1254,15 +1208,8 @@ parse_args(const char **cpp, int *aflag, int *hflag, int *iflag, int *lflag,
1254 case I_LINK: 1208 case I_LINK:
1255 if ((optidx = parse_link_flags(cmd, argv, argc, sflag)) == -1) 1209 if ((optidx = parse_link_flags(cmd, argv, argc, sflag)) == -1)
1256 return -1; 1210 return -1;
1257 goto parse_two_paths;
1258 case I_RENAME:
1259 if ((optidx = parse_rename_flags(cmd, argv, argc, lflag)) == -1)
1260 return -1;
1261 goto parse_two_paths;
1262 case I_SYMLINK: 1211 case I_SYMLINK:
1263 if ((optidx = parse_no_flags(cmd, argv, argc)) == -1) 1212 case I_RENAME:
1264 return -1;
1265 parse_two_paths:
1266 if (argc - optidx < 2) { 1213 if (argc - optidx < 2) {
1267 error("You must specify two paths after a %s " 1214 error("You must specify two paths after a %s "
1268 "command.", cmd); 1215 "command.", cmd);
@@ -1280,8 +1227,6 @@ parse_args(const char **cpp, int *aflag, int *hflag, int *iflag, int *lflag,
1280 case I_CHDIR: 1227 case I_CHDIR:
1281 case I_LCHDIR: 1228 case I_LCHDIR:
1282 case I_LMKDIR: 1229 case I_LMKDIR:
1283 if ((optidx = parse_no_flags(cmd, argv, argc)) == -1)
1284 return -1;
1285 /* Get pathname (mandatory) */ 1230 /* Get pathname (mandatory) */
1286 if (argc - optidx < 1) { 1231 if (argc - optidx < 1) {
1287 error("You must specify a path after a %s command.", 1232 error("You must specify a path after a %s command.",
@@ -1323,8 +1268,6 @@ parse_args(const char **cpp, int *aflag, int *hflag, int *iflag, int *lflag,
1323 base = 8; 1268 base = 8;
1324 case I_CHOWN: 1269 case I_CHOWN:
1325 case I_CHGRP: 1270 case I_CHGRP:
1326 if ((optidx = parse_no_flags(cmd, argv, argc)) == -1)
1327 return -1;
1328 /* Get numeric arg (mandatory) */ 1271 /* Get numeric arg (mandatory) */
1329 if (argc - optidx < 1) 1272 if (argc - optidx < 1)
1330 goto need_num_arg; 1273 goto need_num_arg;
@@ -1355,8 +1298,6 @@ parse_args(const char **cpp, int *aflag, int *hflag, int *iflag, int *lflag,
1355 case I_HELP: 1298 case I_HELP:
1356 case I_VERSION: 1299 case I_VERSION:
1357 case I_PROGRESS: 1300 case I_PROGRESS:
1358 if ((optidx = parse_no_flags(cmd, argv, argc)) == -1)
1359 return -1;
1360 break; 1301 break;
1361 default: 1302 default:
1362 fatal("Command not implemented"); 1303 fatal("Command not implemented");
@@ -1410,13 +1351,12 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
1410 case I_RENAME: 1351 case I_RENAME:
1411 path1 = make_absolute(path1, *pwd); 1352 path1 = make_absolute(path1, *pwd);
1412 path2 = make_absolute(path2, *pwd); 1353 path2 = make_absolute(path2, *pwd);
1413 err = do_rename(conn, path1, path2, lflag); 1354 err = do_rename(conn, path1, path2);
1414 break; 1355 break;
1415 case I_SYMLINK: 1356 case I_SYMLINK:
1416 sflag = 1; 1357 sflag = 1;
1417 case I_LINK: 1358 case I_LINK:
1418 if (!sflag) 1359 path1 = make_absolute(path1, *pwd);
1419 path1 = make_absolute(path1, *pwd);
1420 path2 = make_absolute(path2, *pwd); 1360 path2 = make_absolute(path2, *pwd);
1421 err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2); 1361 err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2);
1422 break; 1362 break;
@@ -1627,7 +1567,7 @@ complete_display(char **list, u_int len)
1627 char *tmp; 1567 char *tmp;
1628 1568
1629 /* Count entries for sort and find longest */ 1569 /* Count entries for sort and find longest */
1630 for (y = 0; list[y]; y++) 1570 for (y = 0; list[y]; y++)
1631 m = MAX(m, strlen(list[y])); 1571 m = MAX(m, strlen(list[y]));
1632 1572
1633 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) 1573 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)
@@ -1672,8 +1612,8 @@ complete_ambiguous(const char *word, char **list, size_t count)
1672 for (y = 1; list[y]; y++) { 1612 for (y = 1; list[y]; y++) {
1673 u_int x; 1613 u_int x;
1674 1614
1675 for (x = 0; x < matchlen; x++) 1615 for (x = 0; x < matchlen; x++)
1676 if (list[0][x] != list[y][x]) 1616 if (list[0][x] != list[y][x])
1677 break; 1617 break;
1678 1618
1679 matchlen = x; 1619 matchlen = x;
@@ -1685,7 +1625,7 @@ complete_ambiguous(const char *word, char **list, size_t count)
1685 tmp[matchlen] = '\0'; 1625 tmp[matchlen] = '\0';
1686 return tmp; 1626 return tmp;
1687 } 1627 }
1688 } 1628 }
1689 1629
1690 return xstrdup(word); 1630 return xstrdup(word);
1691} 1631}
@@ -1705,12 +1645,12 @@ complete_cmd_parse(EditLine *el, char *cmd, int lastarg, char quote,
1705 if (cmd == NULL) { 1645 if (cmd == NULL) {
1706 for (y = 0; cmds[y].c; y++) 1646 for (y = 0; cmds[y].c; y++)
1707 list[count++] = xstrdup(cmds[y].c); 1647 list[count++] = xstrdup(cmds[y].c);
1708 1648
1709 list[count] = NULL; 1649 list[count] = NULL;
1710 complete_display(list, 0); 1650 complete_display(list, 0);
1711 1651
1712 for (y = 0; list[y] != NULL; y++) 1652 for (y = 0; list[y] != NULL; y++)
1713 free(list[y]); 1653 free(list[y]);
1714 free(list); 1654 free(list);
1715 return count; 1655 return count;
1716 } 1656 }
@@ -1718,7 +1658,7 @@ complete_cmd_parse(EditLine *el, char *cmd, int lastarg, char quote,
1718 /* Prepare subset of commands that start with "cmd" */ 1658 /* Prepare subset of commands that start with "cmd" */
1719 cmdlen = strlen(cmd); 1659 cmdlen = strlen(cmd);
1720 for (y = 0; cmds[y].c; y++) { 1660 for (y = 0; cmds[y].c; y++) {
1721 if (!strncasecmp(cmd, cmds[y].c, cmdlen)) 1661 if (!strncasecmp(cmd, cmds[y].c, cmdlen))
1722 list[count++] = xstrdup(cmds[y].c); 1662 list[count++] = xstrdup(cmds[y].c);
1723 } 1663 }
1724 list[count] = NULL; 1664 list[count] = NULL;
@@ -1733,8 +1673,8 @@ complete_cmd_parse(EditLine *el, char *cmd, int lastarg, char quote,
1733 if (count > 1) 1673 if (count > 1)
1734 complete_display(list, 0); 1674 complete_display(list, 0);
1735 1675
1736 for (y = 0; list[y]; y++) 1676 for (y = 0; list[y]; y++)
1737 free(list[y]); 1677 free(list[y]);
1738 free(list); 1678 free(list);
1739 1679
1740 if (tmp != NULL) { 1680 if (tmp != NULL) {
@@ -1774,7 +1714,7 @@ complete_is_remote(char *cmd) {
1774 return -1; 1714 return -1;
1775 1715
1776 for (i = 0; cmds[i].c; i++) { 1716 for (i = 0; cmds[i].c; i++) {
1777 if (!strncasecmp(cmd, cmds[i].c, strlen(cmds[i].c))) 1717 if (!strncasecmp(cmd, cmds[i].c, strlen(cmds[i].c)))
1778 return cmds[i].t; 1718 return cmds[i].t;
1779 } 1719 }
1780 1720
@@ -1791,7 +1731,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
1791 u_int i, hadglob, pwdlen, len, tmplen, filelen, cesc, isesc, isabs; 1731 u_int i, hadglob, pwdlen, len, tmplen, filelen, cesc, isesc, isabs;
1792 int clen; 1732 int clen;
1793 const LineInfo *lf; 1733 const LineInfo *lf;
1794 1734
1795 /* Glob from "file" location */ 1735 /* Glob from "file" location */
1796 if (file == NULL) 1736 if (file == NULL)
1797 tmp = xstrdup("*"); 1737 tmp = xstrdup("*");
@@ -1805,9 +1745,9 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
1805 if (remote != LOCAL) { 1745 if (remote != LOCAL) {
1806 tmp = make_absolute(tmp, remote_path); 1746 tmp = make_absolute(tmp, remote_path);
1807 remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g); 1747 remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
1808 } else 1748 } else
1809 glob(tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g); 1749 glob(tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
1810 1750
1811 /* Determine length of pwd so we can trim completion display */ 1751 /* Determine length of pwd so we can trim completion display */
1812 for (hadglob = tmplen = pwdlen = 0; tmp[tmplen] != 0; tmplen++) { 1752 for (hadglob = tmplen = pwdlen = 0; tmp[tmplen] != 0; tmplen++) {
1813 /* Terminate counting on first unescaped glob metacharacter */ 1753 /* Terminate counting on first unescaped glob metacharacter */
@@ -1823,7 +1763,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
1823 } 1763 }
1824 free(tmp); 1764 free(tmp);
1825 1765
1826 if (g.gl_matchc == 0) 1766 if (g.gl_matchc == 0)
1827 goto out; 1767 goto out;
1828 1768
1829 if (g.gl_matchc > 1) 1769 if (g.gl_matchc > 1)
@@ -1856,7 +1796,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
1856 1796
1857 if (tmplen > (filelen - cesc)) { 1797 if (tmplen > (filelen - cesc)) {
1858 tmp2 = tmp + filelen - cesc; 1798 tmp2 = tmp + filelen - cesc;
1859 len = strlen(tmp2); 1799 len = strlen(tmp2);
1860 /* quote argument on way out */ 1800 /* quote argument on way out */
1861 for (i = 0; i < len; i += clen) { 1801 for (i = 0; i < len; i += clen) {
1862 if ((clen = mblen(tmp2 + i, len - i)) < 0 || 1802 if ((clen = mblen(tmp2 + i, len - i)) < 0 ||
@@ -1912,7 +1852,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
1912static unsigned char 1852static unsigned char
1913complete(EditLine *el, int ch) 1853complete(EditLine *el, int ch)
1914{ 1854{
1915 char **argv, *line, quote; 1855 char **argv, *line, quote;
1916 int argc, carg; 1856 int argc, carg;
1917 u_int cursor, len, terminated, ret = CC_ERROR; 1857 u_int cursor, len, terminated, ret = CC_ERROR;
1918 const LineInfo *lf; 1858 const LineInfo *lf;
@@ -1951,7 +1891,7 @@ complete(EditLine *el, int ch)
1951 } else if (carg == 1 && cursor > 0 && line[cursor - 1] != ' ') { 1891 } else if (carg == 1 && cursor > 0 && line[cursor - 1] != ' ') {
1952 /* Handle the command parsing */ 1892 /* Handle the command parsing */
1953 if (complete_cmd_parse(el, argv[0], argc == carg, 1893 if (complete_cmd_parse(el, argv[0], argc == carg,
1954 quote, terminated) != 0) 1894 quote, terminated) != 0)
1955 ret = CC_REDISPLAY; 1895 ret = CC_REDISPLAY;
1956 } else if (carg >= 1) { 1896 } else if (carg >= 1) {
1957 /* Handle file parsing */ 1897 /* Handle file parsing */
@@ -1964,11 +1904,11 @@ complete(EditLine *el, int ch)
1964 if (remote != 0 && 1904 if (remote != 0 &&
1965 complete_match(el, complete_ctx->conn, 1905 complete_match(el, complete_ctx->conn,
1966 *complete_ctx->remote_pathp, filematch, 1906 *complete_ctx->remote_pathp, filematch,
1967 remote, carg == argc, quote, terminated) != 0) 1907 remote, carg == argc, quote, terminated) != 0)
1968 ret = CC_REDISPLAY; 1908 ret = CC_REDISPLAY;
1969 } 1909 }
1970 1910
1971 free(line); 1911 free(line);
1972 return ret; 1912 return ret;
1973} 1913}
1974#endif /* USE_LIBEDIT */ 1914#endif /* USE_LIBEDIT */
@@ -2002,17 +1942,12 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
2002 el_source(el, NULL); 1942 el_source(el, NULL);
2003 1943
2004 /* Tab Completion */ 1944 /* Tab Completion */
2005 el_set(el, EL_ADDFN, "ftp-complete", 1945 el_set(el, EL_ADDFN, "ftp-complete",
2006 "Context sensitive argument completion", complete); 1946 "Context sensitive argument completion", complete);
2007 complete_ctx.conn = conn; 1947 complete_ctx.conn = conn;
2008 complete_ctx.remote_pathp = &remote_path; 1948 complete_ctx.remote_pathp = &remote_path;
2009 el_set(el, EL_CLIENTDATA, (void*)&complete_ctx); 1949 el_set(el, EL_CLIENTDATA, (void*)&complete_ctx);
2010 el_set(el, EL_BIND, "^I", "ftp-complete", NULL); 1950 el_set(el, EL_BIND, "^I", "ftp-complete", NULL);
2011 /* enable ctrl-left-arrow and ctrl-right-arrow */
2012 el_set(el, EL_BIND, "\\e[1;5C", "em-next-word", NULL);
2013 el_set(el, EL_BIND, "\\e[5C", "em-next-word", NULL);
2014 el_set(el, EL_BIND, "\\e[1;5D", "ed-prev-word", NULL);
2015 el_set(el, EL_BIND, "\\e\\e[D", "ed-prev-word", NULL);
2016 } 1951 }
2017#endif /* USE_LIBEDIT */ 1952#endif /* USE_LIBEDIT */
2018 1953
@@ -2181,7 +2116,7 @@ usage(void)
2181 extern char *__progname; 2116 extern char *__progname;
2182 2117
2183 fprintf(stderr, 2118 fprintf(stderr,
2184 "usage: %s [-1246aCpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n" 2119 "usage: %s [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n"
2185 " [-D sftp_server_path] [-F ssh_config] " 2120 " [-D sftp_server_path] [-F ssh_config] "
2186 "[-i identity_file] [-l limit]\n" 2121 "[-i identity_file] [-l limit]\n"
2187 " [-o ssh_option] [-P port] [-R num_requests] " 2122 " [-o ssh_option] [-P port] [-R num_requests] "
diff --git a/ssh-add.0 b/ssh-add.0
new file mode 100644
index 000000000..bcd1e7322
--- /dev/null
+++ b/ssh-add.0
@@ -0,0 +1,119 @@
1SSH-ADD(1) OpenBSD Reference Manual SSH-ADD(1)
2
3NAME
4 ssh-add - adds private key identities to the authentication agent
5
6SYNOPSIS
7 ssh-add [-cDdkLlXx] [-t life] [file ...]
8 ssh-add -s pkcs11
9 ssh-add -e pkcs11
10
11DESCRIPTION
12 ssh-add adds private key identities to the authentication agent,
13 ssh-agent(1). When run without arguments, it adds the files
14 ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/identity. After
15 loading a private key, ssh-add will try to load corresponding certificate
16 information from the filename obtained by appending -cert.pub to the name
17 of the private key file. Alternative file names can be given on the
18 command line.
19
20 If any file requires a passphrase, ssh-add asks for the passphrase from
21 the user. The passphrase is read from the user's tty. ssh-add retries
22 the last passphrase if multiple identity files are given.
23
24 The authentication agent must be running and the SSH_AUTH_SOCK
25 environment variable must contain the name of its socket for ssh-add to
26 work.
27
28 The options are as follows:
29
30 -c Indicates that added identities should be subject to confirmation
31 before being used for authentication. Confirmation is performed
32 by the SSH_ASKPASS program mentioned below. Successful
33 confirmation is signaled by a zero exit status from the
34 SSH_ASKPASS program, rather than text entered into the requester.
35
36 -D Deletes all identities from the agent.
37
38 -d Instead of adding identities, removes identities from the agent.
39 If ssh-add has been run without arguments, the keys for the
40 default identities and their corresponding certificates will be
41 removed. Otherwise, the argument list will be interpreted as a
42 list of paths to public key files to specify keys and
43 certificates to be removed from the agent. If no public key is
44 found at a given path, ssh-add will append .pub and retry.
45
46 -e pkcs11
47 Remove keys provided by the PKCS#11 shared library pkcs11.
48
49 -k When loading keys into or deleting keys from the agent, process
50 plain private keys only and skip certificates.
51
52 -L Lists public key parameters of all identities currently
53 represented by the agent.
54
55 -l Lists fingerprints of all identities currently represented by the
56 agent.
57
58 -s pkcs11
59 Add keys provided by the PKCS#11 shared library pkcs11.
60
61 -t life
62 Set a maximum lifetime when adding identities to an agent. The
63 lifetime may be specified in seconds or in a time format
64 specified in sshd_config(5).
65
66 -X Unlock the agent.
67
68 -x Lock the agent with a password.
69
70ENVIRONMENT
71 DISPLAY and SSH_ASKPASS
72 If ssh-add needs a passphrase, it will read the passphrase from
73 the current terminal if it was run from a terminal. If ssh-add
74 does not have a terminal associated with it but DISPLAY and
75 SSH_ASKPASS are set, it will execute the program specified by
76 SSH_ASKPASS and open an X11 window to read the passphrase. This
77 is particularly useful when calling ssh-add from a .xsession or
78 related script. (Note that on some machines it may be necessary
79 to redirect the input from /dev/null to make this work.)
80
81 SSH_AUTH_SOCK
82 Identifies the path of a UNIX-domain socket used to communicate
83 with the agent.
84
85FILES
86 ~/.ssh/identity
87 Contains the protocol version 1 RSA authentication identity of
88 the user.
89
90 ~/.ssh/id_dsa
91 Contains the protocol version 2 DSA authentication identity of
92 the user.
93
94 ~/.ssh/id_ecdsa
95 Contains the protocol version 2 ECDSA authentication identity of
96 the user.
97
98 ~/.ssh/id_rsa
99 Contains the protocol version 2 RSA authentication identity of
100 the user.
101
102 Identity files should not be readable by anyone but the user. Note that
103 ssh-add ignores identity files if they are accessible by others.
104
105EXIT STATUS
106 Exit status is 0 on success, 1 if the specified command fails, and 2 if
107 ssh-add is unable to contact the authentication agent.
108
109SEE ALSO
110 ssh(1), ssh-agent(1), ssh-keygen(1), sshd(8)
111
112AUTHORS
113 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
114 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
115 de Raadt and Dug Song removed many bugs, re-added newer features and
116 created OpenSSH. Markus Friedl contributed the support for SSH protocol
117 versions 1.5 and 2.0.
118
119OpenBSD 5.4 December 3, 2012 OpenBSD 5.4
diff --git a/ssh-agent.0 b/ssh-agent.0
new file mode 100644
index 000000000..e5f0f7342
--- /dev/null
+++ b/ssh-agent.0
@@ -0,0 +1,123 @@
1SSH-AGENT(1) OpenBSD Reference Manual SSH-AGENT(1)
2
3NAME
4 ssh-agent - authentication agent
5
6SYNOPSIS
7 ssh-agent [-c | -s] [-d] [-a bind_address] [-t life] [command [arg ...]]
8 ssh-agent [-c | -s] -k
9
10DESCRIPTION
11 ssh-agent is a program to hold private keys used for public key
12 authentication (RSA, DSA, ECDSA). The idea is that ssh-agent is started
13 in the beginning of an X-session or a login session, and all other
14 windows or programs are started as clients to the ssh-agent program.
15 Through use of environment variables the agent can be located and
16 automatically used for authentication when logging in to other machines
17 using ssh(1).
18
19 The options are as follows:
20
21 -a bind_address
22 Bind the agent to the UNIX-domain socket bind_address. The
23 default is $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>.
24
25 -c Generate C-shell commands on stdout. This is the default if
26 SHELL looks like it's a csh style of shell.
27
28 -d Debug mode. When this option is specified ssh-agent will not
29 fork.
30
31 -k Kill the current agent (given by the SSH_AGENT_PID environment
32 variable).
33
34 -s Generate Bourne shell commands on stdout. This is the default if
35 SHELL does not look like it's a csh style of shell.
36
37 -t life
38 Set a default value for the maximum lifetime of identities added
39 to the agent. The lifetime may be specified in seconds or in a
40 time format specified in sshd_config(5). A lifetime specified
41 for an identity with ssh-add(1) overrides this value. Without
42 this option the default maximum lifetime is forever.
43
44 If a commandline is given, this is executed as a subprocess of the agent.
45 When the command dies, so does the agent.
46
47 The agent initially does not have any private keys. Keys are added using
48 ssh-add(1). When executed without arguments, ssh-add(1) adds the files
49 ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/identity. If
50 the identity has a passphrase, ssh-add(1) asks for the passphrase on the
51 terminal if it has one or from a small X11 program if running under X11.
52 If neither of these is the case then the authentication will fail. It
53 then sends the identity to the agent. Several identities can be stored
54 in the agent; the agent can automatically use any of these identities.
55 ssh-add -l displays the identities currently held by the agent.
56
57 The idea is that the agent is run in the user's local PC, laptop, or
58 terminal. Authentication data need not be stored on any other machine,
59 and authentication passphrases never go over the network. However, the
60 connection to the agent is forwarded over SSH remote logins, and the user
61 can thus use the privileges given by the identities anywhere in the
62 network in a secure way.
63
64 There are two main ways to get an agent set up: The first is that the
65 agent starts a new subcommand into which some environment variables are
66 exported, eg ssh-agent xterm &. The second is that the agent prints the
67 needed shell commands (either sh(1) or csh(1) syntax can be generated)
68 which can be evaluated in the calling shell, eg eval `ssh-agent -s` for
69 Bourne-type shells such as sh(1) or ksh(1) and eval `ssh-agent -c` for
70 csh(1) and derivatives.
71
72 Later ssh(1) looks at these variables and uses them to establish a
73 connection to the agent.
74
75 The agent will never send a private key over its request channel.
76 Instead, operations that require a private key will be performed by the
77 agent, and the result will be returned to the requester. This way,
78 private keys are not exposed to clients using the agent.
79
80 A UNIX-domain socket is created and the name of this socket is stored in
81 the SSH_AUTH_SOCK environment variable. The socket is made accessible
82 only to the current user. This method is easily abused by root or
83 another instance of the same user.
84
85 The SSH_AGENT_PID environment variable holds the agent's process ID.
86
87 The agent exits automatically when the command given on the command line
88 terminates.
89
90FILES
91 ~/.ssh/identity
92 Contains the protocol version 1 RSA authentication identity of
93 the user.
94
95 ~/.ssh/id_dsa
96 Contains the protocol version 2 DSA authentication identity of
97 the user.
98
99 ~/.ssh/id_ecdsa
100 Contains the protocol version 2 ECDSA authentication identity of
101 the user.
102
103 ~/.ssh/id_rsa
104 Contains the protocol version 2 RSA authentication identity of
105 the user.
106
107 $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>
108 UNIX-domain sockets used to contain the connection to the
109 authentication agent. These sockets should only be readable by
110 the owner. The sockets should get automatically removed when the
111 agent exits.
112
113SEE ALSO
114 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
115
116AUTHORS
117 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
118 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
119 de Raadt and Dug Song removed many bugs, re-added newer features and
120 created OpenSSH. Markus Friedl contributed the support for SSH protocol
121 versions 1.5 and 2.0.
122
123OpenBSD 5.4 November 21, 2010 OpenBSD 5.4
diff --git a/ssh-keygen.0 b/ssh-keygen.0
new file mode 100644
index 000000000..2b0e9a692
--- /dev/null
+++ b/ssh-keygen.0
@@ -0,0 +1,546 @@
1SSH-KEYGEN(1) OpenBSD Reference Manual SSH-KEYGEN(1)
2
3NAME
4 ssh-keygen - authentication key generation, management and conversion
5
6SYNOPSIS
7 ssh-keygen [-q] [-b bits] -t type [-N new_passphrase] [-C comment]
8 [-f output_keyfile]
9 ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
10 ssh-keygen -i [-m key_format] [-f input_keyfile]
11 ssh-keygen -e [-m key_format] [-f input_keyfile]
12 ssh-keygen -y [-f input_keyfile]
13 ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
14 ssh-keygen -l [-f input_keyfile]
15 ssh-keygen -B [-f input_keyfile]
16 ssh-keygen -D pkcs11
17 ssh-keygen -F hostname [-f known_hosts_file] [-l]
18 ssh-keygen -H [-f known_hosts_file]
19 ssh-keygen -R hostname [-f known_hosts_file]
20 ssh-keygen -r hostname [-f input_keyfile] [-g]
21 ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]
22 ssh-keygen -T output_file -f input_file [-v] [-a num_trials]
23 [-J num_lines] [-j start_line] [-K checkpt] [-W generator]
24 ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals]
25 [-O option] [-V validity_interval] [-z serial_number] file ...
26 ssh-keygen -L [-f input_keyfile]
27 ssh-keygen -A
28 ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number]
29 file ...
30 ssh-keygen -Q -f krl_file file ...
31
32DESCRIPTION
33 ssh-keygen generates, manages and converts authentication keys for
34 ssh(1). ssh-keygen can create RSA keys for use by SSH protocol version 1
35 and DSA, ECDSA or RSA keys for use by SSH protocol version 2. The type
36 of key to be generated is specified with the -t option. If invoked
37 without any arguments, ssh-keygen will generate an RSA key for use in SSH
38 protocol 2 connections.
39
40 ssh-keygen is also used to generate groups for use in Diffie-Hellman
41 group exchange (DH-GEX). See the MODULI GENERATION section for details.
42
43 Finally, ssh-keygen can be used to generate and update Key Revocation
44 Lists, and to test whether given keys have been revoked by one. See the
45 KEY REVOCATION LISTS section for details.
46
47 Normally each user wishing to use SSH with public key authentication runs
48 this once to create the authentication key in ~/.ssh/identity,
49 ~/.ssh/id_ecdsa, ~/.ssh/id_dsa or ~/.ssh/id_rsa. Additionally, the
50 system administrator may use this to generate host keys, as seen in
51 /etc/rc.
52
53 Normally this program generates the key and asks for a file in which to
54 store the private key. The public key is stored in a file with the same
55 name but ``.pub'' appended. The program also asks for a passphrase. The
56 passphrase may be empty to indicate no passphrase (host keys must have an
57 empty passphrase), or it may be a string of arbitrary length. A
58 passphrase is similar to a password, except it can be a phrase with a
59 series of words, punctuation, numbers, whitespace, or any string of
60 characters you want. Good passphrases are 10-30 characters long, are not
61 simple sentences or otherwise easily guessable (English prose has only
62 1-2 bits of entropy per character, and provides very bad passphrases),
63 and contain a mix of upper and lowercase letters, numbers, and non-
64 alphanumeric characters. The passphrase can be changed later by using
65 the -p option.
66
67 There is no way to recover a lost passphrase. If the passphrase is lost
68 or forgotten, a new key must be generated and the corresponding public
69 key copied to other machines.
70
71 For RSA1 keys, there is also a comment field in the key file that is only
72 for convenience to the user to help identify the key. The comment can
73 tell what the key is for, or whatever is useful. The comment is
74 initialized to ``user@host'' when the key is created, but can be changed
75 using the -c option.
76
77 After a key is generated, instructions below detail where the keys should
78 be placed to be activated.
79
80 The options are as follows:
81
82 -A For each of the key types (rsa1, rsa, dsa and ecdsa) for which
83 host keys do not exist, generate the host keys with the default
84 key file path, an empty passphrase, default bits for the key
85 type, and default comment. This is used by /etc/rc to generate
86 new host keys.
87
88 -a trials
89 Specifies the number of primality tests to perform when screening
90 DH-GEX candidates using the -T command.
91
92 -B Show the bubblebabble digest of specified private or public key
93 file.
94
95 -b bits
96 Specifies the number of bits in the key to create. For RSA keys,
97 the minimum size is 768 bits and the default is 2048 bits.
98 Generally, 2048 bits is considered sufficient. DSA keys must be
99 exactly 1024 bits as specified by FIPS 186-2. For ECDSA keys,
100 the -b flag determines the key length by selecting from one of
101 three elliptic curve sizes: 256, 384 or 521 bits. Attempting to
102 use bit lengths other than these three values for ECDSA keys will
103 fail.
104
105 -C comment
106 Provides a new comment.
107
108 -c Requests changing the comment in the private and public key
109 files. This operation is only supported for RSA1 keys. The
110 program will prompt for the file containing the private keys, for
111 the passphrase if the key has one, and for the new comment.
112
113 -D pkcs11
114 Download the RSA public keys provided by the PKCS#11 shared
115 library pkcs11. When used in combination with -s, this option
116 indicates that a CA key resides in a PKCS#11 token (see the
117 CERTIFICATES section for details).
118
119 -e This option will read a private or public OpenSSH key file and
120 print to stdout the key in one of the formats specified by the -m
121 option. The default export format is ``RFC4716''. This option
122 allows exporting OpenSSH keys for use by other programs,
123 including several commercial SSH implementations.
124
125 -F hostname
126 Search for the specified hostname in a known_hosts file, listing
127 any occurrences found. This option is useful to find hashed host
128 names or addresses and may also be used in conjunction with the
129 -H option to print found keys in a hashed format.
130
131 -f filename
132 Specifies the filename of the key file.
133
134 -G output_file
135 Generate candidate primes for DH-GEX. These primes must be
136 screened for safety (using the -T option) before use.
137
138 -g Use generic DNS format when printing fingerprint resource records
139 using the -r command.
140
141 -H Hash a known_hosts file. This replaces all hostnames and
142 addresses with hashed representations within the specified file;
143 the original content is moved to a file with a .old suffix.
144 These hashes may be used normally by ssh and sshd, but they do
145 not reveal identifying information should the file's contents be
146 disclosed. This option will not modify existing hashed hostnames
147 and is therefore safe to use on files that mix hashed and non-
148 hashed names.
149
150 -h When signing a key, create a host certificate instead of a user
151 certificate. Please see the CERTIFICATES section for details.
152
153 -I certificate_identity
154 Specify the key identity when signing a public key. Please see
155 the CERTIFICATES section for details.
156
157 -i This option will read an unencrypted private (or public) key file
158 in the format specified by the -m option and print an OpenSSH
159 compatible private (or public) key to stdout.
160
161 -J num_lines
162 Exit after screening the specified number of lines while
163 performing DH candidate screening using the -T option.
164
165 -j start_line
166 Start screening at the specified line number while performing DH
167 candidate screening using the -T option.
168
169 -K checkpt
170 Write the last line processed to the file checkpt while
171 performing DH candidate screening using the -T option. This will
172 be used to skip lines in the input file that have already been
173 processed if the job is restarted. This option allows importing
174 keys from other software, including several commercial SSH
175 implementations. The default import format is ``RFC4716''.
176
177 -k Generate a KRL file. In this mode, ssh-keygen will generate a
178 KRL file at the location specified via the -f flag that revokes
179 every key or certificate presented on the command line.
180 Keys/certificates to be revoked may be specified by public key
181 file or using the format described in the KEY REVOCATION LISTS
182 section.
183
184 -L Prints the contents of a certificate.
185
186 -l Show fingerprint of specified public key file. Private RSA1 keys
187 are also supported. For RSA and DSA keys ssh-keygen tries to
188 find the matching public key file and prints its fingerprint. If
189 combined with -v, an ASCII art representation of the key is
190 supplied with the fingerprint.
191
192 -M memory
193 Specify the amount of memory to use (in megabytes) when
194 generating candidate moduli for DH-GEX.
195
196 -m key_format
197 Specify a key format for the -i (import) or -e (export)
198 conversion options. The supported key formats are: ``RFC4716''
199 (RFC 4716/SSH2 public or private key), ``PKCS8'' (PEM PKCS8
200 public key) or ``PEM'' (PEM public key). The default conversion
201 format is ``RFC4716''.
202
203 -N new_passphrase
204 Provides the new passphrase.
205
206 -n principals
207 Specify one or more principals (user or host names) to be
208 included in a certificate when signing a key. Multiple
209 principals may be specified, separated by commas. Please see the
210 CERTIFICATES section for details.
211
212 -O option
213 Specify a certificate option when signing a key. This option may
214 be specified multiple times. Please see the CERTIFICATES section
215 for details. The options that are valid for user certificates
216 are:
217
218 clear Clear all enabled permissions. This is useful for
219 clearing the default set of permissions so permissions
220 may be added individually.
221
222 force-command=command
223 Forces the execution of command instead of any shell or
224 command specified by the user when the certificate is
225 used for authentication.
226
227 no-agent-forwarding
228 Disable ssh-agent(1) forwarding (permitted by default).
229
230 no-port-forwarding
231 Disable port forwarding (permitted by default).
232
233 no-pty Disable PTY allocation (permitted by default).
234
235 no-user-rc
236 Disable execution of ~/.ssh/rc by sshd(8) (permitted by
237 default).
238
239 no-x11-forwarding
240 Disable X11 forwarding (permitted by default).
241
242 permit-agent-forwarding
243 Allows ssh-agent(1) forwarding.
244
245 permit-port-forwarding
246 Allows port forwarding.
247
248 permit-pty
249 Allows PTY allocation.
250
251 permit-user-rc
252 Allows execution of ~/.ssh/rc by sshd(8).
253
254 permit-x11-forwarding
255 Allows X11 forwarding.
256
257 source-address=address_list
258 Restrict the source addresses from which the certificate
259 is considered valid. The address_list is a comma-
260 separated list of one or more address/netmask pairs in
261 CIDR format.
262
263 At present, no options are valid for host keys.
264
265 -P passphrase
266 Provides the (old) passphrase.
267
268 -p Requests changing the passphrase of a private key file instead of
269 creating a new private key. The program will prompt for the file
270 containing the private key, for the old passphrase, and twice for
271 the new passphrase.
272
273 -Q Test whether keys have been revoked in a KRL.
274
275 -q Silence ssh-keygen.
276
277 -R hostname
278 Removes all keys belonging to hostname from a known_hosts file.
279 This option is useful to delete hashed hosts (see the -H option
280 above).
281
282 -r hostname
283 Print the SSHFP fingerprint resource record named hostname for
284 the specified public key file.
285
286 -S start
287 Specify start point (in hex) when generating candidate moduli for
288 DH-GEX.
289
290 -s ca_key
291 Certify (sign) a public key using the specified CA key. Please
292 see the CERTIFICATES section for details.
293
294 When generating a KRL, -s specifies a path to a CA public key
295 file used to revoke certificates directly by key ID or serial
296 number. See the KEY REVOCATION LISTS section for details.
297
298 -T output_file
299 Test DH group exchange candidate primes (generated using the -G
300 option) for safety.
301
302 -t type
303 Specifies the type of key to create. The possible values are
304 ``rsa1'' for protocol version 1 and ``dsa'', ``ecdsa'' or ``rsa''
305 for protocol version 2.
306
307 -u Update a KRL. When specified with -k, keys listed via the
308 command line are added to the existing KRL rather than a new KRL
309 being created.
310
311 -V validity_interval
312 Specify a validity interval when signing a certificate. A
313 validity interval may consist of a single time, indicating that
314 the certificate is valid beginning now and expiring at that time,
315 or may consist of two times separated by a colon to indicate an
316 explicit time interval. The start time may be specified as a
317 date in YYYYMMDD format, a time in YYYYMMDDHHMMSS format or a
318 relative time (to the current time) consisting of a minus sign
319 followed by a relative time in the format described in the TIME
320 FORMATS section of sshd_config(5). The end time may be specified
321 as a YYYYMMDD date, a YYYYMMDDHHMMSS time or a relative time
322 starting with a plus character.
323
324 For example: ``+52w1d'' (valid from now to 52 weeks and one day
325 from now), ``-4w:+4w'' (valid from four weeks ago to four weeks
326 from now), ``20100101123000:20110101123000'' (valid from 12:30
327 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011),
328 ``-1d:20110101'' (valid from yesterday to midnight, January 1st,
329 2011).
330
331 -v Verbose mode. Causes ssh-keygen to print debugging messages
332 about its progress. This is helpful for debugging moduli
333 generation. Multiple -v options increase the verbosity. The
334 maximum is 3.
335
336 -W generator
337 Specify desired generator when testing candidate moduli for DH-
338 GEX.
339
340 -y This option will read a private OpenSSH format file and print an
341 OpenSSH public key to stdout.
342
343 -z serial_number
344 Specifies a serial number to be embedded in the certificate to
345 distinguish this certificate from others from the same CA. The
346 default serial number is zero.
347
348 When generating a KRL, the -z flag is used to specify a KRL
349 version number.
350
351MODULI GENERATION
352 ssh-keygen may be used to generate groups for the Diffie-Hellman Group
353 Exchange (DH-GEX) protocol. Generating these groups is a two-step
354 process: first, candidate primes are generated using a fast, but memory
355 intensive process. These candidate primes are then tested for
356 suitability (a CPU-intensive process).
357
358 Generation of primes is performed using the -G option. The desired
359 length of the primes may be specified by the -b option. For example:
360
361 # ssh-keygen -G moduli-2048.candidates -b 2048
362
363 By default, the search for primes begins at a random point in the desired
364 length range. This may be overridden using the -S option, which
365 specifies a different start point (in hex).
366
367 Once a set of candidates have been generated, they must be screened for
368 suitability. This may be performed using the -T option. In this mode
369 ssh-keygen will read candidates from standard input (or a file specified
370 using the -f option). For example:
371
372 # ssh-keygen -T moduli-2048 -f moduli-2048.candidates
373
374 By default, each candidate will be subjected to 100 primality tests.
375 This may be overridden using the -a option. The DH generator value will
376 be chosen automatically for the prime under consideration. If a specific
377 generator is desired, it may be requested using the -W option. Valid
378 generator values are 2, 3, and 5.
379
380 Screened DH groups may be installed in /etc/moduli. It is important that
381 this file contains moduli of a range of bit lengths and that both ends of
382 a connection share common moduli.
383
384CERTIFICATES
385 ssh-keygen supports signing of keys to produce certificates that may be
386 used for user or host authentication. Certificates consist of a public
387 key, some identity information, zero or more principal (user or host)
388 names and a set of options that are signed by a Certification Authority
389 (CA) key. Clients or servers may then trust only the CA key and verify
390 its signature on a certificate rather than trusting many user/host keys.
391 Note that OpenSSH certificates are a different, and much simpler, format
392 to the X.509 certificates used in ssl(8).
393
394 ssh-keygen supports two types of certificates: user and host. User
395 certificates authenticate users to servers, whereas host certificates
396 authenticate server hosts to users. To generate a user certificate:
397
398 $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub
399
400 The resultant certificate will be placed in /path/to/user_key-cert.pub.
401 A host certificate requires the -h option:
402
403 $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub
404
405 The host certificate will be output to /path/to/host_key-cert.pub.
406
407 It is possible to sign using a CA key stored in a PKCS#11 token by
408 providing the token library using -D and identifying the CA key by
409 providing its public half as an argument to -s:
410
411 $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id host_key.pub
412
413 In all cases, key_id is a "key identifier" that is logged by the server
414 when the certificate is used for authentication.
415
416 Certificates may be limited to be valid for a set of principal
417 (user/host) names. By default, generated certificates are valid for all
418 users or hosts. To generate a certificate for a specified set of
419 principals:
420
421 $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
422 $ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub
423
424 Additional limitations on the validity and use of user certificates may
425 be specified through certificate options. A certificate option may
426 disable features of the SSH session, may be valid only when presented
427 from particular source addresses or may force the use of a specific
428 command. For a list of valid certificate options, see the documentation
429 for the -O option above.
430
431 Finally, certificates may be defined with a validity lifetime. The -V
432 option allows specification of certificate start and end times. A
433 certificate that is presented at a time outside this range will not be
434 considered valid. By default, certificates are valid from UNIX Epoch to
435 the distant future.
436
437 For certificates to be used for user or host authentication, the CA
438 public key must be trusted by sshd(8) or ssh(1). Please refer to those
439 manual pages for details.
440
441KEY REVOCATION LISTS
442 ssh-keygen is able to manage OpenSSH format Key Revocation Lists (KRLs).
443 These binary files specify keys or certificates to be revoked using a
444 compact format, taking as little a one bit per certificate if they are
445 being revoked by serial number.
446
447 KRLs may be generated using the -k flag. This option reads one or more
448 files from the command line and generates a new KRL. The files may
449 either contain a KRL specification (see below) or public keys, listed one
450 per line. Plain public keys are revoked by listing their hash or
451 contents in the KRL and certificates revoked by serial number or key ID
452 (if the serial is zero or not available).
453
454 Revoking keys using a KRL specification offers explicit control over the
455 types of record used to revoke keys and may be used to directly revoke
456 certificates by serial number or key ID without having the complete
457 original certificate on hand. A KRL specification consists of lines
458 containing one of the following directives followed by a colon and some
459 directive-specific information.
460
461 serial: serial_number[-serial_number]
462 Revokes a certificate with the specified serial number. Serial
463 numbers are 64-bit values, not including zero and may be
464 expressed in decimal, hex or octal. If two serial numbers are
465 specified separated by a hyphen, then the range of serial numbers
466 including and between each is revoked. The CA key must have been
467 specified on the ssh-keygen command line using the -s option.
468
469 id: key_id
470 Revokes a certificate with the specified key ID string. The CA
471 key must have been specified on the ssh-keygen command line using
472 the -s option.
473
474 key: public_key
475 Revokes the specified key. If a certificate is listed, then it
476 is revoked as a plain public key.
477
478 sha1: public_key
479 Revokes the specified key by its SHA1 hash.
480
481 KRLs may be updated using the -u flag in addition to -k. When this
482 option is specified, keys listed via the command line are merged into the
483 KRL, adding to those already there.
484
485 It is also possible, given a KRL, to test whether it revokes a particular
486 key (or keys). The -Q flag will query an existing KRL, testing each key
487 specified on the commandline. If any key listed on the command line has
488 been revoked (or an error encountered) then ssh-keygen will exit with a
489 non-zero exit status. A zero exit status will only be returned if no key
490 was revoked.
491
492FILES
493 ~/.ssh/identity
494 Contains the protocol version 1 RSA authentication identity of
495 the user. This file should not be readable by anyone but the
496 user. It is possible to specify a passphrase when generating the
497 key; that passphrase will be used to encrypt the private part of
498 this file using 3DES. This file is not automatically accessed by
499 ssh-keygen but it is offered as the default file for the private
500 key. ssh(1) will read this file when a login attempt is made.
501
502 ~/.ssh/identity.pub
503 Contains the protocol version 1 RSA public key for
504 authentication. The contents of this file should be added to
505 ~/.ssh/authorized_keys on all machines where the user wishes to
506 log in using RSA authentication. There is no need to keep the
507 contents of this file secret.
508
509 ~/.ssh/id_dsa
510 ~/.ssh/id_ecdsa
511 ~/.ssh/id_rsa
512 Contains the protocol version 2 DSA, ECDSA or RSA authentication
513 identity of the user. This file should not be readable by anyone
514 but the user. It is possible to specify a passphrase when
515 generating the key; that passphrase will be used to encrypt the
516 private part of this file using 128-bit AES. This file is not
517 automatically accessed by ssh-keygen but it is offered as the
518 default file for the private key. ssh(1) will read this file
519 when a login attempt is made.
520
521 ~/.ssh/id_dsa.pub
522 ~/.ssh/id_ecdsa.pub
523 ~/.ssh/id_rsa.pub
524 Contains the protocol version 2 DSA, ECDSA or RSA public key for
525 authentication. The contents of this file should be added to
526 ~/.ssh/authorized_keys on all machines where the user wishes to
527 log in using public key authentication. There is no need to keep
528 the contents of this file secret.
529
530 /etc/moduli
531 Contains Diffie-Hellman groups used for DH-GEX. The file format
532 is described in moduli(5).
533
534SEE ALSO
535 ssh(1), ssh-add(1), ssh-agent(1), moduli(5), sshd(8)
536
537 The Secure Shell (SSH) Public Key File Format, RFC 4716, 2006.
538
539AUTHORS
540 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
541 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
542 de Raadt and Dug Song removed many bugs, re-added newer features and
543 created OpenSSH. Markus Friedl contributed the support for SSH protocol
544 versions 1.5 and 2.0.
545
546OpenBSD 5.4 June 27, 2013 OpenBSD 5.4
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 6ee8145af..03c444d42 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.232 2013/08/13 18:33:08 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.230 2013/07/20 01:44:37 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
@@ -1963,7 +1963,7 @@ update_krl_from_file(struct passwd *pw, const char *file, const Key *ca,
1963 continue; 1963 continue;
1964 if (strncasecmp(cp, "serial:", 7) == 0) { 1964 if (strncasecmp(cp, "serial:", 7) == 0) {
1965 if (ca == NULL) { 1965 if (ca == NULL) {
1966 fatal("revoking certificates by serial number " 1966 fatal("revoking certificated by serial number "
1967 "requires specification of a CA key"); 1967 "requires specification of a CA key");
1968 } 1968 }
1969 cp += 7; 1969 cp += 7;
@@ -2000,7 +2000,7 @@ update_krl_from_file(struct passwd *pw, const char *file, const Key *ca,
2000 } 2000 }
2001 } else if (strncasecmp(cp, "id:", 3) == 0) { 2001 } else if (strncasecmp(cp, "id:", 3) == 0) {
2002 if (ca == NULL) { 2002 if (ca == NULL) {
2003 fatal("revoking certificates by key ID " 2003 fatal("revoking certificated by key ID "
2004 "requires specification of a CA key"); 2004 "requires specification of a CA key");
2005 } 2005 }
2006 cp += 3; 2006 cp += 3;
diff --git a/ssh-keyscan.0 b/ssh-keyscan.0
new file mode 100644
index 000000000..3ea99c320
--- /dev/null
+++ b/ssh-keyscan.0
@@ -0,0 +1,109 @@
1SSH-KEYSCAN(1) OpenBSD Reference Manual SSH-KEYSCAN(1)
2
3NAME
4 ssh-keyscan - gather ssh public keys
5
6SYNOPSIS
7 ssh-keyscan [-46Hv] [-f file] [-p port] [-T timeout] [-t type]
8 [host | addrlist namelist] ...
9
10DESCRIPTION
11 ssh-keyscan is a utility for gathering the public ssh host keys of a
12 number of hosts. It was designed to aid in building and verifying
13 ssh_known_hosts files. ssh-keyscan provides a minimal interface suitable
14 for use by shell and perl scripts.
15
16 ssh-keyscan uses non-blocking socket I/O to contact as many hosts as
17 possible in parallel, so it is very efficient. The keys from a domain of
18 1,000 hosts can be collected in tens of seconds, even when some of those
19 hosts are down or do not run ssh. For scanning, one does not need login
20 access to the machines that are being scanned, nor does the scanning
21 process involve any encryption.
22
23 The options are as follows:
24
25 -4 Forces ssh-keyscan to use IPv4 addresses only.
26
27 -6 Forces ssh-keyscan to use IPv6 addresses only.
28
29 -f file
30 Read hosts or addrlist namelist pairs from this file, one per
31 line. If - is supplied instead of a filename, ssh-keyscan will
32 read hosts or addrlist namelist pairs from the standard input.
33
34 -H Hash all hostnames and addresses in the output. Hashed names may
35 be used normally by ssh and sshd, but they do not reveal
36 identifying information should the file's contents be disclosed.
37
38 -p port
39 Port to connect to on the remote host.
40
41 -T timeout
42 Set the timeout for connection attempts. If timeout seconds have
43 elapsed since a connection was initiated to a host or since the
44 last time anything was read from that host, then the connection
45 is closed and the host in question considered unavailable.
46 Default is 5 seconds.
47
48 -t type
49 Specifies the type of the key to fetch from the scanned hosts.
50 The possible values are ``rsa1'' for protocol version 1 and
51 ``dsa'', ``ecdsa'' or ``rsa'' for protocol version 2. Multiple
52 values may be specified by separating them with commas. The
53 default is to fetch ``rsa'' and ``ecdsa'' keys.
54
55 -v Verbose mode. Causes ssh-keyscan to print debugging messages
56 about its progress.
57
58SECURITY
59 If an ssh_known_hosts file is constructed using ssh-keyscan without
60 verifying the keys, users will be vulnerable to man in the middle
61 attacks. On the other hand, if the security model allows such a risk,
62 ssh-keyscan can help in the detection of tampered keyfiles or man in the
63 middle attacks which have begun after the ssh_known_hosts file was
64 created.
65
66FILES
67 Input format:
68
69 1.2.3.4,1.2.4.4 name.my.domain,name,n.my.domain,n,1.2.3.4,1.2.4.4
70
71 Output format for rsa1 keys:
72
73 host-or-namelist bits exponent modulus
74
75 Output format for rsa, dsa and ecdsa keys:
76
77 host-or-namelist keytype base64-encoded-key
78
79 Where keytype is either ``ecdsa-sha2-nistp256'', ``ecdsa-sha2-nistp384'',
80 ``ecdsa-sha2-nistp521'', ``ssh-dss'' or ``ssh-rsa''.
81
82 /etc/ssh/ssh_known_hosts
83
84EXAMPLES
85 Print the rsa host key for machine hostname:
86
87 $ ssh-keyscan hostname
88
89 Find all hosts from the file ssh_hosts which have new or different keys
90 from those in the sorted file ssh_known_hosts:
91
92 $ ssh-keyscan -t rsa,dsa,ecdsa -f ssh_hosts | \
93 sort -u - ssh_known_hosts | diff ssh_known_hosts -
94
95SEE ALSO
96 ssh(1), sshd(8)
97
98AUTHORS
99 David Mazieres <dm@lcs.mit.edu> wrote the initial version, and Wayne
100 Davison <wayned@users.sourceforge.net> added support for protocol version
101 2.
102
103BUGS
104 It generates "Connection closed by remote host" messages on the consoles
105 of all the machines it scans if the server is older than version 2.9.
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.
108
109OpenBSD 5.4 July 16, 2013 OpenBSD 5.4
diff --git a/ssh-keysign.0 b/ssh-keysign.0
new file mode 100644
index 000000000..808828a07
--- /dev/null
+++ b/ssh-keysign.0
@@ -0,0 +1,51 @@
1SSH-KEYSIGN(8) OpenBSD System Manager's Manual SSH-KEYSIGN(8)
2
3NAME
4 ssh-keysign - ssh helper program for host-based authentication
5
6SYNOPSIS
7 ssh-keysign
8
9DESCRIPTION
10 ssh-keysign is used by ssh(1) to access the local host keys and generate
11 the digital signature required during host-based authentication with SSH
12 protocol version 2.
13
14 ssh-keysign is disabled by default and can only be enabled in the global
15 client configuration file /etc/ssh/ssh_config by setting EnableSSHKeysign
16 to ``yes''.
17
18 ssh-keysign is not intended to be invoked by the user, but from ssh(1).
19 See ssh(1) and sshd(8) for more information about host-based
20 authentication.
21
22FILES
23 /etc/ssh/ssh_config
24 Controls whether ssh-keysign is enabled.
25
26 /etc/ssh/ssh_host_dsa_key
27 /etc/ssh/ssh_host_ecdsa_key
28 /etc/ssh/ssh_host_rsa_key
29 These files contain the private parts of the host keys used to
30 generate the digital signature. They should be owned by root,
31 readable only by root, and not accessible to others. Since they
32 are readable only by root, ssh-keysign must be set-uid root if
33 host-based authentication is used.
34
35 /etc/ssh/ssh_host_dsa_key-cert.pub
36 /etc/ssh/ssh_host_ecdsa_key-cert.pub
37 /etc/ssh/ssh_host_rsa_key-cert.pub
38 If these files exist they are assumed to contain public
39 certificate information corresponding with the private keys
40 above.
41
42SEE ALSO
43 ssh(1), ssh-keygen(1), ssh_config(5), sshd(8)
44
45HISTORY
46 ssh-keysign first appeared in OpenBSD 3.2.
47
48AUTHORS
49 Markus Friedl <markus@openbsd.org>
50
51OpenBSD 5.4 July 16, 2013 OpenBSD 5.4
diff --git a/ssh-pkcs11-helper.0 b/ssh-pkcs11-helper.0
new file mode 100644
index 000000000..d9ea34248
--- /dev/null
+++ b/ssh-pkcs11-helper.0
@@ -0,0 +1,25 @@
1SSH-PKCS11-HELPER(8) OpenBSD System Manager's Manual SSH-PKCS11-HELPER(8)
2
3NAME
4 ssh-pkcs11-helper - ssh-agent helper program for PKCS#11 support
5
6SYNOPSIS
7 ssh-pkcs11-helper
8
9DESCRIPTION
10 ssh-pkcs11-helper is used by ssh-agent(1) to access keys provided by a
11 PKCS#11 token.
12
13 ssh-pkcs11-helper is not intended to be invoked by the user, but from
14 ssh-agent(1).
15
16SEE ALSO
17 ssh(1), ssh-add(1), ssh-agent(1)
18
19HISTORY
20 ssh-pkcs11-helper first appeared in OpenBSD 4.7.
21
22AUTHORS
23 Markus Friedl <markus@openbsd.org>
24
25OpenBSD 5.4 July 16, 2013 OpenBSD 5.4
diff --git a/ssh.0 b/ssh.0
new file mode 100644
index 000000000..adc1ee421
--- /dev/null
+++ b/ssh.0
@@ -0,0 +1,935 @@
1SSH(1) OpenBSD Reference Manual SSH(1)
2
3NAME
4 ssh - OpenSSH SSH client (remote login program)
5
6SYNOPSIS
7 ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
8 [-D [bind_address:]port] [-E log_file] [-e escape_char]
9 [-F configfile] [-I pkcs11] [-i identity_file]
10 [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec]
11 [-O ctl_cmd] [-o option] [-p port]
12 [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port]
13 [-w local_tun[:remote_tun]] [user@]hostname [command]
14 ssh -Q protocol_feature
15
16DESCRIPTION
17 ssh (SSH client) is a program for logging into a remote machine and for
18 executing commands on a remote machine. It is intended to replace rlogin
19 and rsh, and provide secure encrypted communications between two
20 untrusted hosts over an insecure network. X11 connections and arbitrary
21 TCP ports can also be forwarded over the secure channel.
22
23 ssh connects and logs into the specified hostname (with optional user
24 name). The user must prove his/her identity to the remote machine using
25 one of several methods depending on the protocol version used (see
26 below).
27
28 If command is specified, it is executed on the remote host instead of a
29 login shell.
30
31 The options are as follows:
32
33 -1 Forces ssh to try protocol version 1 only.
34
35 -2 Forces ssh to try protocol version 2 only.
36
37 -4 Forces ssh to use IPv4 addresses only.
38
39 -6 Forces ssh to use IPv6 addresses only.
40
41 -A Enables forwarding of the authentication agent connection. This
42 can also be specified on a per-host basis in a configuration
43 file.
44
45 Agent forwarding should be enabled with caution. Users with the
46 ability to bypass file permissions on the remote host (for the
47 agent's UNIX-domain socket) can access the local agent through
48 the forwarded connection. An attacker cannot obtain key material
49 from the agent, however they can perform operations on the keys
50 that enable them to authenticate using the identities loaded into
51 the agent.
52
53 -a Disables forwarding of the authentication agent connection.
54
55 -b bind_address
56 Use bind_address on the local machine as the source address of
57 the connection. Only useful on systems with more than one
58 address.
59
60 -C Requests compression of all data (including stdin, stdout,
61 stderr, and data for forwarded X11 and TCP connections). The
62 compression algorithm is the same used by gzip(1), and the
63 ``level'' can be controlled by the CompressionLevel option for
64 protocol version 1. Compression is desirable on modem lines and
65 other slow connections, but will only slow down things on fast
66 networks. The default value can be set on a host-by-host basis
67 in the configuration files; see the Compression option.
68
69 -c cipher_spec
70 Selects the cipher specification for encrypting the session.
71
72 Protocol version 1 allows specification of a single cipher. The
73 supported values are ``3des'', ``blowfish'', and ``des''. 3des
74 (triple-des) is an encrypt-decrypt-encrypt triple with three
75 different keys. It is believed to be secure. blowfish is a fast
76 block cipher; it appears very secure and is much faster than
77 3des. des is only supported in the ssh client for
78 interoperability with legacy protocol 1 implementations that do
79 not support the 3des cipher. Its use is strongly discouraged due
80 to cryptographic weaknesses. The default is ``3des''.
81
82 For protocol version 2, cipher_spec is a comma-separated list of
83 ciphers listed in order of preference. See the Ciphers keyword
84 in ssh_config(5) for more information.
85
86 -D [bind_address:]port
87 Specifies a local ``dynamic'' application-level port forwarding.
88 This works by allocating a socket to listen to port on the local
89 side, optionally bound to the specified bind_address. Whenever a
90 connection is made to this port, the connection is forwarded over
91 the secure channel, and the application protocol is then used to
92 determine where to connect to from the remote machine. Currently
93 the SOCKS4 and SOCKS5 protocols are supported, and ssh will act
94 as a SOCKS server. Only root can forward privileged ports.
95 Dynamic port forwardings can also be specified in the
96 configuration file.
97
98 IPv6 addresses can be specified by enclosing the address in
99 square brackets. Only the superuser can forward privileged
100 ports. By default, the local port is bound in accordance with
101 the GatewayPorts setting. However, an explicit bind_address may
102 be used to bind the connection to a specific address. The
103 bind_address of ``localhost'' indicates that the listening port
104 be bound for local use only, while an empty address or `*'
105 indicates that the port should be available from all interfaces.
106
107 -E log_file
108 Append debug logs to log_file instead of standard error.
109
110 -e escape_char
111 Sets the escape character for sessions with a pty (default: `~').
112 The escape character is only recognized at the beginning of a
113 line. The escape character followed by a dot (`.') closes the
114 connection; followed by control-Z suspends the connection; and
115 followed by itself sends the escape character once. Setting the
116 character to ``none'' disables any escapes and makes the session
117 fully transparent.
118
119 -F configfile
120 Specifies an alternative per-user configuration file. If a
121 configuration file is given on the command line, the system-wide
122 configuration file (/etc/ssh/ssh_config) will be ignored. The
123 default for the per-user configuration file is ~/.ssh/config.
124
125 -f Requests ssh to go to background just before command execution.
126 This is useful if ssh is going to ask for passwords or
127 passphrases, but the user wants it in the background. This
128 implies -n. The recommended way to start X11 programs at a
129 remote site is with something like ssh -f host xterm.
130
131 If the ExitOnForwardFailure configuration option is set to
132 ``yes'', then a client started with -f will wait for all remote
133 port forwards to be successfully established before placing
134 itself in the background.
135
136 -g Allows remote hosts to connect to local forwarded ports.
137
138 -I pkcs11
139 Specify the PKCS#11 shared library ssh should use to communicate
140 with a PKCS#11 token providing the user's private RSA key.
141
142 -i identity_file
143 Selects a file from which the identity (private key) for public
144 key authentication is read. The default is ~/.ssh/identity for
145 protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and
146 ~/.ssh/id_rsa for protocol version 2. Identity files may also be
147 specified on a per-host basis in the configuration file. It is
148 possible to have multiple -i options (and multiple identities
149 specified in configuration files). ssh will also try to load
150 certificate information from the filename obtained by appending
151 -cert.pub to identity filenames.
152
153 -K Enables GSSAPI-based authentication and forwarding (delegation)
154 of GSSAPI credentials to the server.
155
156 -k Disables forwarding (delegation) of GSSAPI credentials to the
157 server.
158
159 -L [bind_address:]port:host:hostport
160 Specifies that the given port on the local (client) host is to be
161 forwarded to the given host and port on the remote side. This
162 works by allocating a socket to listen to port on the local side,
163 optionally bound to the specified bind_address. Whenever a
164 connection is made to this port, the connection is forwarded over
165 the secure channel, and a connection is made to host port
166 hostport from the remote machine. Port forwardings can also be
167 specified in the configuration file. IPv6 addresses can be
168 specified by enclosing the address in square brackets. Only the
169 superuser can forward privileged ports. By default, the local
170 port is bound in accordance with the GatewayPorts setting.
171 However, an explicit bind_address may be used to bind the
172 connection to a specific address. The bind_address of
173 ``localhost'' indicates that the listening port be bound for
174 local use only, while an empty address or `*' indicates that the
175 port should be available from all interfaces.
176
177 -l login_name
178 Specifies the user to log in as on the remote machine. This also
179 may be specified on a per-host basis in the configuration file.
180
181 -M Places the ssh client into ``master'' mode for connection
182 sharing. Multiple -M options places ssh into ``master'' mode
183 with confirmation required before slave connections are accepted.
184 Refer to the description of ControlMaster in ssh_config(5) for
185 details.
186
187 -m mac_spec
188 Additionally, for protocol version 2 a comma-separated list of
189 MAC (message authentication code) algorithms can be specified in
190 order of preference. See the MACs keyword for more information.
191
192 -N Do not execute a remote command. This is useful for just
193 forwarding ports (protocol version 2 only).
194
195 -n Redirects stdin from /dev/null (actually, prevents reading from
196 stdin). This must be used when ssh is run in the background. A
197 common trick is to use this to run X11 programs on a remote
198 machine. For example, ssh -n shadows.cs.hut.fi emacs & will
199 start an emacs on shadows.cs.hut.fi, and the X11 connection will
200 be automatically forwarded over an encrypted channel. The ssh
201 program will be put in the background. (This does not work if
202 ssh needs to ask for a password or passphrase; see also the -f
203 option.)
204
205 -O ctl_cmd
206 Control an active connection multiplexing master process. When
207 the -O option is specified, the ctl_cmd argument is interpreted
208 and passed to the master process. Valid commands are: ``check''
209 (check that the master process is running), ``forward'' (request
210 forwardings without command execution), ``cancel'' (cancel
211 forwardings), ``exit'' (request the master to exit), and ``stop''
212 (request the master to stop accepting further multiplexing
213 requests).
214
215 -o option
216 Can be used to give options in the format used in the
217 configuration file. This is useful for specifying options for
218 which there is no separate command-line flag. For full details
219 of the options listed below, and their possible values, see
220 ssh_config(5).
221
222 AddressFamily
223 BatchMode
224 BindAddress
225 ChallengeResponseAuthentication
226 CheckHostIP
227 Cipher
228 Ciphers
229 ClearAllForwardings
230 Compression
231 CompressionLevel
232 ConnectionAttempts
233 ConnectTimeout
234 ControlMaster
235 ControlPath
236 ControlPersist
237 DynamicForward
238 EscapeChar
239 ExitOnForwardFailure
240 ForwardAgent
241 ForwardX11
242 ForwardX11Timeout
243 ForwardX11Trusted
244 GatewayPorts
245 GlobalKnownHostsFile
246 GSSAPIAuthentication
247 GSSAPIDelegateCredentials
248 HashKnownHosts
249 Host
250 HostbasedAuthentication
251 HostKeyAlgorithms
252 HostKeyAlias
253 HostName
254 IdentityFile
255 IdentitiesOnly
256 IPQoS
257 KbdInteractiveAuthentication
258 KbdInteractiveDevices
259 KexAlgorithms
260 LocalCommand
261 LocalForward
262 LogLevel
263 MACs
264 NoHostAuthenticationForLocalhost
265 NumberOfPasswordPrompts
266 PasswordAuthentication
267 PermitLocalCommand
268 PKCS11Provider
269 Port
270 PreferredAuthentications
271 Protocol
272 ProxyCommand
273 PubkeyAuthentication
274 RekeyLimit
275 RemoteForward
276 RequestTTY
277 RhostsRSAAuthentication
278 RSAAuthentication
279 SendEnv
280 ServerAliveInterval
281 ServerAliveCountMax
282 StrictHostKeyChecking
283 TCPKeepAlive
284 Tunnel
285 TunnelDevice
286 UsePrivilegedPort
287 User
288 UserKnownHostsFile
289 VerifyHostKeyDNS
290 VisualHostKey
291 XAuthLocation
292
293 -p port
294 Port to connect to on the remote host. This can be specified on
295 a per-host basis in the configuration file.
296
297 -Q protocol_feature
298 Queries ssh for the algorithms supported for the specified
299 version 2 protocol_feature. The queriable features are:
300 ``cipher'' (supported symmetric ciphers), ``MAC'' (supported
301 message integrity codes), ``KEX'' (key exchange algorithms),
302 ``key'' (key types). Protocol features are treated case-
303 insensitively.
304
305 -q Quiet mode. Causes most warning and diagnostic messages to be
306 suppressed.
307
308 -R [bind_address:]port:host:hostport
309 Specifies that the given port on the remote (server) host is to
310 be forwarded to the given host and port on the local side. This
311 works by allocating a socket to listen to port on the remote
312 side, and whenever a connection is made to this port, the
313 connection is forwarded over the secure channel, and a connection
314 is made to host port hostport from the local machine.
315
316 Port forwardings can also be specified in the configuration file.
317 Privileged ports can be forwarded only when logging in as root on
318 the remote machine. IPv6 addresses can be specified by enclosing
319 the address in square brackets.
320
321 By default, the listening socket on the server will be bound to
322 the loopback interface only. This may be overridden by
323 specifying a bind_address. An empty bind_address, or the address
324 `*', indicates that the remote socket should listen on all
325 interfaces. Specifying a remote bind_address will only succeed
326 if the server's GatewayPorts option is enabled (see
327 sshd_config(5)).
328
329 If the port argument is `0', the listen port will be dynamically
330 allocated on the server and reported to the client at run time.
331 When used together with -O forward the allocated port will be
332 printed to the standard output.
333
334 -S ctl_path
335 Specifies the location of a control socket for connection
336 sharing, or the string ``none'' to disable connection sharing.
337 Refer to the description of ControlPath and ControlMaster in
338 ssh_config(5) for details.
339
340 -s May be used to request invocation of a subsystem on the remote
341 system. Subsystems are a feature of the SSH2 protocol which
342 facilitate the use of SSH as a secure transport for other
343 applications (eg. sftp(1)). The subsystem is specified as the
344 remote command.
345
346 -T Disable pseudo-tty allocation.
347
348 -t Force pseudo-tty allocation. This can be used to execute
349 arbitrary screen-based programs on a remote machine, which can be
350 very useful, e.g. when implementing menu services. Multiple -t
351 options force tty allocation, even if ssh has no local tty.
352
353 -V Display the version number and exit.
354
355 -v Verbose mode. Causes ssh to print debugging messages about its
356 progress. This is helpful in debugging connection,
357 authentication, and configuration problems. Multiple -v options
358 increase the verbosity. The maximum is 3.
359
360 -W host:port
361 Requests that standard input and output on the client be
362 forwarded to host on port over the secure channel. Implies -N,
363 -T, ExitOnForwardFailure and ClearAllForwardings. Works with
364 Protocol version 2 only.
365
366 -w local_tun[:remote_tun]
367 Requests tunnel device forwarding with the specified tun(4)
368 devices between the client (local_tun) and the server
369 (remote_tun).
370
371 The devices may be specified by numerical ID or the keyword
372 ``any'', which uses the next available tunnel device. If
373 remote_tun is not specified, it defaults to ``any''. See also
374 the Tunnel and TunnelDevice directives in ssh_config(5). If the
375 Tunnel directive is unset, it is set to the default tunnel mode,
376 which is ``point-to-point''.
377
378 -X Enables X11 forwarding. This can also be specified on a per-host
379 basis in a configuration file.
380
381 X11 forwarding should be enabled with caution. Users with the
382 ability to bypass file permissions on the remote host (for the
383 user's X authorization database) can access the local X11 display
384 through the forwarded connection. An attacker may then be able
385 to perform activities such as keystroke monitoring.
386
387 For this reason, X11 forwarding is subjected to X11 SECURITY
388 extension restrictions by default. Please refer to the ssh -Y
389 option and the ForwardX11Trusted directive in ssh_config(5) for
390 more information.
391
392 -x Disables X11 forwarding.
393
394 -Y Enables trusted X11 forwarding. Trusted X11 forwardings are not
395 subjected to the X11 SECURITY extension controls.
396
397 -y Send log information using the syslog(3) system module. By
398 default this information is sent to stderr.
399
400 ssh may additionally obtain configuration data from a per-user
401 configuration file and a system-wide configuration file. The file format
402 and configuration options are described in ssh_config(5).
403
404AUTHENTICATION
405 The OpenSSH SSH client supports SSH protocols 1 and 2. The default is to
406 use protocol 2 only, though this can be changed via the Protocol option
407 in ssh_config(5) or the -1 and -2 options (see above). Both protocols
408 support similar authentication methods, but protocol 2 is the default
409 since it provides additional mechanisms for confidentiality (the traffic
410 is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) and
411 integrity (hmac-md5, hmac-sha1, hmac-sha2-256, hmac-sha2-512, umac-64,
412 umac-128, hmac-ripemd160). Protocol 1 lacks a strong mechanism for
413 ensuring the integrity of the connection.
414
415 The methods available for authentication are: GSSAPI-based
416 authentication, host-based authentication, public key authentication,
417 challenge-response authentication, and password authentication.
418 Authentication methods are tried in the order specified above, though
419 protocol 2 has a configuration option to change the default order:
420 PreferredAuthentications.
421
422 Host-based authentication works as follows: If the machine the user logs
423 in from is listed in /etc/hosts.equiv or /etc/shosts.equiv on the remote
424 machine, and the user names are the same on both sides, or if the files
425 ~/.rhosts or ~/.shosts exist in the user's home directory on the remote
426 machine and contain a line containing the name of the client machine and
427 the name of the user on that machine, the user is considered for login.
428 Additionally, the server must be able to verify the client's host key
429 (see the description of /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts,
430 below) for login to be permitted. This authentication method closes
431 security holes due to IP spoofing, DNS spoofing, and routing spoofing.
432 [Note to the administrator: /etc/hosts.equiv, ~/.rhosts, and the
433 rlogin/rsh protocol in general, are inherently insecure and should be
434 disabled if security is desired.]
435
436 Public key authentication works as follows: The scheme is based on
437 public-key cryptography, using cryptosystems where encryption and
438 decryption are done using separate keys, and it is unfeasible to derive
439 the decryption key from the encryption key. The idea is that each user
440 creates a public/private key pair for authentication purposes. The
441 server knows the public key, and only the user knows the private key.
442 ssh implements public key authentication protocol automatically, using
443 one of the DSA, ECDSA or RSA algorithms. Protocol 1 is restricted to
444 using only RSA keys, but protocol 2 may use any. The HISTORY section of
445 ssl(8) contains a brief discussion of the DSA and RSA algorithms.
446
447 The file ~/.ssh/authorized_keys lists the public keys that are permitted
448 for logging in. When the user logs in, the ssh program tells the server
449 which key pair it would like to use for authentication. The client
450 proves that it has access to the private key and the server checks that
451 the corresponding public key is authorized to accept the account.
452
453 The user creates his/her key pair by running ssh-keygen(1). This stores
454 the private key in ~/.ssh/identity (protocol 1), ~/.ssh/id_dsa (protocol
455 2 DSA), ~/.ssh/id_ecdsa (protocol 2 ECDSA), or ~/.ssh/id_rsa (protocol 2
456 RSA) and stores the public key in ~/.ssh/identity.pub (protocol 1),
457 ~/.ssh/id_dsa.pub (protocol 2 DSA), ~/.ssh/id_ecdsa.pub (protocol 2
458 ECDSA), or ~/.ssh/id_rsa.pub (protocol 2 RSA) in the user's home
459 directory. The user should then copy the public key to
460 ~/.ssh/authorized_keys in his/her home directory on the remote machine.
461 The authorized_keys file corresponds to the conventional ~/.rhosts file,
462 and has one key per line, though the lines can be very long. After this,
463 the user can log in without giving the password.
464
465 A variation on public key authentication is available in the form of
466 certificate authentication: instead of a set of public/private keys,
467 signed certificates are used. This has the advantage that a single
468 trusted certification authority can be used in place of many
469 public/private keys. See the CERTIFICATES section of ssh-keygen(1) for
470 more information.
471
472 The most convenient way to use public key or certificate authentication
473 may be with an authentication agent. See ssh-agent(1) for more
474 information.
475
476 Challenge-response authentication works as follows: The server sends an
477 arbitrary "challenge" text, and prompts for a response. Protocol 2
478 allows multiple challenges and responses; protocol 1 is restricted to
479 just one challenge/response. Examples of challenge-response
480 authentication include BSD Authentication (see login.conf(5)) and PAM
481 (some non-OpenBSD systems).
482
483 Finally, if other authentication methods fail, ssh prompts the user for a
484 password. The password is sent to the remote host for checking; however,
485 since all communications are encrypted, the password cannot be seen by
486 someone listening on the network.
487
488 ssh automatically maintains and checks a database containing
489 identification for all hosts it has ever been used with. Host keys are
490 stored in ~/.ssh/known_hosts in the user's home directory. Additionally,
491 the file /etc/ssh/ssh_known_hosts is automatically checked for known
492 hosts. Any new hosts are automatically added to the user's file. If a
493 host's identification ever changes, ssh warns about this and disables
494 password authentication to prevent server spoofing or man-in-the-middle
495 attacks, which could otherwise be used to circumvent the encryption. The
496 StrictHostKeyChecking option can be used to control logins to machines
497 whose host key is not known or has changed.
498
499 When the user's identity has been accepted by the server, the server
500 either executes the given command, or logs into the machine and gives the
501 user a normal shell on the remote machine. All communication with the
502 remote command or shell will be automatically encrypted.
503
504 If a pseudo-terminal has been allocated (normal login session), the user
505 may use the escape characters noted below.
506
507 If no pseudo-tty has been allocated, the session is transparent and can
508 be used to reliably transfer binary data. On most systems, setting the
509 escape character to ``none'' will also make the session transparent even
510 if a tty is used.
511
512 The session terminates when the command or shell on the remote machine
513 exits and all X11 and TCP connections have been closed.
514
515ESCAPE CHARACTERS
516 When a pseudo-terminal has been requested, ssh supports a number of
517 functions through the use of an escape character.
518
519 A single tilde character can be sent as ~~ or by following the tilde by a
520 character other than those described below. The escape character must
521 always follow a newline to be interpreted as special. The escape
522 character can be changed in configuration files using the EscapeChar
523 configuration directive or on the command line by the -e option.
524
525 The supported escapes (assuming the default `~') are:
526
527 ~. Disconnect.
528
529 ~^Z Background ssh.
530
531 ~# List forwarded connections.
532
533 ~& Background ssh at logout when waiting for forwarded connection /
534 X11 sessions to terminate.
535
536 ~? Display a list of escape characters.
537
538 ~B Send a BREAK to the remote system (only useful for SSH protocol
539 version 2 and if the peer supports it).
540
541 ~C Open command line. Currently this allows the addition of port
542 forwardings using the -L, -R and -D options (see above). It also
543 allows the cancellation of existing port-forwardings with
544 -KL[bind_address:]port for local, -KR[bind_address:]port for
545 remote and -KD[bind_address:]port for dynamic port-forwardings.
546 !command allows the user to execute a local command if the
547 PermitLocalCommand option is enabled in ssh_config(5). Basic
548 help is available, using the -h option.
549
550 ~R Request rekeying of the connection (only useful for SSH protocol
551 version 2 and if the peer supports it).
552
553 ~V Decrease the verbosity (LogLevel) when errors are being written
554 to stderr.
555
556 ~v Increase the verbosity (LogLevel) when errors are being written
557 to stderr.
558
559TCP FORWARDING
560 Forwarding of arbitrary TCP connections over the secure channel can be
561 specified either on the command line or in a configuration file. One
562 possible application of TCP forwarding is a secure connection to a mail
563 server; another is going through firewalls.
564
565 In the example below, we look at encrypting communication between an IRC
566 client and server, even though the IRC server does not directly support
567 encrypted communications. This works as follows: the user connects to
568 the remote host using ssh, specifying a port to be used to forward
569 connections to the remote server. After that it is possible to start the
570 service which is to be encrypted on the client machine, connecting to the
571 same local port, and ssh will encrypt and forward the connection.
572
573 The following example tunnels an IRC session from client machine
574 ``127.0.0.1'' (localhost) to remote server ``server.example.com'':
575
576 $ ssh -f -L 1234:localhost:6667 server.example.com sleep 10
577 $ irc -c '#users' -p 1234 pinky 127.0.0.1
578
579 This tunnels a connection to IRC server ``server.example.com'', joining
580 channel ``#users'', nickname ``pinky'', using port 1234. It doesn't
581 matter which port is used, as long as it's greater than 1023 (remember,
582 only root can open sockets on privileged ports) and doesn't conflict with
583 any ports already in use. The connection is forwarded to port 6667 on
584 the remote server, since that's the standard port for IRC services.
585
586 The -f option backgrounds ssh and the remote command ``sleep 10'' is
587 specified to allow an amount of time (10 seconds, in the example) to
588 start the service which is to be tunnelled. If no connections are made
589 within the time specified, ssh will exit.
590
591X11 FORWARDING
592 If the ForwardX11 variable is set to ``yes'' (or see the description of
593 the -X, -x, and -Y options above) and the user is using X11 (the DISPLAY
594 environment variable is set), the connection to the X11 display is
595 automatically forwarded to the remote side in such a way that any X11
596 programs started from the shell (or command) will go through the
597 encrypted channel, and the connection to the real X server will be made
598 from the local machine. The user should not manually set DISPLAY.
599 Forwarding of X11 connections can be configured on the command line or in
600 configuration files.
601
602 The DISPLAY value set by ssh will point to the server machine, but with a
603 display number greater than zero. This is normal, and happens because
604 ssh creates a ``proxy'' X server on the server machine for forwarding the
605 connections over the encrypted channel.
606
607 ssh will also automatically set up Xauthority data on the server machine.
608 For this purpose, it will generate a random authorization cookie, store
609 it in Xauthority on the server, and verify that any forwarded connections
610 carry this cookie and replace it by the real cookie when the connection
611 is opened. The real authentication cookie is never sent to the server
612 machine (and no cookies are sent in the plain).
613
614 If the ForwardAgent variable is set to ``yes'' (or see the description of
615 the -A and -a options above) and the user is using an authentication
616 agent, the connection to the agent is automatically forwarded to the
617 remote side.
618
619VERIFYING HOST KEYS
620 When connecting to a server for the first time, a fingerprint of the
621 server's public key is presented to the user (unless the option
622 StrictHostKeyChecking has been disabled). Fingerprints can be determined
623 using ssh-keygen(1):
624
625 $ ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key
626
627 If the fingerprint is already known, it can be matched and the key can be
628 accepted or rejected. Because of the difficulty of comparing host keys
629 just by looking at hex strings, there is also support to compare host
630 keys visually, using random art. By setting the VisualHostKey option to
631 ``yes'', a small ASCII graphic gets displayed on every login to a server,
632 no matter if the session itself is interactive or not. By learning the
633 pattern a known server produces, a user can easily find out that the host
634 key has changed when a completely different pattern is displayed.
635 Because these patterns are not unambiguous however, a pattern that looks
636 similar to the pattern remembered only gives a good probability that the
637 host key is the same, not guaranteed proof.
638
639 To get a listing of the fingerprints along with their random art for all
640 known hosts, the following command line can be used:
641
642 $ ssh-keygen -lv -f ~/.ssh/known_hosts
643
644 If the fingerprint is unknown, an alternative method of verification is
645 available: SSH fingerprints verified by DNS. An additional resource
646 record (RR), SSHFP, is added to a zonefile and the connecting client is
647 able to match the fingerprint with that of the key presented.
648
649 In this example, we are connecting a client to a server,
650 ``host.example.com''. The SSHFP resource records should first be added
651 to the zonefile for host.example.com:
652
653 $ ssh-keygen -r host.example.com.
654
655 The output lines will have to be added to the zonefile. To check that
656 the zone is answering fingerprint queries:
657
658 $ dig -t SSHFP host.example.com
659
660 Finally the client connects:
661
662 $ ssh -o "VerifyHostKeyDNS ask" host.example.com
663 [...]
664 Matching host key fingerprint found in DNS.
665 Are you sure you want to continue connecting (yes/no)?
666
667 See the VerifyHostKeyDNS option in ssh_config(5) for more information.
668
669SSH-BASED VIRTUAL PRIVATE NETWORKS
670 ssh contains support for Virtual Private Network (VPN) tunnelling using
671 the tun(4) network pseudo-device, allowing two networks to be joined
672 securely. The sshd_config(5) configuration option PermitTunnel controls
673 whether the server supports this, and at what level (layer 2 or 3
674 traffic).
675
676 The following example would connect client network 10.0.50.0/24 with
677 remote network 10.0.99.0/24 using a point-to-point connection from
678 10.1.1.1 to 10.1.1.2, provided that the SSH server running on the gateway
679 to the remote network, at 192.168.1.15, allows it.
680
681 On the client:
682
683 # ssh -f -w 0:1 192.168.1.15 true
684 # ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252
685 # route add 10.0.99.0/24 10.1.1.2
686
687 On the server:
688
689 # ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252
690 # route add 10.0.50.0/24 10.1.1.1
691
692 Client access may be more finely tuned via the /root/.ssh/authorized_keys
693 file (see below) and the PermitRootLogin server option. The following
694 entry would permit connections on tun(4) device 1 from user ``jane'' and
695 on tun device 2 from user ``john'', if PermitRootLogin is set to
696 ``forced-commands-only'':
697
698 tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... jane
699 tunnel="2",command="sh /etc/netstart tun2" ssh-rsa ... john
700
701 Since an SSH-based setup entails a fair amount of overhead, it may be
702 more suited to temporary setups, such as for wireless VPNs. More
703 permanent VPNs are better provided by tools such as ipsecctl(8) and
704 isakmpd(8).
705
706ENVIRONMENT
707 ssh will normally set the following environment variables:
708
709 DISPLAY The DISPLAY variable indicates the location of the
710 X11 server. It is automatically set by ssh to
711 point to a value of the form ``hostname:n'', where
712 ``hostname'' indicates the host where the shell
713 runs, and `n' is an integer >= 1. ssh uses this
714 special value to forward X11 connections over the
715 secure channel. The user should normally not set
716 DISPLAY explicitly, as that will render the X11
717 connection insecure (and will require the user to
718 manually copy any required authorization cookies).
719
720 HOME Set to the path of the user's home directory.
721
722 LOGNAME Synonym for USER; set for compatibility with
723 systems that use this variable.
724
725 MAIL Set to the path of the user's mailbox.
726
727 PATH Set to the default PATH, as specified when
728 compiling ssh.
729
730 SSH_ASKPASS If ssh needs a passphrase, it will read the
731 passphrase from the current terminal if it was run
732 from a terminal. If ssh does not have a terminal
733 associated with it but DISPLAY and SSH_ASKPASS are
734 set, it will execute the program specified by
735 SSH_ASKPASS and open an X11 window to read the
736 passphrase. This is particularly useful when
737 calling ssh from a .xsession or related script.
738 (Note that on some machines it may be necessary to
739 redirect the input from /dev/null to make this
740 work.)
741
742 SSH_AUTH_SOCK Identifies the path of a UNIX-domain socket used to
743 communicate with the agent.
744
745 SSH_CONNECTION Identifies the client and server ends of the
746 connection. The variable contains four space-
747 separated values: client IP address, client port
748 number, server IP address, and server port number.
749
750 SSH_ORIGINAL_COMMAND This variable contains the original command line if
751 a forced command is executed. It can be used to
752 extract the original arguments.
753
754 SSH_TTY This is set to the name of the tty (path to the
755 device) associated with the current shell or
756 command. If the current session has no tty, this
757 variable is not set.
758
759 TZ This variable is set to indicate the present time
760 zone if it was set when the daemon was started
761 (i.e. the daemon passes the value on to new
762 connections).
763
764 USER Set to the name of the user logging in.
765
766 Additionally, ssh reads ~/.ssh/environment, and adds lines of the format
767 ``VARNAME=value'' to the environment if the file exists and users are
768 allowed to change their environment. For more information, see the
769 PermitUserEnvironment option in sshd_config(5).
770
771FILES
772 ~/.rhosts
773 This file is used for host-based authentication (see above). On
774 some machines this file may need to be world-readable if the
775 user's home directory is on an NFS partition, because sshd(8)
776 reads it as root. Additionally, this file must be owned by the
777 user, and must not have write permissions for anyone else. The
778 recommended permission for most machines is read/write for the
779 user, and not accessible by others.
780
781 ~/.shosts
782 This file is used in exactly the same way as .rhosts, but allows
783 host-based authentication without permitting login with
784 rlogin/rsh.
785
786 ~/.ssh/
787 This directory is the default location for all user-specific
788 configuration and authentication information. There is no
789 general requirement to keep the entire contents of this directory
790 secret, but the recommended permissions are read/write/execute
791 for the user, and not accessible by others.
792
793 ~/.ssh/authorized_keys
794 Lists the public keys (DSA/ECDSA/RSA) that can be used for
795 logging in as this user. The format of this file is described in
796 the sshd(8) manual page. This file is not highly sensitive, but
797 the recommended permissions are read/write for the user, and not
798 accessible by others.
799
800 ~/.ssh/config
801 This is the per-user configuration file. The file format and
802 configuration options are described in ssh_config(5). Because of
803 the potential for abuse, this file must have strict permissions:
804 read/write for the user, and not writable by others.
805
806 ~/.ssh/environment
807 Contains additional definitions for environment variables; see
808 ENVIRONMENT, above.
809
810 ~/.ssh/identity
811 ~/.ssh/id_dsa
812 ~/.ssh/id_ecdsa
813 ~/.ssh/id_rsa
814 Contains the private key for authentication. These files contain
815 sensitive data and should be readable by the user but not
816 accessible by others (read/write/execute). ssh will simply
817 ignore a private key file if it is accessible by others. It is
818 possible to specify a passphrase when generating the key which
819 will be used to encrypt the sensitive part of this file using
820 3DES.
821
822 ~/.ssh/identity.pub
823 ~/.ssh/id_dsa.pub
824 ~/.ssh/id_ecdsa.pub
825 ~/.ssh/id_rsa.pub
826 Contains the public key for authentication. These files are not
827 sensitive and can (but need not) be readable by anyone.
828
829 ~/.ssh/known_hosts
830 Contains a list of host keys for all hosts the user has logged
831 into that are not already in the systemwide list of known host
832 keys. See sshd(8) for further details of the format of this
833 file.
834
835 ~/.ssh/rc
836 Commands in this file are executed by ssh when the user logs in,
837 just before the user's shell (or command) is started. See the
838 sshd(8) manual page for more information.
839
840 /etc/hosts.equiv
841 This file is for host-based authentication (see above). It
842 should only be writable by root.
843
844 /etc/shosts.equiv
845 This file is used in exactly the same way as hosts.equiv, but
846 allows host-based authentication without permitting login with
847 rlogin/rsh.
848
849 /etc/ssh/ssh_config
850 Systemwide configuration file. The file format and configuration
851 options are described in ssh_config(5).
852
853 /etc/ssh/ssh_host_key
854 /etc/ssh/ssh_host_dsa_key
855 /etc/ssh/ssh_host_ecdsa_key
856 /etc/ssh/ssh_host_rsa_key
857 These files contain the private parts of the host keys and are
858 used for host-based authentication. If protocol version 1 is
859 used, ssh must be setuid root, since the host key is readable
860 only by root. For protocol version 2, ssh uses ssh-keysign(8) to
861 access the host keys, eliminating the requirement that ssh be
862 setuid root when host-based authentication is used. By default
863 ssh is not setuid root.
864
865 /etc/ssh/ssh_known_hosts
866 Systemwide list of known host keys. This file should be prepared
867 by the system administrator to contain the public host keys of
868 all machines in the organization. It should be world-readable.
869 See sshd(8) for further details of the format of this file.
870
871 /etc/ssh/sshrc
872 Commands in this file are executed by ssh when the user logs in,
873 just before the user's shell (or command) is started. See the
874 sshd(8) manual page for more information.
875
876EXIT STATUS
877 ssh exits with the exit status of the remote command or with 255 if an
878 error occurred.
879
880SEE ALSO
881 scp(1), sftp(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh-keyscan(1),
882 tun(4), hosts.equiv(5), ssh_config(5), ssh-keysign(8), sshd(8)
883
884STANDARDS
885 S. Lehtinen and C. Lonvick, The Secure Shell (SSH) Protocol Assigned
886 Numbers, RFC 4250, January 2006.
887
888 T. Ylonen and C. Lonvick, The Secure Shell (SSH) Protocol Architecture,
889 RFC 4251, January 2006.
890
891 T. Ylonen and C. Lonvick, The Secure Shell (SSH) Authentication Protocol,
892 RFC 4252, January 2006.
893
894 T. Ylonen and C. Lonvick, The Secure Shell (SSH) Transport Layer
895 Protocol, RFC 4253, January 2006.
896
897 T. Ylonen and C. Lonvick, The Secure Shell (SSH) Connection Protocol, RFC
898 4254, January 2006.
899
900 J. Schlyter and W. Griffin, Using DNS to Securely Publish Secure Shell
901 (SSH) Key Fingerprints, RFC 4255, January 2006.
902
903 F. Cusack and M. Forssen, Generic Message Exchange Authentication for the
904 Secure Shell Protocol (SSH), RFC 4256, January 2006.
905
906 J. Galbraith and P. Remaker, The Secure Shell (SSH) Session Channel Break
907 Extension, RFC 4335, January 2006.
908
909 M. Bellare, T. Kohno, and C. Namprempre, The Secure Shell (SSH) Transport
910 Layer Encryption Modes, RFC 4344, January 2006.
911
912 B. Harris, Improved Arcfour Modes for the Secure Shell (SSH) Transport
913 Layer Protocol, RFC 4345, January 2006.
914
915 M. Friedl, N. Provos, and W. Simpson, Diffie-Hellman Group Exchange for
916 the Secure Shell (SSH) Transport Layer Protocol, RFC 4419, March 2006.
917
918 J. Galbraith and R. Thayer, The Secure Shell (SSH) Public Key File
919 Format, RFC 4716, November 2006.
920
921 D. Stebila and J. Green, Elliptic Curve Algorithm Integration in the
922 Secure Shell Transport Layer, RFC 5656, December 2009.
923
924 A. Perrig and D. Song, Hash Visualization: a New Technique to improve
925 Real-World Security, 1999, International Workshop on Cryptographic
926 Techniques and E-Commerce (CrypTEC '99).
927
928AUTHORS
929 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
930 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
931 de Raadt and Dug Song removed many bugs, re-added newer features and
932 created OpenSSH. Markus Friedl contributed the support for SSH protocol
933 versions 1.5 and 2.0.
934
935OpenBSD 5.4 July 18, 2013 OpenBSD 5.4
diff --git a/ssh.1 b/ssh.1
index 227654016..62292cc09 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.336 2013/08/20 06:56:07 jmc Exp $ 36.\" $OpenBSD: ssh.1,v 1.334 2013/07/18 01:12:26 djm Exp $
37.Dd $Mdocdate: August 20 2013 $ 37.Dd $Mdocdate: July 18 2013 $
38.Dt SSH 1 38.Dt SSH 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -465,7 +465,6 @@ For full details of the options listed below, and their possible values, see
465.It PreferredAuthentications 465.It PreferredAuthentications
466.It Protocol 466.It Protocol
467.It ProxyCommand 467.It ProxyCommand
468.It ProxyUseFdpass
469.It PubkeyAuthentication 468.It PubkeyAuthentication
470.It RekeyLimit 469.It RekeyLimit
471.It RemoteForward 470.It RemoteForward
@@ -828,12 +827,9 @@ text, and prompts for a response.
828Protocol 2 allows multiple challenges and responses; 827Protocol 2 allows multiple challenges and responses;
829protocol 1 is restricted to just one challenge/response. 828protocol 1 is restricted to just one challenge/response.
830Examples of challenge-response authentication include 829Examples of challenge-response authentication include
831.Bx 830BSD Authentication (see
832Authentication (see
833.Xr login.conf 5 ) 831.Xr login.conf 5 )
834and PAM (some 832and PAM (some non-OpenBSD systems).
835.Pf non- Ox
836systems).
837.Pp 833.Pp
838Finally, if other authentication methods fail, 834Finally, if other authentication methods fail,
839.Nm 835.Nm
diff --git a/ssh_config.0 b/ssh_config.0
new file mode 100644
index 000000000..bd9e1ad51
--- /dev/null
+++ b/ssh_config.0
@@ -0,0 +1,795 @@
1SSH_CONFIG(5) OpenBSD Programmer's Manual SSH_CONFIG(5)
2
3NAME
4 ssh_config - OpenSSH SSH client configuration files
5
6SYNOPSIS
7 ~/.ssh/config
8 /etc/ssh/ssh_config
9
10DESCRIPTION
11 ssh(1) obtains configuration data from the following sources in the
12 following order:
13
14 1. command-line options
15 2. user's configuration file (~/.ssh/config)
16 3. system-wide configuration file (/etc/ssh/ssh_config)
17
18 For each parameter, the first obtained value will be used. The
19 configuration files contain sections separated by ``Host''
20 specifications, and that section is only applied for hosts that match one
21 of the patterns given in the specification. The matched host name is the
22 one given on the command line.
23
24 Since the first obtained value for each parameter is used, more host-
25 specific declarations should be given near the beginning of the file, and
26 general defaults at the end.
27
28 The configuration file has the following format:
29
30 Empty lines and lines starting with `#' are comments. Otherwise a line
31 is of the format ``keyword arguments''. Configuration options may be
32 separated by whitespace or optional whitespace and exactly one `='; the
33 latter format is useful to avoid the need to quote whitespace when
34 specifying configuration options using the ssh, scp, and sftp -o option.
35 Arguments may optionally be enclosed in double quotes (") in order to
36 represent arguments containing spaces.
37
38 The possible keywords and their meanings are as follows (note that
39 keywords are case-insensitive and arguments are case-sensitive):
40
41 Host Restricts the following declarations (up to the next Host
42 keyword) to be only for those hosts that match one of the
43 patterns given after the keyword. If more than one pattern is
44 provided, they should be separated by whitespace. A single `*'
45 as a pattern can be used to provide global defaults for all
46 hosts. The host is the hostname argument given on the command
47 line (i.e. the name is not converted to a canonicalized host name
48 before matching).
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
56 See PATTERNS for more information on patterns.
57
58 AddressFamily
59 Specifies which address family to use when connecting. Valid
60 arguments are ``any'', ``inet'' (use IPv4 only), or ``inet6''
61 (use IPv6 only).
62
63 BatchMode
64 If set to ``yes'', passphrase/password querying will be disabled.
65 This option is useful in scripts and other batch jobs where no
66 user is present to supply the password. The argument must be
67 ``yes'' or ``no''. The default is ``no''.
68
69 BindAddress
70 Use the specified address on the local machine as the source
71 address of the connection. Only useful on systems with more than
72 one address. Note that this option does not work if
73 UsePrivilegedPort is set to ``yes''.
74
75 ChallengeResponseAuthentication
76 Specifies whether to use challenge-response authentication. The
77 argument to this keyword must be ``yes'' or ``no''. The default
78 is ``yes''.
79
80 CheckHostIP
81 If this flag is set to ``yes'', ssh(1) will additionally check
82 the host IP address in the known_hosts file. This allows ssh to
83 detect if a host key changed due to DNS spoofing. If the option
84 is set to ``no'', the check will not be executed. The default is
85 ``yes''.
86
87 Cipher Specifies the cipher to use for encrypting the session in
88 protocol version 1. Currently, ``blowfish'', ``3des'', and
89 ``des'' are supported. des is only supported in the ssh(1)
90 client for interoperability with legacy protocol 1
91 implementations that do not support the 3des cipher. Its use is
92 strongly discouraged due to cryptographic weaknesses. The
93 default is ``3des''.
94
95 Ciphers
96 Specifies the ciphers allowed for protocol version 2 in order of
97 preference. Multiple ciphers must be comma-separated. The
98 supported ciphers are ``3des-cbc'', ``aes128-cbc'',
99 ``aes192-cbc'', ``aes256-cbc'', ``aes128-ctr'', ``aes192-ctr'',
100 ``aes256-ctr'', ``aes128-gcm@openssh.com'',
101 ``aes256-gcm@openssh.com'', ``arcfour128'', ``arcfour256'',
102 ``arcfour'', ``blowfish-cbc'', and ``cast128-cbc''. The default
103 is:
104
105 aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
106 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
107 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
108 aes256-cbc,arcfour
109
110 ClearAllForwardings
111 Specifies that all local, remote, and dynamic port forwardings
112 specified in the configuration files or on the command line be
113 cleared. This option is primarily useful when used from the
114 ssh(1) command line to clear port forwardings set in
115 configuration files, and is automatically set by scp(1) and
116 sftp(1). The argument must be ``yes'' or ``no''. The default is
117 ``no''.
118
119 Compression
120 Specifies whether to use compression. The argument must be
121 ``yes'' or ``no''. The default is ``no''.
122
123 CompressionLevel
124 Specifies the compression level to use if compression is enabled.
125 The argument must be an integer from 1 (fast) to 9 (slow, best).
126 The default level is 6, which is good for most applications. The
127 meaning of the values is the same as in gzip(1). Note that this
128 option applies to protocol version 1 only.
129
130 ConnectionAttempts
131 Specifies the number of tries (one per second) to make before
132 exiting. The argument must be an integer. This may be useful in
133 scripts if the connection sometimes fails. The default is 1.
134
135 ConnectTimeout
136 Specifies the timeout (in seconds) used when connecting to the
137 SSH server, instead of using the default system TCP timeout.
138 This value is used only when the target is down or really
139 unreachable, not when it refuses the connection.
140
141 ControlMaster
142 Enables the sharing of multiple sessions over a single network
143 connection. When set to ``yes'', ssh(1) will listen for
144 connections on a control socket specified using the ControlPath
145 argument. Additional sessions can connect to this socket using
146 the same ControlPath with ControlMaster set to ``no'' (the
147 default). These sessions will try to reuse the master instance's
148 network connection rather than initiating new ones, but will fall
149 back to connecting normally if the control socket does not exist,
150 or is not listening.
151
152 Setting this to ``ask'' will cause ssh to listen for control
153 connections, but require confirmation using the SSH_ASKPASS
154 program before they are accepted (see ssh-add(1) for details).
155 If the ControlPath cannot be opened, ssh will continue without
156 connecting to a master instance.
157
158 X11 and ssh-agent(1) forwarding is supported over these
159 multiplexed connections, however the display and agent forwarded
160 will be the one belonging to the master connection i.e. it is not
161 possible to forward multiple displays or agents.
162
163 Two additional options allow for opportunistic multiplexing: try
164 to use a master connection but fall back to creating a new one if
165 one does not already exist. These options are: ``auto'' and
166 ``autoask''. The latter requires confirmation like the ``ask''
167 option.
168
169 ControlPath
170 Specify the path to the control socket used for connection
171 sharing as described in the ControlMaster section above or the
172 string ``none'' to disable connection sharing. In the path, `%L'
173 will be substituted by the first component of the local host
174 name, `%l' will be substituted by the local host name (including
175 any domain name), `%h' will be substituted by the target host
176 name, `%n' will be substituted by the original target host name
177 specified on the command line, `%p' the port, `%r' by the remote
178 login username, and `%u' by the username of the user running
179 ssh(1). It is recommended that any ControlPath used for
180 opportunistic connection sharing include at least %h, %p, and %r.
181 This ensures that shared connections are uniquely identified.
182
183 ControlPersist
184 When used in conjunction with ControlMaster, specifies that the
185 master connection should remain open in the background (waiting
186 for future client connections) after the initial client
187 connection has been closed. If set to ``no'', then the master
188 connection will not be placed into the background, and will close
189 as soon as the initial client connection is closed. If set to
190 ``yes'', then the master connection will remain in the background
191 indefinitely (until killed or closed via a mechanism such as the
192 ssh(1) ``-O exit'' option). If set to a time in seconds, or a
193 time in any of the formats documented in sshd_config(5), then the
194 backgrounded master connection will automatically terminate after
195 it has remained idle (with no client connections) for the
196 specified time.
197
198 DynamicForward
199 Specifies that a TCP port on the local machine be forwarded over
200 the secure channel, and the application protocol is then used to
201 determine where to connect to from the remote machine.
202
203 The argument must be [bind_address:]port. IPv6 addresses can be
204 specified by enclosing addresses in square brackets. By default,
205 the local port is bound in accordance with the GatewayPorts
206 setting. However, an explicit bind_address may be used to bind
207 the connection to a specific address. The bind_address of
208 ``localhost'' indicates that the listening port be bound for
209 local use only, while an empty address or `*' indicates that the
210 port should be available from all interfaces.
211
212 Currently the SOCKS4 and SOCKS5 protocols are supported, and
213 ssh(1) will act as a SOCKS server. Multiple forwardings may be
214 specified, and additional forwardings can be given on the command
215 line. Only the superuser can forward privileged ports.
216
217 EnableSSHKeysign
218 Setting this option to ``yes'' in the global client configuration
219 file /etc/ssh/ssh_config enables the use of the helper program
220 ssh-keysign(8) during HostbasedAuthentication. The argument must
221 be ``yes'' or ``no''. The default is ``no''. This option should
222 be placed in the non-hostspecific section. See ssh-keysign(8)
223 for more information.
224
225 EscapeChar
226 Sets the escape character (default: `~'). The escape character
227 can also be set on the command line. The argument should be a
228 single character, `^' followed by a letter, or ``none'' to
229 disable the escape character entirely (making the connection
230 transparent for binary data).
231
232 ExitOnForwardFailure
233 Specifies whether ssh(1) should terminate the connection if it
234 cannot set up all requested dynamic, tunnel, local, and remote
235 port forwardings. The argument must be ``yes'' or ``no''. The
236 default is ``no''.
237
238 ForwardAgent
239 Specifies whether the connection to the authentication agent (if
240 any) will be forwarded to the remote machine. The argument must
241 be ``yes'' or ``no''. The default is ``no''.
242
243 Agent forwarding should be enabled with caution. Users with the
244 ability to bypass file permissions on the remote host (for the
245 agent's Unix-domain socket) can access the local agent through
246 the forwarded connection. An attacker cannot obtain key material
247 from the agent, however they can perform operations on the keys
248 that enable them to authenticate using the identities loaded into
249 the agent.
250
251 ForwardX11
252 Specifies whether X11 connections will be automatically
253 redirected over the secure channel and DISPLAY set. The argument
254 must be ``yes'' or ``no''. The default is ``no''.
255
256 X11 forwarding should be enabled with caution. Users with the
257 ability to bypass file permissions on the remote host (for the
258 user's X11 authorization database) can access the local X11
259 display through the forwarded connection. An attacker may then
260 be able to perform activities such as keystroke monitoring if the
261 ForwardX11Trusted option is also enabled.
262
263 ForwardX11Timeout
264 Specify a timeout for untrusted X11 forwarding using the format
265 described in the TIME FORMATS section of sshd_config(5). X11
266 connections received by ssh(1) after this time will be refused.
267 The default is to disable untrusted X11 forwarding after twenty
268 minutes has elapsed.
269
270 ForwardX11Trusted
271 If this option is set to ``yes'', remote X11 clients will have
272 full access to the original X11 display.
273
274 If this option is set to ``no'', remote X11 clients will be
275 considered untrusted and prevented from stealing or tampering
276 with data belonging to trusted X11 clients. Furthermore, the
277 xauth(1) token used for the session will be set to expire after
278 20 minutes. Remote clients will be refused access after this
279 time.
280
281 The default is ``no''.
282
283 See the X11 SECURITY extension specification for full details on
284 the restrictions imposed on untrusted clients.
285
286 GatewayPorts
287 Specifies whether remote hosts are allowed to connect to local
288 forwarded ports. By default, ssh(1) binds local port forwardings
289 to the loopback address. This prevents other remote hosts from
290 connecting to forwarded ports. GatewayPorts can be used to
291 specify that ssh should bind local port forwardings to the
292 wildcard address, thus allowing remote hosts to connect to
293 forwarded ports. The argument must be ``yes'' or ``no''. The
294 default is ``no''.
295
296 GlobalKnownHostsFile
297 Specifies one or more files to use for the global host key
298 database, separated by whitespace. The default is
299 /etc/ssh/ssh_known_hosts, /etc/ssh/ssh_known_hosts2.
300
301 GSSAPIAuthentication
302 Specifies whether user authentication based on GSSAPI is allowed.
303 The default is ``no''. Note that this option applies to protocol
304 version 2 only.
305
306 GSSAPIDelegateCredentials
307 Forward (delegate) credentials to the server. The default is
308 ``no''. Note that this option applies to protocol version 2
309 only.
310
311 HashKnownHosts
312 Indicates that ssh(1) should hash host names and addresses when
313 they are added to ~/.ssh/known_hosts. These hashed names may be
314 used normally by ssh(1) and sshd(8), but they do not reveal
315 identifying information should the file's contents be disclosed.
316 The default is ``no''. Note that existing names and addresses in
317 known hosts files will not be converted automatically, but may be
318 manually hashed using ssh-keygen(1).
319
320 HostbasedAuthentication
321 Specifies whether to try rhosts based authentication with public
322 key authentication. The argument must be ``yes'' or ``no''. The
323 default is ``no''. This option applies to protocol version 2
324 only and is similar to RhostsRSAAuthentication.
325
326 HostKeyAlgorithms
327 Specifies the protocol version 2 host key algorithms that the
328 client wants to use in order of preference. The default for this
329 option is:
330
331 ecdsa-sha2-nistp256-cert-v01@openssh.com,
332 ecdsa-sha2-nistp384-cert-v01@openssh.com,
333 ecdsa-sha2-nistp521-cert-v01@openssh.com,
334 ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,
335 ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,
336 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
337 ssh-rsa,ssh-dss
338
339 If hostkeys are known for the destination host then this default
340 is modified to prefer their algorithms.
341
342 HostKeyAlias
343 Specifies an alias that should be used instead of the real host
344 name when looking up or saving the host key in the host key
345 database files. This option is useful for tunneling SSH
346 connections or for multiple servers running on a single host.
347
348 HostName
349 Specifies the real host name to log into. This can be used to
350 specify nicknames or abbreviations for hosts. If the hostname
351 contains the character sequence `%h', then this will be replaced
352 with the host name specified on the command line (this is useful
353 for manipulating unqualified names). The default is the name
354 given on the command line. Numeric IP addresses are also
355 permitted (both on the command line and in HostName
356 specifications).
357
358 IdentitiesOnly
359 Specifies that ssh(1) should only use the authentication identity
360 files configured in the ssh_config files, even if ssh-agent(1) or
361 a PKCS11Provider offers more identities. The argument to this
362 keyword must be ``yes'' or ``no''. This option is intended for
363 situations where ssh-agent offers many different identities. The
364 default is ``no''.
365
366 IdentityFile
367 Specifies a file from which the user's DSA, ECDSA or RSA
368 authentication identity is read. The default is ~/.ssh/identity
369 for protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and
370 ~/.ssh/id_rsa for protocol version 2. Additionally, any
371 identities represented by the authentication agent will be used
372 for authentication unless IdentitiesOnly is set. ssh(1) will try
373 to load certificate information from the filename obtained by
374 appending -cert.pub to the path of a specified IdentityFile.
375
376 The file name may use the tilde syntax to refer to a user's home
377 directory or one of the following escape characters: `%d' (local
378 user's home directory), `%u' (local user name), `%l' (local host
379 name), `%h' (remote host name) or `%r' (remote user name).
380
381 It is possible to have multiple identity files specified in
382 configuration files; all these identities will be tried in
383 sequence. Multiple IdentityFile directives will add to the list
384 of identities tried (this behaviour differs from that of other
385 configuration directives).
386
387 IdentityFile may be used in conjunction with IdentitiesOnly to
388 select which identities in an agent are offered during
389 authentication.
390
391 IgnoreUnknown
392 Specifies a pattern-list of unknown options to be ignored if they
393 are encountered in configuration parsing. This may be used to
394 suppress errors if ssh_config contains options that are
395 unrecognised by ssh(1). It is recommended that IgnoreUnknown be
396 listed early in the configuration file as it will not be applied
397 to unknown options that appear before it.
398
399 IPQoS Specifies the IPv4 type-of-service or DSCP class for connections.
400 Accepted values are ``af11'', ``af12'', ``af13'', ``af21'',
401 ``af22'', ``af23'', ``af31'', ``af32'', ``af33'', ``af41'',
402 ``af42'', ``af43'', ``cs0'', ``cs1'', ``cs2'', ``cs3'', ``cs4'',
403 ``cs5'', ``cs6'', ``cs7'', ``ef'', ``lowdelay'', ``throughput'',
404 ``reliability'', or a numeric value. This option may take one or
405 two arguments, separated by whitespace. If one argument is
406 specified, it is used as the packet class unconditionally. If
407 two values are specified, the first is automatically selected for
408 interactive sessions and the second for non-interactive sessions.
409 The default is ``lowdelay'' for interactive sessions and
410 ``throughput'' for non-interactive sessions.
411
412 KbdInteractiveAuthentication
413 Specifies whether to use keyboard-interactive authentication.
414 The argument to this keyword must be ``yes'' or ``no''. The
415 default is ``yes''.
416
417 KbdInteractiveDevices
418 Specifies the list of methods to use in keyboard-interactive
419 authentication. Multiple method names must be comma-separated.
420 The default is to use the server specified list. The methods
421 available vary depending on what the server supports. For an
422 OpenSSH server, it may be zero or more of: ``bsdauth'', ``pam'',
423 and ``skey''.
424
425 KexAlgorithms
426 Specifies the available KEX (Key Exchange) algorithms. Multiple
427 algorithms must be comma-separated. The default is:
428
429 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
430 diffie-hellman-group-exchange-sha256,
431 diffie-hellman-group-exchange-sha1,
432 diffie-hellman-group14-sha1,
433 diffie-hellman-group1-sha1
434
435 LocalCommand
436 Specifies a command to execute on the local machine after
437 successfully connecting to the server. The command string
438 extends to the end of the line, and is executed with the user's
439 shell. The following escape character substitutions will be
440 performed: `%d' (local user's home directory), `%h' (remote host
441 name), `%l' (local host name), `%n' (host name as provided on the
442 command line), `%p' (remote port), `%r' (remote user name) or
443 `%u' (local user name).
444
445 The command is run synchronously and does not have access to the
446 session of the ssh(1) that spawned it. It should not be used for
447 interactive commands.
448
449 This directive is ignored unless PermitLocalCommand has been
450 enabled.
451
452 LocalForward
453 Specifies that a TCP port on the local machine be forwarded over
454 the secure channel to the specified host and port from the remote
455 machine. The first argument must be [bind_address:]port and the
456 second argument must be host:hostport. IPv6 addresses can be
457 specified by enclosing addresses in square brackets. Multiple
458 forwardings may be specified, and additional forwardings can be
459 given on the command line. Only the superuser can forward
460 privileged ports. By default, the local port is bound in
461 accordance with the GatewayPorts setting. However, an explicit
462 bind_address may be used to bind the connection to a specific
463 address. The bind_address of ``localhost'' indicates that the
464 listening port be bound for local use only, while an empty
465 address or `*' indicates that the port should be available from
466 all interfaces.
467
468 LogLevel
469 Gives the verbosity level that is used when logging messages from
470 ssh(1). The possible values are: QUIET, FATAL, ERROR, INFO,
471 VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
472 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
473 higher levels of verbose output.
474
475 MACs Specifies the MAC (message authentication code) algorithms in
476 order of preference. The MAC algorithm is used in protocol
477 version 2 for data integrity protection. Multiple algorithms
478 must be comma-separated. The algorithms that contain ``-etm''
479 calculate the MAC after encryption (encrypt-then-mac). These are
480 considered safer and their use recommended. The default is:
481
482 hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
483 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
484 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
485 hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,
486 hmac-md5-96-etm@openssh.com,
487 hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
488 hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
489 hmac-sha1-96,hmac-md5-96
490
491 NoHostAuthenticationForLocalhost
492 This option can be used if the home directory is shared across
493 machines. In this case localhost will refer to a different
494 machine on each of the machines and the user will get many
495 warnings about changed host keys. However, this option disables
496 host authentication for localhost. The argument to this keyword
497 must be ``yes'' or ``no''. The default is to check the host key
498 for localhost.
499
500 NumberOfPasswordPrompts
501 Specifies the number of password prompts before giving up. The
502 argument to this keyword must be an integer. The default is 3.
503
504 PasswordAuthentication
505 Specifies whether to use password authentication. The argument
506 to this keyword must be ``yes'' or ``no''. The default is
507 ``yes''.
508
509 PermitLocalCommand
510 Allow local command execution via the LocalCommand option or
511 using the !command escape sequence in ssh(1). The argument must
512 be ``yes'' or ``no''. The default is ``no''.
513
514 PKCS11Provider
515 Specifies which PKCS#11 provider to use. The argument to this
516 keyword is the PKCS#11 shared library ssh(1) should use to
517 communicate with a PKCS#11 token providing the user's private RSA
518 key.
519
520 Port Specifies the port number to connect on the remote host. The
521 default is 22.
522
523 PreferredAuthentications
524 Specifies the order in which the client should try protocol 2
525 authentication methods. This allows a client to prefer one
526 method (e.g. keyboard-interactive) over another method (e.g.
527 password). The default is:
528
529 gssapi-with-mic,hostbased,publickey,
530 keyboard-interactive,password
531
532 Protocol
533 Specifies the protocol versions ssh(1) should support in order of
534 preference. The possible values are `1' and `2'. Multiple
535 versions must be comma-separated. When this option is set to
536 ``2,1'' ssh will try version 2 and fall back to version 1 if
537 version 2 is not available. The default is `2'.
538
539 ProxyCommand
540 Specifies the command to use to connect to the server. The
541 command string extends to the end of the line, and is executed
542 with the user's shell. In the command string, any occurrence of
543 `%h' will be substituted by the host name to connect, `%p' by the
544 port, and `%r' by the remote user name. The command can be
545 basically anything, and should read from its standard input and
546 write to its standard output. It should eventually connect an
547 sshd(8) server running on some machine, or execute sshd -i
548 somewhere. Host key management will be done using the HostName
549 of the host being connected (defaulting to the name typed by the
550 user). Setting the command to ``none'' disables this option
551 entirely. Note that CheckHostIP is not available for connects
552 with a proxy command.
553
554 This directive is useful in conjunction with nc(1) and its proxy
555 support. For example, the following directive would connect via
556 an HTTP proxy at 192.0.2.0:
557
558 ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
559
560 PubkeyAuthentication
561 Specifies whether to try public key authentication. The argument
562 to this keyword must be ``yes'' or ``no''. The default is
563 ``yes''. This option applies to protocol version 2 only.
564
565 RekeyLimit
566 Specifies the maximum amount of data that may be transmitted
567 before the session key is renegotiated, optionally followed a
568 maximum amount of time that may pass before the session key is
569 renegotiated. The first argument is specified in bytes and may
570 have a suffix of `K', `M', or `G' to indicate Kilobytes,
571 Megabytes, or Gigabytes, respectively. The default is between
572 `1G' and `4G', depending on the cipher. The optional second
573 value is specified in seconds and may use any of the units
574 documented in the TIME FORMATS section of sshd_config(5). The
575 default value for RekeyLimit is ``default none'', which means
576 that rekeying is performed after the cipher's default amount of
577 data has been sent or received and no time based rekeying is
578 done. This option applies to protocol version 2 only.
579
580 RemoteForward
581 Specifies that a TCP port on the remote machine be forwarded over
582 the secure channel to the specified host and port from the local
583 machine. The first argument must be [bind_address:]port and the
584 second argument must be host:hostport. IPv6 addresses can be
585 specified by enclosing addresses in square brackets. Multiple
586 forwardings may be specified, and additional forwardings can be
587 given on the command line. Privileged ports can be forwarded
588 only when logging in as root on the remote machine.
589
590 If the port argument is `0', the listen port will be dynamically
591 allocated on the server and reported to the client at run time.
592
593 If the bind_address is not specified, the default is to only bind
594 to loopback addresses. If the bind_address is `*' or an empty
595 string, then the forwarding is requested to listen on all
596 interfaces. Specifying a remote bind_address will only succeed
597 if the server's GatewayPorts option is enabled (see
598 sshd_config(5)).
599
600 RequestTTY
601 Specifies whether to request a pseudo-tty for the session. The
602 argument may be one of: ``no'' (never request a TTY), ``yes''
603 (always request a TTY when standard input is a TTY), ``force''
604 (always request a TTY) or ``auto'' (request a TTY when opening a
605 login session). This option mirrors the -t and -T flags for
606 ssh(1).
607
608 RhostsRSAAuthentication
609 Specifies whether to try rhosts based authentication with RSA
610 host authentication. The argument must be ``yes'' or ``no''.
611 The default is ``no''. This option applies to protocol version 1
612 only and requires ssh(1) to be setuid root.
613
614 RSAAuthentication
615 Specifies whether to try RSA authentication. The argument to
616 this keyword must be ``yes'' or ``no''. RSA authentication will
617 only be attempted if the identity file exists, or an
618 authentication agent is running. The default is ``yes''. Note
619 that this option applies to protocol version 1 only.
620
621 SendEnv
622 Specifies what variables from the local environ(7) should be sent
623 to the server. Note that environment passing is only supported
624 for protocol 2. The server must also support it, and the server
625 must be configured to accept these environment variables. Refer
626 to AcceptEnv in sshd_config(5) for how to configure the server.
627 Variables are specified by name, which may contain wildcard
628 characters. Multiple environment variables may be separated by
629 whitespace or spread across multiple SendEnv directives. The
630 default is not to send any environment variables.
631
632 See PATTERNS for more information on patterns.
633
634 ServerAliveCountMax
635 Sets the number of server alive messages (see below) which may be
636 sent without ssh(1) receiving any messages back from the server.
637 If this threshold is reached while server alive messages are
638 being sent, ssh will disconnect from the server, terminating the
639 session. It is important to note that the use of server alive
640 messages is very different from TCPKeepAlive (below). The server
641 alive messages are sent through the encrypted channel and
642 therefore will not be spoofable. The TCP keepalive option
643 enabled by TCPKeepAlive is spoofable. The server alive mechanism
644 is valuable when the client or server depend on knowing when a
645 connection has become inactive.
646
647 The default value is 3. If, for example, ServerAliveInterval
648 (see below) is set to 15 and ServerAliveCountMax is left at the
649 default, if the server becomes unresponsive, ssh will disconnect
650 after approximately 45 seconds. This option applies to protocol
651 version 2 only.
652
653 ServerAliveInterval
654 Sets a timeout interval in seconds after which if no data has
655 been received from the server, ssh(1) will send a message through
656 the encrypted channel to request a response from the server. The
657 default is 0, indicating that these messages will not be sent to
658 the server. This option applies to protocol version 2 only.
659
660 StrictHostKeyChecking
661 If this flag is set to ``yes'', ssh(1) will never automatically
662 add host keys to the ~/.ssh/known_hosts file, and refuses to
663 connect to hosts whose host key has changed. This provides
664 maximum protection against trojan horse attacks, though it can be
665 annoying when the /etc/ssh/ssh_known_hosts file is poorly
666 maintained or when connections to new hosts are frequently made.
667 This option forces the user to manually add all new hosts. If
668 this flag is set to ``no'', ssh will automatically add new host
669 keys to the user known hosts files. If this flag is set to
670 ``ask'', new host keys will be added to the user known host files
671 only after the user has confirmed that is what they really want
672 to do, and ssh will refuse to connect to hosts whose host key has
673 changed. The host keys of known hosts will be verified
674 automatically in all cases. The argument must be ``yes'',
675 ``no'', or ``ask''. The default is ``ask''.
676
677 TCPKeepAlive
678 Specifies whether the system should send TCP keepalive messages
679 to the other side. If they are sent, death of the connection or
680 crash of one of the machines will be properly noticed. However,
681 this means that connections will die if the route is down
682 temporarily, and some people find it annoying.
683
684 The default is ``yes'' (to send TCP keepalive messages), and the
685 client will notice if the network goes down or the remote host
686 dies. This is important in scripts, and many users want it too.
687
688 To disable TCP keepalive messages, the value should be set to
689 ``no''.
690
691 Tunnel Request tun(4) device forwarding between the client and the
692 server. The argument must be ``yes'', ``point-to-point'' (layer
693 3), ``ethernet'' (layer 2), or ``no''. Specifying ``yes''
694 requests the default tunnel mode, which is ``point-to-point''.
695 The default is ``no''.
696
697 TunnelDevice
698 Specifies the tun(4) devices to open on the client (local_tun)
699 and the server (remote_tun).
700
701 The argument must be local_tun[:remote_tun]. The devices may be
702 specified by numerical ID or the keyword ``any'', which uses the
703 next available tunnel device. If remote_tun is not specified, it
704 defaults to ``any''. The default is ``any:any''.
705
706 UsePrivilegedPort
707 Specifies whether to use a privileged port for outgoing
708 connections. The argument must be ``yes'' or ``no''. The
709 default is ``no''. If set to ``yes'', ssh(1) must be setuid
710 root. Note that this option must be set to ``yes'' for
711 RhostsRSAAuthentication with older servers.
712
713 User Specifies the user to log in as. This can be useful when a
714 different user name is used on different machines. This saves
715 the trouble of having to remember to give the user name on the
716 command line.
717
718 UserKnownHostsFile
719 Specifies one or more files to use for the user host key
720 database, separated by whitespace. The default is
721 ~/.ssh/known_hosts, ~/.ssh/known_hosts2.
722
723 VerifyHostKeyDNS
724 Specifies whether to verify the remote key using DNS and SSHFP
725 resource records. If this option is set to ``yes'', the client
726 will implicitly trust keys that match a secure fingerprint from
727 DNS. Insecure fingerprints will be handled as if this option was
728 set to ``ask''. If this option is set to ``ask'', information on
729 fingerprint match will be displayed, but the user will still need
730 to confirm new host keys according to the StrictHostKeyChecking
731 option. The argument must be ``yes'', ``no'', or ``ask''. The
732 default is ``no''. Note that this option applies to protocol
733 version 2 only.
734
735 See also VERIFYING HOST KEYS in ssh(1).
736
737 VisualHostKey
738 If this flag is set to ``yes'', an ASCII art representation of
739 the remote host key fingerprint is printed in addition to the hex
740 fingerprint string at login and for unknown host keys. If this
741 flag is set to ``no'', no fingerprint strings are printed at
742 login and only the hex fingerprint string will be printed for
743 unknown host keys. The default is ``no''.
744
745 XAuthLocation
746 Specifies the full pathname of the xauth(1) program. The default
747 is /usr/X11R6/bin/xauth.
748
749PATTERNS
750 A pattern consists of zero or more non-whitespace characters, `*' (a
751 wildcard that matches zero or more characters), or `?' (a wildcard that
752 matches exactly one character). For example, to specify a set of
753 declarations for any host in the ``.co.uk'' set of domains, the following
754 pattern could be used:
755
756 Host *.co.uk
757
758 The following pattern would match any host in the 192.168.0.[0-9] network
759 range:
760
761 Host 192.168.0.?
762
763 A pattern-list is a comma-separated list of patterns. Patterns within
764 pattern-lists may be negated by preceding them with an exclamation mark
765 (`!'). For example, to allow a key to be used from anywhere within an
766 organisation except from the ``dialup'' pool, the following entry (in
767 authorized_keys) could be used:
768
769 from="!*.dialup.example.com,*.example.com"
770
771FILES
772 ~/.ssh/config
773 This is the per-user configuration file. The format of this file
774 is described above. This file is used by the SSH client.
775 Because of the potential for abuse, this file must have strict
776 permissions: read/write for the user, and not accessible by
777 others.
778
779 /etc/ssh/ssh_config
780 Systemwide configuration file. This file provides defaults for
781 those values that are not specified in the user's configuration
782 file, and for those users who do not have a configuration file.
783 This file must be world-readable.
784
785SEE ALSO
786 ssh(1)
787
788AUTHORS
789 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
790 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
791 de Raadt and Dug Song removed many bugs, re-added newer features and
792 created OpenSSH. Markus Friedl contributed the support for SSH protocol
793 versions 1.5 and 2.0.
794
795OpenBSD 5.4 June 27, 2013 OpenBSD 5.4
diff --git a/ssh_config.5 b/ssh_config.5
index 9ddd6b8a6..5d76c6d2d 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.168 2013/08/20 06:56:07 jmc Exp $ 36.\" $OpenBSD: ssh_config.5,v 1.166 2013/06/27 14:05:37 jmc Exp $
37.Dd $Mdocdate: August 20 2013 $ 37.Dd $Mdocdate: June 27 2013 $
38.Dt SSH_CONFIG 5 38.Dt SSH_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -937,14 +937,6 @@ For example, the following directive would connect via an HTTP proxy at
937.Bd -literal -offset 3n 937.Bd -literal -offset 3n
938ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p 938ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
939.Ed 939.Ed
940.It Cm ProxyUseFdpass
941Specifies that
942.Cm ProxyCommand
943will pass a connected file descriptor back to
944.Xr ssh 1
945instead of continuing to execute and pass data.
946The default is
947.Dq no .
948.It Cm PubkeyAuthentication 940.It Cm PubkeyAuthentication
949Specifies whether to try public key authentication. 941Specifies whether to try public key authentication.
950The argument to this keyword must be 942The argument to this keyword must be
diff --git a/sshconnect.c b/sshconnect.c
index 76bb5cdac..483eb85ac 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.239 2013/08/20 00:11:38 djm Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.238 2013/05/17 00:13:14 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
@@ -59,7 +59,6 @@
59#include "misc.h" 59#include "misc.h"
60#include "dns.h" 60#include "dns.h"
61#include "roaming.h" 61#include "roaming.h"
62#include "monitor_fdpass.h"
63#include "ssh2.h" 62#include "ssh2.h"
64#include "version.h" 63#include "version.h"
65 64
@@ -79,113 +78,16 @@ extern uid_t original_effective_uid;
79static int show_other_keys(struct hostkeys *, Key *); 78static int show_other_keys(struct hostkeys *, Key *);
80static void warn_changed_key(Key *); 79static void warn_changed_key(Key *);
81 80
82/* Expand a proxy command */
83static char *
84expand_proxy_command(const char *proxy_command, const char *user,
85 const char *host, int port)
86{
87 char *tmp, *ret, strport[NI_MAXSERV];
88
89 snprintf(strport, sizeof strport, "%hu", port);
90 xasprintf(&tmp, "exec %s", proxy_command);
91 ret = percent_expand(tmp, "h", host, "p", strport,
92 "r", options.user, (char *)NULL);
93 free(tmp);
94 return ret;
95}
96
97/*
98 * Connect to the given ssh server using a proxy command that passes a
99 * a connected fd back to us.
100 */
101static int
102ssh_proxy_fdpass_connect(const char *host, u_short port,
103 const char *proxy_command)
104{
105 char *command_string;
106 int sp[2], sock;
107 pid_t pid;
108 char *shell;
109
110 if ((shell = getenv("SHELL")) == NULL)
111 shell = _PATH_BSHELL;
112
113 if (socketpair(AF_UNIX, SOCK_STREAM, 0, sp) < 0)
114 fatal("Could not create socketpair to communicate with "
115 "proxy dialer: %.100s", strerror(errno));
116
117 command_string = expand_proxy_command(proxy_command, options.user,
118 host, port);
119 debug("Executing proxy dialer command: %.500s", command_string);
120
121 /* Fork and execute the proxy command. */
122 if ((pid = fork()) == 0) {
123 char *argv[10];
124
125 /* Child. Permanently give up superuser privileges. */
126 permanently_drop_suid(original_real_uid);
127
128 close(sp[1]);
129 /* Redirect stdin and stdout. */
130 if (sp[0] != 0) {
131 if (dup2(sp[0], 0) < 0)
132 perror("dup2 stdin");
133 }
134 if (sp[0] != 1) {
135 if (dup2(sp[0], 1) < 0)
136 perror("dup2 stdout");
137 }
138 if (sp[0] >= 2)
139 close(sp[0]);
140
141 /*
142 * Stderr is left as it is so that error messages get
143 * printed on the user's terminal.
144 */
145 argv[0] = shell;
146 argv[1] = "-c";
147 argv[2] = command_string;
148 argv[3] = NULL;
149
150 /*
151 * Execute the proxy command.
152 * Note that we gave up any extra privileges above.
153 */
154 execv(argv[0], argv);
155 perror(argv[0]);
156 exit(1);
157 }
158 /* Parent. */
159 if (pid < 0)
160 fatal("fork failed: %.100s", strerror(errno));
161 close(sp[0]);
162 free(command_string);
163
164 if ((sock = mm_receive_fd(sp[1])) == -1)
165 fatal("proxy dialer did not pass back a connection");
166
167 while (waitpid(pid, NULL, 0) == -1)
168 if (errno != EINTR)
169 fatal("Couldn't wait for child: %s", strerror(errno));
170
171 /* Set the connection file descriptors. */
172 packet_set_connection(sock, sock);
173 packet_set_timeout(options.server_alive_interval,
174 options.server_alive_count_max);
175
176 return 0;
177}
178
179/* 81/*
180 * Connect to the given ssh server using a proxy command. 82 * Connect to the given ssh server using a proxy command.
181 */ 83 */
182static int 84static int
183ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) 85ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
184{ 86{
185 char *command_string; 87 char *command_string, *tmp;
186 int pin[2], pout[2]; 88 int pin[2], pout[2];
187 pid_t pid; 89 pid_t pid;
188 char *shell; 90 char *shell, strport[NI_MAXSERV];
189 91
190 if (!strcmp(proxy_command, "-")) { 92 if (!strcmp(proxy_command, "-")) {
191 packet_set_connection(STDIN_FILENO, STDOUT_FILENO); 93 packet_set_connection(STDIN_FILENO, STDOUT_FILENO);
@@ -194,19 +96,29 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
194 return 0; 96 return 0;
195 } 97 }
196 98
197 if (options.proxy_use_fdpass)
198 return ssh_proxy_fdpass_connect(host, port, proxy_command);
199
200 if ((shell = getenv("SHELL")) == NULL || *shell == '\0') 99 if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
201 shell = _PATH_BSHELL; 100 shell = _PATH_BSHELL;
202 101
102 /* Convert the port number into a string. */
103 snprintf(strport, sizeof strport, "%hu", port);
104
105 /*
106 * Build the final command string in the buffer by making the
107 * appropriate substitutions to the given proxy command.
108 *
109 * Use "exec" to avoid "sh -c" processes on some platforms
110 * (e.g. Solaris)
111 */
112 xasprintf(&tmp, "exec %s", proxy_command);
113 command_string = percent_expand(tmp, "h", host, "p", strport,
114 "r", options.user, (char *)NULL);
115 free(tmp);
116
203 /* Create pipes for communicating with the proxy. */ 117 /* Create pipes for communicating with the proxy. */
204 if (pipe(pin) < 0 || pipe(pout) < 0) 118 if (pipe(pin) < 0 || pipe(pout) < 0)
205 fatal("Could not create pipes to communicate with the proxy: %.100s", 119 fatal("Could not create pipes to communicate with the proxy: %.100s",
206 strerror(errno)); 120 strerror(errno));
207 121
208 command_string = expand_proxy_command(proxy_command, options.user,
209 host, port);
210 debug("Executing proxy command: %.500s", command_string); 122 debug("Executing proxy command: %.500s", command_string);
211 123
212 /* Fork and execute the proxy command. */ 124 /* Fork and execute the proxy command. */
diff --git a/sshd.0 b/sshd.0
new file mode 100644
index 000000000..c48b987f9
--- /dev/null
+++ b/sshd.0
@@ -0,0 +1,640 @@
1SSHD(8) OpenBSD System Manager's Manual SSHD(8)
2
3NAME
4 sshd - OpenSSH SSH daemon
5
6SYNOPSIS
7 sshd [-46DdeiqTt] [-b bits] [-C connection_spec]
8 [-c host_certificate_file] [-E log_file] [-f config_file]
9 [-g login_grace_time] [-h host_key_file] [-k key_gen_time]
10 [-o option] [-p port] [-u len]
11
12DESCRIPTION
13 sshd (OpenSSH Daemon) is the daemon program for ssh(1). Together these
14 programs replace rlogin(1) and rsh(1), and provide secure encrypted
15 communications between two untrusted hosts over an insecure network.
16
17 sshd listens for connections from clients. It is normally started at
18 boot from /etc/rc. It forks a new daemon for each incoming connection.
19 The forked daemons handle key exchange, encryption, authentication,
20 command execution, and data exchange.
21
22 sshd can be configured using command-line options or a configuration file
23 (by default sshd_config(5)); command-line options override values
24 specified in the configuration file. sshd rereads its configuration file
25 when it receives a hangup signal, SIGHUP, by executing itself with the
26 name and options it was started with, e.g. /usr/sbin/sshd.
27
28 The options are as follows:
29
30 -4 Forces sshd to use IPv4 addresses only.
31
32 -6 Forces sshd to use IPv6 addresses only.
33
34 -b bits
35 Specifies the number of bits in the ephemeral protocol version 1
36 server key (default 1024).
37
38 -C connection_spec
39 Specify the connection parameters to use for the -T extended test
40 mode. If provided, any Match directives in the configuration
41 file that would apply to the specified user, host, and address
42 will be set before the configuration is written to standard
43 output. The connection parameters are supplied as keyword=value
44 pairs. The keywords are ``user'', ``host'', ``laddr'',
45 ``lport'', and ``addr''. All are required and may be supplied in
46 any order, either with multiple -C options or as a comma-
47 separated list.
48
49 -c host_certificate_file
50 Specifies a path to a certificate file to identify sshd during
51 key exchange. The certificate file must match a host key file
52 specified using the -h option or the HostKey configuration
53 directive.
54
55 -D When this option is specified, sshd will not detach and does not
56 become a daemon. This allows easy monitoring of sshd.
57
58 -d Debug mode. The server sends verbose debug output to standard
59 error, and does not put itself in the background. The server
60 also will not fork and will only process one connection. This
61 option is only intended for debugging for the server. Multiple
62 -d options increase the debugging level. Maximum is 3.
63
64 -E log_file
65 Append debug logs to log_file instead of the system log.
66
67 -e Write debug logs to standard error instead of the system log.
68
69 -f config_file
70 Specifies the name of the configuration file. The default is
71 /etc/ssh/sshd_config. sshd refuses to start if there is no
72 configuration file.
73
74 -g login_grace_time
75 Gives the grace time for clients to authenticate themselves
76 (default 120 seconds). If the client fails to authenticate the
77 user within this many seconds, the server disconnects and exits.
78 A value of zero indicates no limit.
79
80 -h host_key_file
81 Specifies a file from which a host key is read. This option must
82 be given if sshd is not run as root (as the normal host key files
83 are normally not readable by anyone but root). The default is
84 /etc/ssh/ssh_host_key for protocol version 1, and
85 /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key and
86 /etc/ssh/ssh_host_rsa_key for protocol version 2. It is possible
87 to have multiple host key files for the different protocol
88 versions and host key algorithms.
89
90 -i Specifies that sshd is being run from inetd(8). sshd is normally
91 not run from inetd because it needs to generate the server key
92 before it can respond to the client, and this may take tens of
93 seconds. Clients would have to wait too long if the key was
94 regenerated every time. However, with small key sizes (e.g. 512)
95 using sshd from inetd may be feasible.
96
97 -k key_gen_time
98 Specifies how often the ephemeral protocol version 1 server key
99 is regenerated (default 3600 seconds, or one hour). The
100 motivation for regenerating the key fairly often is that the key
101 is not stored anywhere, and after about an hour it becomes
102 impossible to recover the key for decrypting intercepted
103 communications even if the machine is cracked into or physically
104 seized. A value of zero indicates that the key will never be
105 regenerated.
106
107 -o option
108 Can be used to give options in the format used in the
109 configuration file. This is useful for specifying options for
110 which there is no separate command-line flag. For full details
111 of the options, and their values, see sshd_config(5).
112
113 -p port
114 Specifies the port on which the server listens for connections
115 (default 22). Multiple port options are permitted. Ports
116 specified in the configuration file with the Port option are
117 ignored when a command-line port is specified. Ports specified
118 using the ListenAddress option override command-line ports.
119
120 -q Quiet mode. Nothing is sent to the system log. Normally the
121 beginning, authentication, and termination of each connection is
122 logged.
123
124 -T Extended test mode. Check the validity of the configuration
125 file, output the effective configuration to stdout and then exit.
126 Optionally, Match rules may be applied by specifying the
127 connection parameters using one or more -C options.
128
129 -t Test mode. Only check the validity of the configuration file and
130 sanity of the keys. This is useful for updating sshd reliably as
131 configuration options may change.
132
133 -u len This option is used to specify the size of the field in the utmp
134 structure that holds the remote host name. If the resolved host
135 name is longer than len, the dotted decimal value will be used
136 instead. This allows hosts with very long host names that
137 overflow this field to still be uniquely identified. Specifying
138 -u0 indicates that only dotted decimal addresses should be put
139 into the utmp file. -u0 may also be used to prevent sshd from
140 making DNS requests unless the authentication mechanism or
141 configuration requires it. Authentication mechanisms that may
142 require DNS include RhostsRSAAuthentication,
143 HostbasedAuthentication, and using a from="pattern-list" option
144 in a key file. Configuration options that require DNS include
145 using a USER@HOST pattern in AllowUsers or DenyUsers.
146
147AUTHENTICATION
148 The OpenSSH SSH daemon supports SSH protocols 1 and 2. The default is to
149 use protocol 2 only, though this can be changed via the Protocol option
150 in sshd_config(5). Protocol 2 supports DSA, ECDSA and RSA keys; protocol
151 1 only supports RSA keys. For both protocols, each host has a host-
152 specific key, normally 2048 bits, used to identify the host.
153
154 Forward security for protocol 1 is provided through an additional server
155 key, normally 768 bits, generated when the server starts. This key is
156 normally regenerated every hour if it has been used, and is never stored
157 on disk. Whenever a client connects, the daemon responds with its public
158 host and server keys. The client compares the RSA host key against its
159 own database to verify that it has not changed. The client then
160 generates a 256-bit random number. It encrypts this random number using
161 both the host key and the server key, and sends the encrypted number to
162 the server. Both sides then use this random number as a session key
163 which is used to encrypt all further communications in the session. The
164 rest of the session is encrypted using a conventional cipher, currently
165 Blowfish or 3DES, with 3DES being used by default. The client selects
166 the encryption algorithm to use from those offered by the server.
167
168 For protocol 2, forward security is provided through a Diffie-Hellman key
169 agreement. This key agreement results in a shared session key. The rest
170 of the session is encrypted using a symmetric cipher, currently 128-bit
171 AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES. The
172 client selects the encryption algorithm to use from those offered by the
173 server. Additionally, session integrity is provided through a
174 cryptographic message authentication code (hmac-md5, hmac-sha1, umac-64,
175 umac-128, hmac-ripemd160, hmac-sha2-256 or hmac-sha2-512).
176
177 Finally, the server and the client enter an authentication dialog. The
178 client tries to authenticate itself using host-based authentication,
179 public key authentication, challenge-response authentication, or password
180 authentication.
181
182 Regardless of the authentication type, the account is checked to ensure
183 that it is accessible. An account is not accessible if it is locked,
184 listed in DenyUsers or its group is listed in DenyGroups . The
185 definition of a locked account is system dependant. Some platforms have
186 their own account database (eg AIX) and some modify the passwd field (
187 `*LK*' on Solaris and UnixWare, `*' on HP-UX, containing `Nologin' on
188 Tru64, a leading `*LOCKED*' on FreeBSD and a leading `!' on most
189 Linuxes). If there is a requirement to disable password authentication
190 for the account while allowing still public-key, then the passwd field
191 should be set to something other than these values (eg `NP' or `*NP*' ).
192
193 If the client successfully authenticates itself, a dialog for preparing
194 the session is entered. At this time the client may request things like
195 allocating a pseudo-tty, forwarding X11 connections, forwarding TCP
196 connections, or forwarding the authentication agent connection over the
197 secure channel.
198
199 After this, the client either requests a shell or execution of a command.
200 The sides then enter session mode. In this mode, either side may send
201 data at any time, and such data is forwarded to/from the shell or command
202 on the server side, and the user terminal in the client side.
203
204 When the user program terminates and all forwarded X11 and other
205 connections have been closed, the server sends command exit status to the
206 client, and both sides exit.
207
208LOGIN PROCESS
209 When a user successfully logs in, sshd does the following:
210
211 1. If the login is on a tty, and no command has been specified,
212 prints last login time and /etc/motd (unless prevented in the
213 configuration file or by ~/.hushlogin; see the FILES section).
214
215 2. If the login is on a tty, records login time.
216
217 3. Checks /etc/nologin; if it exists, prints contents and quits
218 (unless root).
219
220 4. Changes to run with normal user privileges.
221
222 5. Sets up basic environment.
223
224 6. Reads the file ~/.ssh/environment, if it exists, and users are
225 allowed to change their environment. See the
226 PermitUserEnvironment option in sshd_config(5).
227
228 7. Changes to user's home directory.
229
230 8. If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists,
231 runs it; otherwise runs xauth. The ``rc'' files are given the
232 X11 authentication protocol and cookie in standard input. See
233 SSHRC, below.
234
235 9. Runs user's shell or command.
236
237SSHRC
238 If the file ~/.ssh/rc exists, sh(1) runs it after reading the environment
239 files but before starting the user's shell or command. It must not
240 produce any output on stdout; stderr must be used instead. If X11
241 forwarding is in use, it will receive the "proto cookie" pair in its
242 standard input (and DISPLAY in its environment). The script must call
243 xauth(1) because sshd will not run xauth automatically to add X11
244 cookies.
245
246 The primary purpose of this file is to run any initialization routines
247 which may be needed before the user's home directory becomes accessible;
248 AFS is a particular example of such an environment.
249
250 This file will probably contain some initialization code followed by
251 something similar to:
252
253 if read proto cookie && [ -n "$DISPLAY" ]; then
254 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
255 # X11UseLocalhost=yes
256 echo add unix:`echo $DISPLAY |
257 cut -c11-` $proto $cookie
258 else
259 # X11UseLocalhost=no
260 echo add $DISPLAY $proto $cookie
261 fi | xauth -q -
262 fi
263
264 If this file does not exist, /etc/ssh/sshrc is run, and if that does not
265 exist either, xauth is used to add the cookie.
266
267AUTHORIZED_KEYS FILE FORMAT
268 AuthorizedKeysFile specifies the files containing public keys for public
269 key authentication; if none is specified, the default is
270 ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2. Each line of the
271 file contains one key (empty lines and lines starting with a `#' are
272 ignored as comments). Protocol 1 public keys consist of the following
273 space-separated fields: options, bits, exponent, modulus, comment.
274 Protocol 2 public key consist of: options, keytype, base64-encoded key,
275 comment. The options field is optional; its presence is determined by
276 whether the line starts with a number or not (the options field never
277 starts with a number). The bits, exponent, modulus, and comment fields
278 give the RSA key for protocol version 1; the comment field is not used
279 for anything (but may be convenient for the user to identify the key).
280 For protocol version 2 the keytype is ``ecdsa-sha2-nistp256'',
281 ``ecdsa-sha2-nistp384'', ``ecdsa-sha2-nistp521'', ``ssh-dss'' or
282 ``ssh-rsa''.
283
284 Note that lines in this file are usually several hundred bytes long
285 (because of the size of the public key encoding) up to a limit of 8
286 kilobytes, which permits DSA keys up to 8 kilobits and RSA keys up to 16
287 kilobits. You don't want to type them in; instead, copy the
288 identity.pub, id_dsa.pub, id_ecdsa.pub, or the id_rsa.pub file and edit
289 it.
290
291 sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
292 2 keys of 768 bits.
293
294 The options (if present) consist of comma-separated option
295 specifications. No spaces are permitted, except within double quotes.
296 The following option specifications are supported (note that option
297 keywords are case-insensitive):
298
299 cert-authority
300 Specifies that the listed key is a certification authority (CA)
301 that is trusted to validate signed certificates for user
302 authentication.
303
304 Certificates may encode access restrictions similar to these key
305 options. If both certificate restrictions and key options are
306 present, the most restrictive union of the two is applied.
307
308 command="command"
309 Specifies that the command is executed whenever this key is used
310 for authentication. The command supplied by the user (if any) is
311 ignored. The command is run on a pty if the client requests a
312 pty; otherwise it is run without a tty. If an 8-bit clean
313 channel is required, one must not request a pty or should specify
314 no-pty. A quote may be included in the command by quoting it
315 with a backslash. This option might be useful to restrict
316 certain public keys to perform just a specific operation. An
317 example might be a key that permits remote backups but nothing
318 else. Note that the client may specify TCP and/or X11 forwarding
319 unless they are explicitly prohibited. The command originally
320 supplied by the client is available in the SSH_ORIGINAL_COMMAND
321 environment variable. Note that this option applies to shell,
322 command or subsystem execution. Also note that this command may
323 be superseded by either a sshd_config(5) ForceCommand directive
324 or a command embedded in a certificate.
325
326 environment="NAME=value"
327 Specifies that the string is to be added to the environment when
328 logging in using this key. Environment variables set this way
329 override other default environment values. Multiple options of
330 this type are permitted. Environment processing is disabled by
331 default and is controlled via the PermitUserEnvironment option.
332 This option is automatically disabled if UseLogin is enabled.
333
334 from="pattern-list"
335 Specifies that in addition to public key authentication, either
336 the canonical name of the remote host or its IP address must be
337 present in the comma-separated list of patterns. See PATTERNS in
338 ssh_config(5) for more information on patterns.
339
340 In addition to the wildcard matching that may be applied to
341 hostnames or addresses, a from stanza may match IP addresses
342 using CIDR address/masklen notation.
343
344 The purpose of this option is to optionally increase security:
345 public key authentication by itself does not trust the network or
346 name servers or anything (but the key); however, if somebody
347 somehow steals the key, the key permits an intruder to log in
348 from anywhere in the world. This additional option makes using a
349 stolen key more difficult (name servers and/or routers would have
350 to be compromised in addition to just the key).
351
352 no-agent-forwarding
353 Forbids authentication agent forwarding when this key is used for
354 authentication.
355
356 no-port-forwarding
357 Forbids TCP forwarding when this key is used for authentication.
358 Any port forward requests by the client will return an error.
359 This might be used, e.g. in connection with the command option.
360
361 no-pty Prevents tty allocation (a request to allocate a pty will fail).
362
363 no-user-rc
364 Disables execution of ~/.ssh/rc.
365
366 no-X11-forwarding
367 Forbids X11 forwarding when this key is used for authentication.
368 Any X11 forward requests by the client will return an error.
369
370 permitopen="host:port"
371 Limit local ``ssh -L'' port forwarding such that it may only
372 connect to the specified host and port. IPv6 addresses can be
373 specified by enclosing the address in square brackets. Multiple
374 permitopen options may be applied separated by commas. No
375 pattern matching is performed on the specified hostnames, they
376 must be literal domains or addresses. A port specification of *
377 matches any port.
378
379 principals="principals"
380 On a cert-authority line, specifies allowed principals for
381 certificate authentication as a comma-separated list. At least
382 one name from the list must appear in the certificate's list of
383 principals for the certificate to be accepted. This option is
384 ignored for keys that are not marked as trusted certificate
385 signers using the cert-authority option.
386
387 tunnel="n"
388 Force a tun(4) device on the server. Without this option, the
389 next available device will be used if the client requests a
390 tunnel.
391
392 An example authorized_keys file:
393
394 # Comments allowed at start of line
395 ssh-rsa AAAAB3Nza...LiPk== user@example.net
396 from="*.sales.example.net,!pc.sales.example.net" ssh-rsa
397 AAAAB2...19Q== john@example.net
398 command="dump /home",no-pty,no-port-forwarding ssh-dss
399 AAAAC3...51R== example.net
400 permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss
401 AAAAB5...21S==
402 tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...==
403 jane@example.net
404
405SSH_KNOWN_HOSTS FILE FORMAT
406 The /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts files contain host
407 public keys for all known hosts. The global file should be prepared by
408 the administrator (optional), and the per-user file is maintained
409 automatically: whenever the user connects from an unknown host, its key
410 is added to the per-user file.
411
412 Each line in these files contains the following fields: markers
413 (optional), hostnames, bits, exponent, modulus, comment. The fields are
414 separated by spaces.
415
416 The marker is optional, but if it is present then it must be one of
417 ``@cert-authority'', to indicate that the line contains a certification
418 authority (CA) key, or ``@revoked'', to indicate that the key contained
419 on the line is revoked and must not ever be accepted. Only one marker
420 should be used on a key line.
421
422 Hostnames is a comma-separated list of patterns (`*' and `?' act as
423 wildcards); each pattern in turn is matched against the canonical host
424 name (when authenticating a client) or against the user-supplied name
425 (when authenticating a server). A pattern may also be preceded by `!' to
426 indicate negation: if the host name matches a negated pattern, it is not
427 accepted (by that line) even if it matched another pattern on the line.
428 A hostname or address may optionally be enclosed within `[' and `]'
429 brackets then followed by `:' and a non-standard port number.
430
431 Alternately, hostnames may be stored in a hashed form which hides host
432 names and addresses should the file's contents be disclosed. Hashed
433 hostnames start with a `|' character. Only one hashed hostname may
434 appear on a single line and none of the above negation or wildcard
435 operators may be applied.
436
437 Bits, exponent, and modulus are taken directly from the RSA host key;
438 they can be obtained, for example, from /etc/ssh/ssh_host_key.pub. The
439 optional comment field continues to the end of the line, and is not used.
440
441 Lines starting with `#' and empty lines are ignored as comments.
442
443 When performing host authentication, authentication is accepted if any
444 matching line has the proper key; either one that matches exactly or, if
445 the server has presented a certificate for authentication, the key of the
446 certification authority that signed the certificate. For a key to be
447 trusted as a certification authority, it must use the ``@cert-authority''
448 marker described above.
449
450 The known hosts file also provides a facility to mark keys as revoked,
451 for example when it is known that the associated private key has been
452 stolen. Revoked keys are specified by including the ``@revoked'' marker
453 at the beginning of the key line, and are never accepted for
454 authentication or as certification authorities, but instead will produce
455 a warning from ssh(1) when they are encountered.
456
457 It is permissible (but not recommended) to have several lines or
458 different host keys for the same names. This will inevitably happen when
459 short forms of host names from different domains are put in the file. It
460 is possible that the files contain conflicting information;
461 authentication is accepted if valid information can be found from either
462 file.
463
464 Note that the lines in these files are typically hundreds of characters
465 long, and you definitely don't want to type in the host keys by hand.
466 Rather, generate them by a script, ssh-keyscan(1) or by taking
467 /etc/ssh/ssh_host_key.pub and adding the host names at the front.
468 ssh-keygen(1) also offers some basic automated editing for
469 ~/.ssh/known_hosts including removing hosts matching a host name and
470 converting all host names to their hashed representations.
471
472 An example ssh_known_hosts file:
473
474 # Comments allowed at start of line
475 closenet,...,192.0.2.53 1024 37 159...93 closenet.example.net
476 cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
477 # A hashed hostname
478 |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
479 AAAA1234.....=
480 # A revoked key
481 @revoked * ssh-rsa AAAAB5W...
482 # A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
483 @cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
484
485FILES
486 ~/.hushlogin
487 This file is used to suppress printing the last login time and
488 /etc/motd, if PrintLastLog and PrintMotd, respectively, are
489 enabled. It does not suppress printing of the banner specified
490 by Banner.
491
492 ~/.rhosts
493 This file is used for host-based authentication (see ssh(1) for
494 more information). On some machines this file may need to be
495 world-readable if the user's home directory is on an NFS
496 partition, because sshd reads it as root. Additionally, this
497 file must be owned by the user, and must not have write
498 permissions for anyone else. The recommended permission for most
499 machines is read/write for the user, and not accessible by
500 others.
501
502 ~/.shosts
503 This file is used in exactly the same way as .rhosts, but allows
504 host-based authentication without permitting login with
505 rlogin/rsh.
506
507 ~/.ssh/
508 This directory is the default location for all user-specific
509 configuration and authentication information. There is no
510 general requirement to keep the entire contents of this directory
511 secret, but the recommended permissions are read/write/execute
512 for the user, and not accessible by others.
513
514 ~/.ssh/authorized_keys
515 Lists the public keys (DSA/ECDSA/RSA) that can be used for
516 logging in as this user. The format of this file is described
517 above. The content of the file is not highly sensitive, but the
518 recommended permissions are read/write for the user, and not
519 accessible by others.
520
521 If this file, the ~/.ssh directory, or the user's home directory
522 are writable by other users, then the file could be modified or
523 replaced by unauthorized users. In this case, sshd will not
524 allow it to be used unless the StrictModes option has been set to
525 ``no''.
526
527 ~/.ssh/environment
528 This file is read into the environment at login (if it exists).
529 It can only contain empty lines, comment lines (that start with
530 `#'), and assignment lines of the form name=value. The file
531 should be writable only by the user; it need not be readable by
532 anyone else. Environment processing is disabled by default and
533 is controlled via the PermitUserEnvironment option.
534
535 ~/.ssh/known_hosts
536 Contains a list of host keys for all hosts the user has logged
537 into that are not already in the systemwide list of known host
538 keys. The format of this file is described above. This file
539 should be writable only by root/the owner and can, but need not
540 be, world-readable.
541
542 ~/.ssh/rc
543 Contains initialization routines to be run before the user's home
544 directory becomes accessible. This file should be writable only
545 by the user, and need not be readable by anyone else.
546
547 /etc/hosts.allow
548 /etc/hosts.deny
549 Access controls that should be enforced by tcp-wrappers are
550 defined here. Further details are described in hosts_access(5).
551
552 /etc/hosts.equiv
553 This file is for host-based authentication (see ssh(1)). It
554 should only be writable by root.
555
556 /etc/moduli
557 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group
558 Exchange". The file format is described in moduli(5).
559
560 /etc/motd
561 See motd(5).
562
563 /etc/nologin
564 If this file exists, sshd refuses to let anyone except root log
565 in. The contents of the file are displayed to anyone trying to
566 log in, and non-root connections are refused. The file should be
567 world-readable.
568
569 /etc/shosts.equiv
570 This file is used in exactly the same way as hosts.equiv, but
571 allows host-based authentication without permitting login with
572 rlogin/rsh.
573
574 /etc/ssh/ssh_host_key
575 /etc/ssh/ssh_host_dsa_key
576 /etc/ssh/ssh_host_ecdsa_key
577 /etc/ssh/ssh_host_rsa_key
578 These files contain the private parts of the host keys. These
579 files should only be owned by root, readable only by root, and
580 not accessible to others. Note that sshd does not start if these
581 files are group/world-accessible.
582
583 /etc/ssh/ssh_host_key.pub
584 /etc/ssh/ssh_host_dsa_key.pub
585 /etc/ssh/ssh_host_ecdsa_key.pub
586 /etc/ssh/ssh_host_rsa_key.pub
587 These files contain the public parts of the host keys. These
588 files should be world-readable but writable only by root. Their
589 contents should match the respective private parts. These files
590 are not really used for anything; they are provided for the
591 convenience of the user so their contents can be copied to known
592 hosts files. These files are created using ssh-keygen(1).
593
594 /etc/ssh/ssh_known_hosts
595 Systemwide list of known host keys. This file should be prepared
596 by the system administrator to contain the public host keys of
597 all machines in the organization. The format of this file is
598 described above. This file should be writable only by root/the
599 owner and should be world-readable.
600
601 /etc/ssh/sshd_config
602 Contains configuration data for sshd. The file format and
603 configuration options are described in sshd_config(5).
604
605 /etc/ssh/sshrc
606 Similar to ~/.ssh/rc, it can be used to specify machine-specific
607 login-time initializations globally. This file should be
608 writable only by root, and should be world-readable.
609
610 /var/empty
611 chroot(2) directory used by sshd during privilege separation in
612 the pre-authentication phase. The directory should not contain
613 any files and must be owned by root and not group or world-
614 writable.
615
616 /var/run/sshd.pid
617 Contains the process ID of the sshd listening for connections (if
618 there are several daemons running concurrently for different
619 ports, this contains the process ID of the one started last).
620 The content of this file is not sensitive; it can be world-
621 readable.
622
623SEE ALSO
624 scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
625 ssh-keyscan(1), chroot(2), hosts_access(5), login.conf(5), moduli(5),
626 sshd_config(5), inetd(8), sftp-server(8)
627
628AUTHORS
629 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
630 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
631 de Raadt and Dug Song removed many bugs, re-added newer features and
632 created OpenSSH. Markus Friedl contributed the support for SSH protocol
633 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
634 for privilege separation.
635
636CAVEATS
637 System security is not improved unless rshd, rlogind, and rexecd are
638 disabled (thus completely disabling rlogin and rsh into the machine).
639
640OpenBSD 5.4 June 27, 2013 OpenBSD 5.4
diff --git a/sshd_config.0 b/sshd_config.0
new file mode 100644
index 000000000..5f1df7b58
--- /dev/null
+++ b/sshd_config.0
@@ -0,0 +1,813 @@
1SSHD_CONFIG(5) OpenBSD Programmer's Manual SSHD_CONFIG(5)
2
3NAME
4 sshd_config - OpenSSH SSH daemon configuration file
5
6SYNOPSIS
7 /etc/ssh/sshd_config
8
9DESCRIPTION
10 sshd(8) reads configuration data from /etc/ssh/sshd_config (or the file
11 specified with -f on the command line). The file contains keyword-
12 argument pairs, one per line. Lines starting with `#' and empty lines
13 are interpreted as comments. Arguments may optionally be enclosed in
14 double quotes (") in order to represent arguments containing spaces.
15
16 The possible keywords and their meanings are as follows (note that
17 keywords are case-insensitive and arguments are case-sensitive):
18
19 AcceptEnv
20 Specifies what environment variables sent by the client will be
21 copied into the session's environ(7). See SendEnv in
22 ssh_config(5) for how to configure the client. Note that
23 environment passing is only supported for protocol 2. Variables
24 are specified by name, which may contain the wildcard characters
25 `*' and `?'. Multiple environment variables may be separated by
26 whitespace or spread across multiple AcceptEnv directives. Be
27 warned that some environment variables could be used to bypass
28 restricted user environments. For this reason, care should be
29 taken in the use of this directive. The default is not to accept
30 any environment variables.
31
32 AddressFamily
33 Specifies which address family should be used by sshd(8). Valid
34 arguments are ``any'', ``inet'' (use IPv4 only), or ``inet6''
35 (use IPv6 only). The default is ``any''.
36
37 AllowAgentForwarding
38 Specifies whether ssh-agent(1) forwarding is permitted. The
39 default is ``yes''. Note that disabling agent forwarding does
40 not improve security unless users are also denied shell access,
41 as they can always install their own forwarders.
42
43 AllowGroups
44 This keyword can be followed by a list of group name patterns,
45 separated by spaces. If specified, login is allowed only for
46 users whose primary group or supplementary group list matches one
47 of the patterns. Only group names are valid; a numerical group
48 ID is not recognized. By default, login is allowed for all
49 groups. The allow/deny directives are processed in the following
50 order: DenyUsers, AllowUsers, DenyGroups, and finally
51 AllowGroups.
52
53 See PATTERNS in ssh_config(5) for more information on patterns.
54
55 AllowTcpForwarding
56 Specifies whether TCP forwarding is permitted. The available
57 options are ``yes'' or ``all'' to allow TCP forwarding, ``no'' to
58 prevent all TCP forwarding, ``local'' to allow local (from the
59 perspective of ssh(1)) forwarding only or ``remote'' to allow
60 remote forwarding only. The default is ``yes''. Note that
61 disabling TCP forwarding does not improve security unless users
62 are also denied shell access, as they can always install their
63 own forwarders.
64
65 AllowUsers
66 This keyword can be followed by a list of user name patterns,
67 separated by spaces. If specified, login is allowed only for
68 user names that match one of the patterns. Only user names are
69 valid; a numerical user ID is not recognized. By default, login
70 is allowed for all users. If the pattern takes the form
71 USER@HOST then USER and HOST are separately checked, restricting
72 logins to particular users from particular hosts. The allow/deny
73 directives are processed in the following order: DenyUsers,
74 AllowUsers, DenyGroups, and finally AllowGroups.
75
76 See PATTERNS in ssh_config(5) for more information on patterns.
77
78 AuthenticationMethods
79 Specifies the authentication methods that must be successfully
80 completed for a user to be granted access. This option must be
81 followed by one or more comma-separated lists of authentication
82 method names. Successful authentication requires completion of
83 every method in at least one of these lists.
84
85 For example, an argument of ``publickey,password
86 publickey,keyboard-interactive'' would require the user to
87 complete public key authentication, followed by either password
88 or keyboard interactive authentication. Only methods that are
89 next in one or more lists are offered at each stage, so for this
90 example, it would not be possible to attempt password or
91 keyboard-interactive authentication before public key.
92
93 For keyboard interactive authentication it is also possible to
94 restrict authentication to a specific device by appending a colon
95 followed by the device identifier ``bsdauth'', ``pam'', or
96 ``skey'', depending on the server configuration. For example,
97 ``keyboard-interactive:bsdauth'' would restrict keyboard
98 interactive authentication to the ``bsdauth'' device.
99
100 This option is only available for SSH protocol 2 and will yield a
101 fatal error if enabled if protocol 1 is also enabled. Note that
102 each authentication method listed should also be explicitly
103 enabled in the configuration. The default is not to require
104 multiple authentication; successful completion of a single
105 authentication method is sufficient.
106
107 AuthorizedKeysCommand
108 Specifies a program to be used to look up the user's public keys.
109 The program must be owned by root and not writable by group or
110 others. It will be invoked with a single argument of the
111 username being authenticated, and should produce on standard
112 output zero or more lines of authorized_keys output (see
113 AUTHORIZED_KEYS in sshd(8)). If a key supplied by
114 AuthorizedKeysCommand does not successfully authenticate and
115 authorize the user then public key authentication continues using
116 the usual AuthorizedKeysFile files. By default, no
117 AuthorizedKeysCommand is run.
118
119 AuthorizedKeysCommandUser
120 Specifies the user under whose account the AuthorizedKeysCommand
121 is run. It is recommended to use a dedicated user that has no
122 other role on the host than running authorized keys commands.
123
124 AuthorizedKeysFile
125 Specifies the file that contains the public keys that can be used
126 for user authentication. The format is described in the
127 AUTHORIZED_KEYS FILE FORMAT section of sshd(8).
128 AuthorizedKeysFile may contain tokens of the form %T which are
129 substituted during connection setup. The following tokens are
130 defined: %% is replaced by a literal '%', %h is replaced by the
131 home directory of the user being authenticated, and %u is
132 replaced by the username of that user. After expansion,
133 AuthorizedKeysFile is taken to be an absolute path or one
134 relative to the user's home directory. Multiple files may be
135 listed, separated by whitespace. The default is
136 ``.ssh/authorized_keys .ssh/authorized_keys2''.
137
138 AuthorizedPrincipalsFile
139 Specifies a file that lists principal names that are accepted for
140 certificate authentication. When using certificates signed by a
141 key listed in TrustedUserCAKeys, this file lists names, one of
142 which must appear in the certificate for it to be accepted for
143 authentication. Names are listed one per line preceded by key
144 options (as described in AUTHORIZED_KEYS FILE FORMAT in sshd(8)).
145 Empty lines and comments starting with `#' are ignored.
146
147 AuthorizedPrincipalsFile may contain tokens of the form %T which
148 are substituted during connection setup. The following tokens
149 are defined: %% is replaced by a literal '%', %h is replaced by
150 the home directory of the user being authenticated, and %u is
151 replaced by the username of that user. After expansion,
152 AuthorizedPrincipalsFile is taken to be an absolute path or one
153 relative to the user's home directory.
154
155 The default is ``none'', i.e. not to use a principals file - in
156 this case, the username of the user must appear in a
157 certificate's principals list for it to be accepted. Note that
158 AuthorizedPrincipalsFile is only used when authentication
159 proceeds using a CA listed in TrustedUserCAKeys and is not
160 consulted for certification authorities trusted via
161 ~/.ssh/authorized_keys, though the principals= key option offers
162 a similar facility (see sshd(8) for details).
163
164 Banner The contents of the specified file are sent to the remote user
165 before authentication is allowed. If the argument is ``none''
166 then no banner is displayed. This option is only available for
167 protocol version 2. By default, no banner is displayed.
168
169 ChallengeResponseAuthentication
170 Specifies whether challenge-response authentication is allowed
171 (e.g. via PAM or though authentication styles supported in
172 login.conf(5)) The default is ``yes''.
173
174 ChrootDirectory
175 Specifies the pathname of a directory to chroot(2) to after
176 authentication. All components of the pathname must be root-
177 owned directories that are not writable by any other user or
178 group. After the chroot, sshd(8) changes the working directory
179 to the user's home directory.
180
181 The pathname may contain the following tokens that are expanded
182 at runtime once the connecting user has been authenticated: %% is
183 replaced by a literal '%', %h is replaced by the home directory
184 of the user being authenticated, and %u is replaced by the
185 username of that user.
186
187 The ChrootDirectory must contain the necessary files and
188 directories to support the user's session. For an interactive
189 session this requires at least a shell, typically sh(1), and
190 basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4),
191 stderr(4), arandom(4) and tty(4) devices. For file transfer
192 sessions using ``sftp'', no additional configuration of the
193 environment is necessary if the in-process sftp server is used,
194 though sessions which use logging do require /dev/log inside the
195 chroot directory (see sftp-server(8) for details).
196
197 The default is not to chroot(2).
198
199 Ciphers
200 Specifies the ciphers allowed for protocol version 2. Multiple
201 ciphers must be comma-separated. The supported ciphers are
202 ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'', ``aes256-cbc'',
203 ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'',
204 ``aes128-gcm@openssh.com'', ``aes256-gcm@openssh.com'',
205 ``arcfour128'', ``arcfour256'', ``arcfour'', ``blowfish-cbc'',
206 and ``cast128-cbc''. The default is:
207
208 aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
209 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
210 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
211 aes256-cbc,arcfour
212
213 ClientAliveCountMax
214 Sets the number of client alive messages (see below) which may be
215 sent without sshd(8) receiving any messages back from the client.
216 If this threshold is reached while client alive messages are
217 being sent, sshd will disconnect the client, terminating the
218 session. It is important to note that the use of client alive
219 messages is very different from TCPKeepAlive (below). The client
220 alive messages are sent through the encrypted channel and
221 therefore will not be spoofable. The TCP keepalive option
222 enabled by TCPKeepAlive is spoofable. The client alive mechanism
223 is valuable when the client or server depend on knowing when a
224 connection has become inactive.
225
226 The default value is 3. If ClientAliveInterval (see below) is
227 set to 15, and ClientAliveCountMax is left at the default,
228 unresponsive SSH clients will be disconnected after approximately
229 45 seconds. This option applies to protocol version 2 only.
230
231 ClientAliveInterval
232 Sets a timeout interval in seconds after which if no data has
233 been received from the client, sshd(8) will send a message
234 through the encrypted channel to request a response from the
235 client. The default is 0, indicating that these messages will
236 not be sent to the client. This option applies to protocol
237 version 2 only.
238
239 Compression
240 Specifies whether compression is allowed, or delayed until the
241 user has authenticated successfully. The argument must be
242 ``yes'', ``delayed'', or ``no''. The default is ``delayed''.
243
244 DenyGroups
245 This keyword can be followed by a list of group name patterns,
246 separated by spaces. Login is disallowed for users whose primary
247 group or supplementary group list matches one of the patterns.
248 Only group names are valid; a numerical group ID is not
249 recognized. By default, login is allowed for all groups. The
250 allow/deny directives are processed in the following order:
251 DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
252
253 See PATTERNS in ssh_config(5) for more information on patterns.
254
255 DenyUsers
256 This keyword can be followed by a list of user name patterns,
257 separated by spaces. Login is disallowed for user names that
258 match one of the patterns. Only user names are valid; a
259 numerical user ID is not recognized. By default, login is
260 allowed for all users. If the pattern takes the form USER@HOST
261 then USER and HOST are separately checked, restricting logins to
262 particular users from particular hosts. The allow/deny
263 directives are processed in the following order: DenyUsers,
264 AllowUsers, DenyGroups, and finally AllowGroups.
265
266 See PATTERNS in ssh_config(5) for more information on patterns.
267
268 ForceCommand
269 Forces the execution of the command specified by ForceCommand,
270 ignoring any command supplied by the client and ~/.ssh/rc if
271 present. The command is invoked by using the user's login shell
272 with the -c option. This applies to shell, command, or subsystem
273 execution. It is most useful inside a Match block. The command
274 originally supplied by the client is available in the
275 SSH_ORIGINAL_COMMAND environment variable. Specifying a command
276 of ``internal-sftp'' will force the use of an in-process sftp
277 server that requires no support files when used with
278 ChrootDirectory.
279
280 GatewayPorts
281 Specifies whether remote hosts are allowed to connect to ports
282 forwarded for the client. By default, sshd(8) binds remote port
283 forwardings to the loopback address. This prevents other remote
284 hosts from connecting to forwarded ports. GatewayPorts can be
285 used to specify that sshd should allow remote port forwardings to
286 bind to non-loopback addresses, thus allowing other hosts to
287 connect. The argument may be ``no'' to force remote port
288 forwardings to be available to the local host only, ``yes'' to
289 force remote port forwardings to bind to the wildcard address, or
290 ``clientspecified'' to allow the client to select the address to
291 which the forwarding is bound. The default is ``no''.
292
293 GSSAPIAuthentication
294 Specifies whether user authentication based on GSSAPI is allowed.
295 The default is ``no''. Note that this option applies to protocol
296 version 2 only.
297
298 GSSAPICleanupCredentials
299 Specifies whether to automatically destroy the user's credentials
300 cache on logout. The default is ``yes''. Note that this option
301 applies to protocol version 2 only.
302
303 HostbasedAuthentication
304 Specifies whether rhosts or /etc/hosts.equiv authentication
305 together with successful public key client host authentication is
306 allowed (host-based authentication). This option is similar to
307 RhostsRSAAuthentication and applies to protocol version 2 only.
308 The default is ``no''.
309
310 HostbasedUsesNameFromPacketOnly
311 Specifies whether or not the server will attempt to perform a
312 reverse name lookup when matching the name in the ~/.shosts,
313 ~/.rhosts, and /etc/hosts.equiv files during
314 HostbasedAuthentication. A setting of ``yes'' means that sshd(8)
315 uses the name supplied by the client rather than attempting to
316 resolve the name from the TCP connection itself. The default is
317 ``no''.
318
319 HostCertificate
320 Specifies a file containing a public host certificate. The
321 certificate's public key must match a private host key already
322 specified by HostKey. The default behaviour of sshd(8) is not to
323 load any certificates.
324
325 HostKey
326 Specifies a file containing a private host key used by SSH. The
327 default is /etc/ssh/ssh_host_key for protocol version 1, and
328 /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key and
329 /etc/ssh/ssh_host_rsa_key for protocol version 2. Note that
330 sshd(8) will refuse to use a file if it is group/world-
331 accessible. It is possible to have multiple host key files.
332 ``rsa1'' keys are used for version 1 and ``dsa'', ``ecdsa'' or
333 ``rsa'' are used for version 2 of the SSH protocol. It is also
334 possible to specify public host key files instead. In this case
335 operations on the private key will be delegated to an
336 ssh-agent(1).
337
338 HostKeyAgent
339 Identifies the UNIX-domain socket used to communicate with an
340 agent that has access to the private host keys. If
341 ``SSH_AUTH_SOCK'' is specified, the location of the socket will
342 be read from the SSH_AUTH_SOCK environment variable.
343
344 IgnoreRhosts
345 Specifies that .rhosts and .shosts files will not be used in
346 RhostsRSAAuthentication or HostbasedAuthentication.
347
348 /etc/hosts.equiv and /etc/shosts.equiv are still used. The
349 default is ``yes''.
350
351 IgnoreUserKnownHosts
352 Specifies whether sshd(8) should ignore the user's
353 ~/.ssh/known_hosts during RhostsRSAAuthentication or
354 HostbasedAuthentication. The default is ``no''.
355
356 IPQoS Specifies the IPv4 type-of-service or DSCP class for the
357 connection. Accepted values are ``af11'', ``af12'', ``af13'',
358 ``af21'', ``af22'', ``af23'', ``af31'', ``af32'', ``af33'',
359 ``af41'', ``af42'', ``af43'', ``cs0'', ``cs1'', ``cs2'', ``cs3'',
360 ``cs4'', ``cs5'', ``cs6'', ``cs7'', ``ef'', ``lowdelay'',
361 ``throughput'', ``reliability'', or a numeric value. This option
362 may take one or two arguments, separated by whitespace. If one
363 argument is specified, it is used as the packet class
364 unconditionally. If two values are specified, the first is
365 automatically selected for interactive sessions and the second
366 for non-interactive sessions. The default is ``lowdelay'' for
367 interactive sessions and ``throughput'' for non-interactive
368 sessions.
369
370 KerberosAuthentication
371 Specifies whether the password provided by the user for
372 PasswordAuthentication will be validated through the Kerberos
373 KDC. To use this option, the server needs a Kerberos servtab
374 which allows the verification of the KDC's identity. The default
375 is ``no''.
376
377 KerberosGetAFSToken
378 If AFS is active and the user has a Kerberos 5 TGT, attempt to
379 acquire an AFS token before accessing the user's home directory.
380 The default is ``no''.
381
382 KerberosOrLocalPasswd
383 If password authentication through Kerberos fails then the
384 password will be validated via any additional local mechanism
385 such as /etc/passwd. The default is ``yes''.
386
387 KerberosTicketCleanup
388 Specifies whether to automatically destroy the user's ticket
389 cache file on logout. The default is ``yes''.
390
391 KexAlgorithms
392 Specifies the available KEX (Key Exchange) algorithms. Multiple
393 algorithms must be comma-separated. The default is
394 ``ecdh-sha2-nistp256'', ``ecdh-sha2-nistp384'',
395 ``ecdh-sha2-nistp521'', ``diffie-hellman-group-exchange-sha256'',
396 ``diffie-hellman-group-exchange-sha1'',
397 ``diffie-hellman-group14-sha1'', ``diffie-hellman-group1-sha1''.
398
399 KeyRegenerationInterval
400 In protocol version 1, the ephemeral server key is automatically
401 regenerated after this many seconds (if it has been used). The
402 purpose of regeneration is to prevent decrypting captured
403 sessions by later breaking into the machine and stealing the
404 keys. The key is never stored anywhere. If the value is 0, the
405 key is never regenerated. The default is 3600 (seconds).
406
407 ListenAddress
408 Specifies the local addresses sshd(8) should listen on. The
409 following forms may be used:
410
411 ListenAddress host|IPv4_addr|IPv6_addr
412 ListenAddress host|IPv4_addr:port
413 ListenAddress [host|IPv6_addr]:port
414
415 If port is not specified, sshd will listen on the address and all
416 prior Port options specified. The default is to listen on all
417 local addresses. Multiple ListenAddress options are permitted.
418 Additionally, any Port options must precede this option for non-
419 port qualified addresses.
420
421 LoginGraceTime
422 The server disconnects after this time if the user has not
423 successfully logged in. If the value is 0, there is no time
424 limit. The default is 120 seconds.
425
426 LogLevel
427 Gives the verbosity level that is used when logging messages from
428 sshd(8). The possible values are: QUIET, FATAL, ERROR, INFO,
429 VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
430 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
431 higher levels of debugging output. Logging with a DEBUG level
432 violates the privacy of users and is not recommended.
433
434 MACs Specifies the available MAC (message authentication code)
435 algorithms. The MAC algorithm is used in protocol version 2 for
436 data integrity protection. Multiple algorithms must be comma-
437 separated. The algorithms that contain ``-etm'' calculate the
438 MAC after encryption (encrypt-then-mac). These are considered
439 safer and their use recommended. The default is:
440
441 hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
442 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
443 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
444 hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,
445 hmac-md5-96-etm@openssh.com,
446 hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
447 hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
448 hmac-sha1-96,hmac-md5-96
449
450 Match Introduces a conditional block. If all of the criteria on the
451 Match line are satisfied, the keywords on the following lines
452 override those set in the global section of the config file,
453 until either another Match line or the end of the file.
454
455 The arguments to Match are one or more criteria-pattern pairs.
456 The available criteria are User, Group, Host, LocalAddress,
457 LocalPort, and Address. The match patterns may consist of single
458 entries or comma-separated lists and may use the wildcard and
459 negation operators described in the PATTERNS section of
460 ssh_config(5).
461
462 The patterns in an Address criteria may additionally contain
463 addresses to match in CIDR address/masklen format, e.g.
464 ``192.0.2.0/24'' or ``3ffe:ffff::/32''. Note that the mask
465 length provided must be consistent with the address - it is an
466 error to specify a mask length that is too long for the address
467 or one with bits set in this host portion of the address. For
468 example, ``192.0.2.0/33'' and ``192.0.2.0/8'' respectively.
469
470 Only a subset of keywords may be used on the lines following a
471 Match keyword. Available keywords are AcceptEnv,
472 AllowAgentForwarding, AllowGroups, AllowTcpForwarding,
473 AllowUsers, AuthenticationMethods, AuthorizedKeysCommand,
474 AuthorizedKeysCommandUser, AuthorizedKeysFile,
475 AuthorizedPrincipalsFile, Banner, ChrootDirectory, DenyGroups,
476 DenyUsers, ForceCommand, GatewayPorts, GSSAPIAuthentication,
477 HostbasedAuthentication, HostbasedUsesNameFromPacketOnly,
478 KbdInteractiveAuthentication, KerberosAuthentication,
479 MaxAuthTries, MaxSessions, PasswordAuthentication,
480 PermitEmptyPasswords, PermitOpen, PermitRootLogin, PermitTunnel,
481 PubkeyAuthentication, RekeyLimit, RhostsRSAAuthentication,
482 RSAAuthentication, X11DisplayOffset, X11Forwarding and
483 X11UseLocalHost.
484
485 MaxAuthTries
486 Specifies the maximum number of authentication attempts permitted
487 per connection. Once the number of failures reaches half this
488 value, additional failures are logged. The default is 6.
489
490 MaxSessions
491 Specifies the maximum number of open sessions permitted per
492 network connection. The default is 10.
493
494 MaxStartups
495 Specifies the maximum number of concurrent unauthenticated
496 connections to the SSH daemon. Additional connections will be
497 dropped until authentication succeeds or the LoginGraceTime
498 expires for a connection. The default is 10:30:100.
499
500 Alternatively, random early drop can be enabled by specifying the
501 three colon separated values ``start:rate:full'' (e.g.
502 "10:30:60"). sshd(8) will refuse connection attempts with a
503 probability of ``rate/100'' (30%) if there are currently
504 ``start'' (10) unauthenticated connections. The probability
505 increases linearly and all connection attempts are refused if the
506 number of unauthenticated connections reaches ``full'' (60).
507
508 PasswordAuthentication
509 Specifies whether password authentication is allowed. The
510 default is ``yes''.
511
512 PermitEmptyPasswords
513 When password authentication is allowed, it specifies whether the
514 server allows login to accounts with empty password strings. The
515 default is ``no''.
516
517 PermitOpen
518 Specifies the destinations to which TCP port forwarding is
519 permitted. The forwarding specification must be one of the
520 following forms:
521
522 PermitOpen host:port
523 PermitOpen IPv4_addr:port
524 PermitOpen [IPv6_addr]:port
525
526 Multiple forwards may be specified by separating them with
527 whitespace. An argument of ``any'' can be used to remove all
528 restrictions and permit any forwarding requests. An argument of
529 ``none'' can be used to prohibit all forwarding requests. By
530 default all port forwarding requests are permitted.
531
532 PermitRootLogin
533 Specifies whether root can log in using ssh(1). The argument
534 must be ``yes'', ``without-password'', ``forced-commands-only'',
535 or ``no''. The default is ``yes''.
536
537 If this option is set to ``without-password'', password
538 authentication is disabled for root.
539
540 If this option is set to ``forced-commands-only'', root login
541 with public key authentication will be allowed, but only if the
542 command option has been specified (which may be useful for taking
543 remote backups even if root login is normally not allowed). All
544 other authentication methods are disabled for root.
545
546 If this option is set to ``no'', root is not allowed to log in.
547
548 PermitTunnel
549 Specifies whether tun(4) device forwarding is allowed. The
550 argument must be ``yes'', ``point-to-point'' (layer 3),
551 ``ethernet'' (layer 2), or ``no''. Specifying ``yes'' permits
552 both ``point-to-point'' and ``ethernet''. The default is ``no''.
553
554 PermitUserEnvironment
555 Specifies whether ~/.ssh/environment and environment= options in
556 ~/.ssh/authorized_keys are processed by sshd(8). The default is
557 ``no''. Enabling environment processing may enable users to
558 bypass access restrictions in some configurations using
559 mechanisms such as LD_PRELOAD.
560
561 PidFile
562 Specifies the file that contains the process ID of the SSH
563 daemon. The default is /var/run/sshd.pid.
564
565 Port Specifies the port number that sshd(8) listens on. The default
566 is 22. Multiple options of this type are permitted. See also
567 ListenAddress.
568
569 PrintLastLog
570 Specifies whether sshd(8) should print the date and time of the
571 last user login when a user logs in interactively. The default
572 is ``yes''.
573
574 PrintMotd
575 Specifies whether sshd(8) should print /etc/motd when a user logs
576 in interactively. (On some systems it is also printed by the
577 shell, /etc/profile, or equivalent.) The default is ``yes''.
578
579 Protocol
580 Specifies the protocol versions sshd(8) supports. The possible
581 values are `1' and `2'. Multiple versions must be comma-
582 separated. The default is `2'. Note that the order of the
583 protocol list does not indicate preference, because the client
584 selects among multiple protocol versions offered by the server.
585 Specifying ``2,1'' is identical to ``1,2''.
586
587 PubkeyAuthentication
588 Specifies whether public key authentication is allowed. The
589 default is ``yes''. Note that this option applies to protocol
590 version 2 only.
591
592 RekeyLimit
593 Specifies the maximum amount of data that may be transmitted
594 before the session key is renegotiated, optionally followed a
595 maximum amount of time that may pass before the session key is
596 renegotiated. The first argument is specified in bytes and may
597 have a suffix of `K', `M', or `G' to indicate Kilobytes,
598 Megabytes, or Gigabytes, respectively. The default is between
599 `1G' and `4G', depending on the cipher. The optional second
600 value is specified in seconds and may use any of the units
601 documented in the TIME FORMATS section. The default value for
602 RekeyLimit is ``default none'', which means that rekeying is
603 performed after the cipher's default amount of data has been sent
604 or received and no time based rekeying is done. This option
605 applies to protocol version 2 only.
606
607 RevokedKeys
608 Specifies revoked public keys. Keys listed in this file will be
609 refused for public key authentication. Note that if this file is
610 not readable, then public key authentication will be refused for
611 all users. Keys may be specified as a text file, listing one
612 public key per line, or as an OpenSSH Key Revocation List (KRL)
613 as generated by ssh-keygen(1). For more information on KRLs, see
614 the KEY REVOCATION LISTS section in ssh-keygen(1).
615
616 RhostsRSAAuthentication
617 Specifies whether rhosts or /etc/hosts.equiv authentication
618 together with successful RSA host authentication is allowed. The
619 default is ``no''. This option applies to protocol version 1
620 only.
621
622 RSAAuthentication
623 Specifies whether pure RSA authentication is allowed. The
624 default is ``yes''. This option applies to protocol version 1
625 only.
626
627 ServerKeyBits
628 Defines the number of bits in the ephemeral protocol version 1
629 server key. The minimum value is 512, and the default is 1024.
630
631 StrictModes
632 Specifies whether sshd(8) should check file modes and ownership
633 of the user's files and home directory before accepting login.
634 This is normally desirable because novices sometimes accidentally
635 leave their directory or files world-writable. The default is
636 ``yes''. Note that this does not apply to ChrootDirectory, whose
637 permissions and ownership are checked unconditionally.
638
639 Subsystem
640 Configures an external subsystem (e.g. file transfer daemon).
641 Arguments should be a subsystem name and a command (with optional
642 arguments) to execute upon subsystem request.
643
644 The command sftp-server(8) implements the ``sftp'' file transfer
645 subsystem.
646
647 Alternately the name ``internal-sftp'' implements an in-process
648 ``sftp'' server. This may simplify configurations using
649 ChrootDirectory to force a different filesystem root on clients.
650
651 By default no subsystems are defined. Note that this option
652 applies to protocol version 2 only.
653
654 SyslogFacility
655 Gives the facility code that is used when logging messages from
656 sshd(8). The possible values are: DAEMON, USER, AUTH, LOCAL0,
657 LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The
658 default is AUTH.
659
660 TCPKeepAlive
661 Specifies whether the system should send TCP keepalive messages
662 to the other side. If they are sent, death of the connection or
663 crash of one of the machines will be properly noticed. However,
664 this means that connections will die if the route is down
665 temporarily, and some people find it annoying. On the other
666 hand, if TCP keepalives are not sent, sessions may hang
667 indefinitely on the server, leaving ``ghost'' users and consuming
668 server resources.
669
670 The default is ``yes'' (to send TCP keepalive messages), and the
671 server will notice if the network goes down or the client host
672 crashes. This avoids infinitely hanging sessions.
673
674 To disable TCP keepalive messages, the value should be set to
675 ``no''.
676
677 TrustedUserCAKeys
678 Specifies a file containing public keys of certificate
679 authorities that are trusted to sign user certificates for
680 authentication. Keys are listed one per line; empty lines and
681 comments starting with `#' are allowed. If a certificate is
682 presented for authentication and has its signing CA key listed in
683 this file, then it may be used for authentication for any user
684 listed in the certificate's principals list. Note that
685 certificates that lack a list of principals will not be permitted
686 for authentication using TrustedUserCAKeys. For more details on
687 certificates, see the CERTIFICATES section in ssh-keygen(1).
688
689 UseDNS Specifies whether sshd(8) should look up the remote host name and
690 check that the resolved host name for the remote IP address maps
691 back to the very same IP address. The default is ``yes''.
692
693 UseLogin
694 Specifies whether login(1) is used for interactive login
695 sessions. The default is ``no''. Note that login(1) is never
696 used for remote command execution. Note also, that if this is
697 enabled, X11Forwarding will be disabled because login(1) does not
698 know how to handle xauth(1) cookies. If UsePrivilegeSeparation
699 is specified, it will be disabled after authentication.
700
701 UsePAM Enables the Pluggable Authentication Module interface. If set to
702 ``yes'' this will enable PAM authentication using
703 ChallengeResponseAuthentication and PasswordAuthentication in
704 addition to PAM account and session module processing for all
705 authentication types.
706
707 Because PAM challenge-response authentication usually serves an
708 equivalent role to password authentication, you should disable
709 either PasswordAuthentication or ChallengeResponseAuthentication.
710
711 If UsePAM is enabled, you will not be able to run sshd(8) as a
712 non-root user. The default is ``no''.
713
714 UsePrivilegeSeparation
715 Specifies whether sshd(8) separates privileges by creating an
716 unprivileged child process to deal with incoming network traffic.
717 After successful authentication, another process will be created
718 that has the privilege of the authenticated user. The goal of
719 privilege separation is to prevent privilege escalation by
720 containing any corruption within the unprivileged processes. The
721 default is ``yes''. If UsePrivilegeSeparation is set to
722 ``sandbox'' then the pre-authentication unprivileged process is
723 subject to additional restrictions.
724
725 VersionAddendum
726 Optionally specifies additional text to append to the SSH
727 protocol banner sent by the server upon connection. The default
728 is ``none''.
729
730 X11DisplayOffset
731 Specifies the first display number available for sshd(8)'s X11
732 forwarding. This prevents sshd from interfering with real X11
733 servers. The default is 10.
734
735 X11Forwarding
736 Specifies whether X11 forwarding is permitted. The argument must
737 be ``yes'' or ``no''. The default is ``no''.
738
739 When X11 forwarding is enabled, there may be additional exposure
740 to the server and to client displays if the sshd(8) proxy display
741 is configured to listen on the wildcard address (see
742 X11UseLocalhost below), though this is not the default.
743 Additionally, the authentication spoofing and authentication data
744 verification and substitution occur on the client side. The
745 security risk of using X11 forwarding is that the client's X11
746 display server may be exposed to attack when the SSH client
747 requests forwarding (see the warnings for ForwardX11 in
748 ssh_config(5)). A system administrator may have a stance in
749 which they want to protect clients that may expose themselves to
750 attack by unwittingly requesting X11 forwarding, which can
751 warrant a ``no'' setting.
752
753 Note that disabling X11 forwarding does not prevent users from
754 forwarding X11 traffic, as users can always install their own
755 forwarders. X11 forwarding is automatically disabled if UseLogin
756 is enabled.
757
758 X11UseLocalhost
759 Specifies whether sshd(8) should bind the X11 forwarding server
760 to the loopback address or to the wildcard address. By default,
761 sshd binds the forwarding server to the loopback address and sets
762 the hostname part of the DISPLAY environment variable to
763 ``localhost''. This prevents remote hosts from connecting to the
764 proxy display. However, some older X11 clients may not function
765 with this configuration. X11UseLocalhost may be set to ``no'' to
766 specify that the forwarding server should be bound to the
767 wildcard address. The argument must be ``yes'' or ``no''. The
768 default is ``yes''.
769
770 XAuthLocation
771 Specifies the full pathname of the xauth(1) program. The default
772 is /usr/X11R6/bin/xauth.
773
774TIME FORMATS
775 sshd(8) command-line arguments and configuration file options that
776 specify time may be expressed using a sequence of the form:
777 time[qualifier], where time is a positive integer value and qualifier is
778 one of the following:
779
780 <none> seconds
781 s | S seconds
782 m | M minutes
783 h | H hours
784 d | D days
785 w | W weeks
786
787 Each member of the sequence is added together to calculate the total time
788 value.
789
790 Time format examples:
791
792 600 600 seconds (10 minutes)
793 10m 10 minutes
794 1h30m 1 hour 30 minutes (90 minutes)
795
796FILES
797 /etc/ssh/sshd_config
798 Contains configuration data for sshd(8). This file should be
799 writable by root only, but it is recommended (though not
800 necessary) that it be world-readable.
801
802SEE ALSO
803 sshd(8)
804
805AUTHORS
806 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
807 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
808 de Raadt and Dug Song removed many bugs, re-added newer features and
809 created OpenSSH. Markus Friedl contributed the support for SSH protocol
810 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
811 for privilege separation.
812
813OpenBSD 5.4 July 19, 2013 OpenBSD 5.4