3 # Copyright (c) 1999-2004 Damien Miller
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 AC_CONFIG_SRCDIR([ssh.c])
20 AC_CONFIG_HEADER(config.h)
25 # Checks for programs.
31 AC_PATH_PROGS(PERL, perl5 perl)
32 AC_PATH_PROG(SED, sed)
34 AC_PATH_PROG(ENT, ent)
36 AC_PATH_PROG(TEST_MINUS_S_SH, bash)
37 AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
38 AC_PATH_PROG(TEST_MINUS_S_SH, sh)
42 AC_PATH_PROG(PATH_GROUPADD_PROG, groupadd, groupadd,
43 [/usr/sbin${PATH_SEPARATOR}/etc])
44 AC_PATH_PROG(PATH_USERADD_PROG, useradd, useradd,
45 [/usr/sbin${PATH_SEPARATOR}/etc])
46 AC_CHECK_PROG(MAKE_PACKAGE_SUPPORTED, pkgmk, yes, no)
51 if test -z "$AR" ; then
52 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
55 # Use LOGIN_PROGRAM from environment if possible
56 if test ! -z "$LOGIN_PROGRAM" ; then
57 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
60 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
61 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
62 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
66 AC_PATH_PROG(PATH_PASSWD_PROG, passwd)
67 if test ! -z "$PATH_PASSWD_PROG" ; then
68 AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG")
71 if test -z "$LD" ; then
77 if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
78 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
82 [ --without-rpath Disable auto-added -R linker paths],
84 if test "x$withval" = "xno" ; then
87 if test "x$withval" = "xyes" ; then
93 # Check for some target-specific stuff
96 AC_MSG_CHECKING([how to specify blibpath for linker ($LD)])
97 if (test -z "$blibpath"); then
98 blibpath="/usr/lib:/lib"
100 saved_LDFLAGS="$LDFLAGS"
101 for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do
102 if (test -z "$blibflags"); then
103 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
104 AC_TRY_LINK([], [], [blibflags=$tryflags])
107 if (test -z "$blibflags"); then
108 AC_MSG_RESULT(not found)
109 AC_MSG_ERROR([*** must be able to specify blibpath on AIX - check config.log])
111 AC_MSG_RESULT($blibflags)
113 LDFLAGS="$saved_LDFLAGS"
114 dnl Check for authenticate. Might be in libs.a on older AIXes
115 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)],
116 [AC_CHECK_LIB(s,authenticate,
117 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
121 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
122 AC_CHECK_DECL(loginfailed,
123 [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
125 [#include <usersec.h>],
126 [(void)loginfailed("user","host","tty",0);],
128 AC_DEFINE(AIX_LOGINFAILED_4ARG)],
132 [#include <usersec.h>]
134 AC_CHECK_FUNCS(setauthdb)
135 AC_DEFINE(BROKEN_GETADDRINFO)
136 AC_DEFINE(BROKEN_REALPATH)
137 AC_DEFINE(SETEUID_BREAKS_SETUID)
138 AC_DEFINE(BROKEN_SETREUID)
139 AC_DEFINE(BROKEN_SETREGID)
140 dnl AIX handles lastlog as part of its login message
141 AC_DEFINE(DISABLE_LASTLOG)
142 AC_DEFINE(LOGIN_NEEDS_UTMPX)
143 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
146 check_for_libcrypt_later=1
147 LIBS="$LIBS /usr/lib/textmode.o"
148 AC_DEFINE(HAVE_CYGWIN)
150 AC_DEFINE(DISABLE_SHADOW)
151 AC_DEFINE(IP_TOS_IS_BROKEN)
152 AC_DEFINE(NO_X11_UNIX_SOCKETS)
153 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT)
154 AC_DEFINE(DISABLE_FD_PASSING)
155 AC_DEFINE(SETGROUPS_NOOP)
158 AC_DEFINE(IP_TOS_IS_BROKEN)
159 AC_DEFINE(SETEUID_BREAKS_SETUID)
160 AC_DEFINE(BROKEN_SETREUID)
161 AC_DEFINE(BROKEN_SETREGID)
164 AC_MSG_CHECKING(if we have working getaddrinfo)
165 AC_TRY_RUN([#include <mach-o/dyld.h>
166 main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
170 }], [AC_MSG_RESULT(working)],
171 [AC_MSG_RESULT(buggy)
172 AC_DEFINE(BROKEN_GETADDRINFO)],
173 [AC_MSG_RESULT(assume it is working)])
174 AC_DEFINE(SETEUID_BREAKS_SETUID)
175 AC_DEFINE(BROKEN_SETREUID)
176 AC_DEFINE(BROKEN_SETREGID)
177 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1)
180 if test -z "$GCC"; then
183 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
184 IPADDR_IN_DISPLAY=yes
185 AC_DEFINE(HAVE_SECUREWARE)
187 AC_DEFINE(LOGIN_NO_ENDOPT)
188 AC_DEFINE(LOGIN_NEEDS_UTMPX)
189 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
190 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
191 LIBS="$LIBS -lsec -lsecpw"
192 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
193 disable_ptmx_check=yes
196 if test -z "$GCC"; then
199 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
200 IPADDR_IN_DISPLAY=yes
202 AC_DEFINE(LOGIN_NO_ENDOPT)
203 AC_DEFINE(LOGIN_NEEDS_UTMPX)
204 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
205 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
207 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
210 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
211 IPADDR_IN_DISPLAY=yes
212 AC_DEFINE(PAM_SUN_CODEBASE)
214 AC_DEFINE(LOGIN_NO_ENDOPT)
215 AC_DEFINE(LOGIN_NEEDS_UTMPX)
216 AC_DEFINE(DISABLE_UTMP)
217 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
218 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
219 check_for_hpux_broken_getaddrinfo=1
221 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
224 PATH="$PATH:/usr/etc"
225 AC_DEFINE(BROKEN_INET_NTOA)
226 AC_DEFINE(SETEUID_BREAKS_SETUID)
227 AC_DEFINE(BROKEN_SETREUID)
228 AC_DEFINE(BROKEN_SETREGID)
229 AC_DEFINE(WITH_ABBREV_NO_TTY)
230 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
233 PATH="$PATH:/usr/etc"
234 AC_DEFINE(WITH_IRIX_ARRAY)
235 AC_DEFINE(WITH_IRIX_PROJECT)
236 AC_DEFINE(WITH_IRIX_AUDIT)
237 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
238 AC_DEFINE(BROKEN_INET_NTOA)
239 AC_DEFINE(SETEUID_BREAKS_SETUID)
240 AC_DEFINE(BROKEN_SETREUID)
241 AC_DEFINE(BROKEN_SETREGID)
242 AC_DEFINE(BROKEN_UPDWTMPX)
243 AC_DEFINE(WITH_ABBREV_NO_TTY)
244 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
248 check_for_libcrypt_later=1
249 check_for_openpty_ctty_bug=1
250 AC_DEFINE(DONT_TRY_OTHER_AF)
251 AC_DEFINE(PAM_TTY_KLUDGE)
252 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!")
253 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
254 inet6_default_4in6=yes
257 AC_DEFINE(BROKEN_CMSG_TYPE)
261 mips-sony-bsd|mips-sony-newsos4)
262 AC_DEFINE(HAVE_NEWS4)
266 check_for_libcrypt_before=1
267 if test "x$withval" != "xno" ; then
272 check_for_libcrypt_later=1
275 AC_DEFINE(SETEUID_BREAKS_SETUID)
276 AC_DEFINE(BROKEN_SETREUID)
277 AC_DEFINE(BROKEN_SETREGID)
280 conf_lastlog_location="/usr/adm/lastlog"
281 conf_utmp_location=/etc/utmp
282 conf_wtmp_location=/usr/adm/wtmp
285 AC_DEFINE(BROKEN_REALPATH)
287 AC_DEFINE(BROKEN_SAVED_UIDS)
290 if test "x$withval" != "xno" ; then
293 AC_DEFINE(PAM_SUN_CODEBASE)
294 AC_DEFINE(LOGIN_NEEDS_UTMPX)
295 AC_DEFINE(LOGIN_NEEDS_TERM)
296 AC_DEFINE(PAM_TTY_KLUDGE)
297 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
298 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
299 AC_DEFINE(SSHD_ACQUIRES_CTTY)
300 external_path_file=/etc/default/login
301 # hardwire lastlog location (can't detect it on some versions)
302 conf_lastlog_location="/var/adm/lastlog"
303 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
304 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
305 if test "$sol2ver" -ge 8; then
307 AC_DEFINE(DISABLE_UTMP)
308 AC_DEFINE(DISABLE_WTMP)
314 CPPFLAGS="$CPPFLAGS -DSUNOS4"
315 AC_CHECK_FUNCS(getpwanam)
316 AC_DEFINE(PAM_SUN_CODEBASE)
317 conf_utmp_location=/etc/utmp
318 conf_wtmp_location=/var/adm/wtmp
319 conf_lastlog_location=/var/adm/lastlog
325 AC_DEFINE(SSHD_ACQUIRES_CTTY)
326 AC_DEFINE(SETEUID_BREAKS_SETUID)
327 AC_DEFINE(BROKEN_SETREUID)
328 AC_DEFINE(BROKEN_SETREGID)
331 # /usr/ucblib MUST NOT be searched on ReliantUNIX
332 AC_CHECK_LIB(dl, dlsym, ,)
333 IPADDR_IN_DISPLAY=yes
335 AC_DEFINE(IP_TOS_IS_BROKEN)
336 AC_DEFINE(SETEUID_BREAKS_SETUID)
337 AC_DEFINE(BROKEN_SETREUID)
338 AC_DEFINE(BROKEN_SETREGID)
339 AC_DEFINE(SSHD_ACQUIRES_CTTY)
340 external_path_file=/etc/default/login
341 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
342 # Attention: always take care to bind libsocket and libnsl before libc,
343 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
347 AC_DEFINE(SETEUID_BREAKS_SETUID)
348 AC_DEFINE(BROKEN_SETREUID)
349 AC_DEFINE(BROKEN_SETREGID)
353 AC_DEFINE(SETEUID_BREAKS_SETUID)
354 AC_DEFINE(BROKEN_SETREUID)
355 AC_DEFINE(BROKEN_SETREGID)
360 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize"
361 LIBS="$LIBS -los -lprot -lcrypt_i -lx -ltinfo -lm"
364 AC_DEFINE(BROKEN_SYS_TERMIO_H)
366 AC_DEFINE(HAVE_SECUREWARE)
367 AC_DEFINE(DISABLE_SHADOW)
368 AC_DEFINE(BROKEN_SAVED_UIDS)
369 AC_DEFINE(SETEUID_BREAKS_SETUID)
370 AC_DEFINE(BROKEN_SETREUID)
371 AC_DEFINE(BROKEN_SETREGID)
372 AC_DEFINE(WITH_ABBREV_NO_TTY)
373 AC_CHECK_FUNCS(getluid setluid)
375 do_sco3_extra_lib_check=yes
378 if test -z "$GCC"; then
379 CFLAGS="$CFLAGS -belf"
381 LIBS="$LIBS -lprot -lx -ltinfo -lm"
384 AC_DEFINE(HAVE_SECUREWARE)
385 AC_DEFINE(DISABLE_SHADOW)
386 AC_DEFINE(DISABLE_FD_PASSING)
387 AC_DEFINE(SETEUID_BREAKS_SETUID)
388 AC_DEFINE(BROKEN_SETREUID)
389 AC_DEFINE(BROKEN_SETREGID)
390 AC_DEFINE(WITH_ABBREV_NO_TTY)
391 AC_CHECK_FUNCS(getluid setluid)
395 AC_DEFINE(NO_SSH_LASTLOG)
396 AC_DEFINE(SETEUID_BREAKS_SETUID)
397 AC_DEFINE(BROKEN_SETREUID)
398 AC_DEFINE(BROKEN_SETREGID)
400 AC_DEFINE(DISABLE_FD_PASSING)
402 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
406 AC_DEFINE(SETEUID_BREAKS_SETUID)
407 AC_DEFINE(BROKEN_SETREUID)
408 AC_DEFINE(BROKEN_SETREGID)
409 AC_DEFINE(WITH_ABBREV_NO_TTY)
411 AC_DEFINE(DISABLE_FD_PASSING)
413 LIBS="$LIBS -lgen -lacid -ldb"
417 AC_DEFINE(SETEUID_BREAKS_SETUID)
418 AC_DEFINE(BROKEN_SETREUID)
419 AC_DEFINE(BROKEN_SETREGID)
421 AC_DEFINE(DISABLE_FD_PASSING)
422 AC_DEFINE(NO_SSH_LASTLOG)
423 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
424 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
428 AC_MSG_CHECKING(for Digital Unix SIA)
431 [ --with-osfsia Enable Digital Unix SIA],
433 if test "x$withval" = "xno" ; then
434 AC_MSG_RESULT(disabled)
439 if test -z "$no_osfsia" ; then
440 if test -f /etc/sia/matrix.conf; then
442 AC_DEFINE(HAVE_OSF_SIA)
443 AC_DEFINE(DISABLE_LOGIN)
444 AC_DEFINE(DISABLE_FD_PASSING)
445 LIBS="$LIBS -lsecurity -ldb -lm -laud"
448 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin")
451 AC_DEFINE(BROKEN_GETADDRINFO)
452 AC_DEFINE(SETEUID_BREAKS_SETUID)
453 AC_DEFINE(BROKEN_SETREUID)
454 AC_DEFINE(BROKEN_SETREGID)
459 AC_DEFINE(NO_X11_UNIX_SOCKETS)
460 AC_DEFINE(MISSING_NFDBITS)
461 AC_DEFINE(MISSING_HOWMANY)
462 AC_DEFINE(MISSING_FD_MASK)
466 # Allow user to specify flags
468 [ --with-cflags Specify additional flags to pass to compiler],
470 if test "x$withval" != "xno" ; then
471 CFLAGS="$CFLAGS $withval"
475 AC_ARG_WITH(cppflags,
476 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
478 if test "x$withval" != "xno"; then
479 CPPFLAGS="$CPPFLAGS $withval"
484 [ --with-ldflags Specify additional flags to pass to linker],
486 if test "x$withval" != "xno" ; then
487 LDFLAGS="$LDFLAGS $withval"
492 [ --with-libs Specify additional libraries to link with],
494 if test "x$withval" != "xno" ; then
495 LIBS="$LIBS $withval"
500 AC_MSG_CHECKING(compiler and flags for sanity)
505 [ AC_MSG_RESULT(yes) ],
508 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
512 # Checks for header files.
513 AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \
514 getopt.h glob.h ia.h lastlog.h limits.h login.h \
515 login_cap.h maillock.h netdb.h netgroup.h \
516 netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \
517 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
518 strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \
519 sys/cdefs.h sys/mman.h sys/prctl.h sys/pstat.h sys/ptms.h \
520 sys/select.h sys/stat.h sys/stream.h sys/stropts.h \
521 sys/sysmacros.h sys/time.h sys/timers.h sys/un.h time.h tmpdir.h \
522 ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
524 # Checks for libraries.
525 AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
526 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
528 dnl SCO OS3 needs this for libwrap
529 if test "x$with_tcp_wrappers" != "xno" ; then
530 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
531 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
535 dnl IRIX and Solaris 2.5.1 have dirname() in libgen
536 AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
537 AC_CHECK_LIB(gen, dirname,[
538 AC_CACHE_CHECK([for broken dirname],
539 ac_cv_have_broken_dirname, [
547 int main(int argc, char **argv) {
550 strncpy(buf,"/etc", 32);
552 if (!s || strncmp(s, "/", 32) != 0) {
559 [ ac_cv_have_broken_dirname="no" ],
560 [ ac_cv_have_broken_dirname="yes" ]
564 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
566 AC_DEFINE(HAVE_DIRNAME)
567 AC_CHECK_HEADERS(libgen.h)
572 AC_CHECK_FUNC(getspnam, ,
573 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
574 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
578 [ --with-zlib=PATH Use zlib in PATH],
580 if test "x$withval" = "xno" ; then
581 AC_MSG_ERROR([*** zlib is required ***])
583 if test -d "$withval/lib"; then
584 if test -n "${need_dash_r}"; then
585 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
587 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
590 if test -n "${need_dash_r}"; then
591 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
593 LDFLAGS="-L${withval} ${LDFLAGS}"
596 if test -d "$withval/include"; then
597 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
599 CPPFLAGS="-I${withval} ${CPPFLAGS}"
604 AC_CHECK_LIB(z, deflate, ,
606 saved_CPPFLAGS="$CPPFLAGS"
607 saved_LDFLAGS="$LDFLAGS"
609 dnl Check default zlib install dir
610 if test -n "${need_dash_r}"; then
611 LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
613 LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
615 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
617 AC_TRY_LINK_FUNC(deflate, AC_DEFINE(HAVE_LIBZ),
619 AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***])
624 AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
626 AC_ARG_WITH(zlib-version-check,
627 [ --without-zlib-version-check Disable zlib version check],
628 [ if test "x$withval" = "xno" ; then
629 zlib_check_nonfatal=1
634 AC_MSG_CHECKING(for zlib 1.1.4 or greater)
640 if (sscanf(ZLIB_VERSION, "%d.%d.%d", &a, &b, &c) != 3)
642 v = a*1000000 + b*1000 + c;
650 if test -z "$zlib_check_nonfatal" ; then
651 AC_MSG_ERROR([*** zlib too old - check config.log ***
652 Your reported zlib version has known security problems. It's possible your
653 vendor has fixed these problems without changing the version number. If you
654 are sure this is the case, you can disable the check by running
655 "./configure --without-zlib-version-check".
656 If you are in doubt, upgrade zlib to version 1.1.4 or greater.])
658 AC_MSG_WARN([zlib version may have security problems])
664 AC_CHECK_FUNC(strcasecmp,
665 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
667 AC_CHECK_FUNC(utimes,
668 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
669 LIBS="$LIBS -lc89"]) ]
672 dnl Checks for libutil functions
673 AC_CHECK_HEADERS(libutil.h)
674 AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
675 AC_CHECK_FUNCS(logout updwtmp logwtmp)
679 # Check for ALTDIRFUNC glob() extension
680 AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
681 AC_EGREP_CPP(FOUNDIT,
684 #ifdef GLOB_ALTDIRFUNC
689 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
697 # Check for g.gl_matchc glob() extension
698 AC_MSG_CHECKING(for gl_matchc field in glob_t)
699 AC_EGREP_CPP(FOUNDIT,
702 int main(void){glob_t g; g.gl_matchc = 1;}
705 AC_DEFINE(GLOB_HAS_GL_MATCHC)
713 AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
716 #include <sys/types.h>
718 int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
720 [AC_MSG_RESULT(yes)],
723 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
727 # Check whether user wants S/Key support
730 [ --with-skey[[=PATH]] Enable S/Key support
731 (optionally in PATH)],
733 if test "x$withval" != "xno" ; then
735 if test "x$withval" != "xyes" ; then
736 CPPFLAGS="$CPPFLAGS -I${withval}/include"
737 LDFLAGS="$LDFLAGS -L${withval}/lib"
744 AC_MSG_CHECKING([for s/key support])
749 int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
751 [AC_MSG_RESULT(yes)],
754 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
756 AC_MSG_CHECKING(if skeychallenge takes 4 arguments)
760 [(void)skeychallenge(NULL,"name","",0);],
762 AC_DEFINE(SKEYCHALLENGE_4ARG)],
769 # Check whether user wants TCP wrappers support
771 AC_ARG_WITH(tcp-wrappers,
772 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
773 (optionally in PATH)],
775 if test "x$withval" != "xno" ; then
777 saved_LDFLAGS="$LDFLAGS"
778 saved_CPPFLAGS="$CPPFLAGS"
779 if test -n "${withval}" -a "${withval}" != "yes"; then
780 if test -d "${withval}/lib"; then
781 if test -n "${need_dash_r}"; then
782 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
784 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
787 if test -n "${need_dash_r}"; then
788 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
790 LDFLAGS="-L${withval} ${LDFLAGS}"
793 if test -d "${withval}/include"; then
794 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
796 CPPFLAGS="-I${withval} ${CPPFLAGS}"
800 LIBS="$LIBWRAP $LIBS"
801 AC_MSG_CHECKING(for libwrap)
804 #include <sys/types.h>
805 #include <sys/socket.h>
806 #include <netinet/in.h>
808 int deny_severity = 0, allow_severity = 0;
818 AC_MSG_ERROR([*** libwrap missing])
826 dnl Checks for library functions. Please keep in alphabetical order
828 arc4random __b64_ntop b64_ntop __b64_pton b64_pton \
829 bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
830 getaddrinfo getcwd getgrouplist getnameinfo getopt \
831 getpeereid _getpty getrlimit getttyent glob inet_aton \
832 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
833 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
834 pstat prctl readpassphrase realpath recvmsg rresvport_af sendmsg \
835 setdtablesize setegid setenv seteuid setgroups setlogin setpcred \
836 setproctitle setregid setreuid setrlimit \
837 setsid setvbuf sigaction sigvec snprintf socketpair strerror \
838 strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \
839 truncate unsetenv updwtmpx utimes vhangup vsnprintf waitpid \
842 # IRIX has a const char return value for gai_strerror()
843 AC_CHECK_FUNCS(gai_strerror,[
844 AC_DEFINE(HAVE_GAI_STRERROR)
846 #include <sys/types.h>
847 #include <sys/socket.h>
850 const char *gai_strerror(int);],[
853 str = gai_strerror(0);],[
854 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
855 [Define if gai_strerror() returns const char *])])])
857 AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
859 dnl Make sure prototypes are defined for these before using them.
860 AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
861 AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
863 dnl tcsendbreak might be a macro
864 AC_CHECK_DECL(tcsendbreak,
865 [AC_DEFINE(HAVE_TCSENDBREAK)],
866 [AC_CHECK_FUNCS(tcsendbreak)],
867 [#include <termios.h>]
870 AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>])
872 AC_CHECK_FUNCS(setresuid, [
873 dnl Some platorms have setresuid that isn't implemented, test for this
874 AC_MSG_CHECKING(if setresuid seems to work)
878 int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
880 [AC_MSG_RESULT(yes)],
881 [AC_DEFINE(BROKEN_SETRESUID)
882 AC_MSG_RESULT(not implemented)]
886 AC_CHECK_FUNCS(setresgid, [
887 dnl Some platorms have setresgid that isn't implemented, test for this
888 AC_MSG_CHECKING(if setresgid seems to work)
892 int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
894 [AC_MSG_RESULT(yes)],
895 [AC_DEFINE(BROKEN_SETRESGID)
896 AC_MSG_RESULT(not implemented)]
900 dnl Checks for time functions
901 AC_CHECK_FUNCS(gettimeofday time)
902 dnl Checks for utmp functions
903 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
904 AC_CHECK_FUNCS(utmpname)
905 dnl Checks for utmpx functions
906 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
907 AC_CHECK_FUNCS(setutxent utmpxname)
909 AC_CHECK_FUNC(daemon,
910 [AC_DEFINE(HAVE_DAEMON)],
911 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
914 AC_CHECK_FUNC(getpagesize,
915 [AC_DEFINE(HAVE_GETPAGESIZE)],
916 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
919 # Check for broken snprintf
920 if test "x$ac_cv_func_snprintf" = "xyes" ; then
921 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
925 int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
927 [AC_MSG_RESULT(yes)],
930 AC_DEFINE(BROKEN_SNPRINTF)
931 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
936 # Check for missing getpeereid (or equiv) support
938 if test "x$ac_cv_func_getpeereid" != "xyes" ; then
939 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt])
941 [#include <sys/types.h>
942 #include <sys/socket.h>],
943 [int i = SO_PEERCRED;],
944 [AC_MSG_RESULT(yes)],
950 dnl see whether mkstemp() requires XXXXXX
951 if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
952 AC_MSG_CHECKING([for (overly) strict mkstemp])
956 main() { char template[]="conftest.mkstemp-test";
957 if (mkstemp(template) == -1)
959 unlink(template); exit(0);
967 AC_DEFINE(HAVE_STRICT_MKSTEMP)
971 AC_DEFINE(HAVE_STRICT_MKSTEMP)
976 dnl make sure that openpty does not reacquire controlling terminal
977 if test ! -z "$check_for_openpty_ctty_bug"; then
978 AC_MSG_CHECKING(if openpty correctly handles controlling tty)
982 #include <sys/fcntl.h>
983 #include <sys/types.h>
984 #include <sys/wait.h>
990 int fd, ptyfd, ttyfd, status;
993 if (pid < 0) { /* failed */
995 } else if (pid > 0) { /* parent */
996 waitpid(pid, &status, 0);
997 if (WIFEXITED(status))
998 exit(WEXITSTATUS(status));
1001 } else { /* child */
1002 close(0); close(1); close(2);
1004 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
1005 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
1007 exit(3); /* Acquired ctty: broken */
1009 exit(0); /* Did not acquire ctty: OK */
1018 AC_DEFINE(SSHD_ACQUIRES_CTTY)
1023 if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1024 AC_MSG_CHECKING(if getaddrinfo seems to work)
1028 #include <sys/socket.h>
1031 #include <netinet/in.h>
1033 #define TEST_PORT "2222"
1039 struct addrinfo *gai_ai, *ai, hints;
1040 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
1042 memset(&hints, 0, sizeof(hints));
1043 hints.ai_family = PF_UNSPEC;
1044 hints.ai_socktype = SOCK_STREAM;
1045 hints.ai_flags = AI_PASSIVE;
1047 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
1049 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
1053 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
1054 if (ai->ai_family != AF_INET6)
1057 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
1058 sizeof(ntop), strport, sizeof(strport),
1059 NI_NUMERICHOST|NI_NUMERICSERV);
1062 if (err == EAI_SYSTEM)
1063 perror("getnameinfo EAI_SYSTEM");
1065 fprintf(stderr, "getnameinfo failed: %s\n",
1070 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
1073 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1086 AC_DEFINE(BROKEN_GETADDRINFO)
1093 # Check for PAM libs
1096 [ --with-pam Enable PAM support ],
1098 if test "x$withval" != "xno" ; then
1099 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
1100 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
1101 AC_MSG_ERROR([PAM headers not found])
1104 AC_CHECK_LIB(dl, dlopen, , )
1105 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
1106 AC_CHECK_FUNCS(pam_getenvlist)
1107 AC_CHECK_FUNCS(pam_putenv)
1112 if test $ac_cv_lib_dl_dlopen = yes; then
1122 # Check for older PAM
1123 if test "x$PAM_MSG" = "xyes" ; then
1124 # Check PAM strerror arguments (old PAM)
1125 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
1129 #if defined(HAVE_SECURITY_PAM_APPL_H)
1130 #include <security/pam_appl.h>
1131 #elif defined (HAVE_PAM_PAM_APPL_H)
1132 #include <pam/pam_appl.h>
1135 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
1136 [AC_MSG_RESULT(no)],
1138 AC_DEFINE(HAVE_OLD_PAM)
1140 PAM_MSG="yes (old library)"
1145 # Search for OpenSSL
1146 saved_CPPFLAGS="$CPPFLAGS"
1147 saved_LDFLAGS="$LDFLAGS"
1148 AC_ARG_WITH(ssl-dir,
1149 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
1151 if test "x$withval" != "xno" ; then
1152 if test -d "$withval/lib"; then
1153 if test -n "${need_dash_r}"; then
1154 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
1156 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1159 if test -n "${need_dash_r}"; then
1160 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
1162 LDFLAGS="-L${withval} ${LDFLAGS}"
1165 if test -d "$withval/include"; then
1166 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
1168 CPPFLAGS="-I${withval} ${CPPFLAGS}"
1173 LIBS="-lcrypto $LIBS"
1174 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
1176 dnl Check default openssl install dir
1177 if test -n "${need_dash_r}"; then
1178 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
1180 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
1182 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
1183 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
1185 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
1191 # Determine OpenSSL header version
1192 AC_MSG_CHECKING([OpenSSL header version])
1197 #include <openssl/opensslv.h>
1198 #define DATA "conftest.sslincver"
1203 fd = fopen(DATA,"w");
1207 if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
1214 ssl_header_ver=`cat conftest.sslincver`
1215 AC_MSG_RESULT($ssl_header_ver)
1218 AC_MSG_RESULT(not found)
1219 AC_MSG_ERROR(OpenSSL version header not found.)
1223 # Determine OpenSSL library version
1224 AC_MSG_CHECKING([OpenSSL library version])
1229 #include <openssl/opensslv.h>
1230 #include <openssl/crypto.h>
1231 #define DATA "conftest.ssllibver"
1236 fd = fopen(DATA,"w");
1240 if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
1247 ssl_library_ver=`cat conftest.ssllibver`
1248 AC_MSG_RESULT($ssl_library_ver)
1251 AC_MSG_RESULT(not found)
1252 AC_MSG_ERROR(OpenSSL library not found.)
1256 # Sanity check OpenSSL headers
1257 AC_MSG_CHECKING([whether OpenSSL's headers match the library])
1261 #include <openssl/opensslv.h>
1262 int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
1269 AC_MSG_ERROR([Your OpenSSL headers do not match your library.
1270 Check config.log for details.
1271 Also see contrib/findssl.sh for help identifying header/library mismatches.])
1275 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
1276 # because the system crypt() is more featureful.
1277 if test "x$check_for_libcrypt_before" = "x1"; then
1278 AC_CHECK_LIB(crypt, crypt)
1281 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
1282 # version in OpenSSL.
1283 if test "x$check_for_libcrypt_later" = "x1"; then
1284 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
1288 ### Configure cryptographic random number support
1290 # Check wheter OpenSSL seeds itself
1291 AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
1295 #include <openssl/rand.h>
1296 int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
1299 OPENSSL_SEEDS_ITSELF=yes
1304 # Default to use of the rand helper if OpenSSL doesn't
1311 # Do we want to force the use of the rand helper?
1312 AC_ARG_WITH(rand-helper,
1313 [ --with-rand-helper Use subprocess to gather strong randomness ],
1315 if test "x$withval" = "xno" ; then
1316 # Force use of OpenSSL's internal RNG, even if
1317 # the previous test showed it to be unseeded.
1318 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
1319 AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG])
1320 OPENSSL_SEEDS_ITSELF=yes
1329 # Which randomness source do we use?
1330 if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
1332 AC_DEFINE(OPENSSL_PRNG_ONLY)
1333 RAND_MSG="OpenSSL internal ONLY"
1334 INSTALL_SSH_RAND_HELPER=""
1335 elif test ! -z "$USE_RAND_HELPER" ; then
1336 # install rand helper
1337 RAND_MSG="ssh-rand-helper"
1338 INSTALL_SSH_RAND_HELPER="yes"
1340 AC_SUBST(INSTALL_SSH_RAND_HELPER)
1342 ### Configuration of ssh-rand-helper
1345 AC_ARG_WITH(prngd-port,
1346 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],
1355 AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port)
1358 if test ! -z "$withval" ; then
1359 PRNGD_PORT="$withval"
1360 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
1365 # PRNGD Unix domain socket
1366 AC_ARG_WITH(prngd-socket,
1367 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
1371 withval="/var/run/egd-pool"
1379 AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
1383 if test ! -z "$withval" ; then
1384 if test ! -z "$PRNGD_PORT" ; then
1385 AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket)
1387 if test ! -r "$withval" ; then
1388 AC_MSG_WARN(Entropy socket is not readable)
1390 PRNGD_SOCKET="$withval"
1391 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
1395 # Check for existing socket only if we don't have a random device already
1396 if test "$USE_RAND_HELPER" = yes ; then
1397 AC_MSG_CHECKING(for PRNGD/EGD socket)
1398 # Insert other locations here
1399 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
1400 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
1401 PRNGD_SOCKET="$sock"
1402 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
1406 if test ! -z "$PRNGD_SOCKET" ; then
1407 AC_MSG_RESULT($PRNGD_SOCKET)
1409 AC_MSG_RESULT(not found)
1415 # Change default command timeout for hashing entropy source
1417 AC_ARG_WITH(entropy-timeout,
1418 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1420 if test "x$withval" != "xno" ; then
1421 entropy_timeout=$withval
1425 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1427 SSH_PRIVSEP_USER=sshd
1428 AC_ARG_WITH(privsep-user,
1429 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
1431 if test -n "$withval"; then
1432 SSH_PRIVSEP_USER=$withval
1436 AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER")
1437 AC_SUBST(SSH_PRIVSEP_USER)
1439 # We do this little dance with the search path to insure
1440 # that programs that we select for use by installed programs
1441 # (which may be run by the super-user) come from trusted
1442 # locations before they come from the user's private area.
1443 # This should help avoid accidentally configuring some
1444 # random version of a program in someone's personal bin.
1448 test -h /bin 2> /dev/null && PATH=/usr/bin
1449 test -d /sbin && PATH=$PATH:/sbin
1450 test -d /usr/sbin && PATH=$PATH:/usr/sbin
1451 PATH=$PATH:/etc:$OPATH
1453 # These programs are used by the command hashing source to gather entropy
1454 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1455 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1456 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1457 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1458 OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
1459 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1460 OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
1461 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1462 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1463 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1464 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1465 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1466 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1467 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1468 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1469 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1473 # Where does ssh-rand-helper get its randomness from?
1474 INSTALL_SSH_PRNG_CMDS=""
1475 if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
1476 if test ! -z "$PRNGD_PORT" ; then
1477 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
1478 elif test ! -z "$PRNGD_SOCKET" ; then
1479 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
1481 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
1482 RAND_HELPER_CMDHASH=yes
1483 INSTALL_SSH_PRNG_CMDS="yes"
1486 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1489 # Cheap hack to ensure NEWS-OS libraries are arranged right.
1490 if test ! -z "$SONY" ; then
1491 LIBS="$LIBS -liberty";
1494 # Checks for data types
1495 AC_CHECK_SIZEOF(char, 1)
1496 AC_CHECK_SIZEOF(short int, 2)
1497 AC_CHECK_SIZEOF(int, 4)
1498 AC_CHECK_SIZEOF(long int, 4)
1499 AC_CHECK_SIZEOF(long long int, 8)
1501 # Sanity check long long for some platforms (AIX)
1502 if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
1503 ac_cv_sizeof_long_long_int=0
1506 # More checks for data types
1507 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1509 [ #include <sys/types.h> ],
1511 [ ac_cv_have_u_int="yes" ],
1512 [ ac_cv_have_u_int="no" ]
1515 if test "x$ac_cv_have_u_int" = "xyes" ; then
1516 AC_DEFINE(HAVE_U_INT)
1520 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1522 [ #include <sys/types.h> ],
1523 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1524 [ ac_cv_have_intxx_t="yes" ],
1525 [ ac_cv_have_intxx_t="no" ]
1528 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1529 AC_DEFINE(HAVE_INTXX_T)
1533 if (test -z "$have_intxx_t" && \
1534 test "x$ac_cv_header_stdint_h" = "xyes")
1536 AC_MSG_CHECKING([for intXX_t types in stdint.h])
1538 [ #include <stdint.h> ],
1539 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1541 AC_DEFINE(HAVE_INTXX_T)
1544 [ AC_MSG_RESULT(no) ]
1548 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1551 #include <sys/types.h>
1552 #ifdef HAVE_STDINT_H
1553 # include <stdint.h>
1555 #include <sys/socket.h>
1556 #ifdef HAVE_SYS_BITYPES_H
1557 # include <sys/bitypes.h>
1560 [ int64_t a; a = 1;],
1561 [ ac_cv_have_int64_t="yes" ],
1562 [ ac_cv_have_int64_t="no" ]
1565 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1566 AC_DEFINE(HAVE_INT64_T)
1569 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1571 [ #include <sys/types.h> ],
1572 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1573 [ ac_cv_have_u_intxx_t="yes" ],
1574 [ ac_cv_have_u_intxx_t="no" ]
1577 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1578 AC_DEFINE(HAVE_U_INTXX_T)
1582 if test -z "$have_u_intxx_t" ; then
1583 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
1585 [ #include <sys/socket.h> ],
1586 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1588 AC_DEFINE(HAVE_U_INTXX_T)
1591 [ AC_MSG_RESULT(no) ]
1595 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1597 [ #include <sys/types.h> ],
1598 [ u_int64_t a; a = 1;],
1599 [ ac_cv_have_u_int64_t="yes" ],
1600 [ ac_cv_have_u_int64_t="no" ]
1603 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1604 AC_DEFINE(HAVE_U_INT64_T)
1608 if test -z "$have_u_int64_t" ; then
1609 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
1611 [ #include <sys/bitypes.h> ],
1612 [ u_int64_t a; a = 1],
1614 AC_DEFINE(HAVE_U_INT64_T)
1617 [ AC_MSG_RESULT(no) ]
1621 if test -z "$have_u_intxx_t" ; then
1622 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1625 #include <sys/types.h>
1627 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
1628 [ ac_cv_have_uintxx_t="yes" ],
1629 [ ac_cv_have_uintxx_t="no" ]
1632 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1633 AC_DEFINE(HAVE_UINTXX_T)
1637 if test -z "$have_uintxx_t" ; then
1638 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
1640 [ #include <stdint.h> ],
1641 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
1643 AC_DEFINE(HAVE_UINTXX_T)
1646 [ AC_MSG_RESULT(no) ]
1650 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1651 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1653 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1656 #include <sys/bitypes.h>
1659 int8_t a; int16_t b; int32_t c;
1660 u_int8_t e; u_int16_t f; u_int32_t g;
1661 a = b = c = e = f = g = 1;
1664 AC_DEFINE(HAVE_U_INTXX_T)
1665 AC_DEFINE(HAVE_INTXX_T)
1673 AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
1676 #include <sys/types.h>
1678 [ u_char foo; foo = 125; ],
1679 [ ac_cv_have_u_char="yes" ],
1680 [ ac_cv_have_u_char="no" ]
1683 if test "x$ac_cv_have_u_char" = "xyes" ; then
1684 AC_DEFINE(HAVE_U_CHAR)
1689 AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
1691 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
1694 #include <sys/types.h>
1696 [ size_t foo; foo = 1235; ],
1697 [ ac_cv_have_size_t="yes" ],
1698 [ ac_cv_have_size_t="no" ]
1701 if test "x$ac_cv_have_size_t" = "xyes" ; then
1702 AC_DEFINE(HAVE_SIZE_T)
1705 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
1708 #include <sys/types.h>
1710 [ ssize_t foo; foo = 1235; ],
1711 [ ac_cv_have_ssize_t="yes" ],
1712 [ ac_cv_have_ssize_t="no" ]
1715 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
1716 AC_DEFINE(HAVE_SSIZE_T)
1719 AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
1724 [ clock_t foo; foo = 1235; ],
1725 [ ac_cv_have_clock_t="yes" ],
1726 [ ac_cv_have_clock_t="no" ]
1729 if test "x$ac_cv_have_clock_t" = "xyes" ; then
1730 AC_DEFINE(HAVE_CLOCK_T)
1733 AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
1736 #include <sys/types.h>
1737 #include <sys/socket.h>
1739 [ sa_family_t foo; foo = 1235; ],
1740 [ ac_cv_have_sa_family_t="yes" ],
1743 #include <sys/types.h>
1744 #include <sys/socket.h>
1745 #include <netinet/in.h>
1747 [ sa_family_t foo; foo = 1235; ],
1748 [ ac_cv_have_sa_family_t="yes" ],
1750 [ ac_cv_have_sa_family_t="no" ]
1754 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1755 AC_DEFINE(HAVE_SA_FAMILY_T)
1758 AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1761 #include <sys/types.h>
1763 [ pid_t foo; foo = 1235; ],
1764 [ ac_cv_have_pid_t="yes" ],
1765 [ ac_cv_have_pid_t="no" ]
1768 if test "x$ac_cv_have_pid_t" = "xyes" ; then
1769 AC_DEFINE(HAVE_PID_T)
1772 AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1775 #include <sys/types.h>
1777 [ mode_t foo; foo = 1235; ],
1778 [ ac_cv_have_mode_t="yes" ],
1779 [ ac_cv_have_mode_t="no" ]
1782 if test "x$ac_cv_have_mode_t" = "xyes" ; then
1783 AC_DEFINE(HAVE_MODE_T)
1787 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1790 #include <sys/types.h>
1791 #include <sys/socket.h>
1793 [ struct sockaddr_storage s; ],
1794 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1795 [ ac_cv_have_struct_sockaddr_storage="no" ]
1798 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1799 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1802 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1805 #include <sys/types.h>
1806 #include <netinet/in.h>
1808 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1809 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1810 [ ac_cv_have_struct_sockaddr_in6="no" ]
1813 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1814 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1817 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1820 #include <sys/types.h>
1821 #include <netinet/in.h>
1823 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1824 [ ac_cv_have_struct_in6_addr="yes" ],
1825 [ ac_cv_have_struct_in6_addr="no" ]
1828 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1829 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1832 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1835 #include <sys/types.h>
1836 #include <sys/socket.h>
1839 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1840 [ ac_cv_have_struct_addrinfo="yes" ],
1841 [ ac_cv_have_struct_addrinfo="no" ]
1844 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1845 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1848 AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1850 [ #include <sys/time.h> ],
1851 [ struct timeval tv; tv.tv_sec = 1;],
1852 [ ac_cv_have_struct_timeval="yes" ],
1853 [ ac_cv_have_struct_timeval="no" ]
1856 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1857 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1858 have_struct_timeval=1
1861 AC_CHECK_TYPES(struct timespec)
1863 # We need int64_t or else certian parts of the compile will fail.
1864 if test "x$ac_cv_have_int64_t" = "xno" -a \
1865 "x$ac_cv_sizeof_long_int" != "x8" -a \
1866 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1867 echo "OpenSSH requires int64_t support. Contact your vendor or install"
1868 echo "an alternative compiler (I.E., GCC) before continuing."
1872 dnl test snprintf (broken on SCO w/gcc)
1877 #ifdef HAVE_SNPRINTF
1881 char expected_out[50];
1883 #if (SIZEOF_LONG_INT == 8)
1884 long int num = 0x7fffffffffffffff;
1886 long long num = 0x7fffffffffffffffll;
1888 strcpy(expected_out, "9223372036854775807");
1889 snprintf(buf, mazsize, "%lld", num);
1890 if(strcmp(buf, expected_out) != 0)
1897 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1901 dnl Checks for structure members
1902 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1903 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1904 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1905 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1906 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
1907 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
1908 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1909 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
1910 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
1911 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1912 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1913 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1914 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
1915 OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1916 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1917 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1918 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
1920 AC_CHECK_MEMBERS([struct stat.st_blksize])
1922 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1923 ac_cv_have_ss_family_in_struct_ss, [
1926 #include <sys/types.h>
1927 #include <sys/socket.h>
1929 [ struct sockaddr_storage s; s.ss_family = 1; ],
1930 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1931 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1934 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1935 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1938 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1939 ac_cv_have___ss_family_in_struct_ss, [
1942 #include <sys/types.h>
1943 #include <sys/socket.h>
1945 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1946 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1947 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1950 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1951 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1954 AC_CACHE_CHECK([for pw_class field in struct passwd],
1955 ac_cv_have_pw_class_in_struct_passwd, [
1960 [ struct passwd p; p.pw_class = 0; ],
1961 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1962 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1965 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1966 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1969 AC_CACHE_CHECK([for pw_expire field in struct passwd],
1970 ac_cv_have_pw_expire_in_struct_passwd, [
1975 [ struct passwd p; p.pw_expire = 0; ],
1976 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1977 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1980 if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1981 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1984 AC_CACHE_CHECK([for pw_change field in struct passwd],
1985 ac_cv_have_pw_change_in_struct_passwd, [
1990 [ struct passwd p; p.pw_change = 0; ],
1991 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1992 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1995 if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1996 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1999 dnl make sure we're using the real structure members and not defines
2000 AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
2001 ac_cv_have_accrights_in_msghdr, [
2004 #include <sys/types.h>
2005 #include <sys/socket.h>
2006 #include <sys/uio.h>
2008 #ifdef msg_accrights
2012 m.msg_accrights = 0;
2016 [ ac_cv_have_accrights_in_msghdr="yes" ],
2017 [ ac_cv_have_accrights_in_msghdr="no" ]
2020 if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
2021 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
2024 AC_CACHE_CHECK([for msg_control field in struct msghdr],
2025 ac_cv_have_control_in_msghdr, [
2028 #include <sys/types.h>
2029 #include <sys/socket.h>
2030 #include <sys/uio.h>
2040 [ ac_cv_have_control_in_msghdr="yes" ],
2041 [ ac_cv_have_control_in_msghdr="no" ]
2044 if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
2045 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
2048 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
2050 [ extern char *__progname; printf("%s", __progname); ],
2051 [ ac_cv_libc_defines___progname="yes" ],
2052 [ ac_cv_libc_defines___progname="no" ]
2055 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
2056 AC_DEFINE(HAVE___PROGNAME)
2059 AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
2063 [ printf("%s", __FUNCTION__); ],
2064 [ ac_cv_cc_implements___FUNCTION__="yes" ],
2065 [ ac_cv_cc_implements___FUNCTION__="no" ]
2068 if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
2069 AC_DEFINE(HAVE___FUNCTION__)
2072 AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
2076 [ printf("%s", __func__); ],
2077 [ ac_cv_cc_implements___func__="yes" ],
2078 [ ac_cv_cc_implements___func__="no" ]
2081 if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
2082 AC_DEFINE(HAVE___func__)
2085 AC_CACHE_CHECK([whether getopt has optreset support],
2086 ac_cv_have_getopt_optreset, [
2091 [ extern int optreset; optreset = 0; ],
2092 [ ac_cv_have_getopt_optreset="yes" ],
2093 [ ac_cv_have_getopt_optreset="no" ]
2096 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
2097 AC_DEFINE(HAVE_GETOPT_OPTRESET)
2100 AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
2102 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
2103 [ ac_cv_libc_defines_sys_errlist="yes" ],
2104 [ ac_cv_libc_defines_sys_errlist="no" ]
2107 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
2108 AC_DEFINE(HAVE_SYS_ERRLIST)
2112 AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
2114 [ extern int sys_nerr; printf("%i", sys_nerr);],
2115 [ ac_cv_libc_defines_sys_nerr="yes" ],
2116 [ ac_cv_libc_defines_sys_nerr="no" ]
2119 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
2120 AC_DEFINE(HAVE_SYS_NERR)
2124 # Check whether user wants sectok support
2126 [ --with-sectok Enable smartcard support using libsectok],
2128 if test "x$withval" != "xno" ; then
2129 if test "x$withval" != "xyes" ; then
2130 CPPFLAGS="$CPPFLAGS -I${withval}"
2131 LDFLAGS="$LDFLAGS -L${withval}"
2132 if test ! -z "$need_dash_r" ; then
2133 LDFLAGS="$LDFLAGS -R${withval}"
2135 if test ! -z "$blibpath" ; then
2136 blibpath="$blibpath:${withval}"
2139 AC_CHECK_HEADERS(sectok.h)
2140 if test "$ac_cv_header_sectok_h" != yes; then
2141 AC_MSG_ERROR(Can't find sectok.h)
2143 AC_CHECK_LIB(sectok, sectok_open)
2144 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
2145 AC_MSG_ERROR(Can't find libsectok)
2147 AC_DEFINE(SMARTCARD)
2148 AC_DEFINE(USE_SECTOK)
2149 SCARD_MSG="yes, using sectok"
2154 # Check whether user wants OpenSC support
2156 AC_HELP_STRING([--with-opensc=PFX],
2157 [Enable smartcard support using OpenSC]),
2158 opensc_config_prefix="$withval", opensc_config_prefix="")
2159 if test x$opensc_config_prefix != x ; then
2160 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
2161 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
2162 if test "$OPENSC_CONFIG" != "no"; then
2163 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
2164 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
2165 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
2166 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
2167 AC_DEFINE(SMARTCARD)
2168 AC_DEFINE(USE_OPENSC)
2169 SCARD_MSG="yes, using OpenSC"
2173 # Check libraries needed by DNS fingerprint support
2174 AC_SEARCH_LIBS(getrrsetbyname, resolv,
2175 [AC_DEFINE(HAVE_GETRRSETBYNAME)],
2177 # Needed by our getrrsetbyname()
2178 AC_SEARCH_LIBS(res_query, resolv)
2179 AC_SEARCH_LIBS(dn_expand, resolv)
2180 AC_MSG_CHECKING(if res_query will link)
2181 AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes),
2184 LIBS="$LIBS -lresolv"
2185 AC_MSG_CHECKING(for res_query in -lresolv)
2190 res_query (0, 0, 0, 0, 0);
2194 [LIBS="$LIBS -lresolv"
2195 AC_MSG_RESULT(yes)],
2199 AC_CHECK_FUNCS(_getshort _getlong)
2200 AC_CHECK_MEMBER(HEADER.ad,
2201 [AC_DEFINE(HAVE_HEADER_AD)],,
2202 [#include <arpa/nameser.h>])
2205 # Check whether user wants Kerberos 5 support
2207 AC_ARG_WITH(kerberos5,
2208 [ --with-kerberos5=PATH Enable Kerberos 5 support],
2209 [ if test "x$withval" != "xno" ; then
2210 if test "x$withval" = "xyes" ; then
2211 KRB5ROOT="/usr/local"
2219 AC_MSG_CHECKING(for krb5-config)
2220 if test -x $KRB5ROOT/bin/krb5-config ; then
2221 KRB5CONF=$KRB5ROOT/bin/krb5-config
2222 AC_MSG_RESULT($KRB5CONF)
2224 AC_MSG_CHECKING(for gssapi support)
2225 if $KRB5CONF | grep gssapi >/dev/null ; then
2233 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
2234 K5LIBS="`$KRB5CONF --libs $k5confopts`"
2235 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
2236 AC_MSG_CHECKING(whether we are using Heimdal)
2237 AC_TRY_COMPILE([ #include <krb5.h> ],
2238 [ char *tmp = heimdal_version; ],
2239 [ AC_MSG_RESULT(yes)
2240 AC_DEFINE(HEIMDAL) ],
2245 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
2246 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
2247 AC_MSG_CHECKING(whether we are using Heimdal)
2248 AC_TRY_COMPILE([ #include <krb5.h> ],
2249 [ char *tmp = heimdal_version; ],
2250 [ AC_MSG_RESULT(yes)
2252 K5LIBS="-lkrb5 -ldes"
2253 K5LIBS="$K5LIBS -lcom_err -lasn1"
2254 AC_CHECK_LIB(roken, net_write,
2255 [K5LIBS="$K5LIBS -lroken"])
2258 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
2261 AC_SEARCH_LIBS(dn_expand, resolv)
2263 AC_CHECK_LIB(gssapi,gss_init_sec_context,
2265 K5LIBS="-lgssapi $K5LIBS" ],
2266 [ AC_CHECK_LIB(gssapi_krb5,gss_init_sec_context,
2268 K5LIBS="-lgssapi_krb5 $K5LIBS" ],
2269 AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]),
2274 AC_CHECK_HEADER(gssapi.h, ,
2275 [ unset ac_cv_header_gssapi_h
2276 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
2277 AC_CHECK_HEADERS(gssapi.h, ,
2278 AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail])
2284 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
2285 AC_CHECK_HEADER(gssapi_krb5.h, ,
2286 [ CPPFLAGS="$oldCPP" ])
2289 if test ! -z "$need_dash_r" ; then
2290 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
2292 if test ! -z "$blibpath" ; then
2293 blibpath="$blibpath:${KRB5ROOT}/lib"
2297 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h)
2298 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h)
2299 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
2301 LIBS="$LIBS $K5LIBS"
2302 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS))
2303 AC_SEARCH_LIBS(krb5_init_ets, $K5LIBS, AC_DEFINE(KRB5_INIT_ETS))
2307 # Looking for programs, paths and files
2309 PRIVSEP_PATH=/var/empty
2310 AC_ARG_WITH(privsep-path,
2311 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
2313 if test "x$withval" != "$no" ; then
2314 PRIVSEP_PATH=$withval
2318 AC_SUBST(PRIVSEP_PATH)
2321 [ --with-xauth=PATH Specify path to xauth program ],
2323 if test "x$withval" != "xno" ; then
2329 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
2330 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
2331 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
2332 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
2333 AC_PATH_PROG(xauth_path, xauth, , $TestPath)
2334 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
2335 xauth_path="/usr/openwin/bin/xauth"
2341 AC_ARG_ENABLE(strip,
2342 [ --disable-strip Disable calling strip(1) on install],
2344 if test "x$enableval" = "xno" ; then
2351 if test -z "$xauth_path" ; then
2352 XAUTH_PATH="undefined"
2353 AC_SUBST(XAUTH_PATH)
2355 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
2356 XAUTH_PATH=$xauth_path
2357 AC_SUBST(XAUTH_PATH)
2360 # Check for mail directory (last resort if we cannot get it from headers)
2361 if test ! -z "$MAIL" ; then
2362 maildir=`dirname $MAIL`
2363 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
2366 if test -z "$no_dev_ptmx" ; then
2367 if test "x$disable_ptmx_check" != "xyes" ; then
2368 AC_CHECK_FILE("/dev/ptmx",
2370 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
2376 AC_CHECK_FILE("/dev/ptc",
2378 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
2383 # Options from here on. Some of these are preset by platform above
2384 AC_ARG_WITH(mantype,
2385 [ --with-mantype=man|cat|doc Set man page type],
2392 AC_MSG_ERROR(invalid man type: $withval)
2397 if test -z "$MANTYPE"; then
2398 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
2399 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath)
2400 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
2402 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
2409 if test "$MANTYPE" = "doc"; then
2416 # Check whether to enable MD5 passwords
2418 AC_ARG_WITH(md5-passwords,
2419 [ --with-md5-passwords Enable use of MD5 passwords],
2421 if test "x$withval" != "xno" ; then
2422 AC_DEFINE(HAVE_MD5_PASSWORDS)
2428 # Whether to disable shadow password support
2430 [ --without-shadow Disable shadow password support],
2432 if test "x$withval" = "xno" ; then
2433 AC_DEFINE(DISABLE_SHADOW)
2439 if test -z "$disable_shadow" ; then
2440 AC_MSG_CHECKING([if the systems has expire shadow information])
2443 #include <sys/types.h>
2446 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
2447 [ sp_expire_available=yes ], []
2450 if test "x$sp_expire_available" = "xyes" ; then
2452 AC_DEFINE(HAS_SHADOW_EXPIRE)
2458 # Use ip address instead of hostname in $DISPLAY
2459 if test ! -z "$IPADDR_IN_DISPLAY" ; then
2460 DISPLAY_HACK_MSG="yes"
2461 AC_DEFINE(IPADDR_IN_DISPLAY)
2463 DISPLAY_HACK_MSG="no"
2464 AC_ARG_WITH(ipaddr-display,
2465 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
2467 if test "x$withval" != "xno" ; then
2468 AC_DEFINE(IPADDR_IN_DISPLAY)
2469 DISPLAY_HACK_MSG="yes"
2475 # check for /etc/default/login and use it if present.
2476 AC_ARG_ENABLE(etc-default-login,
2477 [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],,
2479 AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ])
2481 if test "x$external_path_file" = "x/etc/default/login"; then
2482 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2486 dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2487 if test $ac_cv_func_login_getcapbool = "yes" -a \
2488 $ac_cv_header_login_cap_h = "yes" ; then
2489 external_path_file=/etc/login.conf
2492 # Whether to mess with the default path
2493 SERVER_PATH_MSG="(default)"
2494 AC_ARG_WITH(default-path,
2495 [ --with-default-path= Specify default \$PATH environment for server],
2497 if test "x$external_path_file" = "x/etc/login.conf" ; then
2499 --with-default-path=PATH has no effect on this system.
2500 Edit /etc/login.conf instead.])
2501 elif test "x$withval" != "xno" ; then
2502 if test ! -z "$external_path_file" ; then
2504 --with-default-path=PATH will only be used if PATH is not defined in
2505 $external_path_file .])
2507 user_path="$withval"
2508 SERVER_PATH_MSG="$withval"
2511 [ if test "x$external_path_file" = "x/etc/login.conf" ; then
2512 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
2514 if test ! -z "$external_path_file" ; then
2516 If PATH is defined in $external_path_file, ensure the path to scp is included,
2517 otherwise scp will not work.])
2521 /* find out what STDPATH is */
2526 #ifndef _PATH_STDPATH
2527 # ifdef _PATH_USERPATH /* Irix */
2528 # define _PATH_STDPATH _PATH_USERPATH
2530 # define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
2533 #include <sys/types.h>
2534 #include <sys/stat.h>
2536 #define DATA "conftest.stdpath"
2543 fd = fopen(DATA,"w");
2547 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
2552 ], [ user_path=`cat conftest.stdpath` ],
2553 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
2554 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
2556 # make sure $bindir is in USER_PATH so scp will work
2557 t_bindir=`eval echo ${bindir}`
2559 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
2562 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
2564 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
2565 if test $? -ne 0 ; then
2566 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
2567 if test $? -ne 0 ; then
2568 user_path=$user_path:$t_bindir
2569 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
2574 if test "x$external_path_file" != "x/etc/login.conf" ; then
2575 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2579 # Set superuser path separately to user path
2580 AC_ARG_WITH(superuser-path,
2581 [ --with-superuser-path= Specify different path for super-user],
2583 if test "x$withval" != "xno" ; then
2584 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval")
2585 superuser_path=$withval
2591 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
2592 IPV4_IN6_HACK_MSG="no"
2594 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
2596 if test "x$withval" != "xno" ; then
2598 AC_DEFINE(IPV4_IN_IPV6)
2599 IPV4_IN6_HACK_MSG="yes"
2604 if test "x$inet6_default_4in6" = "xyes"; then
2605 AC_MSG_RESULT([yes (default)])
2606 AC_DEFINE(IPV4_IN_IPV6)
2607 IPV4_IN6_HACK_MSG="yes"
2609 AC_MSG_RESULT([no (default)])
2614 # Whether to enable BSD auth support
2616 AC_ARG_WITH(bsd-auth,
2617 [ --with-bsd-auth Enable BSD auth support],
2619 if test "x$withval" != "xno" ; then
2626 # Where to place sshd.pid
2628 # make sure the directory exists
2629 if test ! -d $piddir ; then
2630 piddir=`eval echo ${sysconfdir}`
2632 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
2636 AC_ARG_WITH(pid-dir,
2637 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2639 if test "x$withval" != "xno" ; then
2641 if test ! -d $piddir ; then
2642 AC_MSG_WARN([** no $piddir directory on this system **])
2648 AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
2651 dnl allow user to disable some login recording features
2652 AC_ARG_ENABLE(lastlog,
2653 [ --disable-lastlog disable use of lastlog even if detected [no]],
2655 if test "x$enableval" = "xno" ; then
2656 AC_DEFINE(DISABLE_LASTLOG)
2661 [ --disable-utmp disable use of utmp even if detected [no]],
2663 if test "x$enableval" = "xno" ; then
2664 AC_DEFINE(DISABLE_UTMP)
2668 AC_ARG_ENABLE(utmpx,
2669 [ --disable-utmpx disable use of utmpx even if detected [no]],
2671 if test "x$enableval" = "xno" ; then
2672 AC_DEFINE(DISABLE_UTMPX)
2677 [ --disable-wtmp disable use of wtmp even if detected [no]],
2679 if test "x$enableval" = "xno" ; then
2680 AC_DEFINE(DISABLE_WTMP)
2684 AC_ARG_ENABLE(wtmpx,
2685 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
2687 if test "x$enableval" = "xno" ; then
2688 AC_DEFINE(DISABLE_WTMPX)
2692 AC_ARG_ENABLE(libutil,
2693 [ --disable-libutil disable use of libutil (login() etc.) [no]],
2695 if test "x$enableval" = "xno" ; then
2696 AC_DEFINE(DISABLE_LOGIN)
2700 AC_ARG_ENABLE(pututline,
2701 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
2703 if test "x$enableval" = "xno" ; then
2704 AC_DEFINE(DISABLE_PUTUTLINE)
2708 AC_ARG_ENABLE(pututxline,
2709 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
2711 if test "x$enableval" = "xno" ; then
2712 AC_DEFINE(DISABLE_PUTUTXLINE)
2716 AC_ARG_WITH(lastlog,
2717 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
2719 if test "x$withval" = "xno" ; then
2720 AC_DEFINE(DISABLE_LASTLOG)
2722 conf_lastlog_location=$withval
2727 dnl lastlog, [uw]tmpx? detection
2728 dnl NOTE: set the paths in the platform section to avoid the
2729 dnl need for command-line parameters
2730 dnl lastlog and [uw]tmp are subject to a file search if all else fails
2732 dnl lastlog detection
2733 dnl NOTE: the code itself will detect if lastlog is a directory
2734 AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
2736 #include <sys/types.h>
2738 #ifdef HAVE_LASTLOG_H
2739 # include <lastlog.h>
2748 [ char *lastlog = LASTLOG_FILE; ],
2749 [ AC_MSG_RESULT(yes) ],
2752 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
2754 #include <sys/types.h>
2756 #ifdef HAVE_LASTLOG_H
2757 # include <lastlog.h>
2763 [ char *lastlog = _PATH_LASTLOG; ],
2764 [ AC_MSG_RESULT(yes) ],
2767 system_lastlog_path=no
2772 if test -z "$conf_lastlog_location"; then
2773 if test x"$system_lastlog_path" = x"no" ; then
2774 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
2775 if (test -d "$f" || test -f "$f") ; then
2776 conf_lastlog_location=$f
2779 if test -z "$conf_lastlog_location"; then
2780 AC_MSG_WARN([** Cannot find lastlog **])
2781 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
2786 if test -n "$conf_lastlog_location"; then
2787 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2791 AC_MSG_CHECKING([if your system defines UTMP_FILE])
2793 #include <sys/types.h>
2799 [ char *utmp = UTMP_FILE; ],
2800 [ AC_MSG_RESULT(yes) ],
2802 system_utmp_path=no ]
2804 if test -z "$conf_utmp_location"; then
2805 if test x"$system_utmp_path" = x"no" ; then
2806 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
2807 if test -f $f ; then
2808 conf_utmp_location=$f
2811 if test -z "$conf_utmp_location"; then
2812 AC_DEFINE(DISABLE_UTMP)
2816 if test -n "$conf_utmp_location"; then
2817 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
2821 AC_MSG_CHECKING([if your system defines WTMP_FILE])
2823 #include <sys/types.h>
2829 [ char *wtmp = WTMP_FILE; ],
2830 [ AC_MSG_RESULT(yes) ],
2832 system_wtmp_path=no ]
2834 if test -z "$conf_wtmp_location"; then
2835 if test x"$system_wtmp_path" = x"no" ; then
2836 for f in /usr/adm/wtmp /var/log/wtmp; do
2837 if test -f $f ; then
2838 conf_wtmp_location=$f
2841 if test -z "$conf_wtmp_location"; then
2842 AC_DEFINE(DISABLE_WTMP)
2846 if test -n "$conf_wtmp_location"; then
2847 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
2851 dnl utmpx detection - I don't know any system so perverse as to require
2852 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
2854 AC_MSG_CHECKING([if your system defines UTMPX_FILE])
2856 #include <sys/types.h>
2865 [ char *utmpx = UTMPX_FILE; ],
2866 [ AC_MSG_RESULT(yes) ],
2868 system_utmpx_path=no ]
2870 if test -z "$conf_utmpx_location"; then
2871 if test x"$system_utmpx_path" = x"no" ; then
2872 AC_DEFINE(DISABLE_UTMPX)
2875 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2879 AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2881 #include <sys/types.h>
2890 [ char *wtmpx = WTMPX_FILE; ],
2891 [ AC_MSG_RESULT(yes) ],
2893 system_wtmpx_path=no ]
2895 if test -z "$conf_wtmpx_location"; then
2896 if test x"$system_wtmpx_path" = x"no" ; then
2897 AC_DEFINE(DISABLE_WTMPX)
2900 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2904 if test ! -z "$blibpath" ; then
2905 LDFLAGS="$LDFLAGS $blibflags$blibpath"
2906 AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile])
2909 dnl remove pam and dl because they are in $LIBPAM
2910 if test "$PAM_MSG" = yes ; then
2911 LIBS=`echo $LIBS | sed 's/-lpam //'`
2913 if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
2914 LIBS=`echo $LIBS | sed 's/-ldl //'`
2918 AC_CONFIG_FILES([Makefile buildpkg.sh openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2921 # Print summary of options
2923 # Someone please show me a better way :)
2924 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2925 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2926 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2927 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
2928 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
2929 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
2930 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
2931 H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
2932 I=`eval echo ${user_path}` ; I=`eval echo ${I}`
2933 J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
2936 echo "OpenSSH has been configured with the following options:"
2937 echo " User binaries: $B"
2938 echo " System binaries: $C"
2939 echo " Configuration files: $D"
2940 echo " Askpass program: $E"
2941 echo " Manual pages: $F"
2942 echo " PID file: $G"
2943 echo " Privilege separation chroot path: $H"
2944 if test "x$external_path_file" = "x/etc/login.conf" ; then
2945 echo " At runtime, sshd will use the path defined in $external_path_file"
2946 echo " Make sure the path to scp is present, otherwise scp will not work"
2948 echo " sshd default user PATH: $I"
2949 if test ! -z "$external_path_file"; then
2950 echo " (If PATH is set in $external_path_file it will be used instead. If"
2951 echo " used, ensure the path to scp is present, otherwise scp will not work.)"
2954 if test ! -z "$superuser_path" ; then
2955 echo " sshd superuser user PATH: $J"
2957 echo " Manpage format: $MANTYPE"
2958 echo " PAM support: $PAM_MSG"
2959 echo " KerberosV support: $KRB5_MSG"
2960 echo " Smartcard support: $SCARD_MSG"
2961 echo " S/KEY support: $SKEY_MSG"
2962 echo " TCP Wrappers support: $TCPW_MSG"
2963 echo " MD5 password support: $MD5_MSG"
2964 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2965 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2966 echo " BSD Auth support: $BSD_AUTH_MSG"
2967 echo " Random number source: $RAND_MSG"
2968 if test ! -z "$USE_RAND_HELPER" ; then
2969 echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
2974 echo " Host: ${host}"
2975 echo " Compiler: ${CC}"
2976 echo " Compiler flags: ${CFLAGS}"
2977 echo "Preprocessor flags: ${CPPFLAGS}"
2978 echo " Linker flags: ${LDFLAGS}"
2979 echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
2983 if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
2984 echo "SVR4 style packages are supported with \"make package\"\n"
2987 if test "x$PAM_MSG" = "xyes" ; then
2988 echo "PAM is enabled. You may need to install a PAM control file "
2989 echo "for sshd, otherwise password authentication may fail. "
2990 echo "Example PAM control files can be found in the contrib/ "
2995 if test ! -z "$RAND_HELPER_CMDHASH" ; then
2996 echo "WARNING: you are using the builtin random number collection "
2997 echo "service. Please read WARNING.RNG and request that your OS "
2998 echo "vendor includes kernel-based random number collection in "
2999 echo "future versions of your OS."
3003 if test ! -z "$NO_PEERCHECK" ; then
3004 echo "WARNING: the operating system that you are using does not "
3005 echo "appear to support either the getpeereid() API nor the "
3006 echo "SO_PEERCRED getsockopt() option. These facilities are used to "
3007 echo "enforce security checks to prevent unauthorised connections to "
3008 echo "ssh-agent. Their absence increases the risk that a malicious "
3009 echo "user can connect to your agent. "