blob: 9f3b10c4321a7ed01c13e5f7f3e0f0f0dd1be538 [file] [log] [blame]
Damien Millerab18c411999-11-11 10:40:23 +11001AC_INIT(ssh.c)
Damien Miller7f6ea021999-10-28 13:25:17 +10002
3AC_CONFIG_HEADER(config.h)
Damien Miller856799b2000-03-15 21:18:10 +11004AC_PROG_CC
Damien Miller76112de1999-12-21 11:18:08 +11005AC_CANONICAL_HOST
Damien Miller7f6ea021999-10-28 13:25:17 +10006
Damien Millera22ba012000-03-02 23:09:20 +11007# Checks for programs.
Damien Millerab18c411999-11-11 10:40:23 +11008AC_PROG_CPP
Damien Miller7f6ea021999-10-28 13:25:17 +10009AC_PROG_RANLIB
Damien Millerd8087f61999-11-25 12:31:26 +110010AC_PROG_INSTALL
Damien Millerc7b38ce1999-11-09 10:28:04 +110011AC_CHECK_PROG(AR, ar, ar)
Damien Millere79334a1999-12-29 10:03:37 +110012AC_PATH_PROG(PERL, perl)
13AC_SUBST(PERL)
Damien Miller8d1fd572000-05-17 21:34:07 +100014AC_PATH_PROG(ENT, ent)
15AC_SUBST(ENT)
Damien Miller78315eb2000-09-29 23:01:36 +110016AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
Damien Miller2e1b0821999-12-25 10:11:29 +110017
Damien Miller3f62aba2000-11-29 11:56:35 +110018if test -z "$AR" ; then
19 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
20fi
21
Damien Millerad833b32000-08-23 10:46:23 +100022# Use LOGIN_PROGRAM from environment if possible
23if test ! -z "$LOGIN_PROGRAM" ; then
24 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
25else
26 # Search for login
27 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
28 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
29 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
30 fi
31fi
32
Damien Miller166bd442000-03-16 10:48:25 +110033if test -z "$LD" ; then
34 LD=$CC
35fi
36AC_SUBST(LD)
37
38# C Compiler features
39AC_C_INLINE
40if test "$GCC" = "yes"; then
41 CFLAGS="$CFLAGS -Wall"
42fi
43
Damien Millera22ba012000-03-02 23:09:20 +110044# Check for some target-specific stuff
Damien Miller76112de1999-12-21 11:18:08 +110045case "$host" in
Damien Miller75b1d102000-01-07 14:01:41 +110046*-*-aix*)
47 AFS_LIBS="-lld"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000048 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +110049 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Milleredb82922000-06-20 13:25:52 +100050 if (test "$LD" != "gcc" && test -z "$blibpath"); then
Damien Miller29ea30d2000-03-17 10:54:15 +110051 blibpath="/usr/lib:/lib:/usr/local/lib"
52 fi
Damien Millerd2c208a2000-05-17 22:00:02 +100053 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
Damien Millereca71f82000-01-20 22:38:27 +110054 AC_DEFINE(BROKEN_GETADDRINFO)
andree441aa32000-06-12 22:34:38 +000055 MANTYPE='$(CATMAN)'
56 mansubdir=cat
andre60f3c982000-06-03 16:18:19 +000057 dnl AIX handles lastlog as part of its login message
58 AC_DEFINE(DISABLE_LASTLOG)
Damien Miller5fc85652000-07-09 23:53:07 +100059 MANTYPE='$(CATMAN)'
60 mansubdir=cat
Damien Miller75b1d102000-01-07 14:01:41 +110061 ;;
Damien Millerbac2d8a2000-09-05 16:13:06 +110062*-*-cygwin*)
Damien Milleref767ac2000-10-17 23:14:08 +110063 LIBS="$LIBS -lregex /usr/lib/textmode.o"
Damien Millerbac2d8a2000-09-05 16:13:06 +110064 AC_DEFINE(HAVE_CYGWIN)
65 AC_DEFINE(DISABLE_PAM)
66 AC_DEFINE(DISABLE_SHADOW)
67 AC_DEFINE(IPV4_DEFAULT)
68 AC_DEFINE(IP_TOS_IS_BROKEN)
69 AC_DEFINE(BROKEN_VHANGUP)
70 no_pam=1
71 no_libsocket=1
72 no_libnsl=1
73 ;;
Damien Miller76112de1999-12-21 11:18:08 +110074*-*-hpux10*)
75 if test -z "$GCC"; then
Damien Millerfda78d92000-05-20 15:33:44 +100076 CFLAGS="$CFLAGS -Ae"
Damien Miller76112de1999-12-21 11:18:08 +110077 fi
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000078 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
Damien Miller9a947342000-08-30 10:03:33 +110079 IPADDR_IN_DISPLAY=yes
Damien Millerb0785672000-08-23 09:10:39 +100080 AC_DEFINE(USE_PIPES)
Damien Miller8a1e6a62000-09-16 15:55:52 +110081 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +110082 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +000083 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Damien Miller8a1e6a62000-09-16 15:55:52 +110084 LIBS="$LIBS -lsec"
Damien Miller670a4b82000-01-22 13:53:11 +110085 MANTYPE='$(CATMAN)'
86 mansubdir=cat
Damien Miller76112de1999-12-21 11:18:08 +110087 ;;
Damien Miller1bead332000-04-30 00:47:29 +100088*-*-hpux11*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000089 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
Damien Miller9a947342000-08-30 10:03:33 +110090 IPADDR_IN_DISPLAY=yes
Damien Miller5552d7a2000-08-30 09:53:24 +110091 AC_DEFINE(USE_PIPES)
Damien Miller8a1e6a62000-09-16 15:55:52 +110092 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +110093 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +000094 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Damien Miller8a1e6a62000-09-16 15:55:52 +110095 LIBS="$LIBS -lsec"
Damien Miller1bead332000-04-30 00:47:29 +100096 MANTYPE='$(CATMAN)'
97 mansubdir=cat
98 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +110099*-*-irix5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000100 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000101 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100102 PATH="$PATH:/usr/etc"
Damien Miller07278932000-01-22 14:05:37 +1100103 MANTYPE='$(CATMAN)'
Damien Miller1808f382000-01-06 12:03:12 +1100104 no_libsocket=1
105 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000106 AC_DEFINE(BROKEN_INET_NTOA)
Damien Miller1808f382000-01-06 12:03:12 +1100107 ;;
108*-*-irix6*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000109 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000110 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100111 PATH="$PATH:/usr/etc"
Damien Miller07278932000-01-22 14:05:37 +1100112 MANTYPE='$(CATMAN)'
Damien Miller91606b12000-06-28 08:22:29 +1000113 AC_DEFINE(WITH_IRIX_ARRAY)
114 AC_DEFINE(WITH_IRIX_PROJECT)
115 AC_DEFINE(WITH_IRIX_AUDIT)
Ben Lindstrom4a1d9162000-11-21 10:45:31 +0000116 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
Damien Millerbeb4ba51999-12-28 15:09:35 +1100117 no_libsocket=1
118 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000119 AC_DEFINE(BROKEN_INET_NTOA)
Ben Lindstrom75214f92000-12-01 21:19:51 +0000120 mansubdir=man
Damien Millerbeb4ba51999-12-28 15:09:35 +1100121 ;;
Damien Millerb29ea912000-01-15 14:12:03 +1100122*-*-linux*)
123 no_dev_ptmx=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100124 AC_DEFINE(DONT_TRY_OTHER_AF)
Damien Miller4e997202000-07-09 21:21:52 +1000125 AC_DEFINE(PAM_TTY_KLUDGE)
Damien Miller7bcb0892000-03-11 20:45:40 +1100126 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100127 ;;
Ben Lindstromb5628642000-10-18 00:02:25 +0000128mips-sony-bsd|mips-sony-newsos4)
129 AC_DEFINE(HAVE_NEWS4)
130 SONY=1
131 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
132 AC_MSG_ERROR([*** libiberty missing - please install first ***])
133 )
134 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100135*-*-netbsd*)
Damien Millera22ba012000-03-02 23:09:20 +1100136 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100137 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000138*-next-*)
Damien Miller0f91b4e2000-06-18 15:43:25 +1000139 conf_lastlog_location="/usr/adm/lastlog"
Damien Millere5192fa2000-08-29 14:30:37 +1100140 conf_utmp_location=/etc/utmp
141 conf_wtmp_location=/usr/adm/wtmp
142 MAIL=/usr/spool/mail
Damien Miller0f91b4e2000-06-18 15:43:25 +1000143 AC_DEFINE(HAVE_NEXT)
Ben Lindstromb4df15d2000-10-15 00:17:36 +0000144 AC_DEFINE(BROKEN_REALPATH)
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000145 AC_DEFINE(USE_PIPES)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000146 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000147 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100148*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000149 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller08c788a2000-03-16 07:52:29 +1100150 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
Damien Millera22ba012000-03-02 23:09:20 +1100151 need_dash_r=1
andre2ff7b5d2000-06-03 14:57:40 +0000152 # hardwire lastlog location (can't detect it on some versions)
153 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000154 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
155 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
156 if test "$sol2ver" -ge 8; then
157 AC_MSG_RESULT(yes)
158 AC_DEFINE(DISABLE_UTMP)
159 AC_DEFINE(DISABLE_WTMP)
160 else
161 AC_MSG_RESULT(no)
162 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100163 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000164*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000165 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000166 AC_CHECK_FUNCS(getpwanam)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000167 conf_utmp_location=/etc/utmp
168 conf_wtmp_location=/var/adm/wtmp
169 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000170 AC_DEFINE(USE_PIPES)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000171 MANTYPE='$(CATMAN)'
172 mansubdir=cat
Damien Millerdfc83f42000-05-20 15:02:59 +1000173 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000174*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000175 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller2ae714f2000-07-11 09:29:50 +1000176 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
177 MANTYPE='$(CATMAN)'
178 AC_DEFINE(IP_TOS_IS_BROKEN)
179 mansubdir=cat
Damien Millerb2dc28e2000-07-12 09:18:33 +1000180 LIBS="$LIBS -lgen -lnsl -lucb"
Damien Miller2ae714f2000-07-11 09:29:50 +1000181 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100182*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000183 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100184 LDFLAGS="$LDFLAGS -L/usr/local/lib"
185 MANTYPE='$(CATMAN)'
186 mansubdir=cat
187 LIBS="$LIBS -lgen -lsocket -lnsl -lresolv"
188 enable_suid_ssh=no
189 ;;
190*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000191 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100192 LDFLAGS="$LDFLAGS -L/usr/local/lib"
193 MANTYPE='$(CATMAN)'
194 mansubdir=cat
195 LIBS="$LIBS -lgen -lsocket"
196 enable_suid_ssh=no
197 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100198*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000199 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100200 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller0e1cf7c2000-01-26 12:15:30 +1100201 MANTYPE='$(CATMAN)'
202 mansubdir=cat
Damien Miller75b1d102000-01-07 14:01:41 +1100203 LIBS="$LIBS -lgen -lsocket"
204 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100205*-*-sco3.2v4*)
Damien Miller238a9fa2000-08-31 09:20:05 +1100206 AC_DEFINE(USE_PIPES)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000207 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100208 LDFLAGS="$LDFLAGS -L/usr/local/lib"
209 MANTYPE='$(CATMAN)'
210 mansubdir=cat
Ben Lindstrom980754c2000-11-12 00:04:24 +0000211 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
Damien Miller78315eb2000-09-29 23:01:36 +1100212 no_dev_ptmx=1
213 RANLIB=true
214 AC_DEFINE(BROKEN_SYS_TERMIO_H)
215 rsh_path="/usr/bin/rcmd"
216 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000217 AC_DEFINE(DISABLE_SHADOW)
Damien Miller78315eb2000-09-29 23:01:36 +1100218 ;;
219*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000220 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000221 LDFLAGS="$LDFLAGS -L/usr/local/lib"
222 MANTYPE='$(CATMAN)'
223 mansubdir=cat
Ben Lindstrom980754c2000-11-12 00:04:24 +0000224 LIBS="$LIBS -lgen -lsocket -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000225 no_dev_ptmx=1
Damien Miller78315eb2000-09-29 23:01:36 +1100226 rsh_path="/usr/bin/rcmd"
227 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000228 AC_DEFINE(DISABLE_SHADOW)
Damien Millera66626b2000-06-13 18:57:53 +1000229 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000230*-dec-osf*)
231# This is untested
232 if test ! -z "USE_SIA" ; then
233 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
234 if test -f /etc/sia/matrix.conf; then
235 AC_MSG_RESULT(yes)
236 AC_DEFINE(HAVE_OSF_SIA)
237 AC_DEFINE(DISABLE_LOGIN)
238 LIBS="$LIBS -lsecurity -ldb -lm -laud"
239 else
240 AC_MSG_RESULT(no)
241 fi
242 fi
243 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100244esac
245
Damien Millere37bfc12000-06-05 09:37:43 +1000246# Allow user to specify flags
247AC_ARG_WITH(cflags,
248 [ --with-cflags Specify additional flags to pass to compiler],
249 [
250 if test "x$withval" != "xno" ; then
251 CFLAGS="$CFLAGS $withval"
252 fi
253 ]
254)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000255AC_ARG_WITH(cppflags,
256 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
257 [
258 if test "x$withval" != "xno"; then
259 CPPFLAGS="$CPPFLAGS $withval"
260 fi
261 ]
262)
Damien Millere37bfc12000-06-05 09:37:43 +1000263AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000264 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000265 [
266 if test "x$withval" != "xno" ; then
267 LDFLAGS="$LDFLAGS $withval"
268 fi
269 ]
270)
271AC_ARG_WITH(libs,
272 [ --with-libs Specify additional libraries to link with],
273 [
274 if test "x$withval" != "xno" ; then
275 LIBS="$LIBS $withval"
276 fi
277 ]
278)
279
280
Damien Millera22ba012000-03-02 23:09:20 +1100281# Checks for libraries.
Damien Millerab18c411999-11-11 10:40:23 +1100282AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
283AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
Damien Miller6f9c3372000-10-25 10:06:04 +1100284
285AC_CHECK_FUNC(regcomp,
286 [],
287 [
288 AC_CHECK_LIB(pcre, pcre_info,
289 AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
290 ]
291)
Damien Millerab18c411999-11-11 10:40:23 +1100292
Damien Millerbeb4ba51999-12-28 15:09:35 +1100293if test -z "$no_libsocket" ; then
294 AC_CHECK_LIB(nsl, yp_match, , )
295fi
296if test -z "$no_libnsl" ; then
297 AC_CHECK_LIB(socket, main, , )
Damien Miller32b3cf21999-12-26 10:21:48 +1100298fi
Damien Millerab18c411999-11-11 10:40:23 +1100299
Damien Millera22ba012000-03-02 23:09:20 +1100300# Checks for header files.
Kevin Steves2c65ada2000-12-06 22:25:40 +0000301AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utmp.h utmpx.h vis.h)
Damien Millerab18c411999-11-11 10:40:23 +1100302
Damien Millerad833b32000-08-23 10:46:23 +1000303dnl Checks for library functions.
Ben Lindstrom67e21e12000-11-05 09:08:45 +0000304AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getnameinfo getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strsep strtok_r vsnprintf vhangup vis waitpid _getpty __b64_ntop)
Damien Millerad833b32000-08-23 10:46:23 +1000305dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000306AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000307dnl Checks for libutil functions
andre2ff7b5d2000-06-03 14:57:40 +0000308AC_CHECK_FUNCS(login logout updwtmp logwtmp)
Damien Millerad833b32000-08-23 10:46:23 +1000309dnl Checks for utmp functions
andre2ff7b5d2000-06-03 14:57:40 +0000310AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent)
311AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000312dnl Checks for utmpx functions
andre2ff7b5d2000-06-03 14:57:40 +0000313AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline )
314AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100315
Damien Miller5fc85652000-07-09 23:53:07 +1000316AC_CHECK_FUNC(getuserattr,
317 [AC_DEFINE(HAVE_GETUSERATTR)],
318 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
319)
320
Damien Miller04f80141999-11-19 15:32:34 +1100321AC_CHECK_FUNC(login,
322 [AC_DEFINE(HAVE_LOGIN)],
323 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
324)
325
326AC_CHECK_FUNC(daemon,
327 [AC_DEFINE(HAVE_DAEMON)],
328 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
329)
330
Damien Miller9fb07e42000-03-05 16:22:59 +1100331AC_CHECK_FUNC(getpagesize,
332 [AC_DEFINE(HAVE_GETPAGESIZE)],
333 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
334)
335
Damien Millercb170cb2000-07-01 16:52:55 +1000336# Check for broken snprintf
337if test "x$ac_cv_func_snprintf" = "xyes" ; then
338 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
339 AC_TRY_RUN(
340 [
341#include <stdio.h>
342int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
343 ],
344 [AC_MSG_RESULT(yes)],
345 [
346 AC_MSG_RESULT(no)
347 AC_DEFINE(BROKEN_SNPRINTF)
348 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
349 ]
350 )
351fi
352
Damien Miller606f8802000-09-16 15:39:56 +1100353AC_FUNC_GETPGRP
354
Damien Miller7b22d652000-06-18 14:07:04 +1000355PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100356AC_ARG_WITH(pam,
357 [ --without-pam Disable PAM support ],
358 [
359 if test "x$withval" = "xno" ; then
360 no_pam=1
361 AC_DEFINE(DISABLE_PAM)
Damien Miller7b22d652000-06-18 14:07:04 +1000362 PAM_MSG="disabled"
Damien Millera22ba012000-03-02 23:09:20 +1100363 fi
364 ]
365)
Damien Milleredb82922000-06-20 13:25:52 +1000366if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100367 AC_CHECK_LIB(dl, dlopen, , )
368 LIBS="$LIBS -lpam"
369
Damien Miller0e65eed2000-05-17 22:16:05 +1000370 AC_CHECK_FUNCS(pam_getenvlist)
Damien Miller1bead332000-04-30 00:47:29 +1000371
Damien Miller1f335fb2000-06-26 11:31:33 +1000372 disable_shadow=yes
373
Damien Miller7b22d652000-06-18 14:07:04 +1000374 PAM_MSG="yes"
375
Damien Millera22ba012000-03-02 23:09:20 +1100376 # Check PAM strerror arguments (old PAM)
377 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
378 AC_TRY_COMPILE(
379 [
Damien Miller81171112000-04-23 11:14:01 +1000380#include <stdlib.h>
381#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100382 ],
383 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
384 [AC_MSG_RESULT(no)],
385 [
386 AC_DEFINE(HAVE_OLD_PAM)
387 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000388 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100389 ]
390 )
391fi
392
393# The big search for OpenSSL
394AC_ARG_WITH(ssl-dir,
395 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
396 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000397 if test "x$withval" != "xno" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100398 tryssldir=$withval
399 fi
400 ]
401)
402
403saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100404saved_LDFLAGS="$LDFLAGS"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000405saved_CPPFLAGS="$CPPFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100406if test "x$prefix" != "xNONE" ; then
407 tryssldir="$tryssldir $prefix"
408fi
Damien Miller61e50f12000-05-08 20:49:37 +1000409AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera22ba012000-03-02 23:09:20 +1100410
Damien Millera1b61e12000-09-16 17:02:16 +1100411 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
Damien Miller61e50f12000-05-08 20:49:37 +1000412 if test ! -z "$ssldir" ; then
413 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000414 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Miller61e50f12000-05-08 20:49:37 +1000415 if test ! -z "$need_dash_r" ; then
416 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
417 fi
Damien Millera1ad4802000-03-15 10:04:54 +1100418 else
Damien Miller61e50f12000-05-08 20:49:37 +1000419 LDFLAGS="$saved_LDFLAGS"
Damien Millerb85dcad2000-03-11 11:37:00 +1100420 fi
421
Damien Miller3b512e12000-05-17 23:29:18 +1000422 LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000423
Damien Miller3b512e12000-05-17 23:29:18 +1000424 # Basic test to check for compatible version and correct linking
425 # *does not* test for RSA - that comes later.
426 AC_TRY_RUN(
427 [
Damien Millere59ce622000-05-01 20:54:17 +1000428#include <string.h>
429#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000430int main(void)
431{
Damien Miller3b512e12000-05-17 23:29:18 +1000432 char a[2048];
433 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000434 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000435 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000436}
Damien Miller3b512e12000-05-17 23:29:18 +1000437 ],
438 [
439 found_crypto=1
440 break;
441 ], []
442 )
Damien Miller61e50f12000-05-08 20:49:37 +1000443
444 if test ! -z "$found_crypto" ; then
445 break;
446 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100447 done
448
Damien Miller61e50f12000-05-08 20:49:37 +1000449 if test -z "$found_crypto" ; then
450 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
Damien Millerb85dcad2000-03-11 11:37:00 +1100451 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000452 if test -z "$ssldir" ; then
453 ssldir="(system)"
454 fi
Damien Millera22ba012000-03-02 23:09:20 +1100455
Damien Miller61e50f12000-05-08 20:49:37 +1000456 ac_cv_openssldir=$ssldir
457])
458
Damien Milleredb82922000-06-20 13:25:52 +1000459if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000460 AC_DEFINE(HAVE_OPENSSL)
461 dnl Need to recover ssldir - test above runs in subshell
462 ssldir=$ac_cv_openssldir
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000463 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Millera1ad4802000-03-15 10:04:54 +1100464 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
465 if test ! -z "$need_dash_r" ; then
466 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
Damien Millera22ba012000-03-02 23:09:20 +1100467 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100468 if test ! -z "$blibpath" ; then
469 blibpath="$blibpath:$ssldir:$ssldir/lib"
470 fi
Damien Millera22ba012000-03-02 23:09:20 +1100471fi
Damien Miller3b512e12000-05-17 23:29:18 +1000472LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000473
Damien Miller3b512e12000-05-17 23:29:18 +1000474# Now test RSA support
475saved_LIBS="$LIBS"
476AC_MSG_CHECKING([for RSA support])
477for WANTS_RSAREF in "" 1 ; do
478 if test -z "$WANTS_RSAREF" ; then
479 LIBS="$saved_LIBS"
480 else
481 LIBS="$saved_LIBS -lRSAglue -lrsaref"
482 fi
483 AC_TRY_RUN([
484#include <string.h>
485#include <openssl/rand.h>
486#include <openssl/rsa.h>
487#include <openssl/bn.h>
488#include <openssl/sha.h>
489int main(void)
490{
491 int num; RSA *key; static unsigned char p_in[] = "blahblah";
492 unsigned char c[256], p[256];
493 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
494 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
495 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
496 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
497}
498 ],
499 [
500 rsa_works=1
501 break;
502 ], [])
503done
504
505if test ! -z "$no_rsa" ; then
506 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000507 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000508else
509 if test -z "$rsa_works" ; then
510 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000511 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000512 else
513 if test -z "$WANTS_RSAREF" ; then
514 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000515 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000516 else
Damien Miller7b22d652000-06-18 14:07:04 +1000517 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000518 AC_MSG_RESULT(using RSAref)
519 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
520 fi
521 fi
522fi
Damien Millera22ba012000-03-02 23:09:20 +1100523
Ben Lindstromb5628642000-10-18 00:02:25 +0000524# Cheap hack to ensure NEWS-OS libraries are arranged right.
525if test ! -z "$SONY" ; then
526 LIBS="$LIBS -liberty";
527fi
528
Damien Millera22ba012000-03-02 23:09:20 +1100529# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100530AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100531AC_CHECK_SIZEOF(short int, 2)
532AC_CHECK_SIZEOF(int, 4)
533AC_CHECK_SIZEOF(long int, 4)
534AC_CHECK_SIZEOF(long long int, 8)
535
Damien Millera22ba012000-03-02 23:09:20 +1100536# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +1100537AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
538 AC_TRY_COMPILE(
539 [ #include <sys/types.h> ],
540 [ u_int a; a = 1;],
541 [ ac_cv_have_u_int="yes" ],
542 [ ac_cv_have_u_int="no" ]
543 )
544])
545if test "x$ac_cv_have_u_int" = "xyes" ; then
546 AC_DEFINE(HAVE_U_INT)
547 have_u_int=1
548fi
549
Damien Miller61e50f12000-05-08 20:49:37 +1000550AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
551 AC_TRY_COMPILE(
552 [ #include <sys/types.h> ],
553 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
554 [ ac_cv_have_intxx_t="yes" ],
555 [ ac_cv_have_intxx_t="no" ]
556 )
557])
558if test "x$ac_cv_have_intxx_t" = "xyes" ; then
559 AC_DEFINE(HAVE_INTXX_T)
560 have_intxx_t=1
561fi
562
Damien Miller578783e2000-09-23 14:12:24 +1100563AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
564 AC_TRY_COMPILE(
565 [ #include <sys/types.h> ],
566 [ int64_t a; a = 1;],
567 [ ac_cv_have_int64_t="yes" ],
568 [ ac_cv_have_int64_t="no" ]
569 )
570])
571if test "x$ac_cv_have_int64_t" = "xyes" ; then
572 AC_DEFINE(HAVE_INT64_T)
573 have_int64_t=1
574fi
575
Damien Miller61e50f12000-05-08 20:49:37 +1000576AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
577 AC_TRY_COMPILE(
578 [ #include <sys/types.h> ],
579 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
580 [ ac_cv_have_u_intxx_t="yes" ],
581 [ ac_cv_have_u_intxx_t="no" ]
582 )
583])
584if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
585 AC_DEFINE(HAVE_U_INTXX_T)
586 have_u_intxx_t=1
587fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100588
Damien Miller578783e2000-09-23 14:12:24 +1100589AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
590 AC_TRY_COMPILE(
591 [ #include <sys/types.h> ],
592 [ u_int64_t a; a = 1;],
593 [ ac_cv_have_u_int64_t="yes" ],
594 [ ac_cv_have_u_int64_t="no" ]
595 )
596])
597if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
598 AC_DEFINE(HAVE_U_INT64_T)
599 have_u_int64_t=1
600fi
601
Damien Milleredb82922000-06-20 13:25:52 +1000602if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
603 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100604then
605 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
606 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000607 [
608#include <sys/bitypes.h>
609 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100610 [
Damien Miller70494d12000-04-03 15:57:06 +1000611 int8_t a; int16_t b; int32_t c;
612 u_int8_t e; u_int16_t f; u_int32_t g;
613 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100614 ],
615 [
616 AC_DEFINE(HAVE_U_INTXX_T)
617 AC_DEFINE(HAVE_INTXX_T)
618 AC_MSG_RESULT(yes)
619 ],
620 [AC_MSG_RESULT(no)]
621 )
622fi
623
Damien Millerd6121d22000-03-17 23:26:46 +1100624if test -z "$have_u_intxx_t" ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000625 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
626 AC_TRY_COMPILE(
627 [
628#include <sys/types.h>
629 ],
630 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
631 [ ac_cv_have_uintxx_t="yes" ],
632 [ ac_cv_have_uintxx_t="no" ]
633 )
634 ])
635 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
636 AC_DEFINE(HAVE_UINTXX_T)
637 fi
Damien Millerd6121d22000-03-17 23:26:46 +1100638fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100639
Damien Miller61e50f12000-05-08 20:49:37 +1000640AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
641 AC_TRY_COMPILE(
642 [
Damien Miller81171112000-04-23 11:14:01 +1000643#include <sys/types.h>
644#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000645 ],
646 [socklen_t foo; foo = 1235;],
647 [ ac_cv_have_socklen_t="yes" ],
648 [ ac_cv_have_socklen_t="no" ]
649 )
650])
651if test "x$ac_cv_have_socklen_t" = "xyes" ; then
652 AC_DEFINE(HAVE_SOCKLEN_T)
653fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100654
Damien Miller61e50f12000-05-08 20:49:37 +1000655AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
656 AC_TRY_COMPILE(
657 [
658#include <sys/types.h>
659 ],
660 [ size_t foo; foo = 1235; ],
661 [ ac_cv_have_size_t="yes" ],
662 [ ac_cv_have_size_t="no" ]
663 )
664])
665if test "x$ac_cv_have_size_t" = "xyes" ; then
666 AC_DEFINE(HAVE_SIZE_T)
667fi
Damien Miller95058511999-12-29 10:36:45 +1100668
Damien Miller615f9392000-05-17 22:53:33 +1000669AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
670 AC_TRY_COMPILE(
671 [
672#include <sys/types.h>
673 ],
674 [ ssize_t foo; foo = 1235; ],
675 [ ac_cv_have_ssize_t="yes" ],
676 [ ac_cv_have_ssize_t="no" ]
677 )
678])
679if test "x$ac_cv_have_ssize_t" = "xyes" ; then
680 AC_DEFINE(HAVE_SSIZE_T)
681fi
682
Damien Millerb54b40e2000-06-23 08:23:34 +1000683AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
684 AC_TRY_COMPILE(
685 [
686#include <sys/types.h>
687#include <sys/socket.h>
688 ],
689 [ sa_family_t foo; foo = 1235; ],
690 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +1100691 [ AC_TRY_COMPILE(
692 [
693#include <sys/types.h>
694#include <sys/socket.h>
695#include <netinet/in.h>
696 ],
697 [ sa_family_t foo; foo = 1235; ],
698 [ ac_cv_have_sa_family_t="yes" ],
699
Damien Millerb54b40e2000-06-23 08:23:34 +1000700 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +1100701 )]
Damien Millerb54b40e2000-06-23 08:23:34 +1000702 )
703])
704if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
705 AC_DEFINE(HAVE_SA_FAMILY_T)
706fi
707
Damien Miller0f91b4e2000-06-18 15:43:25 +1000708AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
709 AC_TRY_COMPILE(
710 [
711#include <sys/types.h>
712 ],
713 [ pid_t foo; foo = 1235; ],
714 [ ac_cv_have_pid_t="yes" ],
715 [ ac_cv_have_pid_t="no" ]
716 )
717])
718if test "x$ac_cv_have_pid_t" = "xyes" ; then
719 AC_DEFINE(HAVE_PID_T)
720fi
721
722AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
723 AC_TRY_COMPILE(
724 [
725#include <sys/types.h>
726 ],
727 [ mode_t foo; foo = 1235; ],
728 [ ac_cv_have_mode_t="yes" ],
729 [ ac_cv_have_mode_t="no" ]
730 )
731])
732if test "x$ac_cv_have_mode_t" = "xyes" ; then
733 AC_DEFINE(HAVE_MODE_T)
734fi
735
Damien Miller61e50f12000-05-08 20:49:37 +1000736
737AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
738 AC_TRY_COMPILE(
739 [
Damien Miller81171112000-04-23 11:14:01 +1000740#include <sys/types.h>
741#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000742 ],
743 [ struct sockaddr_storage s; ],
744 [ ac_cv_have_struct_sockaddr_storage="yes" ],
745 [ ac_cv_have_struct_sockaddr_storage="no" ]
746 )
747])
748if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
749 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
750fi
Damien Miller34132e52000-01-14 15:45:46 +1100751
Damien Miller61e50f12000-05-08 20:49:37 +1000752AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
753 AC_TRY_COMPILE(
754 [
Damien Miller7b22d652000-06-18 14:07:04 +1000755#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000756#include <netinet/in.h>
757 ],
758 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
759 [ ac_cv_have_struct_sockaddr_in6="yes" ],
760 [ ac_cv_have_struct_sockaddr_in6="no" ]
761 )
762])
763if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
764 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
765fi
Damien Miller34132e52000-01-14 15:45:46 +1100766
Damien Miller61e50f12000-05-08 20:49:37 +1000767AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
768 AC_TRY_COMPILE(
769 [
Damien Miller7b22d652000-06-18 14:07:04 +1000770#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000771#include <netinet/in.h>
772 ],
773 [ struct in6_addr s; s.s6_addr[0] = 0; ],
774 [ ac_cv_have_struct_in6_addr="yes" ],
775 [ ac_cv_have_struct_in6_addr="no" ]
776 )
777])
778if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
779 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
780fi
Damien Miller34132e52000-01-14 15:45:46 +1100781
Damien Miller61e50f12000-05-08 20:49:37 +1000782AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
783 AC_TRY_COMPILE(
784 [
Damien Miller81171112000-04-23 11:14:01 +1000785#include <sys/types.h>
786#include <sys/socket.h>
787#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000788 ],
789 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
790 [ ac_cv_have_struct_addrinfo="yes" ],
791 [ ac_cv_have_struct_addrinfo="no" ]
792 )
793])
794if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
795 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
796fi
797
Damien Miller78315eb2000-09-29 23:01:36 +1100798dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +1000799OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
800OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
801OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
802OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
803OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +1000804OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000805OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
806OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +1000807OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000808OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
809OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
810OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
811OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +0000812OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
813OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
814OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
815OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Damien Miller78315eb2000-09-29 23:01:36 +1100816AC_STRUCT_ST_BLKSIZE
andre2ff7b5d2000-06-03 14:57:40 +0000817
Damien Miller942da032000-08-18 13:59:06 +1000818AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
819 ac_cv_have_sun_len_in_struct_sockaddr_un, [
820 AC_TRY_COMPILE(
821 [
822#include <sys/types.h>
823#include <sys/socket.h>
824 ],
825 [ struct sockaddr_un s; s.sun_len = 1; ],
826 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
827 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
828 )
829])
830if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
831 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
832fi
833
Damien Miller61e50f12000-05-08 20:49:37 +1000834AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
835 ac_cv_have_ss_family_in_struct_ss, [
836 AC_TRY_COMPILE(
837 [
Damien Miller81171112000-04-23 11:14:01 +1000838#include <sys/types.h>
839#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000840 ],
841 [ struct sockaddr_storage s; s.ss_family = 1; ],
842 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
843 [ ac_cv_have_ss_family_in_struct_ss="no" ],
844 )
845])
846if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
847 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
848fi
849
Damien Miller61e50f12000-05-08 20:49:37 +1000850AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
851 ac_cv_have___ss_family_in_struct_ss, [
852 AC_TRY_COMPILE(
853 [
Damien Miller81171112000-04-23 11:14:01 +1000854#include <sys/types.h>
855#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000856 ],
857 [ struct sockaddr_storage s; s.__ss_family = 1; ],
858 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
859 [ ac_cv_have___ss_family_in_struct_ss="no" ]
860 )
861])
862if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
863 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
864fi
Damien Millerbf1c9b21999-12-09 10:16:54 +1100865
Damien Millerad833b32000-08-23 10:46:23 +1000866AC_CACHE_CHECK([for pw_class field in struct passwd],
867 ac_cv_have_pw_class_in_struct_passwd, [
868 AC_TRY_COMPILE(
869 [
Damien Millerad833b32000-08-23 10:46:23 +1000870#include <pwd.h>
871 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +0000872 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +1000873 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
874 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
875 )
876])
877if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
878 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
879fi
880
Damien Miller61e50f12000-05-08 20:49:37 +1000881
882AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
883 AC_TRY_LINK([],
884 [ extern char *__progname; printf("%s", __progname); ],
885 [ ac_cv_libc_defines___progname="yes" ],
886 [ ac_cv_libc_defines___progname="no" ]
887 )
888])
889if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
890 AC_DEFINE(HAVE___PROGNAME)
891fi
892
Damien Millera22ba012000-03-02 23:09:20 +1100893
Damien Millerecbb26d2000-07-15 14:59:14 +1000894AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
895 AC_TRY_LINK([],
896 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
897 [ ac_cv_libc_defines_sys_errlist="yes" ],
898 [ ac_cv_libc_defines_sys_errlist="no" ]
899 )
900])
901if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
902 AC_DEFINE(HAVE_SYS_ERRLIST)
903fi
904
905
Damien Miller11fa2cc2000-08-16 10:35:58 +1000906AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
907 AC_TRY_LINK([],
908 [ extern int sys_nerr; printf("%i", sys_nerr);],
909 [ ac_cv_libc_defines_sys_nerr="yes" ],
910 [ ac_cv_libc_defines_sys_nerr="no" ]
911 )
912])
913if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
914 AC_DEFINE(HAVE_SYS_NERR)
915fi
916
917
Damien Millera22ba012000-03-02 23:09:20 +1100918# Looking for programs, paths and files
919AC_ARG_WITH(rsh,
920 [ --with-rsh=PATH Specify path to remote shell program ],
921 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100922 if test "x$withval" != "$no" ; then
Damien Miller90dcc052000-07-08 10:17:40 +1000923 rsh_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100924 fi
925 ],
926 [
927 AC_PATH_PROG(rsh_path, rsh)
928 ]
929)
930
931AC_ARG_WITH(xauth,
932 [ --with-xauth=PATH Specify path to xauth program ],
933 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000934 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000935 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100936 fi
937 ],
938 [
Damien Miller78315eb2000-09-29 23:01:36 +1100939 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
Damien Milleredb82922000-06-20 13:25:52 +1000940 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100941 xauth_path="/usr/openwin/bin/xauth"
942 fi
943 ]
944)
945
Damien Millera19cf472000-11-29 13:28:50 +1100946if test -z "$xauth_path" ; then
947 XAUTH_PATH="undefined"
948 AC_SUBST(XAUTH_PATH)
949else
Damien Millera22ba012000-03-02 23:09:20 +1100950 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +1100951 XAUTH_PATH=$xauth_path
952 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +1100953fi
954if test ! -z "$rsh_path" ; then
955 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
956fi
957
958# Check for mail directory (last resort if we cannot get it from headers)
959if test ! -z "$MAIL" ; then
960 maildir=`dirname $MAIL`
961 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
962fi
963
Damien Millera22ba012000-03-02 23:09:20 +1100964if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +1100965 AC_CHECK_FILE("/dev/ptmx",
966 [
967 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
968 have_dev_ptmx=1
969 ]
970 )
Damien Millera22ba012000-03-02 23:09:20 +1100971fi
Damien Miller204ad072000-03-02 23:56:12 +1100972AC_CHECK_FILE("/dev/ptc",
973 [
974 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
975 have_dev_ptc=1
976 ]
977)
978
Damien Millera22ba012000-03-02 23:09:20 +1100979# Options from here on. Some of these are preset by platform above
980
Damien Millera22ba012000-03-02 23:09:20 +1100981# Check for user-specified random device, otherwise check /dev/urandom
982AC_ARG_WITH(random,
983 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
984 [
Damien Miller040f3832000-04-03 14:50:43 +1000985 if test "x$withval" != "xno" ; then
986 RANDOM_POOL="$withval";
987 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
988 fi
Damien Millera22ba012000-03-02 23:09:20 +1100989 ],
990 [
991 # Check for random device
992 AC_CHECK_FILE("/dev/urandom",
993 [
994 RANDOM_POOL="/dev/urandom";
995 AC_SUBST(RANDOM_POOL)
996 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
997 ]
998 )
999 ]
1000)
1001
1002# Check for EGD pool file
1003AC_ARG_WITH(egd-pool,
1004 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1005 [
Damien Miller040f3832000-04-03 14:50:43 +10001006 if test "x$withval" != "xno" ; then
1007 EGD_SOCKET="$withval";
1008 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1009 fi
Damien Millera22ba012000-03-02 23:09:20 +11001010 ]
1011)
1012
Damien Miller0437b332000-05-02 09:56:41 +10001013# detect pathnames for entropy gathering commands, if we need them
1014INSTALL_SSH_PRNG_CMDS=""
1015rm -f prng_commands
Damien Milleredb82922000-06-20 13:25:52 +10001016if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
Damien Miller11e37f62000-04-08 18:23:30 +10001017 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +10001018 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1019 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1020 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1021 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1022 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1023 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1024 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1025 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1026 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1027 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1028 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1029 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1030 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1031 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1032 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
Damien Miller0437b332000-05-02 09:56:41 +10001033
1034 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +10001035fi
Damien Miller0437b332000-05-02 09:56:41 +10001036AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1037
Damien Miller11e37f62000-04-08 18:23:30 +10001038
Damien Miller670a4b82000-01-22 13:53:11 +11001039AC_ARG_WITH(catman,
1040 [ --with-catman=man|cat Install preformatted manpages[no]],
1041 [
1042 MANTYPE='$(CATMAN)'
1043 if test x"$withval" != x"yes" ; then
1044 mansubdir=$withval
1045 else
1046 mansubdir=cat
1047 fi
1048 ], [
1049 if test -z "$MANTYPE" ; then
1050 MANTYPE='$(TROFFMAN)'
1051 mansubdir=man
1052 fi
1053 ]
1054)
1055AC_SUBST(MANTYPE)
1056AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001057
Damien Millera22ba012000-03-02 23:09:20 +11001058# Check whether user wants Kerberos support
Damien Miller7b22d652000-06-18 14:07:04 +10001059KRB4_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001060AC_ARG_WITH(kerberos4,
Damien Miller105b7f02000-01-07 08:45:55 +11001061 [ --with-kerberos4=PATH Enable Kerberos 4 support],
Damien Miller80297751999-11-19 13:03:25 +11001062 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001063 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001064
Ben Lindstrom23e13712000-10-29 22:49:19 +00001065 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001066 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Damien Miller105b7f02000-01-07 08:45:55 +11001067 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller29ea30d2000-03-17 10:54:15 +11001068 if test ! -z "$need_dash_r" ; then
1069 LDFLAGS="$LDFLAGS -R${withval}/lib"
1070 fi
1071 if test ! -z "$blibpath" ; then
1072 blibpath="$blibpath:${withval}/lib"
1073 fi
Damien Miller105b7f02000-01-07 08:45:55 +11001074 else
1075 if test -d /usr/include/kerberosIV ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001076 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
Damien Miller105b7f02000-01-07 08:45:55 +11001077 fi
1078 fi
1079
1080 AC_CHECK_HEADERS(krb.h)
1081 AC_CHECK_LIB(krb, main)
1082 if test "$ac_cv_header_krb_h" != yes; then
1083 AC_MSG_WARN([Cannot find krb.h, build may fail])
1084 fi
1085 if test "$ac_cv_lib_krb_main" != yes; then
1086 AC_MSG_WARN([Cannot find libkrb, build may fail])
1087 fi
1088
Damien Millerc85f9b42000-01-29 10:20:21 +11001089 KLIBS="-lkrb -ldes"
Damien Miller105b7f02000-01-07 08:45:55 +11001090 AC_CHECK_LIB(resolv, dn_expand, , )
1091 KRB4=yes
Damien Miller7b22d652000-06-18 14:07:04 +10001092 KRB4_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001093 AC_DEFINE(KRB4)
Damien Miller8bdeee21999-12-30 15:50:54 +11001094 fi
Damien Miller80297751999-11-19 13:03:25 +11001095 ]
1096)
1097
Damien Millera22ba012000-03-02 23:09:20 +11001098# Check whether user wants AFS support
Damien Miller7b22d652000-06-18 14:07:04 +10001099AFS_MSG="no"
Damien Millerc6398ef1999-11-20 12:18:40 +11001100AC_ARG_WITH(afs,
Damien Miller105b7f02000-01-07 08:45:55 +11001101 [ --with-afs=PATH Enable AFS support],
Damien Miller80297751999-11-19 13:03:25 +11001102 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001103 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001104
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001105 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001106 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001107 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller105b7f02000-01-07 08:45:55 +11001108 fi
1109
1110 if test -z "$KRB4" ; then
1111 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1112 fi
1113
Damien Miller8bdeee21999-12-30 15:50:54 +11001114 LIBS="$LIBS -lkafs"
Damien Miller105b7f02000-01-07 08:45:55 +11001115 if test ! -z "$AFS_LIBS" ; then
1116 LIBS="$LIBS $AFS_LIBS"
1117 fi
1118 AC_DEFINE(AFS)
Damien Miller7b22d652000-06-18 14:07:04 +10001119 AFS_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001120 fi
Damien Miller80297751999-11-19 13:03:25 +11001121 ]
1122)
Damien Millerc85f9b42000-01-29 10:20:21 +11001123LIBS="$LIBS $KLIBS"
Damien Miller80297751999-11-19 13:03:25 +11001124
Damien Millera22ba012000-03-02 23:09:20 +11001125# Check whether user wants S/Key support
Damien Miller7b22d652000-06-18 14:07:04 +10001126SKEY_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001127AC_ARG_WITH(skey,
Ben Lindstrom305fb002000-11-10 02:41:30 +00001128 [ --with-skey=PATH Enable S/Key support],
Damien Miller80297751999-11-19 13:03:25 +11001129 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001130 if test "x$withval" != "xno" ; then
Ben Lindstrom305fb002000-11-10 02:41:30 +00001131
1132 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001133 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001134 LDFLAGS="$LDFLAGS -L${withval}/lib"
1135 fi
1136
Damien Miller8bdeee21999-12-30 15:50:54 +11001137 AC_DEFINE(SKEY)
1138 LIBS="$LIBS -lskey"
Damien Miller7b22d652000-06-18 14:07:04 +10001139 SKEY_MSG="yes"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001140
1141 AC_CHECK_FUNC(skey_keyinfo,
1142 [],
1143 [
1144 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1145 ])
Damien Miller8bdeee21999-12-30 15:50:54 +11001146 fi
Damien Miller80297751999-11-19 13:03:25 +11001147 ]
1148)
1149
Damien Millera22ba012000-03-02 23:09:20 +11001150# Check whether user wants TCP wrappers support
Damien Miller7b22d652000-06-18 14:07:04 +10001151TCPW_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001152AC_ARG_WITH(tcp-wrappers,
Damien Miller80297751999-11-19 13:03:25 +11001153 [ --with-tcp-wrappers Enable tcpwrappers support],
1154 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001155 if test "x$withval" != "xno" ; then
Damien Miller65165f82000-03-05 17:02:45 +11001156 saved_LIBS="$LIBS"
Damien Miller105b7f02000-01-07 08:45:55 +11001157 LIBS="$LIBS -lwrap"
Damien Miller65165f82000-03-05 17:02:45 +11001158 AC_MSG_CHECKING(for libwrap)
1159 AC_TRY_LINK(
1160 [
Damien Miller81171112000-04-23 11:14:01 +10001161#include <tcpd.h>
Damien Miller65165f82000-03-05 17:02:45 +11001162 int deny_severity = 0, allow_severity = 0;
1163 ],
1164 [hosts_access(0);],
1165 [
1166 AC_MSG_RESULT(yes)
1167 AC_DEFINE(LIBWRAP)
Damien Miller7b22d652000-06-18 14:07:04 +10001168 TCPW_MSG="yes"
Damien Miller65165f82000-03-05 17:02:45 +11001169 ],
1170 [
Damien Miller7b22d652000-06-18 14:07:04 +10001171 AC_MSG_ERROR([*** libwrap missing])
Damien Miller65165f82000-03-05 17:02:45 +11001172 ]
1173 )
Damien Miller8bdeee21999-12-30 15:50:54 +11001174 fi
Damien Miller80297751999-11-19 13:03:25 +11001175 ]
1176)
1177
Damien Millera22ba012000-03-02 23:09:20 +11001178# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001179MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001180AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001181 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001182 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001183 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001184 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10001185 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001186 fi
1187 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001188)
1189
Damien Millera22ba012000-03-02 23:09:20 +11001190# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11001191AC_ARG_WITH(shadow,
1192 [ --without-shadow Disable shadow password support],
1193 [
1194 if test "x$withval" = "xno" ; then
1195 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10001196 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11001197 fi
1198 ]
1199)
1200
Damien Miller1f335fb2000-06-26 11:31:33 +10001201if test -z "$disable_shadow" ; then
1202 AC_MSG_CHECKING([if the systems has expire shadow information])
1203 AC_TRY_COMPILE(
1204 [
1205#include <sys/types.h>
1206#include <shadow.h>
1207 struct spwd sp;
1208 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1209 [ sp_expire_available=yes ], []
1210 )
1211
1212 if test "x$sp_expire_available" = "xyes" ; then
1213 AC_MSG_RESULT(yes)
1214 AC_DEFINE(HAS_SHADOW_EXPIRE)
1215 else
1216 AC_MSG_RESULT(no)
1217 fi
1218fi
1219
Damien Millera22ba012000-03-02 23:09:20 +11001220# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11001221if test ! -z "$IPADDR_IN_DISPLAY" ; then
1222 DISPLAY_HACK_MSG="yes"
1223 AC_DEFINE(IPADDR_IN_DISPLAY)
1224else
1225 DISPLAY_HACK_MSG="no"
1226 AC_ARG_WITH(ipaddr-display,
1227 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1228 [
1229 if test "x$withval" != "xno" ; then
1230 AC_DEFINE(IPADDR_IN_DISPLAY)
1231 DISPLAY_HACK_MSG="yes"
1232 fi
1233 ]
1234 )
1235fi
Damien Miller76112de1999-12-21 11:18:08 +11001236
Damien Millera22ba012000-03-02 23:09:20 +11001237# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10001238SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11001239AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11001240 [ --with-default-path=PATH Specify default \$PATH environment for server],
1241 [
1242 if test "x$withval" != "xno" ; then
Damien Millere68f92b2000-10-02 21:42:15 +11001243 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
Damien Miller7b22d652000-06-18 14:07:04 +10001244 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11001245 fi
1246 ]
1247)
1248
Damien Millera22ba012000-03-02 23:09:20 +11001249# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10001250IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11001251AC_ARG_WITH(ipv4-default,
1252 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1253 [
1254 if test "x$withval" != "xno" ; then
1255 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10001256 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11001257 fi
1258 ]
1259)
1260
Damien Miller61e50f12000-05-08 20:49:37 +10001261AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001262IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001263AC_ARG_WITH(4in6,
1264 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1265 [
1266 if test "x$withval" != "xno" ; then
1267 AC_MSG_RESULT(yes)
1268 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001269 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001270 else
1271 AC_MSG_RESULT(no)
1272 fi
1273 ],[
1274 if test "x$inet6_default_4in6" = "xyes"; then
1275 AC_MSG_RESULT([yes (default)])
1276 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001277 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001278 else
1279 AC_MSG_RESULT([no (default)])
1280 fi
1281 ]
1282)
1283
Damien Miller78315eb2000-09-29 23:01:36 +11001284AC_MSG_CHECKING(whether to install ssh as suid root)
1285AC_ARG_ENABLE(suid-ssh,
1286[ --enable-suid-ssh Install ssh as suid root (default)
1287 --disable-suid-ssh Install ssh without suid bit],
1288[ case "$enableval" in
1289 no)
1290 AC_MSG_RESULT(no)
1291 SSHMODE=0711
1292 ;;
1293 *) AC_MSG_RESULT(yes)
1294 SSHMODE=04711
1295 ;;
1296 esac ],
1297 AC_MSG_RESULT(yes)
1298 SSHMODE=04711
1299)
1300AC_SUBST(SSHMODE)
1301
1302
Damien Millera22ba012000-03-02 23:09:20 +11001303# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001304piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001305AC_ARG_WITH(pid-dir,
1306 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1307 [
1308 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001309 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001310 fi
1311 ]
1312)
Damien Miller4018c192000-04-30 09:30:44 +10001313
Damien Miller78315eb2000-09-29 23:01:36 +11001314# make sure the directory exists
1315if test ! -d $piddir ; then
1316 piddir=`eval echo ${sysconfdir}`
1317 case $piddir in
1318 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1319 esac
1320fi
1321
Damien Millerdbd250f2000-01-18 08:57:14 +11001322AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001323AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001324
andre2ff7b5d2000-06-03 14:57:40 +00001325dnl allow user to disable some login recording features
1326AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001327 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001328 [ AC_DEFINE(DISABLE_LASTLOG) ]
1329)
1330AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001331 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001332 [ AC_DEFINE(DISABLE_UTMP) ]
1333)
1334AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001335 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001336 [ AC_DEFINE(DISABLE_UTMPX) ]
1337)
1338AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001339 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001340 [ AC_DEFINE(DISABLE_WTMP) ]
1341)
1342AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001343 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001344 [ AC_DEFINE(DISABLE_WTMPX) ]
1345)
1346AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001347 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001348 [ AC_DEFINE(DISABLE_LOGIN) ]
1349)
1350AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001351 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001352 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1353)
1354AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001355 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001356 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1357)
1358AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001359 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
andre2ff7b5d2000-06-03 14:57:40 +00001360 [ conf_lastlog_location="$withval"; ],)
1361
1362dnl lastlog, [uw]tmpx? detection
1363dnl NOTE: set the paths in the platform section to avoid the
1364dnl need for command-line parameters
1365dnl lastlog and [uw]tmp are subject to a file search if all else fails
1366
1367dnl lastlog detection
1368dnl NOTE: the code itself will detect if lastlog is a directory
1369AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1370AC_TRY_COMPILE([
1371#include <sys/types.h>
1372#include <utmp.h>
1373#ifdef HAVE_LASTLOG_H
1374# include <lastlog.h>
1375#endif
Damien Miller2994e082000-06-04 15:51:47 +10001376#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001377# include <paths.h>
1378#endif
1379 ],
1380 [ char *lastlog = LASTLOG_FILE; ],
1381 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001382 [
1383 AC_MSG_RESULT(no)
1384 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1385 AC_TRY_COMPILE([
1386#include <sys/types.h>
1387#include <utmp.h>
1388#ifdef HAVE_LASTLOG_H
1389# include <lastlog.h>
1390#endif
1391#ifdef HAVE_PATHS_H
1392# include <paths.h>
1393#endif
1394 ],
1395 [ char *lastlog = _PATH_LASTLOG; ],
1396 [ AC_MSG_RESULT(yes) ],
1397 [
andree441aa32000-06-12 22:34:38 +00001398 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001399 system_lastlog_path=no
1400 ])
1401 ]
andre2ff7b5d2000-06-03 14:57:40 +00001402)
Damien Miller2994e082000-06-04 15:51:47 +10001403
andre2ff7b5d2000-06-03 14:57:40 +00001404if test -z "$conf_lastlog_location"; then
1405 if test x"$system_lastlog_path" = x"no" ; then
1406 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001407 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001408 conf_lastlog_location=$f
1409 fi
1410 done
1411 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001412 AC_MSG_WARN([** Cannot find lastlog **])
1413 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001414 fi
1415 fi
1416fi
1417
1418if test -n "$conf_lastlog_location"; then
1419 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1420fi
1421
1422dnl utmp detection
1423AC_MSG_CHECKING([if your system defines UTMP_FILE])
1424AC_TRY_COMPILE([
1425#include <sys/types.h>
1426#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001427#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001428# include <paths.h>
1429#endif
1430 ],
1431 [ char *utmp = UTMP_FILE; ],
1432 [ AC_MSG_RESULT(yes) ],
1433 [ AC_MSG_RESULT(no)
1434 system_utmp_path=no ]
1435)
1436if test -z "$conf_utmp_location"; then
1437 if test x"$system_utmp_path" = x"no" ; then
1438 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1439 if test -f $f ; then
1440 conf_utmp_location=$f
1441 fi
1442 done
1443 if test -z "$conf_utmp_location"; then
1444 AC_DEFINE(DISABLE_UTMP)
1445 fi
1446 fi
1447fi
1448if test -n "$conf_utmp_location"; then
1449 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1450fi
1451
1452dnl wtmp detection
1453AC_MSG_CHECKING([if your system defines WTMP_FILE])
1454AC_TRY_COMPILE([
1455#include <sys/types.h>
1456#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001457#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001458# include <paths.h>
1459#endif
1460 ],
1461 [ char *wtmp = WTMP_FILE; ],
1462 [ AC_MSG_RESULT(yes) ],
1463 [ AC_MSG_RESULT(no)
1464 system_wtmp_path=no ]
1465)
1466if test -z "$conf_wtmp_location"; then
1467 if test x"$system_wtmp_path" = x"no" ; then
1468 for f in /usr/adm/wtmp /var/log/wtmp; do
1469 if test -f $f ; then
1470 conf_wtmp_location=$f
1471 fi
1472 done
1473 if test -z "$conf_wtmp_location"; then
1474 AC_DEFINE(DISABLE_WTMP)
1475 fi
1476 fi
1477fi
1478if test -n "$conf_wtmp_location"; then
1479 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1480fi
1481
1482
1483dnl utmpx detection - I don't know any system so perverse as to require
1484dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1485dnl there, though.
1486AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1487AC_TRY_COMPILE([
1488#include <sys/types.h>
1489#include <utmp.h>
1490#ifdef HAVE_UTMPX_H
1491#include <utmpx.h>
1492#endif
Damien Miller2994e082000-06-04 15:51:47 +10001493#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001494# include <paths.h>
1495#endif
1496 ],
1497 [ char *utmpx = UTMPX_FILE; ],
1498 [ AC_MSG_RESULT(yes) ],
1499 [ AC_MSG_RESULT(no)
1500 system_utmpx_path=no ]
1501)
1502if test -z "$conf_utmpx_location"; then
1503 if test x"$system_utmpx_path" = x"no" ; then
1504 AC_DEFINE(DISABLE_UTMPX)
1505 fi
1506else
1507 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1508fi
1509
1510dnl wtmpx detection
1511AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1512AC_TRY_COMPILE([
1513#include <sys/types.h>
1514#include <utmp.h>
1515#ifdef HAVE_UTMPX_H
1516#include <utmpx.h>
1517#endif
Damien Miller2994e082000-06-04 15:51:47 +10001518#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001519# include <paths.h>
1520#endif
1521 ],
1522 [ char *wtmpx = WTMPX_FILE; ],
1523 [ AC_MSG_RESULT(yes) ],
1524 [ AC_MSG_RESULT(no)
1525 system_wtmpx_path=no ]
1526)
1527if test -z "$conf_wtmpx_location"; then
1528 if test x"$system_wtmpx_path" = x"no" ; then
1529 AC_DEFINE(DISABLE_WTMPX)
1530 fi
1531else
1532 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1533fi
1534
Damien Miller4018c192000-04-30 09:30:44 +10001535
1536# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001537entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001538AC_ARG_WITH(entropy-timeout,
1539 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1540 [
1541 if test "x$withval" != "xno" ; then
1542 entropy_timeout=$withval
1543 fi
1544 ]
1545)
1546AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1547
1548
Damien Miller29ea30d2000-03-17 10:54:15 +11001549if test ! -z "$blibpath" ; then
1550 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1551 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1552fi
1553
Damien Millerbac2d8a2000-09-05 16:13:06 +11001554AC_EXEEXT
1555
Damien Miller0437b332000-05-02 09:56:41 +10001556AC_OUTPUT(Makefile ssh_prng_cmds)
1557
Damien Miller7b22d652000-06-18 14:07:04 +10001558# Print summary of options
1559
1560if test x$MANTYPE = x'$(CATMAN)' ; then
1561 MAN_MSG=cat
1562else
1563 MAN_MSG=man
1564fi
1565if test ! -z "$RANDOM_POOL" ; then
1566 RAND_MSG="Device ($RANDOM_POOL)"
1567else
1568 if test ! -z "$EGD_SOCKET" ; then
1569 RAND_MSG="EGD ($EGD_SOCKET)"
1570 else
1571 RAND_MSG="Builtin (timeout $entropy_timeout)"
Damien Miller6f9c3372000-10-25 10:06:04 +11001572 BUILTIN_RNG=1
Damien Miller7b22d652000-06-18 14:07:04 +10001573 fi
1574fi
1575
1576# Someone please show me a better way :)
1577A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1578B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1579C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1580D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00001581E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Damien Miller7b22d652000-06-18 14:07:04 +10001582F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1583G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1584
1585echo ""
1586echo "OpenSSH configured has been configured with the following options."
1587echo " User binaries: $B"
Damien Millere68f92b2000-10-02 21:42:15 +11001588echo " User binaries: $B"
Damien Miller7b22d652000-06-18 14:07:04 +10001589echo " System binaries: $C"
1590echo " Configuration files: $D"
1591echo " Askpass program: $E"
1592echo " Manual pages: $F"
1593echo " PID file: $G"
1594echo " Random number collection: $RAND_MSG"
1595echo " Manpage format: $MAN_MSG"
1596echo " PAM support: ${PAM_MSG}"
1597echo " KerberosIV support: $KRB4_MSG"
1598echo " AFS support: $AFS_MSG"
1599echo " S/KEY support: $SKEY_MSG"
1600echo " TCP Wrappers support: $TCPW_MSG"
1601echo " MD5 password support: $MD5_MSG"
1602echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1603echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1604echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1605
1606echo ""
1607
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001608echo " Host: ${host}"
1609echo " Compiler: ${CC}"
1610echo " Compiler flags: ${CFLAGS}"
1611echo "Preprocessor flags: ${CPPFLAGS}"
1612echo " Linker flags: ${LDFLAGS}"
1613echo " Libraries: ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10001614
1615echo ""
1616
Damien Miller6f9c3372000-10-25 10:06:04 +11001617if test ! -z "$BUILTIN_RNG" ; then
1618 echo "WARNING: you are using the builtin random number collection service."
1619 echo "Please read WARNING.RNG and request that your OS vendor includes"
1620 echo "/dev/random in future versions of their OS."
1621 echo ""
1622fi