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