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