]> andersk Git - openssh.git/blame - configure.in
- (djm) Avoid warning on BSDgetopt
[openssh.git] / configure.in
CommitLineData
0b202697 1# $Id$
2
4cca272e 3AC_INIT(ssh.c)
5881cd60 4
5AC_CONFIG_HEADER(config.h)
b14b2ae7 6AC_PROG_CC
a7effaac 7AC_CANONICAL_HOST
cf0c5df5 8AC_C_BIGENDIAN
5881cd60 9
a0391976 10# Checks for programs.
4cca272e 11AC_PROG_CPP
5881cd60 12AC_PROG_RANLIB
cf8dd513 13AC_PROG_INSTALL
bee0a37e 14AC_PATH_PROG(AR, ar)
13dd877b 15AC_PATH_PROGS(PERL, perl5 perl)
a0f84251 16AC_SUBST(PERL)
ad85db64 17AC_PATH_PROG(ENT, ent)
18AC_SUBST(ENT)
77bb0bca 19AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
6958bd37 20AC_PATH_PROG(TEST_MINUS_S_SH, bash)
21AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
22AC_PATH_PROG(TEST_MINUS_S_SH, sh)
f498ed15 23
c193d002 24if test -z "$AR" ; then
25 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
26fi
27
2e73a022 28# Use LOGIN_PROGRAM from environment if possible
29if test ! -z "$LOGIN_PROGRAM" ; then
30 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
31else
32 # Search for login
33 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
34 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
35 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
36 fi
37fi
38
d423d822 39if test -z "$LD" ; then
40 LD=$CC
41fi
42AC_SUBST(LD)
43
d423d822 44AC_C_INLINE
5ed2bb5b 45if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
46 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
d423d822 47fi
48
a0391976 49# Check for some target-specific stuff
a7effaac 50case "$host" in
9d6b1b96 51*-*-aix*)
52 AFS_LIBS="-lld"
0c2fb82f 53 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
84afc958 54 LDFLAGS="$LDFLAGS -L/usr/local/lib"
e5fe9a1f 55 if (test "$LD" != "gcc" && test -z "$blibpath"); then
bd499f9e 56 blibpath="/usr/lib:/lib:/usr/local/lib"
57 fi
c1ef8333 58 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
4c8ef3fb 59 AC_DEFINE(BROKEN_GETADDRINFO)
a3cef3ca 60 dnl AIX handles lastlog as part of its login message
61 AC_DEFINE(DISABLE_LASTLOG)
9d6b1b96 62 ;;
3c62e7eb 63*-*-cygwin*)
2f31bdd6 64 LIBS="$LIBS -lregex /usr/lib/textmode.o"
3c62e7eb 65 AC_DEFINE(HAVE_CYGWIN)
7043a38d 66 AC_DEFINE(USE_PIPES)
3c62e7eb 67 AC_DEFINE(DISABLE_SHADOW)
68 AC_DEFINE(IPV4_DEFAULT)
69 AC_DEFINE(IP_TOS_IS_BROKEN)
3d114925 70 AC_DEFINE(NO_X11_UNIX_SOCKETS)
3c62e7eb 71 no_libsocket=1
72 no_libnsl=1
73 ;;
d6fdb079 74*-*-dgux*)
75 AC_DEFINE(IP_TOS_IS_BROKEN)
76 ;;
39c98ef7 77*-*-darwin*)
78 AC_DEFINE(BROKEN_GETADDRINFO)
79 ;;
a7effaac 80*-*-hpux10*)
81 if test -z "$GCC"; then
fc1e8bf4 82 CFLAGS="$CFLAGS -Ae"
a7effaac 83 fi
28564873 84 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
44839801 85 IPADDR_IN_DISPLAY=yes
137d7b6c 86 AC_DEFINE(USE_PIPES)
0bbfbdeb 87 AC_DEFINE(DISABLE_SHADOW)
764d4113 88 AC_DEFINE(DISABLE_UTMP)
f5af5cd5 89 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
28564873 90 LIBS="$LIBS -lxnet -lsec"
a7effaac 91 ;;
2b763e31 92*-*-hpux11*)
b8fea62d 93 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
44839801 94 IPADDR_IN_DISPLAY=yes
adeebd37 95 AC_DEFINE(PAM_SUN_CODEBASE)
2b10f47a 96 AC_DEFINE(USE_PIPES)
0bbfbdeb 97 AC_DEFINE(DISABLE_SHADOW)
764d4113 98 AC_DEFINE(DISABLE_UTMP)
f5af5cd5 99 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
b8fea62d 100 LIBS="$LIBS -lxnet -lsec"
2b763e31 101 ;;
d94aa2ae 102*-*-irix5*)
0c2fb82f 103 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
c5fa2eb0 104 LDFLAGS="$LDFLAGS"
6ac7829a 105 PATH="$PATH:/usr/etc"
b9795b89 106 no_libsocket=1
107 no_libnsl=1
416ed5a7 108 AC_DEFINE(BROKEN_INET_NTOA)
b9795b89 109 ;;
110*-*-irix6*)
0c2fb82f 111 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
c5fa2eb0 112 LDFLAGS="$LDFLAGS"
6ac7829a 113 PATH="$PATH:/usr/etc"
3206bb3b 114 AC_DEFINE(WITH_IRIX_ARRAY)
115 AC_DEFINE(WITH_IRIX_PROJECT)
116 AC_DEFINE(WITH_IRIX_AUDIT)
0b49a754 117 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
d94aa2ae 118 no_libsocket=1
119 no_libnsl=1
416ed5a7 120 AC_DEFINE(BROKEN_INET_NTOA)
d94aa2ae 121 ;;
5cdfe03f 122*-*-linux*)
123 no_dev_ptmx=1
717057b6 124 check_for_libcrypt_later=1
80faa19f 125 AC_DEFINE(DONT_TRY_OTHER_AF)
a8545c6c 126 AC_DEFINE(PAM_TTY_KLUDGE)
80faa19f 127 inet6_default_4in6=yes
5cdfe03f 128 ;;
66d6c27e 129mips-sony-bsd|mips-sony-newsos4)
130 AC_DEFINE(HAVE_NEWS4)
131 SONY=1
132 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
ed6553e2 133 AC_MSG_ERROR([*** libiberty missing - please install first or check config.log ***])
66d6c27e 134 )
135 ;;
d468fc76 136*-*-netbsd*)
a0391976 137 need_dash_r=1
d468fc76 138 ;;
86b416a7 139*-*-freebsd*)
140 check_for_libcrypt_later=1
141 ;;
729bfe59 142*-next-*)
729bfe59 143 conf_lastlog_location="/usr/adm/lastlog"
698d107e 144 conf_utmp_location=/etc/utmp
145 conf_wtmp_location=/usr/adm/wtmp
146 MAIL=/usr/spool/mail
729bfe59 147 AC_DEFINE(HAVE_NEXT)
443172c4 148 AC_DEFINE(BROKEN_REALPATH)
00937921 149 AC_DEFINE(USE_PIPES)
86b416a7 150 AC_DEFINE(BROKEN_SAVED_UIDS)
0c2fb82f 151 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
b1335fdf 152 CFLAGS="$CFLAGS"
729bfe59 153 ;;
9d6b1b96 154*-*-solaris*)
0c2fb82f 155 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
fbf305f1 156 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
a0391976 157 need_dash_r=1
adeebd37 158 AC_DEFINE(PAM_SUN_CODEBASE)
7e2d5fa4 159 AC_DEFINE(LOGIN_NEEDS_UTMPX)
160 AC_DEFINE(LOGIN_NEEDS_TERM)
1d7b9b20 161 # hardwire lastlog location (can't detect it on some versions)
162 conf_lastlog_location="/var/adm/lastlog"
32c80420 163 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
164 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
165 if test "$sol2ver" -ge 8; then
166 AC_MSG_RESULT(yes)
167 AC_DEFINE(DISABLE_UTMP)
168 AC_DEFINE(DISABLE_WTMP)
169 else
170 AC_MSG_RESULT(no)
171 fi
9d6b1b96 172 ;;
a423beaf 173*-*-sunos4*)
0c2fb82f 174 CPPFLAGS="$CPPFLAGS -DSUNOS4"
a423beaf 175 AC_CHECK_FUNCS(getpwanam)
adeebd37 176 AC_DEFINE(PAM_SUN_CODEBASE)
667beaa9 177 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
32eec038 178 conf_utmp_location=/etc/utmp
179 conf_wtmp_location=/var/adm/wtmp
180 conf_lastlog_location=/var/adm/lastlog
137d7b6c 181 AC_DEFINE(USE_PIPES)
a423beaf 182 ;;
6f68f28a 183*-ncr-sysv*)
184 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
185 LDFLAGS="$LDFLAGS -L/usr/local/lib"
6f68f28a 186 LIBS="$LIBS -lc89 -lnsl -lgen -lsocket"
d8e76a0a 187 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
6f68f28a 188 ;;
132dd316 189*-sni-sysv*)
0c2fb82f 190 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
132dd316 191 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
9548d6c8 192 IPADDR_IN_DISPLAY=yes
193 AC_DEFINE(USE_PIPES)
132dd316 194 AC_DEFINE(IP_TOS_IS_BROKEN)
097ca118 195 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
05e1da75 196 LIBS="$LIBS -lgen -lnsl -lucb"
132dd316 197 ;;
77bb0bca 198*-*-sysv4.2*)
0c2fb82f 199 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
77bb0bca 200 LDFLAGS="$LDFLAGS -L/usr/local/lib"
cb547f98 201# enable_suid_ssh=no
ed6553e2 202 AC_DEFINE(USE_PIPES)
77bb0bca 203 ;;
204*-*-sysv5*)
0c2fb82f 205 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
77bb0bca 206 LDFLAGS="$LDFLAGS -L/usr/local/lib"
cb547f98 207# enable_suid_ssh=no
ed6553e2 208 AC_DEFINE(USE_PIPES)
77bb0bca 209 ;;
9d6b1b96 210*-*-sysv*)
0c2fb82f 211 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
84afc958 212 LDFLAGS="$LDFLAGS -L/usr/local/lib"
9d6b1b96 213 LIBS="$LIBS -lgen -lsocket"
214 ;;
77bb0bca 215*-*-sco3.2v4*)
0c2fb82f 216 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
77bb0bca 217 LDFLAGS="$LDFLAGS -L/usr/local/lib"
d287c664 218 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
ed6553e2 219 rsh_path="/usr/bin/rcmd"
77bb0bca 220 RANLIB=true
ed6553e2 221 no_dev_ptmx=1
77bb0bca 222 AC_DEFINE(BROKEN_SYS_TERMIO_H)
ed6553e2 223 AC_DEFINE(USE_PIPES)
77bb0bca 224 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
d287c664 225 AC_DEFINE(DISABLE_SHADOW)
2c523de9 226 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
86b416a7 227 AC_DEFINE(BROKEN_SAVED_UIDS)
aca75d94 228 AC_CHECK_FUNCS(getluid setluid)
533875af 229 MANTYPE=man
77bb0bca 230 ;;
231*-*-sco3.2v5*)
0c2fb82f 232 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
509b1f88 233 LDFLAGS="$LDFLAGS -L/usr/local/lib"
ed6553e2 234 LIBS="$LIBS -lprot -lx -ltinfo -lm"
509b1f88 235 no_dev_ptmx=1
77bb0bca 236 rsh_path="/usr/bin/rcmd"
ed6553e2 237 AC_DEFINE(USE_PIPES)
77bb0bca 238 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
d287c664 239 AC_DEFINE(DISABLE_SHADOW)
0dd78cd8 240 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
aca75d94 241 AC_CHECK_FUNCS(getluid setluid)
533875af 242 MANTYPE=man
509b1f88 243 ;;
ca5c7d6a 244*-*-unicos*)
a704dd54 245 no_libsocket=1
246 no_libnsl=1
ca5c7d6a 247 AC_DEFINE(USE_PIPES)
a704dd54 248 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
249 LIBS="$LIBS -lgen -lrsc"
250 ;;
4d33e531 251*-dec-osf*)
99c8ddac 252 AC_MSG_CHECKING(for Digital Unix SIA)
253 no_osfsia=""
254 AC_ARG_WITH(osfsia,
255 [ --with-osfsia Enable Digital Unix SIA],
256 [
257 if test "x$withval" = "xno" ; then
258 AC_MSG_RESULT(disabled)
259 no_osfsia=1
260 fi
261 ],
262 )
263 if test -z "$no_osfsia" ; then
4d33e531 264 if test -f /etc/sia/matrix.conf; then
265 AC_MSG_RESULT(yes)
266 AC_DEFINE(HAVE_OSF_SIA)
267 AC_DEFINE(DISABLE_LOGIN)
268 LIBS="$LIBS -lsecurity -ldb -lm -laud"
269 else
270 AC_MSG_RESULT(no)
271 fi
272 fi
273 ;;
41cb4569 274
275*-*-nto-qnx)
276 AC_DEFINE(USE_PIPES)
277 AC_DEFINE(NO_X11_UNIX_SOCKETS)
278 AC_DEFINE(MISSING_NFDBITS)
279 AC_DEFINE(MISSING_HOWMANY)
280 AC_DEFINE(MISSING_FD_MASK)
281 ;;
a7effaac 282esac
283
8e7b16f8 284# Allow user to specify flags
285AC_ARG_WITH(cflags,
286 [ --with-cflags Specify additional flags to pass to compiler],
287 [
288 if test "x$withval" != "xno" ; then
289 CFLAGS="$CFLAGS $withval"
290 fi
291 ]
292)
0c2fb82f 293AC_ARG_WITH(cppflags,
294 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
295 [
296 if test "x$withval" != "xno"; then
297 CPPFLAGS="$CPPFLAGS $withval"
298 fi
299 ]
300)
8e7b16f8 301AC_ARG_WITH(ldflags,
97b378bf 302 [ --with-ldflags Specify additional flags to pass to linker],
8e7b16f8 303 [
304 if test "x$withval" != "xno" ; then
305 LDFLAGS="$LDFLAGS $withval"
306 fi
307 ]
308)
309AC_ARG_WITH(libs,
310 [ --with-libs Specify additional libraries to link with],
311 [
312 if test "x$withval" != "xno" ; then
313 LIBS="$LIBS $withval"
314 fi
315 ]
316)
317
b41d8d4d 318AC_ARG_WITH(pcre,
319 [ --with-pcre Override built in regex library with pcre],
320 [
321
322 AC_CHECK_LIB(pcre, pcre_info,
323 [
324 AC_DEFINE(HAVE_LIBPCRE)
325 LIBS="$LIBS -lpcreposix -lpcre"
326 no_comp_check="yes"
327 ],
328 [ AC_MSG_ERROR([*** Can not locate pcre libraries.]) ]
329 )
330 ]
331)
8e7b16f8 332
a0391976 333# Checks for libraries.
bdf80b2c 334if test -z "$no_libnsl" ; then
2c523de9 335 AC_CHECK_LIB(nsl, yp_match, , )
336fi
bdf80b2c 337if test -z "$no_libsocket" ; then
2c523de9 338 AC_CHECK_LIB(socket, main, , )
339fi
340
f61d6b17 341dnl SCO OS3 needs this for libwrap
342AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
343
2c523de9 344AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
ed6553e2 345AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
4cca272e 346AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
48e7916f 347
b41d8d4d 348# We don't want to check if we did an pcre override.
349if test -z "$no_comp_check" ; then
350 AC_CHECK_FUNC(regcomp,
351 [ AC_DEFINE(HAVE_REGCOMP)],
352 [
353 AC_CHECK_LIB(pcre, pcre_info,
354 [
355 AC_DEFINE(HAVE_LIBPCRE)
356 LIBS="$LIBS -lpcreposix -lpcre"
357 ],
358 [
359 AC_MSG_ERROR([*** No regex library found.])
360 ])
361 ]
362 )
363fi
4cca272e 364
2c523de9 365dnl UnixWare 2.x
366AC_CHECK_FUNC(strcasecmp,
367 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
368)
369AC_CHECK_FUNC(utimes,
370 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
371)
4cca272e 372
a738c3b0 373AC_FUNC_STRFTIME
374
a0391976 375# Checks for header files.
41cb4569 376AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h libgen.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h stdint.h strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
84ceda19 377
378# Check for ALTDIRFUNC glob() extension
379AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
380AC_EGREP_CPP(FOUNDIT,
381 [
382 #include <glob.h>
383 #ifdef GLOB_ALTDIRFUNC
384 FOUNDIT
385 #endif
386 ],
387 [
388 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
389 AC_MSG_RESULT(yes)
390 ],
391 [
392 AC_MSG_RESULT(no)
393 ]
394)
4cca272e 395
40849fdb 396# Check for g.gl_matchc glob() extension
397AC_MSG_CHECKING(for gl_matchc field in glob_t)
398AC_EGREP_CPP(FOUNDIT,
399 [
400 #include <glob.h>
401 int main(void){glob_t g; g.gl_matchc = 1;}
402 ],
403 [
404 AC_DEFINE(GLOB_HAS_GL_MATCHC)
405 AC_MSG_RESULT(yes)
406 ],
407 [
408 AC_MSG_RESULT(no)
409 ]
410)
411
edbe6722 412AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
413AC_TRY_RUN(
414 [
415#include <sys/types.h>
416#include <dirent.h>
417int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
418 ],
419 [AC_MSG_RESULT(yes)],
420 [
421 AC_MSG_RESULT(no)
422 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
423 ]
424)
425
278588d8 426# Check whether user wants S/Key support
427SKEY_MSG="no"
428AC_ARG_WITH(skey,
429 [ --with-skey=PATH Enable S/Key support],
430 [
431 if test "x$withval" != "xno" ; then
432
433 if test "x$withval" != "xyes" ; then
434 CPPFLAGS="$CPPFLAGS -I${withval}/include"
435 LDFLAGS="$LDFLAGS -L${withval}/lib"
436 fi
437
438 AC_DEFINE(SKEY)
439 LIBS="-lskey $LIBS"
440 SKEY_MSG="yes"
441
442 AC_CHECK_FUNC(skey_keyinfo,
443 [],
444 [
445 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
446 ])
447 fi
448 ]
449)
450
451# Check whether user wants TCP wrappers support
452TCPW_MSG="no"
453AC_ARG_WITH(tcp-wrappers,
454 [ --with-tcp-wrappers Enable tcpwrappers support],
455 [
456 if test "x$withval" != "xno" ; then
457 saved_LIBS="$LIBS"
458 LIBS="-lwrap $LIBS"
459 AC_MSG_CHECKING(for libwrap)
460 AC_TRY_LINK(
461 [
462#include <tcpd.h>
463 int deny_severity = 0, allow_severity = 0;
464 ],
465 [hosts_access(0);],
466 [
467 AC_MSG_RESULT(yes)
468 AC_DEFINE(LIBWRAP)
469 TCPW_MSG="yes"
470 ],
471 [
472 AC_MSG_ERROR([*** libwrap missing])
473 ]
474 )
475 fi
476 ]
477)
478
2e73a022 479dnl Checks for library functions.
a704dd54 480AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
2e73a022 481dnl Checks for time functions
1d7b9b20 482AC_CHECK_FUNCS(gettimeofday time)
2e73a022 483dnl Checks for libutil functions
8f523d67 484AC_CHECK_HEADERS(libutil.h)
1d7b9b20 485AC_CHECK_FUNCS(login logout updwtmp logwtmp)
2e73a022 486dnl Checks for utmp functions
b03bd394 487AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
1d7b9b20 488AC_CHECK_FUNCS(utmpname)
2e73a022 489dnl Checks for utmpx functions
b03bd394 490AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
1d7b9b20 491AC_CHECK_FUNCS(setutxent utmpxname)
76cd7316 492
5fa45897 493AC_CHECK_FUNC(getuserattr,
494 [AC_DEFINE(HAVE_GETUSERATTR)],
495 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
496)
497
beb43d31 498AC_CHECK_FUNC(login,
499 [AC_DEFINE(HAVE_LOGIN)],
500 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
501)
502
503AC_CHECK_FUNC(daemon,
504 [AC_DEFINE(HAVE_DAEMON)],
505 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
506)
507
aa6bd60a 508AC_CHECK_FUNC(getpagesize,
509 [AC_DEFINE(HAVE_GETPAGESIZE)],
510 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
511)
512
2647ae26 513# Check for broken snprintf
514if test "x$ac_cv_func_snprintf" = "xyes" ; then
515 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
516 AC_TRY_RUN(
517 [
518#include <stdio.h>
519int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
520 ],
521 [AC_MSG_RESULT(yes)],
522 [
523 AC_MSG_RESULT(no)
524 AC_DEFINE(BROKEN_SNPRINTF)
525 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
526 ]
527 )
528fi
529
7f8f5e00 530AC_FUNC_GETPGRP
531
717057b6 532# Check for PAM libs
cbd7492e 533PAM_MSG="no"
a0391976 534AC_ARG_WITH(pam,
717057b6 535 [ --with-pam Enable PAM support ],
a0391976 536 [
717057b6 537 if test "x$withval" != "xno" ; then
538 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
539 AC_MSG_ERROR([PAM headers not found])
540 fi
a0391976 541
717057b6 542 AC_CHECK_LIB(dl, dlopen, , )
543 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
544 AC_CHECK_FUNCS(pam_getenvlist)
2b763e31 545
717057b6 546 disable_shadow=yes
547 PAM_MSG="yes"
4cb5ffa0 548
717057b6 549 AC_DEFINE(USE_PAM)
550 fi
551 ]
552)
cbd7492e 553
717057b6 554# Check for older PAM
555if test "x$PAM_MSG" = "xyes" ; then
a0391976 556 # Check PAM strerror arguments (old PAM)
557 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
558 AC_TRY_COMPILE(
559 [
18ba2aab 560#include <stdlib.h>
561#include <security/pam_appl.h>
a0391976 562 ],
563 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
564 [AC_MSG_RESULT(no)],
565 [
566 AC_DEFINE(HAVE_OLD_PAM)
567 AC_MSG_RESULT(yes)
cbd7492e 568 PAM_MSG="yes (old library)"
a0391976 569 ]
717057b6 570 )
a0391976 571fi
572
573# The big search for OpenSSL
574AC_ARG_WITH(ssl-dir,
575 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
576 [
e9e4a1c7 577 if test "x$withval" != "xno" ; then
a0391976 578 tryssldir=$withval
579 fi
580 ]
581)
582
583saved_LIBS="$LIBS"
cb0b7ea4 584saved_LDFLAGS="$LDFLAGS"
0c2fb82f 585saved_CPPFLAGS="$CPPFLAGS"
a0391976 586if test "x$prefix" != "xNONE" ; then
587 tryssldir="$tryssldir $prefix"
588fi
58d100bf 589AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
7950bf97 590 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
d6f13fbb 591 CPPFLAGS="$saved_CPPFLAGS"
592 LDFLAGS="$saved_LDFLAGS"
593 LIBS="$saved_LIBS -lcrypto"
594
595 # Skip directories if they don't exist
596 if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
597 continue;
598 fi
717057b6 599 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
d6f13fbb 600 # Try to use $ssldir/lib if it exists, otherwise
601 # $ssldir
602 if test -d "$ssldir/lib" ; then
8d0cc79b 603 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
d6f13fbb 604 if test ! -z "$need_dash_r" ; then
8d0cc79b 605 LDFLAGS="-R$ssldir/lib $LDFLAGS"
d6f13fbb 606 fi
607 else
8d0cc79b 608 LDFLAGS="-L$ssldir $saved_LDFLAGS"
d6f13fbb 609 if test ! -z "$need_dash_r" ; then
8d0cc79b 610 LDFLAGS="-R$ssldir $LDFLAGS"
d6f13fbb 611 fi
612 fi
613 # Try to use $ssldir/include if it exists, otherwise
614 # $ssldir
615 if test -d "$ssldir/include" ; then
8d0cc79b 616 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
d6f13fbb 617 else
8d0cc79b 618 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
58d100bf 619 fi
a0391976 620 fi
a0391976 621
d45e3d76 622 # Basic test to check for compatible version and correct linking
623 # *does not* test for RSA - that comes later.
624 AC_TRY_RUN(
625 [
44fb55e9 626#include <string.h>
627#include <openssl/rand.h>
18ba2aab 628int main(void)
629{
d45e3d76 630 char a[2048];
631 memset(a, 0, sizeof(a));
18ba2aab 632 RAND_add(a, sizeof(a), sizeof(a));
d45e3d76 633 return(RAND_status() <= 0);
18ba2aab 634}
d45e3d76 635 ],
636 [
637 found_crypto=1
638 break;
639 ], []
640 )
58d100bf 641
642 if test ! -z "$found_crypto" ; then
643 break;
644 fi
bcf36c78 645 done
646
58d100bf 647 if test -z "$found_crypto" ; then
ed6553e2 648 AC_MSG_ERROR([Could not find working OpenSSL library, please install or check config.log])
58d100bf 649 fi
650 if test -z "$ssldir" ; then
651 ssldir="(system)"
bcf36c78 652 fi
a0391976 653
58d100bf 654 ac_cv_openssldir=$ssldir
655])
656
e5fe9a1f 657if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
58d100bf 658 AC_DEFINE(HAVE_OPENSSL)
659 dnl Need to recover ssldir - test above runs in subshell
660 ssldir=$ac_cv_openssldir
717057b6 661 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
d6f13fbb 662 # Try to use $ssldir/lib if it exists, otherwise
663 # $ssldir
664 if test -d "$ssldir/lib" ; then
8d0cc79b 665 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
d6f13fbb 666 if test ! -z "$need_dash_r" ; then
8d0cc79b 667 LDFLAGS="-R$ssldir/lib $LDFLAGS"
d6f13fbb 668 fi
669 else
8d0cc79b 670 LDFLAGS="-L$ssldir $saved_LDFLAGS"
d6f13fbb 671 if test ! -z "$need_dash_r" ; then
8d0cc79b 672 LDFLAGS="-R$ssldir $LDFLAGS"
d6f13fbb 673 fi
717057b6 674 fi
d6f13fbb 675 # Try to use $ssldir/include if it exists, otherwise
676 # $ssldir
677 if test -d "$ssldir/include" ; then
8d0cc79b 678 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
d6f13fbb 679 else
8d0cc79b 680 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
717057b6 681 fi
bd499f9e 682 fi
a0391976 683fi
d45e3d76 684LIBS="$saved_LIBS -lcrypto"
685
686# Now test RSA support
687saved_LIBS="$LIBS"
688AC_MSG_CHECKING([for RSA support])
689for WANTS_RSAREF in "" 1 ; do
690 if test -z "$WANTS_RSAREF" ; then
691 LIBS="$saved_LIBS"
692 else
693 LIBS="$saved_LIBS -lRSAglue -lrsaref"
694 fi
695 AC_TRY_RUN([
696#include <string.h>
697#include <openssl/rand.h>
698#include <openssl/rsa.h>
699#include <openssl/bn.h>
700#include <openssl/sha.h>
701int main(void)
702{
703 int num; RSA *key; static unsigned char p_in[] = "blahblah";
704 unsigned char c[256], p[256];
705 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
706 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
707 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
708 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
709}
710 ],
711 [
712 rsa_works=1
713 break;
714 ], [])
715done
0abe778b 716LIBS="$saved_LIBS"
d45e3d76 717
718if test ! -z "$no_rsa" ; then
719 AC_MSG_RESULT(disabled)
cbd7492e 720 RSA_MSG="disabled"
cb0b7ea4 721else
d45e3d76 722 if test -z "$rsa_works" ; then
723 AC_MSG_WARN([*** No RSA support found *** ])
cbd7492e 724 RSA_MSG="no"
d45e3d76 725 else
726 if test -z "$WANTS_RSAREF" ; then
727 AC_MSG_RESULT(yes)
cbd7492e 728 RSA_MSG="yes"
d45e3d76 729 else
cbd7492e 730 RSA_MSG="yes (using RSAref)"
d45e3d76 731 AC_MSG_RESULT(using RSAref)
0abe778b 732 LIBS="$LIBS -lcrypto -lRSAglue -lrsaref"
d45e3d76 733 fi
734 fi
bcf36c78 735fi
58d100bf 736
717057b6 737# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
738# version in OpenSSL. Skip this for PAM
739if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
20cad736 740 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
717057b6 741fi
742
66d6c27e 743# Cheap hack to ensure NEWS-OS libraries are arranged right.
744if test ! -z "$SONY" ; then
745 LIBS="$LIBS -liberty";
746fi
747
a0391976 748# Checks for data types
976f7e19 749AC_CHECK_SIZEOF(char, 1)
2b942fe0 750AC_CHECK_SIZEOF(short int, 2)
751AC_CHECK_SIZEOF(int, 4)
752AC_CHECK_SIZEOF(long int, 4)
753AC_CHECK_SIZEOF(long long int, 8)
754
a0391976 755# More checks for data types
14a9a859 756AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
757 AC_TRY_COMPILE(
758 [ #include <sys/types.h> ],
759 [ u_int a; a = 1;],
760 [ ac_cv_have_u_int="yes" ],
761 [ ac_cv_have_u_int="no" ]
762 )
763])
764if test "x$ac_cv_have_u_int" = "xyes" ; then
765 AC_DEFINE(HAVE_U_INT)
766 have_u_int=1
767fi
768
58d100bf 769AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
770 AC_TRY_COMPILE(
771 [ #include <sys/types.h> ],
772 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
773 [ ac_cv_have_intxx_t="yes" ],
774 [ ac_cv_have_intxx_t="no" ]
775 )
776])
777if test "x$ac_cv_have_intxx_t" = "xyes" ; then
778 AC_DEFINE(HAVE_INTXX_T)
779 have_intxx_t=1
780fi
41cb4569 781
782if (test -z "$have_intxx_t" && \
783 test "x$ac_cv_header_stdint_h" = "xyes")
784then
785 AC_MSG_CHECKING([for intXX_t types in stdint.h])
786 AC_TRY_COMPILE(
787 [ #include <stdint.h> ],
788 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
789 [
790 AC_DEFINE(HAVE_INTXX_T)
791 AC_MSG_RESULT(yes)
792 ],
793 [ AC_MSG_RESULT(no) ]
794 )
795fi
796
bd590612 797AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
798 AC_TRY_COMPILE(
799 [ #include <sys/types.h> ],
800 [ int64_t a; a = 1;],
801 [ ac_cv_have_int64_t="yes" ],
802 [ ac_cv_have_int64_t="no" ]
803 )
804])
805if test "x$ac_cv_have_int64_t" = "xyes" ; then
806 AC_DEFINE(HAVE_INT64_T)
807 have_int64_t=1
808fi
809
41cb4569 810if test -z "$have_int64_t" ; then
811 AC_MSG_CHECKING([for int64_t type in sys/socket.h])
812 AC_TRY_COMPILE(
813 [ #include <sys/socket.h> ],
814 [ int64_t a; a = 1],
815 [
816 AC_DEFINE(HAVE_INT64_T)
817 AC_MSG_RESULT(yes)
818 ],
819 [ AC_MSG_RESULT(no) ]
820 )
821fi
822
58d100bf 823AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
824 AC_TRY_COMPILE(
825 [ #include <sys/types.h> ],
826 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
827 [ ac_cv_have_u_intxx_t="yes" ],
828 [ ac_cv_have_u_intxx_t="no" ]
829 )
830])
831if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
832 AC_DEFINE(HAVE_U_INTXX_T)
833 have_u_intxx_t=1
834fi
2b942fe0 835
41cb4569 836if test -z "$have_u_intxx_t" ; then
837 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
838 AC_TRY_COMPILE(
839 [ #include <sys/socket.h> ],
840 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
841 [
842 AC_DEFINE(HAVE_U_INTXX_T)
843 AC_MSG_RESULT(yes)
844 ],
845 [ AC_MSG_RESULT(no) ]
846 )
847fi
848
bd590612 849AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
850 AC_TRY_COMPILE(
851 [ #include <sys/types.h> ],
852 [ u_int64_t a; a = 1;],
853 [ ac_cv_have_u_int64_t="yes" ],
854 [ ac_cv_have_u_int64_t="no" ]
855 )
856])
857if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
858 AC_DEFINE(HAVE_U_INT64_T)
859 have_u_int64_t=1
860fi
861
41cb4569 862if test -z "$have_u_intxx_t" ; then
863 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
864 AC_TRY_COMPILE(
865 [
866#include <sys/types.h>
867 ],
868 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
869 [ ac_cv_have_uintxx_t="yes" ],
870 [ ac_cv_have_uintxx_t="no" ]
871 )
872 ])
873 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
874 AC_DEFINE(HAVE_UINTXX_T)
875 fi
876fi
877
878if test -z "$have_uintxx_t" ; then
879 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
880 AC_TRY_COMPILE(
881 [ #include <stdint.h> ],
882 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
883 [
884 AC_DEFINE(HAVE_UINTXX_T)
885 AC_MSG_RESULT(yes)
886 ],
887 [ AC_MSG_RESULT(no) ]
888 )
889fi
890
e5fe9a1f 891if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
892 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
5cdfe03f 893then
894 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
895 AC_TRY_COMPILE(
58d100bf 896 [
897#include <sys/bitypes.h>
898 ],
5cdfe03f 899 [
837c30b8 900 int8_t a; int16_t b; int32_t c;
901 u_int8_t e; u_int16_t f; u_int32_t g;
902 a = b = c = e = f = g = 1;
5cdfe03f 903 ],
904 [
905 AC_DEFINE(HAVE_U_INTXX_T)
906 AC_DEFINE(HAVE_INTXX_T)
907 AC_MSG_RESULT(yes)
908 ],
909 [AC_MSG_RESULT(no)]
910 )
911fi
912
0362750e 913
914AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
915 AC_TRY_COMPILE(
916 [
917#include <sys/types.h>
918 ],
919 [ u_char foo; foo = 125; ],
920 [ ac_cv_have_u_char="yes" ],
921 [ ac_cv_have_u_char="no" ]
922 )
923])
924if test "x$ac_cv_have_u_char" = "xyes" ; then
925 AC_DEFINE(HAVE_U_CHAR)
926fi
927
58d100bf 928AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
474b5fef 929 AC_TRY_COMPILE(
474b5fef 930 [
58d100bf 931#include <sys/types.h>
932#include <sys/socket.h>
474b5fef 933 ],
58d100bf 934 [socklen_t foo; foo = 1235;],
935 [ ac_cv_have_socklen_t="yes" ],
936 [ ac_cv_have_socklen_t="no" ]
937 )
938])
939if test "x$ac_cv_have_socklen_t" = "xyes" ; then
940 AC_DEFINE(HAVE_SOCKLEN_T)
474b5fef 941fi
2b942fe0 942
58d100bf 943AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
944 AC_TRY_COMPILE(
945 [
18ba2aab 946#include <sys/types.h>
58d100bf 947 ],
948 [ size_t foo; foo = 1235; ],
949 [ ac_cv_have_size_t="yes" ],
950 [ ac_cv_have_size_t="no" ]
951 )
952])
953if test "x$ac_cv_have_size_t" = "xyes" ; then
954 AC_DEFINE(HAVE_SIZE_T)
955fi
ea1970a3 956
c04f75f1 957AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
958 AC_TRY_COMPILE(
959 [
960#include <sys/types.h>
961 ],
962 [ ssize_t foo; foo = 1235; ],
963 [ ac_cv_have_ssize_t="yes" ],
964 [ ac_cv_have_ssize_t="no" ]
965 )
966])
967if test "x$ac_cv_have_ssize_t" = "xyes" ; then
968 AC_DEFINE(HAVE_SSIZE_T)
969fi
970
f1c4659d 971AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
972 AC_TRY_COMPILE(
973 [
974#include <time.h>
975 ],
976 [ clock_t foo; foo = 1235; ],
977 [ ac_cv_have_clock_t="yes" ],
978 [ ac_cv_have_clock_t="no" ]
979 )
980])
981if test "x$ac_cv_have_clock_t" = "xyes" ; then
982 AC_DEFINE(HAVE_CLOCK_T)
983fi
984
1c04b088 985AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
986 AC_TRY_COMPILE(
987 [
988#include <sys/types.h>
989#include <sys/socket.h>
990 ],
991 [ sa_family_t foo; foo = 1235; ],
992 [ ac_cv_have_sa_family_t="yes" ],
77bb0bca 993 [ AC_TRY_COMPILE(
994 [
995#include <sys/types.h>
996#include <sys/socket.h>
997#include <netinet/in.h>
998 ],
999 [ sa_family_t foo; foo = 1235; ],
1000 [ ac_cv_have_sa_family_t="yes" ],
1001
1c04b088 1002 [ ac_cv_have_sa_family_t="no" ]
77bb0bca 1003 )]
1c04b088 1004 )
1005])
1006if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1007 AC_DEFINE(HAVE_SA_FAMILY_T)
1008fi
1009
729bfe59 1010AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1011 AC_TRY_COMPILE(
1012 [
1013#include <sys/types.h>
1014 ],
1015 [ pid_t foo; foo = 1235; ],
1016 [ ac_cv_have_pid_t="yes" ],
1017 [ ac_cv_have_pid_t="no" ]
1018 )
1019])
1020if test "x$ac_cv_have_pid_t" = "xyes" ; then
1021 AC_DEFINE(HAVE_PID_T)
1022fi
1023
1024AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1025 AC_TRY_COMPILE(
1026 [
1027#include <sys/types.h>
1028 ],
1029 [ mode_t foo; foo = 1235; ],
1030 [ ac_cv_have_mode_t="yes" ],
1031 [ ac_cv_have_mode_t="no" ]
1032 )
1033])
1034if test "x$ac_cv_have_mode_t" = "xyes" ; then
1035 AC_DEFINE(HAVE_MODE_T)
1036fi
1037
e3a93db0 1038
58d100bf 1039AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1040 AC_TRY_COMPILE(
1041 [
18ba2aab 1042#include <sys/types.h>
1043#include <sys/socket.h>
58d100bf 1044 ],
1045 [ struct sockaddr_storage s; ],
1046 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1047 [ ac_cv_have_struct_sockaddr_storage="no" ]
1048 )
1049])
1050if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1051 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1052fi
48e671d5 1053
58d100bf 1054AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1055 AC_TRY_COMPILE(
1056 [
cbd7492e 1057#include <sys/types.h>
58d100bf 1058#include <netinet/in.h>
1059 ],
1060 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1061 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1062 [ ac_cv_have_struct_sockaddr_in6="no" ]
1063 )
1064])
1065if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1066 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1067fi
48e671d5 1068
58d100bf 1069AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1070 AC_TRY_COMPILE(
1071 [
cbd7492e 1072#include <sys/types.h>
58d100bf 1073#include <netinet/in.h>
1074 ],
1075 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1076 [ ac_cv_have_struct_in6_addr="yes" ],
1077 [ ac_cv_have_struct_in6_addr="no" ]
1078 )
1079])
1080if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1081 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1082fi
48e671d5 1083
58d100bf 1084AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1085 AC_TRY_COMPILE(
1086 [
18ba2aab 1087#include <sys/types.h>
1088#include <sys/socket.h>
1089#include <netdb.h>
58d100bf 1090 ],
1091 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1092 [ ac_cv_have_struct_addrinfo="yes" ],
1093 [ ac_cv_have_struct_addrinfo="no" ]
1094 )
1095])
1096if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1097 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1098fi
1099
89c7e31c 1100AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1101 AC_TRY_COMPILE(
1102 [ #include <sys/time.h> ],
1103 [ struct timeval tv; tv.tv_sec = 1;],
1104 [ ac_cv_have_struct_timeval="yes" ],
1105 [ ac_cv_have_struct_timeval="no" ]
1106 )
1107])
1108if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1109 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1110 have_struct_timeval=1
1111fi
1112
2c523de9 1113# If we don't have int64_t then we can't compile sftp-server. So don't
1114# even attempt to do it.
1115if test "x$ac_cv_have_int64_t" = "xno" -a \
1116 "x$ac_cv_sizeof_long_int" != "x8" -a \
1117 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1118 NO_SFTP='#'
733cf7f4 1119else
1120dnl test snprintf (broken on SCO w/gcc)
1121 AC_TRY_RUN(
1122 [
1123#include <stdio.h>
1124#include <string.h>
1125#ifdef HAVE_SNPRINTF
1126main()
1127{
1128 char buf[50];
1129 char expected_out[50];
1130 int mazsize = 50 ;
1131#if (SIZEOF_LONG_INT == 8)
1132 long int num = 0x7fffffffffffffff;
1133#else
763a1a18 1134 long long num = 0x7fffffffffffffffll;
733cf7f4 1135#endif
1136 strcpy(expected_out, "9223372036854775807");
1137 snprintf(buf, mazsize, "%lld", num);
1138 if(strcmp(buf, expected_out) != 0)
1139 exit(1);
1140 exit(0);
1141}
1142#else
1143main() { exit(0); }
1144#endif
1145 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1146 )
2c523de9 1147fi
89c7e31c 1148AC_SUBST(NO_SFTP)
2c523de9 1149
77bb0bca 1150dnl Checks for structure members
58d100bf 1151OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1152OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1153OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1154OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1155OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
25422c70 1156OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
58d100bf 1157OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1158OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
daaff4d5 1159OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
58d100bf 1160OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1161OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1162OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1163OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
1d7b9b20 1164OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1165OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1166OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1167OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
77bb0bca 1168AC_STRUCT_ST_BLKSIZE
1d7b9b20 1169
c345cf9d 1170AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
1171 ac_cv_have_sun_len_in_struct_sockaddr_un, [
1172 AC_TRY_COMPILE(
1173 [
1174#include <sys/types.h>
1175#include <sys/socket.h>
1176 ],
1177 [ struct sockaddr_un s; s.sun_len = 1; ],
1178 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
1179 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
1180 )
1181])
1182if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
1183 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
1184fi
1185
58d100bf 1186AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1187 ac_cv_have_ss_family_in_struct_ss, [
1188 AC_TRY_COMPILE(
1189 [
18ba2aab 1190#include <sys/types.h>
1191#include <sys/socket.h>
58d100bf 1192 ],
1193 [ struct sockaddr_storage s; s.ss_family = 1; ],
1194 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1195 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1196 )
1197])
1198if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1199 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1200fi
1201
58d100bf 1202AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1203 ac_cv_have___ss_family_in_struct_ss, [
1204 AC_TRY_COMPILE(
1205 [
18ba2aab 1206#include <sys/types.h>
1207#include <sys/socket.h>
58d100bf 1208 ],
1209 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1210 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1211 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1212 )
1213])
1214if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1215 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1216fi
1217
2e73a022 1218AC_CACHE_CHECK([for pw_class field in struct passwd],
1219 ac_cv_have_pw_class_in_struct_passwd, [
1220 AC_TRY_COMPILE(
1221 [
2e73a022 1222#include <pwd.h>
1223 ],
97994d32 1224 [ struct passwd p; p.pw_class = 0; ],
2e73a022 1225 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1226 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1227 )
1228])
1229if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1230 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1231fi
1232
7751d4eb 1233AC_CACHE_CHECK([for pw_expire field in struct passwd],
1234 ac_cv_have_pw_expire_in_struct_passwd, [
1235 AC_TRY_COMPILE(
1236 [
1237#include <pwd.h>
1238 ],
1239 [ struct passwd p; p.pw_expire = 0; ],
1240 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1241 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1242 )
1243])
1244if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1245 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1246fi
1247
1248AC_CACHE_CHECK([for pw_change field in struct passwd],
1249 ac_cv_have_pw_change_in_struct_passwd, [
1250 AC_TRY_COMPILE(
1251 [
1252#include <pwd.h>
1253 ],
1254 [ struct passwd p; p.pw_change = 0; ],
1255 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1256 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1257 )
1258])
1259if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1260 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1261fi
58d100bf 1262
1263AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
1264 AC_TRY_LINK([],
1265 [ extern char *__progname; printf("%s", __progname); ],
1266 [ ac_cv_libc_defines___progname="yes" ],
1267 [ ac_cv_libc_defines___progname="no" ]
1268 )
1269])
1270if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1271 AC_DEFINE(HAVE___PROGNAME)
1272fi
8946db53 1273
1812a662 1274AC_CACHE_CHECK([whether getopt has optreset support],
1275 ac_cv_have_getopt_optreset, [
1276 AC_TRY_LINK(
1277 [
1278#include <getopt.h>
1279 ],
1280 [ extern int optreset; optreset = 0; ],
1281 [ ac_cv_have_getopt_optreset="yes" ],
1282 [ ac_cv_have_getopt_optreset="no" ]
1283 )
1284])
1285if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1286 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1287fi
a0391976 1288
819b676f 1289AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
1290 AC_TRY_LINK([],
1291 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
1292 [ ac_cv_libc_defines_sys_errlist="yes" ],
1293 [ ac_cv_libc_defines_sys_errlist="no" ]
1294 )
1295])
1296if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1297 AC_DEFINE(HAVE_SYS_ERRLIST)
1298fi
1299
1300
416ed5a7 1301AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
1302 AC_TRY_LINK([],
1303 [ extern int sys_nerr; printf("%i", sys_nerr);],
1304 [ ac_cv_libc_defines_sys_nerr="yes" ],
1305 [ ac_cv_libc_defines_sys_nerr="no" ]
1306 )
1307])
1308if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1309 AC_DEFINE(HAVE_SYS_NERR)
1310fi
1311
1312
d0b19c95 1313# Check whether user wants Kerberos support
1314SCARD_MSG="no"
1315AC_ARG_WITH(smartcard,
1316 [ --with-smartcard Enable smartcard support],
1317 [
1318 if test "x$withval" != "xno" ; then
1319 if test "x$withval" != "xyes" ; then
1320 CPPFLAGS="$CPPFLAGS -I${withval}"
1321 LDFLAGS="$LDFLAGS -L${withval}"
1322 if test ! -z "$need_dash_r" ; then
1323 LDFLAGS="$LDFLAGS -R${withval}"
1324 fi
1325 if test ! -z "$blibpath" ; then
1326 blibpath="$blibpath:${withval}"
1327 fi
1328 fi
1329 AC_CHECK_HEADERS(sectok.h)
1330 if test "$ac_cv_header_sectok_h" != yes; then
1331 AC_MSG_ERROR(Can't find sectok.h)
1332 fi
1333 AC_CHECK_LIB(sectok, sectok_open)
1334 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
1335 AC_MSG_ERROR(Can't find libsectok)
1336 fi
1337 AC_DEFINE(SMARTCARD)
1338 SCARD_MSG="yes"
1339 fi
1340 ]
1341)
1342
b5b68128 1343# Check whether user wants Kerberos support
1344KRB4_MSG="no"
1345AC_ARG_WITH(kerberos4,
1346 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1347 [
1348 if test "x$withval" != "xno" ; then
b5b68128 1349 if test "x$withval" != "xyes" ; then
1350 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1351 LDFLAGS="$LDFLAGS -L${withval}/lib"
1352 if test ! -z "$need_dash_r" ; then
1353 LDFLAGS="$LDFLAGS -R${withval}/lib"
1354 fi
1355 if test ! -z "$blibpath" ; then
1356 blibpath="$blibpath:${withval}/lib"
1357 fi
1358 else
1359 if test -d /usr/include/kerberosIV ; then
1360 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1361 fi
1362 fi
1363
1364 AC_CHECK_HEADERS(krb.h)
b5b68128 1365 if test "$ac_cv_header_krb_h" != yes; then
1366 AC_MSG_WARN([Cannot find krb.h, build may fail])
1367 fi
cccfea16 1368 AC_CHECK_LIB(krb, main)
b5b68128 1369 if test "$ac_cv_lib_krb_main" != yes; then
cccfea16 1370 AC_CHECK_LIB(krb4, main)
1371 if test "$ac_cv_lib_krb4_main" != yes; then
1372 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1373 else
1374 KLIBS="-lkrb4"
1375 fi
1376 else
1377 KLIBS="-lkrb"
1378 fi
1379 AC_CHECK_LIB(des, des_cbc_encrypt)
1380 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1381 AC_CHECK_LIB(des425, des_cbc_encrypt)
1382 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1383 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1384 else
1385 KLIBS="-ldes425"
1386 fi
1387 else
1388 KLIBS="-ldes"
b5b68128 1389 fi
b5b68128 1390 AC_CHECK_LIB(resolv, dn_expand, , )
1391 KRB4=yes
1392 KRB4_MSG="yes"
1393 AC_DEFINE(KRB4)
1394 fi
1395 ]
1396)
1397
1398# Check whether user wants AFS support
1399AFS_MSG="no"
1400AC_ARG_WITH(afs,
1401 [ --with-afs=PATH Enable AFS support],
1402 [
1403 if test "x$withval" != "xno" ; then
1404
1405 if test "x$withval" != "xyes" ; then
1406 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1407 LDFLAGS="$LDFLAGS -L${withval}/lib"
1408 fi
1409
1410 if test -z "$KRB4" ; then
1411 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1412 fi
1413
1414 LIBS="-lkafs $LIBS"
1415 if test ! -z "$AFS_LIBS" ; then
1416 LIBS="$LIBS $AFS_LIBS"
1417 fi
1418 AC_DEFINE(AFS)
1419 AFS_MSG="yes"
1420 fi
1421 ]
1422)
1423LIBS="$LIBS $KLIBS"
1424
a0391976 1425# Looking for programs, paths and files
1426AC_ARG_WITH(rsh,
1427 [ --with-rsh=PATH Specify path to remote shell program ],
1428 [
bcf36c78 1429 if test "x$withval" != "$no" ; then
7a33f831 1430 rsh_path=$withval
a0391976 1431 fi
1432 ],
1433 [
1434 AC_PATH_PROG(rsh_path, rsh)
1435 ]
1436)
1437
1438AC_ARG_WITH(xauth,
1439 [ --with-xauth=PATH Specify path to xauth program ],
1440 [
00937921 1441 if test "x$withval" != "xno" ; then
cbd7492e 1442 xauth_path=$withval
a0391976 1443 fi
1444 ],
1445 [
77bb0bca 1446 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
e5fe9a1f 1447 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
a0391976 1448 xauth_path="/usr/openwin/bin/xauth"
1449 fi
1450 ]
1451)
1452
b3ec54b4 1453if test -z "$xauth_path" ; then
1454 XAUTH_PATH="undefined"
1455 AC_SUBST(XAUTH_PATH)
1456else
a0391976 1457 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
b3ec54b4 1458 XAUTH_PATH=$xauth_path
1459 AC_SUBST(XAUTH_PATH)
a0391976 1460fi
1461if test ! -z "$rsh_path" ; then
1462 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
1463fi
1464
1465# Check for mail directory (last resort if we cannot get it from headers)
1466if test ! -z "$MAIL" ; then
1467 maildir=`dirname $MAIL`
1468 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1469fi
1470
a0391976 1471if test -z "$no_dev_ptmx" ; then
3276571c 1472 AC_CHECK_FILE("/dev/ptmx",
1473 [
1474 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1475 have_dev_ptmx=1
1476 ]
1477 )
1478fi
1479AC_CHECK_FILE("/dev/ptc",
1480 [
1481 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1482 have_dev_ptc=1
1483 ]
1484)
1485
a0391976 1486# Options from here on. Some of these are preset by platform above
1487
a0391976 1488# Check for user-specified random device, otherwise check /dev/urandom
1489AC_ARG_WITH(random,
e1dd3a7a 1490 [ --with-random=FILE read entropy from FILE (default=/dev/urandom)],
a0391976 1491 [
bfc9a610 1492 if test "x$withval" != "xno" ; then
1493 RANDOM_POOL="$withval";
1494 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1495 fi
a0391976 1496 ],
1497 [
1498 # Check for random device
1499 AC_CHECK_FILE("/dev/urandom",
1500 [
1501 RANDOM_POOL="/dev/urandom";
1502 AC_SUBST(RANDOM_POOL)
1503 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1504 ]
1505 )
1506 ]
1507)
1508
9bdd5929 1509# Check for PRNGD/EGD pool file
1510AC_ARG_WITH(prngd-port,
1511 [ --with-prngd-port=PORT read entropy from PRNGD/EGD localhost:PORT],
1512 [
1513 if test ! -z "$withval" -a "x$withval" != "xno" ; then
1514 PRNGD_PORT="$withval"
1515 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
1516 fi
1517 ]
1518)
1519
1520# Check for PRNGD/EGD pool file
1521AC_ARG_WITH(prngd-socket,
1522 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
a0391976 1523 [
bfc9a610 1524 if test "x$withval" != "xno" ; then
9bdd5929 1525 PRNGD_SOCKET="$withval"
1526 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
bfc9a610 1527 fi
e1dd3a7a 1528 ],
1529 [
1530 # Check for existing socket only if we don't have a random device already
1531 if test -z "$RANDOM_POOL" ; then
1532 AC_MSG_CHECKING(for PRNGD/EGD socket)
1533 # Insert other locations here
733cf7f4 1534 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
9bdd5929 1535 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
1536 PRNGD_SOCKET="$sock"
1537 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
e1dd3a7a 1538 break;
1539 fi
1540 done
9bdd5929 1541 if test ! -z "$PRNGD_SOCKET" ; then
1542 AC_MSG_RESULT($PRNGD_SOCKET)
6958bd37 1543 else
1544 AC_MSG_RESULT(not found)
1545 fi
e1dd3a7a 1546 fi
a0391976 1547 ]
1548)
1549
e1dd3a7a 1550
d3083fbd 1551# detect pathnames for entropy gathering commands, if we need them
1552INSTALL_SSH_PRNG_CMDS=""
1553rm -f prng_commands
9bdd5929 1554if (test -z "$RANDOM_POOL" && test -z "$PRNGD") ; then
9d98aaf6 1555 # Use these commands to collect entropy
58d100bf 1556 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1557 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1558 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1559 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
ca5c7d6a 1560 OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
58d100bf 1561 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1a23ac2c 1562 OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
58d100bf 1563 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1564 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1565 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1566 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1567 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1568 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1569 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1570 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1571 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
d3083fbd 1572
1573 INSTALL_SSH_PRNG_CMDS="yes"
9d98aaf6 1574fi
d3083fbd 1575AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1576
9d98aaf6 1577
fdf6b7aa 1578AC_ARG_WITH(mantype,
5d97cfbf 1579 [ --with-mantype=man|cat|doc Set man page type],
c54a6257 1580 [
5d97cfbf 1581 case "$withval" in
1582 man|cat|doc)
1583 MANTYPE=$withval
1584 ;;
1585 *)
1586 AC_MSG_ERROR(invalid man type: $withval)
1587 ;;
1588 esac
c54a6257 1589 ]
1590)
e0c4d3ac 1591if test -z "$MANTYPE"; then
533875af 1592 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, /usr/bin:/usr/ucb)
e0c4d3ac 1593 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
1594 MANTYPE=doc
1595 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
1596 MANTYPE=man
1597 else
1598 MANTYPE=cat
1599 fi
1600fi
c54a6257 1601AC_SUBST(MANTYPE)
e0c4d3ac 1602if test "$MANTYPE" = "doc"; then
1603 mansubdir=man;
1604else
1605 mansubdir=$MANTYPE;
1606fi
1607AC_SUBST(mansubdir)
0bc5b6fb 1608
a0391976 1609# Check whether to enable MD5 passwords
cbd7492e 1610MD5_MSG="no"
2ddcfdf3 1611AC_ARG_WITH(md5-passwords,
caf3bc51 1612 [ --with-md5-passwords Enable use of MD5 passwords],
0bc5b6fb 1613 [
bcf36c78 1614 if test "x$withval" != "xno" ; then
0bc5b6fb 1615 AC_DEFINE(HAVE_MD5_PASSWORDS)
cbd7492e 1616 MD5_MSG="yes"
0bc5b6fb 1617 fi
1618 ]
caf3bc51 1619)
1620
a0391976 1621# Whether to disable shadow password support
a7effaac 1622AC_ARG_WITH(shadow,
1623 [ --without-shadow Disable shadow password support],
1624 [
1625 if test "x$withval" = "xno" ; then
1626 AC_DEFINE(DISABLE_SHADOW)
4cb5ffa0 1627 disable_shadow=yes
a7effaac 1628 fi
1629 ]
1630)
1631
4cb5ffa0 1632if test -z "$disable_shadow" ; then
1633 AC_MSG_CHECKING([if the systems has expire shadow information])
1634 AC_TRY_COMPILE(
1635 [
1636#include <sys/types.h>
1637#include <shadow.h>
1638 struct spwd sp;
1639 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1640 [ sp_expire_available=yes ], []
1641 )
1642
1643 if test "x$sp_expire_available" = "xyes" ; then
1644 AC_MSG_RESULT(yes)
1645 AC_DEFINE(HAS_SHADOW_EXPIRE)
1646 else
1647 AC_MSG_RESULT(no)
1648 fi
1649fi
1650
a0391976 1651# Use ip address instead of hostname in $DISPLAY
44839801 1652if test ! -z "$IPADDR_IN_DISPLAY" ; then
1653 DISPLAY_HACK_MSG="yes"
1654 AC_DEFINE(IPADDR_IN_DISPLAY)
1655else
1656 DISPLAY_HACK_MSG="no"
1657 AC_ARG_WITH(ipaddr-display,
1658 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1659 [
1660 if test "x$withval" != "xno" ; then
1661 AC_DEFINE(IPADDR_IN_DISPLAY)
1662 DISPLAY_HACK_MSG="yes"
1663 fi
1664 ]
1665 )
1666fi
a7effaac 1667
a0391976 1668# Whether to mess with the default path
cbd7492e 1669SERVER_PATH_MSG="(default)"
c43d69a9 1670AC_ARG_WITH(default-path,
cb807f40 1671 [ --with-default-path=PATH Specify default \$PATH environment for server],
1672 [
1673 if test "x$withval" != "xno" ; then
b2d818e6 1674 user_path="$withval"
cbd7492e 1675 SERVER_PATH_MSG="$withval"
cb807f40 1676 fi
b2d818e6 1677 ],
1678 [
1679 AC_TRY_RUN(
1680 [
1681/* find out what STDPATH is */
1682#include <stdio.h>
b2d818e6 1683#ifdef HAVE_PATHS_H
1684# include <paths.h>
1685#endif
1686#ifndef _PATH_STDPATH
1687# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
1688#endif
1689#include <sys/types.h>
1690#include <sys/stat.h>
1691#include <fcntl.h>
1692#define DATA "conftest.stdpath"
1693
1694main()
1695{
1696 FILE *fd;
1697 int rc;
1698
1699 fd = fopen(DATA,"w");
1700 if(fd == NULL)
1701 exit(1);
1702
1703 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
1704 exit(1);
1705
1706 exit(0);
1707}
1708 ], [ user_path=`cat conftest.stdpath` ],
1709 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
1710 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
1711 )
1712# make sure $bindir is in USER_PATH so scp will work
1713 t_bindir=`eval echo ${bindir}`
1714 case $t_bindir in
1715 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
1716 esac
1717 case $t_bindir in
1718 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
1719 esac
1720 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
1721 if test $? -ne 0 ; then
1722 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
1723 if test $? -ne 0 ; then
1724 user_path=$user_path:$t_bindir
1725 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
1726 fi
1727 fi
cb807f40 1728 ]
1729)
b2d818e6 1730AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
1731AC_SUBST(user_path)
cb807f40 1732
a0391976 1733# Whether to force IPv4 by default (needed on broken glibc Linux)
cbd7492e 1734IPV4_HACK_MSG="no"
59e76f33 1735AC_ARG_WITH(ipv4-default,
1736 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1737 [
1738 if test "x$withval" != "xno" ; then
1739 AC_DEFINE(IPV4_DEFAULT)
cbd7492e 1740 IPV4_HACK_MSG="yes"
59e76f33 1741 fi
1742 ]
1743)
1744
58d100bf 1745AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
cbd7492e 1746IPV4_IN6_HACK_MSG="no"
80faa19f 1747AC_ARG_WITH(4in6,
1748 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1749 [
1750 if test "x$withval" != "xno" ; then
1751 AC_MSG_RESULT(yes)
1752 AC_DEFINE(IPV4_IN_IPV6)
cbd7492e 1753 IPV4_IN6_HACK_MSG="yes"
80faa19f 1754 else
1755 AC_MSG_RESULT(no)
1756 fi
1757 ],[
1758 if test "x$inet6_default_4in6" = "xyes"; then
1759 AC_MSG_RESULT([yes (default)])
1760 AC_DEFINE(IPV4_IN_IPV6)
cbd7492e 1761 IPV4_IN6_HACK_MSG="yes"
80faa19f 1762 else
1763 AC_MSG_RESULT([no (default)])
1764 fi
1765 ]
1766)
1767
af774732 1768# Whether to enable BSD auth support
1769AC_ARG_WITH(bsd-auth,
1770 [ --with-bsd-auth Enable BSD auth support],
1771 [
1772 if test "x$withval" != "xno" ; then
1773 AC_DEFINE(BSD_AUTH)
1774 bsd_auth=yes
1775 fi
1776 ]
1777)
1778
77bb0bca 1779AC_MSG_CHECKING(whether to install ssh as suid root)
1780AC_ARG_ENABLE(suid-ssh,
1781[ --enable-suid-ssh Install ssh as suid root (default)
1782 --disable-suid-ssh Install ssh without suid bit],
1783[ case "$enableval" in
1784 no)
1785 AC_MSG_RESULT(no)
1786 SSHMODE=0711
1787 ;;
1788 *) AC_MSG_RESULT(yes)
0b7d19eb 1789 SSHMODE=4711
77bb0bca 1790 ;;
1791 esac ],
1792 AC_MSG_RESULT(yes)
0b7d19eb 1793 SSHMODE=4711
77bb0bca 1794)
1795AC_SUBST(SSHMODE)
1796
1797
a0391976 1798# Where to place sshd.pid
19d9ac2a 1799piddir=/var/run
47e45e44 1800AC_ARG_WITH(pid-dir,
1801 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1802 [
1803 if test "x$withval" != "xno" ; then
19d9ac2a 1804 piddir=$withval
47e45e44 1805 fi
1806 ]
1807)
b7a87eea 1808
77bb0bca 1809# make sure the directory exists
1810if test ! -d $piddir ; then
1811 piddir=`eval echo ${sysconfdir}`
1812 case $piddir in
1813 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1814 esac
1815fi
1816
42f11eb2 1817AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
19d9ac2a 1818AC_SUBST(piddir)
47e45e44 1819
1d7b9b20 1820dnl allow user to disable some login recording features
1821AC_ARG_ENABLE(lastlog,
bfd550a2 1822 [ --disable-lastlog disable use of lastlog even if detected [no]],
1d7b9b20 1823 [ AC_DEFINE(DISABLE_LASTLOG) ]
1824)
1825AC_ARG_ENABLE(utmp,
bfd550a2 1826 [ --disable-utmp disable use of utmp even if detected [no]],
1d7b9b20 1827 [ AC_DEFINE(DISABLE_UTMP) ]
1828)
1829AC_ARG_ENABLE(utmpx,
bfd550a2 1830 [ --disable-utmpx disable use of utmpx even if detected [no]],
1d7b9b20 1831 [ AC_DEFINE(DISABLE_UTMPX) ]
1832)
1833AC_ARG_ENABLE(wtmp,
bfd550a2 1834 [ --disable-wtmp disable use of wtmp even if detected [no]],
1d7b9b20 1835 [ AC_DEFINE(DISABLE_WTMP) ]
1836)
1837AC_ARG_ENABLE(wtmpx,
bfd550a2 1838 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
1d7b9b20 1839 [ AC_DEFINE(DISABLE_WTMPX) ]
1840)
1841AC_ARG_ENABLE(libutil,
bfd550a2 1842 [ --disable-libutil disable use of libutil (login() etc.) [no]],
1d7b9b20 1843 [ AC_DEFINE(DISABLE_LOGIN) ]
1844)
1845AC_ARG_ENABLE(pututline,
bfd550a2 1846 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
1d7b9b20 1847 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1848)
1849AC_ARG_ENABLE(pututxline,
bfd550a2 1850 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
1d7b9b20 1851 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1852)
1853AC_ARG_WITH(lastlog,
bfd550a2 1854 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
8c89dd2b 1855 [
1856 if test "x$withval" = "xno" ; then
1857 AC_DEFINE(DISABLE_LASTLOG)
1858 else
1859 conf_lastlog_location=$withval
1860 fi
1861 ]
1862)
1d7b9b20 1863
1864dnl lastlog, [uw]tmpx? detection
1865dnl NOTE: set the paths in the platform section to avoid the
1866dnl need for command-line parameters
1867dnl lastlog and [uw]tmp are subject to a file search if all else fails
1868
1869dnl lastlog detection
1870dnl NOTE: the code itself will detect if lastlog is a directory
1871AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1872AC_TRY_COMPILE([
1873#include <sys/types.h>
1874#include <utmp.h>
1875#ifdef HAVE_LASTLOG_H
1876# include <lastlog.h>
1877#endif
d7c0f3d5 1878#ifdef HAVE_PATHS_H
1d7b9b20 1879# include <paths.h>
41cb4569 1880#endif
1881#ifdef HAVE_LOGIN_H
1882# include <login.h>
1d7b9b20 1883#endif
1884 ],
1885 [ char *lastlog = LASTLOG_FILE; ],
1886 [ AC_MSG_RESULT(yes) ],
d7c0f3d5 1887 [
1888 AC_MSG_RESULT(no)
1889 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1890 AC_TRY_COMPILE([
1891#include <sys/types.h>
1892#include <utmp.h>
1893#ifdef HAVE_LASTLOG_H
1894# include <lastlog.h>
1895#endif
1896#ifdef HAVE_PATHS_H
1897# include <paths.h>
1898#endif
1899 ],
1900 [ char *lastlog = _PATH_LASTLOG; ],
1901 [ AC_MSG_RESULT(yes) ],
1902 [
f282b668 1903 AC_MSG_RESULT(no)
d7c0f3d5 1904 system_lastlog_path=no
1905 ])
1906 ]
1d7b9b20 1907)
d7c0f3d5 1908
1d7b9b20 1909if test -z "$conf_lastlog_location"; then
1910 if test x"$system_lastlog_path" = x"no" ; then
1911 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
e5fe9a1f 1912 if (test -d "$f" || test -f "$f") ; then
1d7b9b20 1913 conf_lastlog_location=$f
1914 fi
1915 done
1916 if test -z "$conf_lastlog_location"; then
f8119cef 1917 AC_MSG_WARN([** Cannot find lastlog **])
1918 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
1d7b9b20 1919 fi
1920 fi
1921fi
1922
1923if test -n "$conf_lastlog_location"; then
1924 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1925fi
1926
1927dnl utmp detection
1928AC_MSG_CHECKING([if your system defines UTMP_FILE])
1929AC_TRY_COMPILE([
1930#include <sys/types.h>
1931#include <utmp.h>
d7c0f3d5 1932#ifdef HAVE_PATHS_H
1d7b9b20 1933# include <paths.h>
1934#endif
1935 ],
1936 [ char *utmp = UTMP_FILE; ],
1937 [ AC_MSG_RESULT(yes) ],
1938 [ AC_MSG_RESULT(no)
1939 system_utmp_path=no ]
1940)
1941if test -z "$conf_utmp_location"; then
1942 if test x"$system_utmp_path" = x"no" ; then
1943 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1944 if test -f $f ; then
1945 conf_utmp_location=$f
1946 fi
1947 done
1948 if test -z "$conf_utmp_location"; then
1949 AC_DEFINE(DISABLE_UTMP)
1950 fi
1951 fi
1952fi
1953if test -n "$conf_utmp_location"; then
1954 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1955fi
1956
1957dnl wtmp detection
1958AC_MSG_CHECKING([if your system defines WTMP_FILE])
1959AC_TRY_COMPILE([
1960#include <sys/types.h>
1961#include <utmp.h>
d7c0f3d5 1962#ifdef HAVE_PATHS_H
1d7b9b20 1963# include <paths.h>
1964#endif
1965 ],
1966 [ char *wtmp = WTMP_FILE; ],
1967 [ AC_MSG_RESULT(yes) ],
1968 [ AC_MSG_RESULT(no)
1969 system_wtmp_path=no ]
1970)
1971if test -z "$conf_wtmp_location"; then
1972 if test x"$system_wtmp_path" = x"no" ; then
1973 for f in /usr/adm/wtmp /var/log/wtmp; do
1974 if test -f $f ; then
1975 conf_wtmp_location=$f
1976 fi
1977 done
1978 if test -z "$conf_wtmp_location"; then
1979 AC_DEFINE(DISABLE_WTMP)
1980 fi
1981 fi
1982fi
1983if test -n "$conf_wtmp_location"; then
1984 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1985fi
1986
1987
1988dnl utmpx detection - I don't know any system so perverse as to require
1989dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1990dnl there, though.
1991AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1992AC_TRY_COMPILE([
1993#include <sys/types.h>
1994#include <utmp.h>
1995#ifdef HAVE_UTMPX_H
1996#include <utmpx.h>
1997#endif
d7c0f3d5 1998#ifdef HAVE_PATHS_H
1d7b9b20 1999# include <paths.h>
2000#endif
2001 ],
2002 [ char *utmpx = UTMPX_FILE; ],
2003 [ AC_MSG_RESULT(yes) ],
2004 [ AC_MSG_RESULT(no)
2005 system_utmpx_path=no ]
2006)
2007if test -z "$conf_utmpx_location"; then
2008 if test x"$system_utmpx_path" = x"no" ; then
2009 AC_DEFINE(DISABLE_UTMPX)
2010 fi
2011else
2012 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2013fi
2014
2015dnl wtmpx detection
2016AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2017AC_TRY_COMPILE([
2018#include <sys/types.h>
2019#include <utmp.h>
2020#ifdef HAVE_UTMPX_H
2021#include <utmpx.h>
2022#endif
d7c0f3d5 2023#ifdef HAVE_PATHS_H
1d7b9b20 2024# include <paths.h>
2025#endif
2026 ],
2027 [ char *wtmpx = WTMPX_FILE; ],
2028 [ AC_MSG_RESULT(yes) ],
2029 [ AC_MSG_RESULT(no)
2030 system_wtmpx_path=no ]
2031)
2032if test -z "$conf_wtmpx_location"; then
2033 if test x"$system_wtmpx_path" = x"no" ; then
2034 AC_DEFINE(DISABLE_WTMPX)
2035 fi
2036else
2037 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2038fi
2039
b7a87eea 2040
2041# Change default command timeout for builtin PRNG
48c99b2c 2042entropy_timeout=200
b7a87eea 2043AC_ARG_WITH(entropy-timeout,
2044 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
2045 [
2046 if test "x$withval" != "xno" ; then
2047 entropy_timeout=$withval
2048 fi
2049 ]
2050)
2051AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
2052
2053
bd499f9e 2054if test ! -z "$blibpath" ; then
2055 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
2056 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
2057fi
2058
3c62e7eb 2059AC_EXEEXT
2060
9c8dbb1b 2061AC_OUTPUT(Makefile openbsd-compat/Makefile ssh_prng_cmds)
d3083fbd 2062
cbd7492e 2063# Print summary of options
2064
cbd7492e 2065if test ! -z "$RANDOM_POOL" ; then
2066 RAND_MSG="Device ($RANDOM_POOL)"
2067else
9bdd5929 2068 if test ! -z "$PRNGD_PORT" ; then
2069 RAND_MSG="PRNGD/EGD (port localhost:$PRNGD_PORT)"
2070 elif test ! -z "$PRNGD_SOCKET" ; then
2071 RAND_MSG="PRNGD/EGD (socket $PRNGD_SOCKET)"
cbd7492e 2072 else
2073 RAND_MSG="Builtin (timeout $entropy_timeout)"
48e7916f 2074 BUILTIN_RNG=1
cbd7492e 2075 fi
2076fi
2077
2078# Someone please show me a better way :)
2079A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2080B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2081C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2082D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
f5665f6f 2083E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
e0c4d3ac 2084F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
cbd7492e 2085G=`eval echo ${piddir}` ; G=`eval echo ${G}`
b2d818e6 2086H=`eval echo ${user_path}` ; H=`eval echo ${H}`
cbd7492e 2087
2088echo ""
26de7942 2089echo "OpenSSH has been configured with the following options:"
cbd7492e 2090echo " User binaries: $B"
2091echo " System binaries: $C"
2092echo " Configuration files: $D"
2093echo " Askpass program: $E"
2094echo " Manual pages: $F"
2095echo " PID file: $G"
b2d818e6 2096echo " sshd default user PATH: $H"
cbd7492e 2097echo " Random number collection: $RAND_MSG"
5d97cfbf 2098echo " Manpage format: $MANTYPE"
cbd7492e 2099echo " PAM support: ${PAM_MSG}"
2100echo " KerberosIV support: $KRB4_MSG"
d0b19c95 2101echo " Smartcard support: $SCARD_MSG"
cbd7492e 2102echo " AFS support: $AFS_MSG"
2103echo " S/KEY support: $SKEY_MSG"
2104echo " TCP Wrappers support: $TCPW_MSG"
2105echo " MD5 password support: $MD5_MSG"
2106echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2107echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2108echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2109
af774732 2110if test ! -z "$bsd_auth"; then
2111 echo " BSD Auth support: yes"
2112fi
2113
cbd7492e 2114echo ""
2115
0c2fb82f 2116echo " Host: ${host}"
2117echo " Compiler: ${CC}"
2118echo " Compiler flags: ${CFLAGS}"
2119echo "Preprocessor flags: ${CPPFLAGS}"
2120echo " Linker flags: ${LDFLAGS}"
2121echo " Libraries: ${LIBS}"
cbd7492e 2122
2123echo ""
2124
adeebd37 2125if test "x$PAM_MSG" = "xyes" ; then
2126 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
2127 echo "otherwise password authentication may fail. Example PAM control files"
2128 echo "can be found in the contrib/ subdirectory"
2129 echo ""
2130fi
2131
48e7916f 2132if test ! -z "$BUILTIN_RNG" ; then
2133 echo "WARNING: you are using the builtin random number collection service."
2134 echo "Please read WARNING.RNG and request that your OS vendor includes"
2135 echo "/dev/random in future versions of their OS."
2136 echo ""
2137fi
2c523de9 2138
2139if test ! -z "$NO_SFTP"; then
2140 echo "sftp-server will be disabled. Your compiler does not support"
2141 echo "64bit integers."
2142 echo ""
2143fi
af774732 2144
This page took 0.501618 seconds and 5 git commands to generate.