]> andersk Git - openssh.git/blame_incremental - configure.ac
- (stevesk) [xmmap.c] missing prototype for fatal()
[openssh.git] / configure.ac
... / ...
CommitLineData
1# $Id$
2
3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c])
5
6AC_CONFIG_HEADER(config.h)
7AC_PROG_CC
8AC_CANONICAL_HOST
9AC_C_BIGENDIAN
10
11# Checks for programs.
12AC_PROG_CPP
13AC_PROG_RANLIB
14AC_PROG_INSTALL
15AC_PATH_PROG(AR, ar)
16AC_PATH_PROGS(PERL, perl5 perl)
17AC_SUBST(PERL)
18AC_PATH_PROG(ENT, ent)
19AC_SUBST(ENT)
20AC_PATH_PROG(TEST_MINUS_S_SH, bash)
21AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
22AC_PATH_PROG(TEST_MINUS_S_SH, sh)
23AC_PATH_PROG(SH, sh)
24
25# System features
26AC_SYS_LARGEFILE
27
28if test -z "$AR" ; then
29 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
30fi
31
32# Use LOGIN_PROGRAM from environment if possible
33if test ! -z "$LOGIN_PROGRAM" ; then
34 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
35else
36 # Search for login
37 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
38 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
39 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
40 fi
41fi
42
43if test -z "$LD" ; then
44 LD=$CC
45fi
46AC_SUBST(LD)
47
48AC_C_INLINE
49if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
50 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
51fi
52
53# Check for some target-specific stuff
54case "$host" in
55*-*-aix*)
56 AFS_LIBS="-lld"
57 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
58 LDFLAGS="$LDFLAGS -L/usr/local/lib"
59 if (test "$LD" != "gcc" && test -z "$blibpath"); then
60 AC_MSG_CHECKING([if linkage editor ($LD) accepts -blibpath])
61 saved_LDFLAGS="$LDFLAGS"
62 LDFLAGS="$LDFLAGS -blibpath:/usr/lib:/lib:/usr/local/lib"
63 AC_TRY_LINK([],
64 [],
65 [
66 AC_MSG_RESULT(yes)
67 blibpath="/usr/lib:/lib:/usr/local/lib"
68 ],
69 [ AC_MSG_RESULT(no) ]
70 )
71 LDFLAGS="$saved_LDFLAGS"
72 fi
73 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)],
74 [AC_CHECK_LIB(s,authenticate,
75 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
76 LIBS="$LIBS -ls"
77 ])
78 ])
79 AC_DEFINE(BROKEN_GETADDRINFO)
80 AC_DEFINE(BROKEN_REALPATH)
81 dnl AIX handles lastlog as part of its login message
82 AC_DEFINE(DISABLE_LASTLOG)
83 AC_DEFINE(LOGIN_NEEDS_UTMPX)
84 ;;
85*-*-cygwin*)
86 LIBS="$LIBS /usr/lib/textmode.o"
87 AC_DEFINE(HAVE_CYGWIN)
88 AC_DEFINE(USE_PIPES)
89 AC_DEFINE(DISABLE_SHADOW)
90 AC_DEFINE(IPV4_DEFAULT)
91 AC_DEFINE(IP_TOS_IS_BROKEN)
92 AC_DEFINE(NO_X11_UNIX_SOCKETS)
93 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT)
94 AC_DEFINE(DISABLE_FD_PASSING)
95 AC_DEFINE(SETGROUPS_NOOP)
96 ;;
97*-*-dgux*)
98 AC_DEFINE(IP_TOS_IS_BROKEN)
99 ;;
100*-*-darwin*)
101 AC_DEFINE(BROKEN_GETADDRINFO)
102 ;;
103*-*-hpux10.26)
104 if test -z "$GCC"; then
105 CFLAGS="$CFLAGS -Ae"
106 fi
107 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
108 IPADDR_IN_DISPLAY=yes
109 AC_DEFINE(HAVE_SECUREWARE)
110 AC_DEFINE(USE_PIPES)
111 AC_DEFINE(LOGIN_NO_ENDOPT)
112 AC_DEFINE(LOGIN_NEEDS_UTMPX)
113 AC_DEFINE(DISABLE_SHADOW)
114 AC_DEFINE(DISABLE_UTMP)
115 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
116 LIBS="$LIBS -lsec -lsecpw"
117 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
118 disable_ptmx_check=yes
119 ;;
120*-*-hpux10*)
121 if test -z "$GCC"; then
122 CFLAGS="$CFLAGS -Ae"
123 fi
124 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
125 IPADDR_IN_DISPLAY=yes
126 AC_DEFINE(USE_PIPES)
127 AC_DEFINE(LOGIN_NO_ENDOPT)
128 AC_DEFINE(LOGIN_NEEDS_UTMPX)
129 AC_DEFINE(DISABLE_SHADOW)
130 AC_DEFINE(DISABLE_UTMP)
131 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
132 LIBS="$LIBS -lsec"
133 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
134 ;;
135*-*-hpux11*)
136 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
137 IPADDR_IN_DISPLAY=yes
138 AC_DEFINE(PAM_SUN_CODEBASE)
139 AC_DEFINE(USE_PIPES)
140 AC_DEFINE(LOGIN_NO_ENDOPT)
141 AC_DEFINE(LOGIN_NEEDS_UTMPX)
142 AC_DEFINE(DISABLE_SHADOW)
143 AC_DEFINE(DISABLE_UTMP)
144 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
145 LIBS="$LIBS -lsec"
146 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
147 ;;
148*-*-irix5*)
149 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
150 LDFLAGS="$LDFLAGS"
151 PATH="$PATH:/usr/etc"
152 AC_DEFINE(BROKEN_INET_NTOA)
153 AC_DEFINE(WITH_ABBREV_NO_TTY)
154 ;;
155*-*-irix6*)
156 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
157 LDFLAGS="$LDFLAGS"
158 PATH="$PATH:/usr/etc"
159 AC_DEFINE(WITH_IRIX_ARRAY)
160 AC_DEFINE(WITH_IRIX_PROJECT)
161 AC_DEFINE(WITH_IRIX_AUDIT)
162 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
163 AC_DEFINE(BROKEN_INET_NTOA)
164 AC_DEFINE(WITH_ABBREV_NO_TTY)
165 ;;
166*-*-linux*)
167 no_dev_ptmx=1
168 check_for_libcrypt_later=1
169 AC_DEFINE(DONT_TRY_OTHER_AF)
170 AC_DEFINE(PAM_TTY_KLUDGE)
171 inet6_default_4in6=yes
172 ;;
173mips-sony-bsd|mips-sony-newsos4)
174 AC_DEFINE(HAVE_NEWS4)
175 SONY=1
176 ;;
177*-*-netbsd*)
178 need_dash_r=1
179 ;;
180*-*-freebsd*)
181 check_for_libcrypt_later=1
182 ;;
183*-next-*)
184 conf_lastlog_location="/usr/adm/lastlog"
185 conf_utmp_location=/etc/utmp
186 conf_wtmp_location=/usr/adm/wtmp
187 MAIL=/usr/spool/mail
188 AC_DEFINE(HAVE_NEXT)
189 AC_DEFINE(BROKEN_REALPATH)
190 AC_DEFINE(USE_PIPES)
191 AC_DEFINE(BROKEN_SAVED_UIDS)
192 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
193 CFLAGS="$CFLAGS"
194 ;;
195*-*-solaris*)
196 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
197 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
198 need_dash_r=1
199 AC_DEFINE(PAM_SUN_CODEBASE)
200 AC_DEFINE(LOGIN_NEEDS_UTMPX)
201 AC_DEFINE(LOGIN_NEEDS_TERM)
202 AC_DEFINE(PAM_TTY_KLUDGE)
203 # hardwire lastlog location (can't detect it on some versions)
204 conf_lastlog_location="/var/adm/lastlog"
205 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
206 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
207 if test "$sol2ver" -ge 8; then
208 AC_MSG_RESULT(yes)
209 AC_DEFINE(DISABLE_UTMP)
210 AC_DEFINE(DISABLE_WTMP)
211 else
212 AC_MSG_RESULT(no)
213 fi
214 ;;
215*-*-sunos4*)
216 CPPFLAGS="$CPPFLAGS -DSUNOS4"
217 AC_CHECK_FUNCS(getpwanam)
218 AC_DEFINE(PAM_SUN_CODEBASE)
219 conf_utmp_location=/etc/utmp
220 conf_wtmp_location=/var/adm/wtmp
221 conf_lastlog_location=/var/adm/lastlog
222 AC_DEFINE(USE_PIPES)
223 ;;
224*-ncr-sysv*)
225 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
226 LDFLAGS="$LDFLAGS -L/usr/local/lib"
227 LIBS="$LIBS -lc89"
228 AC_DEFINE(USE_PIPES)
229 ;;
230*-sni-sysv*)
231 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
232 # /usr/ucblib MUST NOT be searched on ReliantUNIX
233 LDFLAGS="$LDFLAGS -L/usr/local/lib"
234 IPADDR_IN_DISPLAY=yes
235 AC_DEFINE(USE_PIPES)
236 AC_DEFINE(IP_TOS_IS_BROKEN)
237 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
238 # Attention: always take care to bind libsocket and libnsl before libc,
239 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
240 ;;
241*-*-sysv4.2*)
242 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
243 LDFLAGS="$LDFLAGS -L/usr/local/lib"
244 AC_DEFINE(USE_PIPES)
245 ;;
246*-*-sysv5*)
247 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
248 LDFLAGS="$LDFLAGS -L/usr/local/lib"
249 AC_DEFINE(USE_PIPES)
250 ;;
251*-*-sysv*)
252 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
253 LDFLAGS="$LDFLAGS -L/usr/local/lib"
254 ;;
255*-*-sco3.2v4*)
256 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
257 LDFLAGS="$LDFLAGS -L/usr/local/lib"
258 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
259 RANLIB=true
260 no_dev_ptmx=1
261 AC_DEFINE(BROKEN_SYS_TERMIO_H)
262 AC_DEFINE(USE_PIPES)
263 AC_DEFINE(HAVE_SECUREWARE)
264 AC_DEFINE(DISABLE_SHADOW)
265 AC_DEFINE(BROKEN_SAVED_UIDS)
266 AC_CHECK_FUNCS(getluid setluid)
267 MANTYPE=man
268 do_sco3_extra_lib_check=yes
269 ;;
270*-*-sco3.2v5*)
271 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
272 LDFLAGS="$LDFLAGS -L/usr/local/lib"
273 LIBS="$LIBS -lprot -lx -ltinfo -lm"
274 no_dev_ptmx=1
275 AC_DEFINE(USE_PIPES)
276 AC_DEFINE(HAVE_SECUREWARE)
277 AC_DEFINE(DISABLE_SHADOW)
278 AC_DEFINE(DISABLE_FD_PASSING)
279 AC_CHECK_FUNCS(getluid setluid)
280 MANTYPE=man
281 ;;
282*-*-unicos*)
283 no_libsocket=1
284 no_libnsl=1
285 AC_DEFINE(USE_PIPES)
286 AC_DEFINE(DISABLE_FD_PASSING)
287 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
288 LIBS="$LIBS -lgen -lrsc"
289 ;;
290*-dec-osf*)
291 AC_MSG_CHECKING(for Digital Unix SIA)
292 no_osfsia=""
293 AC_ARG_WITH(osfsia,
294 [ --with-osfsia Enable Digital Unix SIA],
295 [
296 if test "x$withval" = "xno" ; then
297 AC_MSG_RESULT(disabled)
298 no_osfsia=1
299 fi
300 ],
301 )
302 if test -z "$no_osfsia" ; then
303 if test -f /etc/sia/matrix.conf; then
304 AC_MSG_RESULT(yes)
305 AC_DEFINE(HAVE_OSF_SIA)
306 AC_DEFINE(DISABLE_LOGIN)
307 LIBS="$LIBS -lsecurity -ldb -lm -laud"
308 else
309 AC_MSG_RESULT(no)
310 fi
311 fi
312 ;;
313
314*-*-nto-qnx)
315 AC_DEFINE(USE_PIPES)
316 AC_DEFINE(NO_X11_UNIX_SOCKETS)
317 AC_DEFINE(MISSING_NFDBITS)
318 AC_DEFINE(MISSING_HOWMANY)
319 AC_DEFINE(MISSING_FD_MASK)
320 ;;
321esac
322
323# Allow user to specify flags
324AC_ARG_WITH(cflags,
325 [ --with-cflags Specify additional flags to pass to compiler],
326 [
327 if test "x$withval" != "xno" ; then
328 CFLAGS="$CFLAGS $withval"
329 fi
330 ]
331)
332AC_ARG_WITH(cppflags,
333 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
334 [
335 if test "x$withval" != "xno"; then
336 CPPFLAGS="$CPPFLAGS $withval"
337 fi
338 ]
339)
340AC_ARG_WITH(ldflags,
341 [ --with-ldflags Specify additional flags to pass to linker],
342 [
343 if test "x$withval" != "xno" ; then
344 LDFLAGS="$LDFLAGS $withval"
345 fi
346 ]
347)
348AC_ARG_WITH(libs,
349 [ --with-libs Specify additional libraries to link with],
350 [
351 if test "x$withval" != "xno" ; then
352 LIBS="$LIBS $withval"
353 fi
354 ]
355)
356
357# Checks for header files.
358AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
359 getopt.h glob.h lastlog.h limits.h login.h \
360 login_cap.h maillock.h netdb.h netgroup.h \
361 netinet/in_systm.h paths.h pty.h readpassphrase.h \
362 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
363 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
364 sys/mman.h sys/select.h sys/stat.h \
365 sys/stropts.h sys/sysmacros.h sys/time.h \
366 sys/un.h time.h ttyent.h usersec.h \
367 util.h utime.h utmp.h utmpx.h)
368
369# Checks for libraries.
370AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
371AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
372
373dnl SCO OS3 needs this for libwrap
374if test "x$with_tcp_wrappers" != "xno" ; then
375 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
376 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
377 fi
378fi
379
380AC_CHECK_FUNC(getspnam, ,
381 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
382
383AC_ARG_WITH(rpath,
384 [ --without-rpath Disable auto-added -R linker paths],
385 [
386 if test "x$withval" = "xno" ; then
387 need_dash_r=""
388 fi
389 if test "x$withval" = "xyes" ; then
390 need_dash_r=1
391 fi
392 ]
393)
394
395dnl zlib is required
396AC_ARG_WITH(zlib,
397 [ --with-zlib=PATH Use zlib in PATH],
398 [
399 if test "x$withval" = "xno" ; then
400 AC_MSG_ERROR([*** zlib is required ***])
401 fi
402 if test -d "$withval/lib"; then
403 if test -n "${need_dash_r}"; then
404 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
405 else
406 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
407 fi
408 else
409 if test -n "${need_dash_r}"; then
410 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
411 else
412 LDFLAGS="-L${withval} ${LDFLAGS}"
413 fi
414 fi
415 if test -d "$withval/include"; then
416 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
417 else
418 CPPFLAGS="-I${withval} ${CPPFLAGS}"
419 fi
420 ]
421)
422
423AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
424
425dnl UnixWare 2.x
426AC_CHECK_FUNC(strcasecmp,
427 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
428)
429AC_CHECK_FUNC(utimes,
430 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
431 LIBS="$LIBS -lc89"]) ]
432)
433
434dnl Checks for libutil functions
435AC_CHECK_HEADERS(libutil.h)
436AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
437AC_CHECK_FUNCS(logout updwtmp logwtmp)
438
439AC_FUNC_STRFTIME
440
441# Check for ALTDIRFUNC glob() extension
442AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
443AC_EGREP_CPP(FOUNDIT,
444 [
445 #include <glob.h>
446 #ifdef GLOB_ALTDIRFUNC
447 FOUNDIT
448 #endif
449 ],
450 [
451 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
452 AC_MSG_RESULT(yes)
453 ],
454 [
455 AC_MSG_RESULT(no)
456 ]
457)
458
459# Check for g.gl_matchc glob() extension
460AC_MSG_CHECKING(for gl_matchc field in glob_t)
461AC_EGREP_CPP(FOUNDIT,
462 [
463 #include <glob.h>
464 int main(void){glob_t g; g.gl_matchc = 1;}
465 ],
466 [
467 AC_DEFINE(GLOB_HAS_GL_MATCHC)
468 AC_MSG_RESULT(yes)
469 ],
470 [
471 AC_MSG_RESULT(no)
472 ]
473)
474
475AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
476AC_TRY_RUN(
477 [
478#include <sys/types.h>
479#include <dirent.h>
480int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
481 ],
482 [AC_MSG_RESULT(yes)],
483 [
484 AC_MSG_RESULT(no)
485 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
486 ]
487)
488
489# Check whether user wants S/Key support
490SKEY_MSG="no"
491AC_ARG_WITH(skey,
492 [ --with-skey[[=PATH]] Enable S/Key support
493 (optionally in PATH)],
494 [
495 if test "x$withval" != "xno" ; then
496
497 if test "x$withval" != "xyes" ; then
498 CPPFLAGS="$CPPFLAGS -I${withval}/include"
499 LDFLAGS="$LDFLAGS -L${withval}/lib"
500 fi
501
502 AC_DEFINE(SKEY)
503 LIBS="-lskey $LIBS"
504 SKEY_MSG="yes"
505
506 AC_MSG_CHECKING([for s/key support])
507 AC_TRY_RUN(
508 [
509#include <stdio.h>
510#include <skey.h>
511int main() { char *ff = skey_keyinfo(""); ff=""; return 0; }
512 ],
513 [AC_MSG_RESULT(yes)],
514 [
515 AC_MSG_RESULT(no)
516 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
517 ])
518 fi
519 ]
520)
521
522# Check whether user wants TCP wrappers support
523TCPW_MSG="no"
524AC_ARG_WITH(tcp-wrappers,
525 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
526 (optionally in PATH)],
527 [
528 if test "x$withval" != "xno" ; then
529 saved_LIBS="$LIBS"
530 saved_LDFLAGS="$LDFLAGS"
531 saved_CPPFLAGS="$CPPFLAGS"
532 if test -n "${withval}" -a "${withval}" != "yes"; then
533 if test -d "${withval}/lib"; then
534 if test -n "${need_dash_r}"; then
535 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
536 else
537 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
538 fi
539 else
540 if test -n "${need_dash_r}"; then
541 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
542 else
543 LDFLAGS="-L${withval} ${LDFLAGS}"
544 fi
545 fi
546 if test -d "${withval}/include"; then
547 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
548 else
549 CPPFLAGS="-I${withval} ${CPPFLAGS}"
550 fi
551 fi
552 LIBWRAP="-lwrap"
553 LIBS="$LIBWRAP $LIBS"
554 AC_MSG_CHECKING(for libwrap)
555 AC_TRY_LINK(
556 [
557#include <tcpd.h>
558 int deny_severity = 0, allow_severity = 0;
559 ],
560 [hosts_access(0);],
561 [
562 AC_MSG_RESULT(yes)
563 AC_DEFINE(LIBWRAP)
564 AC_SUBST(LIBWRAP)
565 TCPW_MSG="yes"
566 ],
567 [
568 AC_MSG_ERROR([*** libwrap missing])
569 ]
570 )
571 LIBS="$saved_LIBS"
572 fi
573 ]
574)
575
576dnl Checks for library functions.
577AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \
578 clock fchmod fchown freeaddrinfo futimes gai_strerror \
579 getaddrinfo getcwd getgrouplist getnameinfo getopt \
580 getrlimit getrusage getttyent glob inet_aton inet_ntoa \
581 inet_ntop innetgr login_getcapbool md5_crypt memmove \
582 mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \
583 realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
584 setenv seteuid setgroups setlogin setproctitle setresgid setreuid \
585 setrlimit setsid setpcred setvbuf sigaction sigvec snprintf \
586 socketpair strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp \
587 truncate utimes vhangup vsnprintf waitpid __b64_ntop _getpty)
588
589dnl IRIX and Solaris 2.5.1 have dirname() in libgen
590AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
591 AC_CHECK_LIB(gen, dirname,[
592 AC_CACHE_CHECK([for broken dirname],
593 ac_cv_have_broken_dirname, [
594 save_LIBS="$LIBS"
595 LIBS="$LIBS -lgen"
596 AC_TRY_RUN(
597 [
598#include <libgen.h>
599#include <string.h>
600
601int main(int argc, char **argv) {
602 char *s, buf[32];
603
604 strncpy(buf,"/etc", 32);
605 s = dirname(buf);
606 if (!s || strncmp(s, "/", 32) != 0) {
607 exit(1);
608 } else {
609 exit(0);
610 }
611}
612 ],
613 [ ac_cv_have_broken_dirname="no" ],
614 [ ac_cv_have_broken_dirname="yes" ]
615 )
616 LIBS="$save_LIBS"
617 ])
618 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
619 LIBS="$LIBS -lgen"
620 AC_DEFINE(HAVE_DIRNAME)
621 AC_CHECK_HEADERS(libgen.h)
622 fi
623 ])
624])
625
626dnl Checks for time functions
627AC_CHECK_FUNCS(gettimeofday time)
628dnl Checks for utmp functions
629AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
630AC_CHECK_FUNCS(utmpname)
631dnl Checks for utmpx functions
632AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
633AC_CHECK_FUNCS(setutxent utmpxname)
634
635AC_CHECK_FUNC(daemon,
636 [AC_DEFINE(HAVE_DAEMON)],
637 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
638)
639
640AC_CHECK_FUNC(getpagesize,
641 [AC_DEFINE(HAVE_GETPAGESIZE)],
642 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
643)
644
645# Check for broken snprintf
646if test "x$ac_cv_func_snprintf" = "xyes" ; then
647 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
648 AC_TRY_RUN(
649 [
650#include <stdio.h>
651int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
652 ],
653 [AC_MSG_RESULT(yes)],
654 [
655 AC_MSG_RESULT(no)
656 AC_DEFINE(BROKEN_SNPRINTF)
657 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
658 ]
659 )
660fi
661
662AC_FUNC_GETPGRP
663
664# Check for PAM libs
665PAM_MSG="no"
666AC_ARG_WITH(pam,
667 [ --with-pam Enable PAM support ],
668 [
669 if test "x$withval" != "xno" ; then
670 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
671 AC_MSG_ERROR([PAM headers not found])
672 fi
673
674 AC_CHECK_LIB(dl, dlopen, , )
675 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
676 AC_CHECK_FUNCS(pam_getenvlist)
677
678 disable_shadow=yes
679 PAM_MSG="yes"
680
681 AC_DEFINE(USE_PAM)
682 if test $ac_cv_lib_dl_dlopen = yes; then
683 LIBPAM="-lpam -ldl"
684 else
685 LIBPAM="-lpam"
686 fi
687 AC_SUBST(LIBPAM)
688 fi
689 ]
690)
691
692# Check for older PAM
693if test "x$PAM_MSG" = "xyes" ; then
694 # Check PAM strerror arguments (old PAM)
695 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
696 AC_TRY_COMPILE(
697 [
698#include <stdlib.h>
699#include <security/pam_appl.h>
700 ],
701 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
702 [AC_MSG_RESULT(no)],
703 [
704 AC_DEFINE(HAVE_OLD_PAM)
705 AC_MSG_RESULT(yes)
706 PAM_MSG="yes (old library)"
707 ]
708 )
709fi
710
711# Search for OpenSSL
712saved_CPPFLAGS="$CPPFLAGS"
713saved_LDFLAGS="$LDFLAGS"
714AC_ARG_WITH(ssl-dir,
715 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
716 [
717 if test "x$withval" != "xno" ; then
718 if test -d "$withval/lib"; then
719 if test -n "${need_dash_r}"; then
720 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
721 else
722 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
723 fi
724 else
725 if test -n "${need_dash_r}"; then
726 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
727 else
728 LDFLAGS="-L${withval} ${LDFLAGS}"
729 fi
730 fi
731 if test -d "$withval/include"; then
732 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
733 else
734 CPPFLAGS="-I${withval} ${CPPFLAGS}"
735 fi
736 fi
737 ]
738)
739LIBS="$LIBS -lcrypto"
740AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
741 [
742 dnl Check default openssl install dir
743 if test -n "${need_dash_r}"; then
744 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
745 else
746 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
747 fi
748 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
749 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
750 [
751 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
752 ]
753 )
754 ]
755)
756
757
758# Sanity check OpenSSL headers
759AC_MSG_CHECKING([whether OpenSSL's headers match the library])
760AC_TRY_RUN(
761 [
762#include <string.h>
763#include <openssl/opensslv.h>
764int main(void) { return(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
765 ],
766 [
767 AC_MSG_RESULT(yes)
768 ],
769 [
770 AC_MSG_RESULT(no)
771 AC_MSG_ERROR(Your OpenSSL headers do not match your library)
772 ]
773)
774
775# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
776# version in OpenSSL. Skip this for PAM
777if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
778 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
779fi
780
781
782### Configure cryptographic random number support
783
784# Check wheter OpenSSL seeds itself
785AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
786AC_TRY_RUN(
787 [
788#include <string.h>
789#include <openssl/rand.h>
790int main(void) { return(RAND_status() == 1 ? 0 : 1); }
791 ],
792 [
793 OPENSSL_SEEDS_ITSELF=yes
794 AC_MSG_RESULT(yes)
795 ],
796 [
797 AC_MSG_RESULT(no)
798 # Default to use of the rand helper if OpenSSL doesn't
799 # seed itself
800 USE_RAND_HELPER=yes
801 ]
802)
803
804
805# Do we want to force the use of the rand helper?
806AC_ARG_WITH(rand-helper,
807 [ --with-rand-helper Use subprocess to gather strong randomness ],
808 [
809 if test "x$withval" = "xno" ; then
810 # Force use of OpenSSL's internal RNG, even if
811 # the previous test showed it to be unseeded.
812 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
813 AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG])
814 OPENSSL_SEEDS_ITSELF=yes
815 USE_RAND_HELPER=""
816 fi
817 else
818 USE_RAND_HELPER=yes
819 fi
820 ],
821)
822
823# Which randomness source do we use?
824if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
825 # OpenSSL only
826 AC_DEFINE(OPENSSL_PRNG_ONLY)
827 RAND_MSG="OpenSSL internal ONLY"
828 INSTALL_SSH_RAND_HELPER=""
829elif test ! -z "$USE_RAND_HELPER" ; then
830 # install rand helper
831 RAND_MSG="ssh-rand-helper"
832 INSTALL_SSH_RAND_HELPER="yes"
833fi
834AC_SUBST(INSTALL_SSH_RAND_HELPER)
835
836### Configuration of ssh-rand-helper
837
838# PRNGD TCP socket
839AC_ARG_WITH(prngd-port,
840 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],
841 [
842 case "$withval" in
843 no)
844 withval=""
845 ;;
846 [[0-9]]*)
847 ;;
848 *)
849 AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port)
850 ;;
851 esac
852 if test ! -z "$withval" ; then
853 PRNGD_PORT="$withval"
854 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
855 fi
856 ]
857)
858
859# PRNGD Unix domain socket
860AC_ARG_WITH(prngd-socket,
861 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
862 [
863 case "$withval" in
864 yes)
865 withval="/var/run/egd-pool"
866 ;;
867 no)
868 withval=""
869 ;;
870 /*)
871 ;;
872 *)
873 AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
874 ;;
875 esac
876
877 if test ! -z "$withval" ; then
878 if test ! -z "$PRNGD_PORT" ; then
879 AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket)
880 fi
881 if test ! -r "$withval" ; then
882 AC_MSG_WARN(Entropy socket is not readable)
883 fi
884 PRNGD_SOCKET="$withval"
885 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
886 fi
887 ],
888 [
889 # Check for existing socket only if we don't have a random device already
890 if test "$USE_RAND_HELPER" = yes ; then
891 AC_MSG_CHECKING(for PRNGD/EGD socket)
892 # Insert other locations here
893 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
894 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
895 PRNGD_SOCKET="$sock"
896 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
897 break;
898 fi
899 done
900 if test ! -z "$PRNGD_SOCKET" ; then
901 AC_MSG_RESULT($PRNGD_SOCKET)
902 else
903 AC_MSG_RESULT(not found)
904 fi
905 fi
906 ]
907)
908
909# Change default command timeout for hashing entropy source
910entropy_timeout=200
911AC_ARG_WITH(entropy-timeout,
912 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
913 [
914 if test "x$withval" != "xno" ; then
915 entropy_timeout=$withval
916 fi
917 ]
918)
919AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
920
921SSH_PRIVSEP_USER=sshd
922AC_ARG_WITH(privsep-user,
923 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
924 [
925 if test -n "$withval"; then
926 SSH_PRIVSEP_USER=$withval
927 fi
928 ]
929)
930AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER")
931AC_SUBST(SSH_PRIVSEP_USER)
932
933# We do this little dance with the search path to insure
934# that programs that we select for use by installed programs
935# (which may be run by the super-user) come from trusted
936# locations before they come from the user's private area.
937# This should help avoid accidentally configuring some
938# random version of a program in someone's personal bin.
939
940OPATH=$PATH
941PATH=/bin:/usr/bin
942test -h /bin 2> /dev/null && PATH=/usr/bin
943test -d /sbin && PATH=$PATH:/sbin
944test -d /usr/sbin && PATH=$PATH:/usr/sbin
945PATH=$PATH:/etc:$OPATH
946
947# These programs are used by the command hashing source to gather entropy
948OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
949OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
950OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
951OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
952OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
953OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
954OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
955OSSH_PATH_ENTROPY_PROG(PROG_W, w)
956OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
957OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
958OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
959OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
960OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
961OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
962OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
963OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
964# restore PATH
965PATH=$OPATH
966
967# Where does ssh-rand-helper get its randomness from?
968INSTALL_SSH_PRNG_CMDS=""
969if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
970 if test ! -z "$PRNGD_PORT" ; then
971 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
972 elif test ! -z "$PRNGD_SOCKET" ; then
973 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
974 else
975 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
976 RAND_HELPER_CMDHASH=yes
977 INSTALL_SSH_PRNG_CMDS="yes"
978 fi
979fi
980AC_SUBST(INSTALL_SSH_PRNG_CMDS)
981
982
983# Cheap hack to ensure NEWS-OS libraries are arranged right.
984if test ! -z "$SONY" ; then
985 LIBS="$LIBS -liberty";
986fi
987
988# Checks for data types
989AC_CHECK_SIZEOF(char, 1)
990AC_CHECK_SIZEOF(short int, 2)
991AC_CHECK_SIZEOF(int, 4)
992AC_CHECK_SIZEOF(long int, 4)
993AC_CHECK_SIZEOF(long long int, 8)
994
995# Sanity check long long for some platforms (AIX)
996if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
997 ac_cv_sizeof_long_long_int=0
998fi
999
1000# More checks for data types
1001AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1002 AC_TRY_COMPILE(
1003 [ #include <sys/types.h> ],
1004 [ u_int a; a = 1;],
1005 [ ac_cv_have_u_int="yes" ],
1006 [ ac_cv_have_u_int="no" ]
1007 )
1008])
1009if test "x$ac_cv_have_u_int" = "xyes" ; then
1010 AC_DEFINE(HAVE_U_INT)
1011 have_u_int=1
1012fi
1013
1014AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1015 AC_TRY_COMPILE(
1016 [ #include <sys/types.h> ],
1017 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1018 [ ac_cv_have_intxx_t="yes" ],
1019 [ ac_cv_have_intxx_t="no" ]
1020 )
1021])
1022if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1023 AC_DEFINE(HAVE_INTXX_T)
1024 have_intxx_t=1
1025fi
1026
1027if (test -z "$have_intxx_t" && \
1028 test "x$ac_cv_header_stdint_h" = "xyes")
1029then
1030 AC_MSG_CHECKING([for intXX_t types in stdint.h])
1031 AC_TRY_COMPILE(
1032 [ #include <stdint.h> ],
1033 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1034 [
1035 AC_DEFINE(HAVE_INTXX_T)
1036 AC_MSG_RESULT(yes)
1037 ],
1038 [ AC_MSG_RESULT(no) ]
1039 )
1040fi
1041
1042AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1043 AC_TRY_COMPILE(
1044 [
1045#include <sys/types.h>
1046#ifdef HAVE_STDINT_H
1047# include <stdint.h>
1048#endif
1049#include <sys/socket.h>
1050#ifdef HAVE_SYS_BITYPES_H
1051# include <sys/bitypes.h>
1052#endif
1053 ],
1054 [ int64_t a; a = 1;],
1055 [ ac_cv_have_int64_t="yes" ],
1056 [ ac_cv_have_int64_t="no" ]
1057 )
1058])
1059if test "x$ac_cv_have_int64_t" = "xyes" ; then
1060 AC_DEFINE(HAVE_INT64_T)
1061fi
1062
1063AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1064 AC_TRY_COMPILE(
1065 [ #include <sys/types.h> ],
1066 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1067 [ ac_cv_have_u_intxx_t="yes" ],
1068 [ ac_cv_have_u_intxx_t="no" ]
1069 )
1070])
1071if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1072 AC_DEFINE(HAVE_U_INTXX_T)
1073 have_u_intxx_t=1
1074fi
1075
1076if test -z "$have_u_intxx_t" ; then
1077 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
1078 AC_TRY_COMPILE(
1079 [ #include <sys/socket.h> ],
1080 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1081 [
1082 AC_DEFINE(HAVE_U_INTXX_T)
1083 AC_MSG_RESULT(yes)
1084 ],
1085 [ AC_MSG_RESULT(no) ]
1086 )
1087fi
1088
1089AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1090 AC_TRY_COMPILE(
1091 [ #include <sys/types.h> ],
1092 [ u_int64_t a; a = 1;],
1093 [ ac_cv_have_u_int64_t="yes" ],
1094 [ ac_cv_have_u_int64_t="no" ]
1095 )
1096])
1097if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1098 AC_DEFINE(HAVE_U_INT64_T)
1099 have_u_int64_t=1
1100fi
1101
1102if test -z "$have_u_int64_t" ; then
1103 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
1104 AC_TRY_COMPILE(
1105 [ #include <sys/bitypes.h> ],
1106 [ u_int64_t a; a = 1],
1107 [
1108 AC_DEFINE(HAVE_U_INT64_T)
1109 AC_MSG_RESULT(yes)
1110 ],
1111 [ AC_MSG_RESULT(no) ]
1112 )
1113fi
1114
1115if test -z "$have_u_intxx_t" ; then
1116 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1117 AC_TRY_COMPILE(
1118 [
1119#include <sys/types.h>
1120 ],
1121 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
1122 [ ac_cv_have_uintxx_t="yes" ],
1123 [ ac_cv_have_uintxx_t="no" ]
1124 )
1125 ])
1126 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1127 AC_DEFINE(HAVE_UINTXX_T)
1128 fi
1129fi
1130
1131if test -z "$have_uintxx_t" ; then
1132 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
1133 AC_TRY_COMPILE(
1134 [ #include <stdint.h> ],
1135 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
1136 [
1137 AC_DEFINE(HAVE_UINTXX_T)
1138 AC_MSG_RESULT(yes)
1139 ],
1140 [ AC_MSG_RESULT(no) ]
1141 )
1142fi
1143
1144if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1145 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1146then
1147 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1148 AC_TRY_COMPILE(
1149 [
1150#include <sys/bitypes.h>
1151 ],
1152 [
1153 int8_t a; int16_t b; int32_t c;
1154 u_int8_t e; u_int16_t f; u_int32_t g;
1155 a = b = c = e = f = g = 1;
1156 ],
1157 [
1158 AC_DEFINE(HAVE_U_INTXX_T)
1159 AC_DEFINE(HAVE_INTXX_T)
1160 AC_MSG_RESULT(yes)
1161 ],
1162 [AC_MSG_RESULT(no)]
1163 )
1164fi
1165
1166
1167AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
1168 AC_TRY_COMPILE(
1169 [
1170#include <sys/types.h>
1171 ],
1172 [ u_char foo; foo = 125; ],
1173 [ ac_cv_have_u_char="yes" ],
1174 [ ac_cv_have_u_char="no" ]
1175 )
1176])
1177if test "x$ac_cv_have_u_char" = "xyes" ; then
1178 AC_DEFINE(HAVE_U_CHAR)
1179fi
1180
1181TYPE_SOCKLEN_T
1182
1183AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
1184
1185AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
1186 AC_TRY_COMPILE(
1187 [
1188#include <sys/types.h>
1189 ],
1190 [ size_t foo; foo = 1235; ],
1191 [ ac_cv_have_size_t="yes" ],
1192 [ ac_cv_have_size_t="no" ]
1193 )
1194])
1195if test "x$ac_cv_have_size_t" = "xyes" ; then
1196 AC_DEFINE(HAVE_SIZE_T)
1197fi
1198
1199AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
1200 AC_TRY_COMPILE(
1201 [
1202#include <sys/types.h>
1203 ],
1204 [ ssize_t foo; foo = 1235; ],
1205 [ ac_cv_have_ssize_t="yes" ],
1206 [ ac_cv_have_ssize_t="no" ]
1207 )
1208])
1209if test "x$ac_cv_have_ssize_t" = "xyes" ; then
1210 AC_DEFINE(HAVE_SSIZE_T)
1211fi
1212
1213AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
1214 AC_TRY_COMPILE(
1215 [
1216#include <time.h>
1217 ],
1218 [ clock_t foo; foo = 1235; ],
1219 [ ac_cv_have_clock_t="yes" ],
1220 [ ac_cv_have_clock_t="no" ]
1221 )
1222])
1223if test "x$ac_cv_have_clock_t" = "xyes" ; then
1224 AC_DEFINE(HAVE_CLOCK_T)
1225fi
1226
1227AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
1228 AC_TRY_COMPILE(
1229 [
1230#include <sys/types.h>
1231#include <sys/socket.h>
1232 ],
1233 [ sa_family_t foo; foo = 1235; ],
1234 [ ac_cv_have_sa_family_t="yes" ],
1235 [ AC_TRY_COMPILE(
1236 [
1237#include <sys/types.h>
1238#include <sys/socket.h>
1239#include <netinet/in.h>
1240 ],
1241 [ sa_family_t foo; foo = 1235; ],
1242 [ ac_cv_have_sa_family_t="yes" ],
1243
1244 [ ac_cv_have_sa_family_t="no" ]
1245 )]
1246 )
1247])
1248if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1249 AC_DEFINE(HAVE_SA_FAMILY_T)
1250fi
1251
1252AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1253 AC_TRY_COMPILE(
1254 [
1255#include <sys/types.h>
1256 ],
1257 [ pid_t foo; foo = 1235; ],
1258 [ ac_cv_have_pid_t="yes" ],
1259 [ ac_cv_have_pid_t="no" ]
1260 )
1261])
1262if test "x$ac_cv_have_pid_t" = "xyes" ; then
1263 AC_DEFINE(HAVE_PID_T)
1264fi
1265
1266AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1267 AC_TRY_COMPILE(
1268 [
1269#include <sys/types.h>
1270 ],
1271 [ mode_t foo; foo = 1235; ],
1272 [ ac_cv_have_mode_t="yes" ],
1273 [ ac_cv_have_mode_t="no" ]
1274 )
1275])
1276if test "x$ac_cv_have_mode_t" = "xyes" ; then
1277 AC_DEFINE(HAVE_MODE_T)
1278fi
1279
1280
1281AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1282 AC_TRY_COMPILE(
1283 [
1284#include <sys/types.h>
1285#include <sys/socket.h>
1286 ],
1287 [ struct sockaddr_storage s; ],
1288 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1289 [ ac_cv_have_struct_sockaddr_storage="no" ]
1290 )
1291])
1292if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1293 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1294fi
1295
1296AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1297 AC_TRY_COMPILE(
1298 [
1299#include <sys/types.h>
1300#include <netinet/in.h>
1301 ],
1302 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1303 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1304 [ ac_cv_have_struct_sockaddr_in6="no" ]
1305 )
1306])
1307if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1308 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1309fi
1310
1311AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1312 AC_TRY_COMPILE(
1313 [
1314#include <sys/types.h>
1315#include <netinet/in.h>
1316 ],
1317 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1318 [ ac_cv_have_struct_in6_addr="yes" ],
1319 [ ac_cv_have_struct_in6_addr="no" ]
1320 )
1321])
1322if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1323 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1324fi
1325
1326AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1327 AC_TRY_COMPILE(
1328 [
1329#include <sys/types.h>
1330#include <sys/socket.h>
1331#include <netdb.h>
1332 ],
1333 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1334 [ ac_cv_have_struct_addrinfo="yes" ],
1335 [ ac_cv_have_struct_addrinfo="no" ]
1336 )
1337])
1338if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1339 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1340fi
1341
1342AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1343 AC_TRY_COMPILE(
1344 [ #include <sys/time.h> ],
1345 [ struct timeval tv; tv.tv_sec = 1;],
1346 [ ac_cv_have_struct_timeval="yes" ],
1347 [ ac_cv_have_struct_timeval="no" ]
1348 )
1349])
1350if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1351 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1352 have_struct_timeval=1
1353fi
1354
1355# If we don't have int64_t then we can't compile sftp-server. So don't
1356# even attempt to do it.
1357if test "x$ac_cv_have_int64_t" = "xno" -a \
1358 "x$ac_cv_sizeof_long_int" != "x8" -a \
1359 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1360 NO_SFTP='#'
1361else
1362dnl test snprintf (broken on SCO w/gcc)
1363 AC_TRY_RUN(
1364 [
1365#include <stdio.h>
1366#include <string.h>
1367#ifdef HAVE_SNPRINTF
1368main()
1369{
1370 char buf[50];
1371 char expected_out[50];
1372 int mazsize = 50 ;
1373#if (SIZEOF_LONG_INT == 8)
1374 long int num = 0x7fffffffffffffff;
1375#else
1376 long long num = 0x7fffffffffffffffll;
1377#endif
1378 strcpy(expected_out, "9223372036854775807");
1379 snprintf(buf, mazsize, "%lld", num);
1380 if(strcmp(buf, expected_out) != 0)
1381 exit(1);
1382 exit(0);
1383}
1384#else
1385main() { exit(0); }
1386#endif
1387 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1388 )
1389fi
1390AC_SUBST(NO_SFTP)
1391
1392dnl Checks for structure members
1393OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1394OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1395OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1396OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1397OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
1398OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
1399OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1400OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
1401OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
1402OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1403OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1404OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1405OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
1406OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1407OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1408OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1409OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
1410
1411AC_CHECK_MEMBERS([struct stat.st_blksize])
1412
1413AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1414 ac_cv_have_ss_family_in_struct_ss, [
1415 AC_TRY_COMPILE(
1416 [
1417#include <sys/types.h>
1418#include <sys/socket.h>
1419 ],
1420 [ struct sockaddr_storage s; s.ss_family = 1; ],
1421 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1422 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1423 )
1424])
1425if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1426 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1427fi
1428
1429AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1430 ac_cv_have___ss_family_in_struct_ss, [
1431 AC_TRY_COMPILE(
1432 [
1433#include <sys/types.h>
1434#include <sys/socket.h>
1435 ],
1436 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1437 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1438 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1439 )
1440])
1441if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1442 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1443fi
1444
1445AC_CACHE_CHECK([for pw_class field in struct passwd],
1446 ac_cv_have_pw_class_in_struct_passwd, [
1447 AC_TRY_COMPILE(
1448 [
1449#include <pwd.h>
1450 ],
1451 [ struct passwd p; p.pw_class = 0; ],
1452 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1453 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1454 )
1455])
1456if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1457 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1458fi
1459
1460AC_CACHE_CHECK([for pw_expire field in struct passwd],
1461 ac_cv_have_pw_expire_in_struct_passwd, [
1462 AC_TRY_COMPILE(
1463 [
1464#include <pwd.h>
1465 ],
1466 [ struct passwd p; p.pw_expire = 0; ],
1467 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1468 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1469 )
1470])
1471if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1472 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1473fi
1474
1475AC_CACHE_CHECK([for pw_change field in struct passwd],
1476 ac_cv_have_pw_change_in_struct_passwd, [
1477 AC_TRY_COMPILE(
1478 [
1479#include <pwd.h>
1480 ],
1481 [ struct passwd p; p.pw_change = 0; ],
1482 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1483 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1484 )
1485])
1486if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1487 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1488fi
1489
1490dnl make sure we're using the real structure members and not defines
1491AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
1492 ac_cv_have_accrights_in_msghdr, [
1493 AC_TRY_RUN(
1494 [
1495#include <sys/types.h>
1496#include <sys/socket.h>
1497#include <sys/uio.h>
1498int main() {
1499#ifdef msg_accrights
1500exit(1);
1501#endif
1502struct msghdr m;
1503m.msg_accrights = 0;
1504exit(0);
1505}
1506 ],
1507 [ ac_cv_have_accrights_in_msghdr="yes" ],
1508 [ ac_cv_have_accrights_in_msghdr="no" ]
1509 )
1510])
1511if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
1512 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
1513fi
1514
1515AC_CACHE_CHECK([for msg_control field in struct msghdr],
1516 ac_cv_have_control_in_msghdr, [
1517 AC_TRY_RUN(
1518 [
1519#include <sys/types.h>
1520#include <sys/socket.h>
1521#include <sys/uio.h>
1522int main() {
1523#ifdef msg_control
1524exit(1);
1525#endif
1526struct msghdr m;
1527m.msg_control = 0;
1528exit(0);
1529}
1530 ],
1531 [ ac_cv_have_control_in_msghdr="yes" ],
1532 [ ac_cv_have_control_in_msghdr="no" ]
1533 )
1534])
1535if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
1536 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
1537fi
1538
1539AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
1540 AC_TRY_LINK([],
1541 [ extern char *__progname; printf("%s", __progname); ],
1542 [ ac_cv_libc_defines___progname="yes" ],
1543 [ ac_cv_libc_defines___progname="no" ]
1544 )
1545])
1546if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1547 AC_DEFINE(HAVE___PROGNAME)
1548fi
1549
1550AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
1551 AC_TRY_LINK([
1552#include <stdio.h>
1553],
1554 [ printf("%s", __FUNCTION__); ],
1555 [ ac_cv_cc_implements___FUNCTION__="yes" ],
1556 [ ac_cv_cc_implements___FUNCTION__="no" ]
1557 )
1558])
1559if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
1560 AC_DEFINE(HAVE___FUNCTION__)
1561fi
1562
1563AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
1564 AC_TRY_LINK([
1565#include <stdio.h>
1566],
1567 [ printf("%s", __func__); ],
1568 [ ac_cv_cc_implements___func__="yes" ],
1569 [ ac_cv_cc_implements___func__="no" ]
1570 )
1571])
1572if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
1573 AC_DEFINE(HAVE___func__)
1574fi
1575
1576AC_CACHE_CHECK([whether getopt has optreset support],
1577 ac_cv_have_getopt_optreset, [
1578 AC_TRY_LINK(
1579 [
1580#include <getopt.h>
1581 ],
1582 [ extern int optreset; optreset = 0; ],
1583 [ ac_cv_have_getopt_optreset="yes" ],
1584 [ ac_cv_have_getopt_optreset="no" ]
1585 )
1586])
1587if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1588 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1589fi
1590
1591AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
1592 AC_TRY_LINK([],
1593 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
1594 [ ac_cv_libc_defines_sys_errlist="yes" ],
1595 [ ac_cv_libc_defines_sys_errlist="no" ]
1596 )
1597])
1598if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1599 AC_DEFINE(HAVE_SYS_ERRLIST)
1600fi
1601
1602
1603AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
1604 AC_TRY_LINK([],
1605 [ extern int sys_nerr; printf("%i", sys_nerr);],
1606 [ ac_cv_libc_defines_sys_nerr="yes" ],
1607 [ ac_cv_libc_defines_sys_nerr="no" ]
1608 )
1609])
1610if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1611 AC_DEFINE(HAVE_SYS_NERR)
1612fi
1613
1614SCARD_MSG="no"
1615
1616# Check whether user wants sectok support
1617AC_ARG_WITH(sectok,
1618 [ --with-sectok Enable smartcard support using libsectok],
1619 [
1620 if test "x$withval" != "xno" ; then
1621 if test "x$withval" != "xyes" ; then
1622 CPPFLAGS="$CPPFLAGS -I${withval}"
1623 LDFLAGS="$LDFLAGS -L${withval}"
1624 if test ! -z "$need_dash_r" ; then
1625 LDFLAGS="$LDFLAGS -R${withval}"
1626 fi
1627 if test ! -z "$blibpath" ; then
1628 blibpath="$blibpath:${withval}"
1629 fi
1630 fi
1631 AC_CHECK_HEADERS(sectok.h)
1632 if test "$ac_cv_header_sectok_h" != yes; then
1633 AC_MSG_ERROR(Can't find sectok.h)
1634 fi
1635 AC_CHECK_LIB(sectok, sectok_open)
1636 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
1637 AC_MSG_ERROR(Can't find libsectok)
1638 fi
1639 AC_DEFINE(SMARTCARD)
1640 AC_DEFINE(USE_SECTOK)
1641 SCARD_MSG="yes, using sectok"
1642 fi
1643 ]
1644)
1645
1646# Check whether user wants OpenSC support
1647AC_ARG_WITH(opensc,
1648 AC_HELP_STRING([--with-opensc=PFX],
1649 [Enable smartcard support using OpenSC]),
1650 opensc_config_prefix="$withval", opensc_config_prefix="")
1651if test x$opensc_config_prefix != x ; then
1652 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
1653 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
1654 if test "$OPENSC_CONFIG" != "no"; then
1655 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
1656 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
1657 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
1658 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
1659 AC_DEFINE(SMARTCARD)
1660 AC_DEFINE(USE_OPENSC)
1661 SCARD_MSG="yes, using OpenSC"
1662 fi
1663fi
1664
1665# Check whether user wants Kerberos 5 support
1666KRB5_MSG="no"
1667AC_ARG_WITH(kerberos5,
1668 [ --with-kerberos5=PATH Enable Kerberos 5 support],
1669 [
1670 if test "x$withval" != "xno" ; then
1671 if test "x$withval" = "xyes" ; then
1672 KRB5ROOT="/usr/local"
1673 else
1674 KRB5ROOT=${withval}
1675 fi
1676 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
1677 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
1678 AC_DEFINE(KRB5)
1679 KRB5_MSG="yes"
1680 AC_MSG_CHECKING(whether we are using Heimdal)
1681 AC_TRY_COMPILE([ #include <krb5.h> ],
1682 [ char *tmp = heimdal_version; ],
1683 [ AC_MSG_RESULT(yes)
1684 AC_DEFINE(HEIMDAL)
1685 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
1686 ],
1687 [ AC_MSG_RESULT(no)
1688 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
1689 ]
1690 )
1691 if test ! -z "$need_dash_r" ; then
1692 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
1693 fi
1694 if test ! -z "$blibpath" ; then
1695 blibpath="$blibpath:${KRB5ROOT}/lib"
1696 fi
1697 AC_CHECK_LIB(resolv, dn_expand, , )
1698
1699 KRB5=yes
1700 fi
1701 ]
1702)
1703# Check whether user wants Kerberos 4 support
1704KRB4_MSG="no"
1705AC_ARG_WITH(kerberos4,
1706 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1707 [
1708 if test "x$withval" != "xno" ; then
1709 if test "x$withval" != "xyes" ; then
1710 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1711 LDFLAGS="$LDFLAGS -L${withval}/lib"
1712 if test ! -z "$need_dash_r" ; then
1713 LDFLAGS="$LDFLAGS -R${withval}/lib"
1714 fi
1715 if test ! -z "$blibpath" ; then
1716 blibpath="$blibpath:${withval}/lib"
1717 fi
1718 else
1719 if test -d /usr/include/kerberosIV ; then
1720 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1721 fi
1722 fi
1723
1724 AC_CHECK_HEADERS(krb.h)
1725 if test "$ac_cv_header_krb_h" != yes; then
1726 AC_MSG_WARN([Cannot find krb.h, build may fail])
1727 fi
1728 AC_CHECK_LIB(krb, main)
1729 if test "$ac_cv_lib_krb_main" != yes; then
1730 AC_CHECK_LIB(krb4, main)
1731 if test "$ac_cv_lib_krb4_main" != yes; then
1732 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1733 else
1734 KLIBS="-lkrb4"
1735 fi
1736 else
1737 KLIBS="-lkrb"
1738 fi
1739 AC_CHECK_LIB(des, des_cbc_encrypt)
1740 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1741 AC_CHECK_LIB(des425, des_cbc_encrypt)
1742 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1743 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1744 else
1745 KLIBS="-ldes425"
1746 fi
1747 else
1748 KLIBS="-ldes"
1749 fi
1750 AC_CHECK_LIB(resolv, dn_expand, , )
1751 KRB4=yes
1752 KRB4_MSG="yes"
1753 AC_DEFINE(KRB4)
1754 fi
1755 ]
1756)
1757
1758# Check whether user wants AFS support
1759AFS_MSG="no"
1760AC_ARG_WITH(afs,
1761 [ --with-afs=PATH Enable AFS support],
1762 [
1763 if test "x$withval" != "xno" ; then
1764
1765 if test "x$withval" != "xyes" ; then
1766 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1767 LDFLAGS="$LDFLAGS -L${withval}/lib"
1768 fi
1769
1770 if test -z "$KRB4" ; then
1771 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1772 fi
1773
1774 LIBS="-lkafs $LIBS"
1775 if test ! -z "$AFS_LIBS" ; then
1776 LIBS="$LIBS $AFS_LIBS"
1777 fi
1778 AC_DEFINE(AFS)
1779 AFS_MSG="yes"
1780 fi
1781 ]
1782)
1783LIBS="$LIBS $KLIBS $K5LIBS"
1784
1785# Looking for programs, paths and files
1786
1787PRIVSEP_PATH=/var/empty
1788AC_ARG_WITH(privsep-path,
1789 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
1790 [
1791 if test "x$withval" != "$no" ; then
1792 PRIVSEP_PATH=$withval
1793 fi
1794 ]
1795)
1796AC_SUBST(PRIVSEP_PATH)
1797
1798AC_ARG_WITH(xauth,
1799 [ --with-xauth=PATH Specify path to xauth program ],
1800 [
1801 if test "x$withval" != "xno" ; then
1802 xauth_path=$withval
1803 fi
1804 ],
1805 [
1806 TestPath="$PATH"
1807 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
1808 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
1809 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
1810 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
1811 AC_PATH_PROG(xauth_path, xauth, , $TestPath)
1812 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
1813 xauth_path="/usr/openwin/bin/xauth"
1814 fi
1815 ]
1816)
1817
1818if test -z "$xauth_path" ; then
1819 XAUTH_PATH="undefined"
1820 AC_SUBST(XAUTH_PATH)
1821else
1822 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
1823 XAUTH_PATH=$xauth_path
1824 AC_SUBST(XAUTH_PATH)
1825fi
1826
1827# Check for mail directory (last resort if we cannot get it from headers)
1828if test ! -z "$MAIL" ; then
1829 maildir=`dirname $MAIL`
1830 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1831fi
1832
1833if test -z "$no_dev_ptmx" ; then
1834 if test "x$disable_ptmx_check" != "xyes" ; then
1835 AC_CHECK_FILE("/dev/ptmx",
1836 [
1837 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1838 have_dev_ptmx=1
1839 ]
1840 )
1841 fi
1842fi
1843AC_CHECK_FILE("/dev/ptc",
1844 [
1845 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1846 have_dev_ptc=1
1847 ]
1848)
1849
1850# Options from here on. Some of these are preset by platform above
1851AC_ARG_WITH(mantype,
1852 [ --with-mantype=man|cat|doc Set man page type],
1853 [
1854 case "$withval" in
1855 man|cat|doc)
1856 MANTYPE=$withval
1857 ;;
1858 *)
1859 AC_MSG_ERROR(invalid man type: $withval)
1860 ;;
1861 esac
1862 ]
1863)
1864if test -z "$MANTYPE"; then
1865 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
1866 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath)
1867 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
1868 MANTYPE=doc
1869 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
1870 MANTYPE=man
1871 else
1872 MANTYPE=cat
1873 fi
1874fi
1875AC_SUBST(MANTYPE)
1876if test "$MANTYPE" = "doc"; then
1877 mansubdir=man;
1878else
1879 mansubdir=$MANTYPE;
1880fi
1881AC_SUBST(mansubdir)
1882
1883# Check whether to enable MD5 passwords
1884MD5_MSG="no"
1885AC_ARG_WITH(md5-passwords,
1886 [ --with-md5-passwords Enable use of MD5 passwords],
1887 [
1888 if test "x$withval" != "xno" ; then
1889 AC_DEFINE(HAVE_MD5_PASSWORDS)
1890 MD5_MSG="yes"
1891 fi
1892 ]
1893)
1894
1895# Whether to disable shadow password support
1896AC_ARG_WITH(shadow,
1897 [ --without-shadow Disable shadow password support],
1898 [
1899 if test "x$withval" = "xno" ; then
1900 AC_DEFINE(DISABLE_SHADOW)
1901 disable_shadow=yes
1902 fi
1903 ]
1904)
1905
1906if test -z "$disable_shadow" ; then
1907 AC_MSG_CHECKING([if the systems has expire shadow information])
1908 AC_TRY_COMPILE(
1909 [
1910#include <sys/types.h>
1911#include <shadow.h>
1912 struct spwd sp;
1913 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1914 [ sp_expire_available=yes ], []
1915 )
1916
1917 if test "x$sp_expire_available" = "xyes" ; then
1918 AC_MSG_RESULT(yes)
1919 AC_DEFINE(HAS_SHADOW_EXPIRE)
1920 else
1921 AC_MSG_RESULT(no)
1922 fi
1923fi
1924
1925# Use ip address instead of hostname in $DISPLAY
1926if test ! -z "$IPADDR_IN_DISPLAY" ; then
1927 DISPLAY_HACK_MSG="yes"
1928 AC_DEFINE(IPADDR_IN_DISPLAY)
1929else
1930 DISPLAY_HACK_MSG="no"
1931 AC_ARG_WITH(ipaddr-display,
1932 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1933 [
1934 if test "x$withval" != "xno" ; then
1935 AC_DEFINE(IPADDR_IN_DISPLAY)
1936 DISPLAY_HACK_MSG="yes"
1937 fi
1938 ]
1939 )
1940fi
1941
1942dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
1943if test $ac_cv_func_login_getcapbool = "yes" -a \
1944 $ac_cv_header_login_cap_h = "yes" ; then
1945 USES_LOGIN_CONF=yes
1946fi
1947# Whether to mess with the default path
1948SERVER_PATH_MSG="(default)"
1949AC_ARG_WITH(default-path,
1950 [ --with-default-path= Specify default \$PATH environment for server],
1951 [
1952 if test "$USES_LOGIN_CONF" = "yes" ; then
1953 AC_MSG_WARN([
1954--with-default-path=PATH has no effect on this system.
1955Edit /etc/login.conf instead.])
1956 elif test "x$withval" != "xno" ; then
1957 user_path="$withval"
1958 SERVER_PATH_MSG="$withval"
1959 fi
1960 ],
1961 [ if test "$USES_LOGIN_CONF" = "yes" ; then
1962 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
1963 else
1964 AC_TRY_RUN(
1965 [
1966/* find out what STDPATH is */
1967#include <stdio.h>
1968#ifdef HAVE_PATHS_H
1969# include <paths.h>
1970#endif
1971#ifndef _PATH_STDPATH
1972# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
1973#endif
1974#include <sys/types.h>
1975#include <sys/stat.h>
1976#include <fcntl.h>
1977#define DATA "conftest.stdpath"
1978
1979main()
1980{
1981 FILE *fd;
1982 int rc;
1983
1984 fd = fopen(DATA,"w");
1985 if(fd == NULL)
1986 exit(1);
1987
1988 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
1989 exit(1);
1990
1991 exit(0);
1992}
1993 ], [ user_path=`cat conftest.stdpath` ],
1994 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
1995 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
1996 )
1997# make sure $bindir is in USER_PATH so scp will work
1998 t_bindir=`eval echo ${bindir}`
1999 case $t_bindir in
2000 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
2001 esac
2002 case $t_bindir in
2003 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
2004 esac
2005 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
2006 if test $? -ne 0 ; then
2007 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
2008 if test $? -ne 0 ; then
2009 user_path=$user_path:$t_bindir
2010 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
2011 fi
2012 fi
2013 fi ]
2014)
2015if test "$USES_LOGIN_CONF" != "yes" ; then
2016 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2017 AC_SUBST(user_path)
2018fi
2019
2020# Set superuser path separately to user path
2021AC_ARG_WITH(superuser-path,
2022 [ --with-superuser-path= Specify different path for super-user],
2023 [
2024 if test "x$withval" != "xno" ; then
2025 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval")
2026 superuser_path=$withval
2027 fi
2028 ]
2029)
2030
2031
2032# Whether to force IPv4 by default (needed on broken glibc Linux)
2033IPV4_HACK_MSG="no"
2034AC_ARG_WITH(ipv4-default,
2035 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
2036 [
2037 if test "x$withval" != "xno" ; then
2038 AC_DEFINE(IPV4_DEFAULT)
2039 IPV4_HACK_MSG="yes"
2040 fi
2041 ]
2042)
2043
2044AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
2045IPV4_IN6_HACK_MSG="no"
2046AC_ARG_WITH(4in6,
2047 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
2048 [
2049 if test "x$withval" != "xno" ; then
2050 AC_MSG_RESULT(yes)
2051 AC_DEFINE(IPV4_IN_IPV6)
2052 IPV4_IN6_HACK_MSG="yes"
2053 else
2054 AC_MSG_RESULT(no)
2055 fi
2056 ],[
2057 if test "x$inet6_default_4in6" = "xyes"; then
2058 AC_MSG_RESULT([yes (default)])
2059 AC_DEFINE(IPV4_IN_IPV6)
2060 IPV4_IN6_HACK_MSG="yes"
2061 else
2062 AC_MSG_RESULT([no (default)])
2063 fi
2064 ]
2065)
2066
2067# Whether to enable BSD auth support
2068BSD_AUTH_MSG=no
2069AC_ARG_WITH(bsd-auth,
2070 [ --with-bsd-auth Enable BSD auth support],
2071 [
2072 if test "x$withval" != "xno" ; then
2073 AC_DEFINE(BSD_AUTH)
2074 BSD_AUTH_MSG=yes
2075 fi
2076 ]
2077)
2078
2079# Where to place sshd.pid
2080piddir=/var/run
2081# make sure the directory exists
2082if test ! -d $piddir ; then
2083 piddir=`eval echo ${sysconfdir}`
2084 case $piddir in
2085 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
2086 esac
2087fi
2088
2089AC_ARG_WITH(pid-dir,
2090 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2091 [
2092 if test "x$withval" != "xno" ; then
2093 piddir=$withval
2094 if test ! -d $piddir ; then
2095 AC_MSG_WARN([** no $piddir directory on this system **])
2096 fi
2097 fi
2098 ]
2099)
2100
2101AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
2102AC_SUBST(piddir)
2103
2104dnl allow user to disable some login recording features
2105AC_ARG_ENABLE(lastlog,
2106 [ --disable-lastlog disable use of lastlog even if detected [no]],
2107 [ AC_DEFINE(DISABLE_LASTLOG) ]
2108)
2109AC_ARG_ENABLE(utmp,
2110 [ --disable-utmp disable use of utmp even if detected [no]],
2111 [ AC_DEFINE(DISABLE_UTMP) ]
2112)
2113AC_ARG_ENABLE(utmpx,
2114 [ --disable-utmpx disable use of utmpx even if detected [no]],
2115 [ AC_DEFINE(DISABLE_UTMPX) ]
2116)
2117AC_ARG_ENABLE(wtmp,
2118 [ --disable-wtmp disable use of wtmp even if detected [no]],
2119 [ AC_DEFINE(DISABLE_WTMP) ]
2120)
2121AC_ARG_ENABLE(wtmpx,
2122 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
2123 [ AC_DEFINE(DISABLE_WTMPX) ]
2124)
2125AC_ARG_ENABLE(libutil,
2126 [ --disable-libutil disable use of libutil (login() etc.) [no]],
2127 [ AC_DEFINE(DISABLE_LOGIN) ]
2128)
2129AC_ARG_ENABLE(pututline,
2130 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
2131 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
2132)
2133AC_ARG_ENABLE(pututxline,
2134 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
2135 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
2136)
2137AC_ARG_WITH(lastlog,
2138 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
2139 [
2140 if test "x$withval" = "xno" ; then
2141 AC_DEFINE(DISABLE_LASTLOG)
2142 else
2143 conf_lastlog_location=$withval
2144 fi
2145 ]
2146)
2147
2148dnl lastlog, [uw]tmpx? detection
2149dnl NOTE: set the paths in the platform section to avoid the
2150dnl need for command-line parameters
2151dnl lastlog and [uw]tmp are subject to a file search if all else fails
2152
2153dnl lastlog detection
2154dnl NOTE: the code itself will detect if lastlog is a directory
2155AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
2156AC_TRY_COMPILE([
2157#include <sys/types.h>
2158#include <utmp.h>
2159#ifdef HAVE_LASTLOG_H
2160# include <lastlog.h>
2161#endif
2162#ifdef HAVE_PATHS_H
2163# include <paths.h>
2164#endif
2165#ifdef HAVE_LOGIN_H
2166# include <login.h>
2167#endif
2168 ],
2169 [ char *lastlog = LASTLOG_FILE; ],
2170 [ AC_MSG_RESULT(yes) ],
2171 [
2172 AC_MSG_RESULT(no)
2173 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
2174 AC_TRY_COMPILE([
2175#include <sys/types.h>
2176#include <utmp.h>
2177#ifdef HAVE_LASTLOG_H
2178# include <lastlog.h>
2179#endif
2180#ifdef HAVE_PATHS_H
2181# include <paths.h>
2182#endif
2183 ],
2184 [ char *lastlog = _PATH_LASTLOG; ],
2185 [ AC_MSG_RESULT(yes) ],
2186 [
2187 AC_MSG_RESULT(no)
2188 system_lastlog_path=no
2189 ])
2190 ]
2191)
2192
2193if test -z "$conf_lastlog_location"; then
2194 if test x"$system_lastlog_path" = x"no" ; then
2195 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
2196 if (test -d "$f" || test -f "$f") ; then
2197 conf_lastlog_location=$f
2198 fi
2199 done
2200 if test -z "$conf_lastlog_location"; then
2201 AC_MSG_WARN([** Cannot find lastlog **])
2202 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
2203 fi
2204 fi
2205fi
2206
2207if test -n "$conf_lastlog_location"; then
2208 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2209fi
2210
2211dnl utmp detection
2212AC_MSG_CHECKING([if your system defines UTMP_FILE])
2213AC_TRY_COMPILE([
2214#include <sys/types.h>
2215#include <utmp.h>
2216#ifdef HAVE_PATHS_H
2217# include <paths.h>
2218#endif
2219 ],
2220 [ char *utmp = UTMP_FILE; ],
2221 [ AC_MSG_RESULT(yes) ],
2222 [ AC_MSG_RESULT(no)
2223 system_utmp_path=no ]
2224)
2225if test -z "$conf_utmp_location"; then
2226 if test x"$system_utmp_path" = x"no" ; then
2227 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
2228 if test -f $f ; then
2229 conf_utmp_location=$f
2230 fi
2231 done
2232 if test -z "$conf_utmp_location"; then
2233 AC_DEFINE(DISABLE_UTMP)
2234 fi
2235 fi
2236fi
2237if test -n "$conf_utmp_location"; then
2238 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
2239fi
2240
2241dnl wtmp detection
2242AC_MSG_CHECKING([if your system defines WTMP_FILE])
2243AC_TRY_COMPILE([
2244#include <sys/types.h>
2245#include <utmp.h>
2246#ifdef HAVE_PATHS_H
2247# include <paths.h>
2248#endif
2249 ],
2250 [ char *wtmp = WTMP_FILE; ],
2251 [ AC_MSG_RESULT(yes) ],
2252 [ AC_MSG_RESULT(no)
2253 system_wtmp_path=no ]
2254)
2255if test -z "$conf_wtmp_location"; then
2256 if test x"$system_wtmp_path" = x"no" ; then
2257 for f in /usr/adm/wtmp /var/log/wtmp; do
2258 if test -f $f ; then
2259 conf_wtmp_location=$f
2260 fi
2261 done
2262 if test -z "$conf_wtmp_location"; then
2263 AC_DEFINE(DISABLE_WTMP)
2264 fi
2265 fi
2266fi
2267if test -n "$conf_wtmp_location"; then
2268 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
2269fi
2270
2271
2272dnl utmpx detection - I don't know any system so perverse as to require
2273dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
2274dnl there, though.
2275AC_MSG_CHECKING([if your system defines UTMPX_FILE])
2276AC_TRY_COMPILE([
2277#include <sys/types.h>
2278#include <utmp.h>
2279#ifdef HAVE_UTMPX_H
2280#include <utmpx.h>
2281#endif
2282#ifdef HAVE_PATHS_H
2283# include <paths.h>
2284#endif
2285 ],
2286 [ char *utmpx = UTMPX_FILE; ],
2287 [ AC_MSG_RESULT(yes) ],
2288 [ AC_MSG_RESULT(no)
2289 system_utmpx_path=no ]
2290)
2291if test -z "$conf_utmpx_location"; then
2292 if test x"$system_utmpx_path" = x"no" ; then
2293 AC_DEFINE(DISABLE_UTMPX)
2294 fi
2295else
2296 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2297fi
2298
2299dnl wtmpx detection
2300AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2301AC_TRY_COMPILE([
2302#include <sys/types.h>
2303#include <utmp.h>
2304#ifdef HAVE_UTMPX_H
2305#include <utmpx.h>
2306#endif
2307#ifdef HAVE_PATHS_H
2308# include <paths.h>
2309#endif
2310 ],
2311 [ char *wtmpx = WTMPX_FILE; ],
2312 [ AC_MSG_RESULT(yes) ],
2313 [ AC_MSG_RESULT(no)
2314 system_wtmpx_path=no ]
2315)
2316if test -z "$conf_wtmpx_location"; then
2317 if test x"$system_wtmpx_path" = x"no" ; then
2318 AC_DEFINE(DISABLE_WTMPX)
2319 fi
2320else
2321 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2322fi
2323
2324
2325if test ! -z "$blibpath" ; then
2326 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
2327 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
2328fi
2329
2330dnl remove pam and dl because they are in $LIBPAM
2331if test "$PAM_MSG" = yes ; then
2332 LIBS=`echo $LIBS | sed 's/-lpam //'`
2333fi
2334if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
2335 LIBS=`echo $LIBS | sed 's/-ldl //'`
2336fi
2337
2338AC_EXEEXT
2339AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2340AC_OUTPUT
2341
2342# Print summary of options
2343
2344# Someone please show me a better way :)
2345A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2346B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2347C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2348D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
2349E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
2350F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
2351G=`eval echo ${piddir}` ; G=`eval echo ${G}`
2352H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
2353I=`eval echo ${user_path}` ; I=`eval echo ${I}`
2354J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
2355
2356echo ""
2357echo "OpenSSH has been configured with the following options:"
2358echo " User binaries: $B"
2359echo " System binaries: $C"
2360echo " Configuration files: $D"
2361echo " Askpass program: $E"
2362echo " Manual pages: $F"
2363echo " PID file: $G"
2364echo " Privilege separation chroot path: $H"
2365if test "$USES_LOGIN_CONF" = "yes" ; then
2366echo " At runtime, sshd will use the path defined in /etc/login.conf"
2367else
2368echo " sshd default user PATH: $I"
2369fi
2370if test ! -z "$superuser_path" ; then
2371echo " sshd superuser user PATH: $J"
2372fi
2373echo " Manpage format: $MANTYPE"
2374echo " PAM support: ${PAM_MSG}"
2375echo " KerberosIV support: $KRB4_MSG"
2376echo " KerberosV support: $KRB5_MSG"
2377echo " Smartcard support: $SCARD_MSG"
2378echo " AFS support: $AFS_MSG"
2379echo " S/KEY support: $SKEY_MSG"
2380echo " TCP Wrappers support: $TCPW_MSG"
2381echo " MD5 password support: $MD5_MSG"
2382echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2383echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2384echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2385echo " BSD Auth support: $BSD_AUTH_MSG"
2386echo " Random number source: $RAND_MSG"
2387if test ! -z "$USE_RAND_HELPER" ; then
2388echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
2389fi
2390
2391echo ""
2392
2393echo " Host: ${host}"
2394echo " Compiler: ${CC}"
2395echo " Compiler flags: ${CFLAGS}"
2396echo "Preprocessor flags: ${CPPFLAGS}"
2397echo " Linker flags: ${LDFLAGS}"
2398echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
2399
2400echo ""
2401
2402if test "x$PAM_MSG" = "xyes" ; then
2403 echo "PAM is enabled. You may need to install a PAM control file "
2404 echo "for sshd, otherwise password authentication may fail. "
2405 echo "Example PAM control files can be found in the contrib/ "
2406 echo "subdirectory"
2407 echo ""
2408fi
2409
2410if test ! -z "$NO_SFTP"; then
2411 echo "sftp-server will be disabled. Your compiler does not "
2412 echo "support 64bit integers."
2413 echo ""
2414fi
2415
2416if test ! -z "$RAND_HELPER_CMDHASH" ; then
2417 echo "WARNING: you are using the builtin random number collection "
2418 echo "service. Please read WARNING.RNG and request that your OS "
2419 echo "vendor includes kernel-based random number collection in "
2420 echo "future versions of your OS."
2421 echo ""
2422fi
2423
This page took 0.272283 seconds and 5 git commands to generate.