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