blob: 4601cd38baba13f7a7f82c7181e0ee424ac9d41a [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 Miller82cf0ce2000-12-20 13:34:48 +110091 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller5552d7a2000-08-30 09:53:24 +110092 AC_DEFINE(USE_PIPES)
Damien Miller8a1e6a62000-09-16 15:55:52 +110093 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +110094 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +000095 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Damien Miller8a1e6a62000-09-16 15:55:52 +110096 LIBS="$LIBS -lsec"
Damien Miller1bead332000-04-30 00:47:29 +100097 MANTYPE='$(CATMAN)'
98 mansubdir=cat
99 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +1100100*-*-irix5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000101 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000102 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100103 PATH="$PATH:/usr/etc"
Damien Miller07278932000-01-22 14:05:37 +1100104 MANTYPE='$(CATMAN)'
Damien Miller1808f382000-01-06 12:03:12 +1100105 no_libsocket=1
106 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000107 AC_DEFINE(BROKEN_INET_NTOA)
Damien Miller1808f382000-01-06 12:03:12 +1100108 ;;
109*-*-irix6*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000110 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000111 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100112 PATH="$PATH:/usr/etc"
Damien Miller07278932000-01-22 14:05:37 +1100113 MANTYPE='$(CATMAN)'
Damien Miller91606b12000-06-28 08:22:29 +1000114 AC_DEFINE(WITH_IRIX_ARRAY)
115 AC_DEFINE(WITH_IRIX_PROJECT)
116 AC_DEFINE(WITH_IRIX_AUDIT)
Ben Lindstrom4a1d9162000-11-21 10:45:31 +0000117 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
Damien Millerbeb4ba51999-12-28 15:09:35 +1100118 no_libsocket=1
119 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000120 AC_DEFINE(BROKEN_INET_NTOA)
Ben Lindstrom75214f92000-12-01 21:19:51 +0000121 mansubdir=man
Damien Millerbeb4ba51999-12-28 15:09:35 +1100122 ;;
Damien Millerb29ea912000-01-15 14:12:03 +1100123*-*-linux*)
124 no_dev_ptmx=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100125 AC_DEFINE(DONT_TRY_OTHER_AF)
Damien Miller4e997202000-07-09 21:21:52 +1000126 AC_DEFINE(PAM_TTY_KLUDGE)
Damien Miller7bcb0892000-03-11 20:45:40 +1100127 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100128 ;;
Ben Lindstromb5628642000-10-18 00:02:25 +0000129mips-sony-bsd|mips-sony-newsos4)
130 AC_DEFINE(HAVE_NEWS4)
131 SONY=1
132 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
133 AC_MSG_ERROR([*** libiberty missing - please install first ***])
134 )
135 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100136*-*-netbsd*)
Damien Millera22ba012000-03-02 23:09:20 +1100137 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100138 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000139*-next-*)
Damien Miller0f91b4e2000-06-18 15:43:25 +1000140 conf_lastlog_location="/usr/adm/lastlog"
Damien Millere5192fa2000-08-29 14:30:37 +1100141 conf_utmp_location=/etc/utmp
142 conf_wtmp_location=/usr/adm/wtmp
143 MAIL=/usr/spool/mail
Damien Miller0f91b4e2000-06-18 15:43:25 +1000144 AC_DEFINE(HAVE_NEXT)
Ben Lindstromb4df15d2000-10-15 00:17:36 +0000145 AC_DEFINE(BROKEN_REALPATH)
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000146 AC_DEFINE(USE_PIPES)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000147 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000148 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100149*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000150 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller08c788a2000-03-16 07:52:29 +1100151 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
Damien Millera22ba012000-03-02 23:09:20 +1100152 need_dash_r=1
Damien Miller82cf0ce2000-12-20 13:34:48 +1100153 AC_DEFINE(PAM_SUN_CODEBASE)
andre2ff7b5d2000-06-03 14:57:40 +0000154 # hardwire lastlog location (can't detect it on some versions)
155 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000156 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
157 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
158 if test "$sol2ver" -ge 8; then
159 AC_MSG_RESULT(yes)
160 AC_DEFINE(DISABLE_UTMP)
161 AC_DEFINE(DISABLE_WTMP)
162 else
163 AC_MSG_RESULT(no)
164 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100165 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000166*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000167 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000168 AC_CHECK_FUNCS(getpwanam)
Damien Miller82cf0ce2000-12-20 13:34:48 +1100169 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000170 conf_utmp_location=/etc/utmp
171 conf_wtmp_location=/var/adm/wtmp
172 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000173 AC_DEFINE(USE_PIPES)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000174 MANTYPE='$(CATMAN)'
175 mansubdir=cat
Damien Millerdfc83f42000-05-20 15:02:59 +1000176 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000177*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000178 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller2ae714f2000-07-11 09:29:50 +1000179 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
180 MANTYPE='$(CATMAN)'
181 AC_DEFINE(IP_TOS_IS_BROKEN)
182 mansubdir=cat
Damien Millerb2dc28e2000-07-12 09:18:33 +1000183 LIBS="$LIBS -lgen -lnsl -lucb"
Damien Miller2ae714f2000-07-11 09:29:50 +1000184 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100185*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000186 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100187 LDFLAGS="$LDFLAGS -L/usr/local/lib"
188 MANTYPE='$(CATMAN)'
189 mansubdir=cat
190 LIBS="$LIBS -lgen -lsocket -lnsl -lresolv"
191 enable_suid_ssh=no
192 ;;
193*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000194 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100195 LDFLAGS="$LDFLAGS -L/usr/local/lib"
196 MANTYPE='$(CATMAN)'
197 mansubdir=cat
198 LIBS="$LIBS -lgen -lsocket"
199 enable_suid_ssh=no
200 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100201*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000202 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100203 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller0e1cf7c2000-01-26 12:15:30 +1100204 MANTYPE='$(CATMAN)'
205 mansubdir=cat
Damien Miller75b1d102000-01-07 14:01:41 +1100206 LIBS="$LIBS -lgen -lsocket"
207 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100208*-*-sco3.2v4*)
Damien Miller238a9fa2000-08-31 09:20:05 +1100209 AC_DEFINE(USE_PIPES)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000210 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100211 LDFLAGS="$LDFLAGS -L/usr/local/lib"
212 MANTYPE='$(CATMAN)'
213 mansubdir=cat
Ben Lindstrom980754c2000-11-12 00:04:24 +0000214 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
Damien Miller78315eb2000-09-29 23:01:36 +1100215 no_dev_ptmx=1
216 RANLIB=true
217 AC_DEFINE(BROKEN_SYS_TERMIO_H)
218 rsh_path="/usr/bin/rcmd"
219 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000220 AC_DEFINE(DISABLE_SHADOW)
Damien Miller78315eb2000-09-29 23:01:36 +1100221 ;;
222*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000223 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000224 LDFLAGS="$LDFLAGS -L/usr/local/lib"
225 MANTYPE='$(CATMAN)'
226 mansubdir=cat
Ben Lindstrom980754c2000-11-12 00:04:24 +0000227 LIBS="$LIBS -lgen -lsocket -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000228 no_dev_ptmx=1
Damien Miller78315eb2000-09-29 23:01:36 +1100229 rsh_path="/usr/bin/rcmd"
230 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000231 AC_DEFINE(DISABLE_SHADOW)
Damien Millera66626b2000-06-13 18:57:53 +1000232 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000233*-dec-osf*)
234# This is untested
235 if test ! -z "USE_SIA" ; then
236 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
237 if test -f /etc/sia/matrix.conf; then
238 AC_MSG_RESULT(yes)
239 AC_DEFINE(HAVE_OSF_SIA)
240 AC_DEFINE(DISABLE_LOGIN)
241 LIBS="$LIBS -lsecurity -ldb -lm -laud"
242 else
243 AC_MSG_RESULT(no)
244 fi
245 fi
246 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100247esac
248
Damien Millere37bfc12000-06-05 09:37:43 +1000249# Allow user to specify flags
250AC_ARG_WITH(cflags,
251 [ --with-cflags Specify additional flags to pass to compiler],
252 [
253 if test "x$withval" != "xno" ; then
254 CFLAGS="$CFLAGS $withval"
255 fi
256 ]
257)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000258AC_ARG_WITH(cppflags,
259 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
260 [
261 if test "x$withval" != "xno"; then
262 CPPFLAGS="$CPPFLAGS $withval"
263 fi
264 ]
265)
Damien Millere37bfc12000-06-05 09:37:43 +1000266AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000267 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000268 [
269 if test "x$withval" != "xno" ; then
270 LDFLAGS="$LDFLAGS $withval"
271 fi
272 ]
273)
274AC_ARG_WITH(libs,
275 [ --with-libs Specify additional libraries to link with],
276 [
277 if test "x$withval" != "xno" ; then
278 LIBS="$LIBS $withval"
279 fi
280 ]
281)
282
283
Damien Millera22ba012000-03-02 23:09:20 +1100284# Checks for libraries.
Damien Millerab18c411999-11-11 10:40:23 +1100285AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
286AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
Damien Miller6f9c3372000-10-25 10:06:04 +1100287
288AC_CHECK_FUNC(regcomp,
289 [],
290 [
291 AC_CHECK_LIB(pcre, pcre_info,
292 AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
293 ]
294)
Damien Millerab18c411999-11-11 10:40:23 +1100295
Damien Millerbeb4ba51999-12-28 15:09:35 +1100296if test -z "$no_libsocket" ; then
297 AC_CHECK_LIB(nsl, yp_match, , )
298fi
299if test -z "$no_libnsl" ; then
300 AC_CHECK_LIB(socket, main, , )
Damien Miller32b3cf21999-12-26 10:21:48 +1100301fi
Damien Millerab18c411999-11-11 10:40:23 +1100302
Damien Millera22ba012000-03-02 23:09:20 +1100303# Checks for header files.
Kevin Steves2c65ada2000-12-06 22:25:40 +0000304AC_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 +1100305
Damien Millerad833b32000-08-23 10:46:23 +1000306dnl Checks for library functions.
Ben Lindstrom67e21e12000-11-05 09:08:45 +0000307AC_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 +1000308dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000309AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000310dnl Checks for libutil functions
andre2ff7b5d2000-06-03 14:57:40 +0000311AC_CHECK_FUNCS(login logout updwtmp logwtmp)
Damien Millerad833b32000-08-23 10:46:23 +1000312dnl Checks for utmp functions
andre2ff7b5d2000-06-03 14:57:40 +0000313AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent)
314AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000315dnl Checks for utmpx functions
andre2ff7b5d2000-06-03 14:57:40 +0000316AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline )
317AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100318
Damien Miller5fc85652000-07-09 23:53:07 +1000319AC_CHECK_FUNC(getuserattr,
320 [AC_DEFINE(HAVE_GETUSERATTR)],
321 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
322)
323
Damien Miller04f80141999-11-19 15:32:34 +1100324AC_CHECK_FUNC(login,
325 [AC_DEFINE(HAVE_LOGIN)],
326 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
327)
328
329AC_CHECK_FUNC(daemon,
330 [AC_DEFINE(HAVE_DAEMON)],
331 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
332)
333
Damien Miller9fb07e42000-03-05 16:22:59 +1100334AC_CHECK_FUNC(getpagesize,
335 [AC_DEFINE(HAVE_GETPAGESIZE)],
336 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
337)
338
Damien Millercb170cb2000-07-01 16:52:55 +1000339# Check for broken snprintf
340if test "x$ac_cv_func_snprintf" = "xyes" ; then
341 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
342 AC_TRY_RUN(
343 [
344#include <stdio.h>
345int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
346 ],
347 [AC_MSG_RESULT(yes)],
348 [
349 AC_MSG_RESULT(no)
350 AC_DEFINE(BROKEN_SNPRINTF)
351 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
352 ]
353 )
354fi
355
Damien Miller606f8802000-09-16 15:39:56 +1100356AC_FUNC_GETPGRP
357
Damien Miller7b22d652000-06-18 14:07:04 +1000358PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100359AC_ARG_WITH(pam,
360 [ --without-pam Disable PAM support ],
361 [
362 if test "x$withval" = "xno" ; then
363 no_pam=1
364 AC_DEFINE(DISABLE_PAM)
Damien Miller7b22d652000-06-18 14:07:04 +1000365 PAM_MSG="disabled"
Damien Millera22ba012000-03-02 23:09:20 +1100366 fi
367 ]
368)
Damien Milleredb82922000-06-20 13:25:52 +1000369if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100370 AC_CHECK_LIB(dl, dlopen, , )
371 LIBS="$LIBS -lpam"
372
Damien Miller0e65eed2000-05-17 22:16:05 +1000373 AC_CHECK_FUNCS(pam_getenvlist)
Damien Miller1bead332000-04-30 00:47:29 +1000374
Damien Miller1f335fb2000-06-26 11:31:33 +1000375 disable_shadow=yes
376
Damien Miller7b22d652000-06-18 14:07:04 +1000377 PAM_MSG="yes"
378
Damien Millera22ba012000-03-02 23:09:20 +1100379 # Check PAM strerror arguments (old PAM)
380 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
381 AC_TRY_COMPILE(
382 [
Damien Miller81171112000-04-23 11:14:01 +1000383#include <stdlib.h>
384#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100385 ],
386 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
387 [AC_MSG_RESULT(no)],
388 [
389 AC_DEFINE(HAVE_OLD_PAM)
390 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000391 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100392 ]
393 )
394fi
395
396# The big search for OpenSSL
397AC_ARG_WITH(ssl-dir,
398 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
399 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000400 if test "x$withval" != "xno" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100401 tryssldir=$withval
402 fi
403 ]
404)
405
406saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100407saved_LDFLAGS="$LDFLAGS"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000408saved_CPPFLAGS="$CPPFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100409if test "x$prefix" != "xNONE" ; then
410 tryssldir="$tryssldir $prefix"
411fi
Damien Miller61e50f12000-05-08 20:49:37 +1000412AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera22ba012000-03-02 23:09:20 +1100413
Damien Millera1b61e12000-09-16 17:02:16 +1100414 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 +1000415 if test ! -z "$ssldir" ; then
416 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000417 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Miller61e50f12000-05-08 20:49:37 +1000418 if test ! -z "$need_dash_r" ; then
419 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
420 fi
Damien Millera1ad4802000-03-15 10:04:54 +1100421 else
Damien Miller61e50f12000-05-08 20:49:37 +1000422 LDFLAGS="$saved_LDFLAGS"
Damien Millerb85dcad2000-03-11 11:37:00 +1100423 fi
424
Damien Miller3b512e12000-05-17 23:29:18 +1000425 LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000426
Damien Miller3b512e12000-05-17 23:29:18 +1000427 # Basic test to check for compatible version and correct linking
428 # *does not* test for RSA - that comes later.
429 AC_TRY_RUN(
430 [
Damien Millere59ce622000-05-01 20:54:17 +1000431#include <string.h>
432#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000433int main(void)
434{
Damien Miller3b512e12000-05-17 23:29:18 +1000435 char a[2048];
436 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000437 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000438 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000439}
Damien Miller3b512e12000-05-17 23:29:18 +1000440 ],
441 [
442 found_crypto=1
443 break;
444 ], []
445 )
Damien Miller61e50f12000-05-08 20:49:37 +1000446
447 if test ! -z "$found_crypto" ; then
448 break;
449 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100450 done
451
Damien Miller61e50f12000-05-08 20:49:37 +1000452 if test -z "$found_crypto" ; then
453 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
Damien Millerb85dcad2000-03-11 11:37:00 +1100454 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000455 if test -z "$ssldir" ; then
456 ssldir="(system)"
457 fi
Damien Millera22ba012000-03-02 23:09:20 +1100458
Damien Miller61e50f12000-05-08 20:49:37 +1000459 ac_cv_openssldir=$ssldir
460])
461
Damien Milleredb82922000-06-20 13:25:52 +1000462if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000463 AC_DEFINE(HAVE_OPENSSL)
464 dnl Need to recover ssldir - test above runs in subshell
465 ssldir=$ac_cv_openssldir
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000466 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Millera1ad4802000-03-15 10:04:54 +1100467 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
468 if test ! -z "$need_dash_r" ; then
469 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
Damien Millera22ba012000-03-02 23:09:20 +1100470 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100471 if test ! -z "$blibpath" ; then
472 blibpath="$blibpath:$ssldir:$ssldir/lib"
473 fi
Damien Millera22ba012000-03-02 23:09:20 +1100474fi
Damien Miller3b512e12000-05-17 23:29:18 +1000475LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000476
Damien Miller3b512e12000-05-17 23:29:18 +1000477# Now test RSA support
478saved_LIBS="$LIBS"
479AC_MSG_CHECKING([for RSA support])
480for WANTS_RSAREF in "" 1 ; do
481 if test -z "$WANTS_RSAREF" ; then
482 LIBS="$saved_LIBS"
483 else
484 LIBS="$saved_LIBS -lRSAglue -lrsaref"
485 fi
486 AC_TRY_RUN([
487#include <string.h>
488#include <openssl/rand.h>
489#include <openssl/rsa.h>
490#include <openssl/bn.h>
491#include <openssl/sha.h>
492int main(void)
493{
494 int num; RSA *key; static unsigned char p_in[] = "blahblah";
495 unsigned char c[256], p[256];
496 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
497 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
498 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
499 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
500}
501 ],
502 [
503 rsa_works=1
504 break;
505 ], [])
506done
507
508if test ! -z "$no_rsa" ; then
509 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000510 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000511else
512 if test -z "$rsa_works" ; then
513 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000514 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000515 else
516 if test -z "$WANTS_RSAREF" ; then
517 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000518 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000519 else
Damien Miller7b22d652000-06-18 14:07:04 +1000520 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000521 AC_MSG_RESULT(using RSAref)
522 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
523 fi
524 fi
525fi
Damien Millera22ba012000-03-02 23:09:20 +1100526
Ben Lindstromb5628642000-10-18 00:02:25 +0000527# Cheap hack to ensure NEWS-OS libraries are arranged right.
528if test ! -z "$SONY" ; then
529 LIBS="$LIBS -liberty";
530fi
531
Damien Millera22ba012000-03-02 23:09:20 +1100532# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100533AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100534AC_CHECK_SIZEOF(short int, 2)
535AC_CHECK_SIZEOF(int, 4)
536AC_CHECK_SIZEOF(long int, 4)
537AC_CHECK_SIZEOF(long long int, 8)
538
Damien Millera22ba012000-03-02 23:09:20 +1100539# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +1100540AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
541 AC_TRY_COMPILE(
542 [ #include <sys/types.h> ],
543 [ u_int a; a = 1;],
544 [ ac_cv_have_u_int="yes" ],
545 [ ac_cv_have_u_int="no" ]
546 )
547])
548if test "x$ac_cv_have_u_int" = "xyes" ; then
549 AC_DEFINE(HAVE_U_INT)
550 have_u_int=1
551fi
552
Damien Miller61e50f12000-05-08 20:49:37 +1000553AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
554 AC_TRY_COMPILE(
555 [ #include <sys/types.h> ],
556 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
557 [ ac_cv_have_intxx_t="yes" ],
558 [ ac_cv_have_intxx_t="no" ]
559 )
560])
561if test "x$ac_cv_have_intxx_t" = "xyes" ; then
562 AC_DEFINE(HAVE_INTXX_T)
563 have_intxx_t=1
564fi
565
Damien Miller578783e2000-09-23 14:12:24 +1100566AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
567 AC_TRY_COMPILE(
568 [ #include <sys/types.h> ],
569 [ int64_t a; a = 1;],
570 [ ac_cv_have_int64_t="yes" ],
571 [ ac_cv_have_int64_t="no" ]
572 )
573])
574if test "x$ac_cv_have_int64_t" = "xyes" ; then
575 AC_DEFINE(HAVE_INT64_T)
576 have_int64_t=1
577fi
578
Damien Miller61e50f12000-05-08 20:49:37 +1000579AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
580 AC_TRY_COMPILE(
581 [ #include <sys/types.h> ],
582 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
583 [ ac_cv_have_u_intxx_t="yes" ],
584 [ ac_cv_have_u_intxx_t="no" ]
585 )
586])
587if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
588 AC_DEFINE(HAVE_U_INTXX_T)
589 have_u_intxx_t=1
590fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100591
Damien Miller578783e2000-09-23 14:12:24 +1100592AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
593 AC_TRY_COMPILE(
594 [ #include <sys/types.h> ],
595 [ u_int64_t a; a = 1;],
596 [ ac_cv_have_u_int64_t="yes" ],
597 [ ac_cv_have_u_int64_t="no" ]
598 )
599])
600if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
601 AC_DEFINE(HAVE_U_INT64_T)
602 have_u_int64_t=1
603fi
604
Damien Milleredb82922000-06-20 13:25:52 +1000605if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
606 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100607then
608 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
609 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000610 [
611#include <sys/bitypes.h>
612 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100613 [
Damien Miller70494d12000-04-03 15:57:06 +1000614 int8_t a; int16_t b; int32_t c;
615 u_int8_t e; u_int16_t f; u_int32_t g;
616 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100617 ],
618 [
619 AC_DEFINE(HAVE_U_INTXX_T)
620 AC_DEFINE(HAVE_INTXX_T)
621 AC_MSG_RESULT(yes)
622 ],
623 [AC_MSG_RESULT(no)]
624 )
625fi
626
Damien Millerd6121d22000-03-17 23:26:46 +1100627if test -z "$have_u_intxx_t" ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000628 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
629 AC_TRY_COMPILE(
630 [
631#include <sys/types.h>
632 ],
633 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
634 [ ac_cv_have_uintxx_t="yes" ],
635 [ ac_cv_have_uintxx_t="no" ]
636 )
637 ])
638 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
639 AC_DEFINE(HAVE_UINTXX_T)
640 fi
Damien Millerd6121d22000-03-17 23:26:46 +1100641fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100642
Damien Miller61e50f12000-05-08 20:49:37 +1000643AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
644 AC_TRY_COMPILE(
645 [
Damien Miller81171112000-04-23 11:14:01 +1000646#include <sys/types.h>
647#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000648 ],
649 [socklen_t foo; foo = 1235;],
650 [ ac_cv_have_socklen_t="yes" ],
651 [ ac_cv_have_socklen_t="no" ]
652 )
653])
654if test "x$ac_cv_have_socklen_t" = "xyes" ; then
655 AC_DEFINE(HAVE_SOCKLEN_T)
656fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100657
Damien Miller61e50f12000-05-08 20:49:37 +1000658AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
659 AC_TRY_COMPILE(
660 [
661#include <sys/types.h>
662 ],
663 [ size_t foo; foo = 1235; ],
664 [ ac_cv_have_size_t="yes" ],
665 [ ac_cv_have_size_t="no" ]
666 )
667])
668if test "x$ac_cv_have_size_t" = "xyes" ; then
669 AC_DEFINE(HAVE_SIZE_T)
670fi
Damien Miller95058511999-12-29 10:36:45 +1100671
Damien Miller615f9392000-05-17 22:53:33 +1000672AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
673 AC_TRY_COMPILE(
674 [
675#include <sys/types.h>
676 ],
677 [ ssize_t foo; foo = 1235; ],
678 [ ac_cv_have_ssize_t="yes" ],
679 [ ac_cv_have_ssize_t="no" ]
680 )
681])
682if test "x$ac_cv_have_ssize_t" = "xyes" ; then
683 AC_DEFINE(HAVE_SSIZE_T)
684fi
685
Damien Millerb54b40e2000-06-23 08:23:34 +1000686AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
687 AC_TRY_COMPILE(
688 [
689#include <sys/types.h>
690#include <sys/socket.h>
691 ],
692 [ sa_family_t foo; foo = 1235; ],
693 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +1100694 [ AC_TRY_COMPILE(
695 [
696#include <sys/types.h>
697#include <sys/socket.h>
698#include <netinet/in.h>
699 ],
700 [ sa_family_t foo; foo = 1235; ],
701 [ ac_cv_have_sa_family_t="yes" ],
702
Damien Millerb54b40e2000-06-23 08:23:34 +1000703 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +1100704 )]
Damien Millerb54b40e2000-06-23 08:23:34 +1000705 )
706])
707if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
708 AC_DEFINE(HAVE_SA_FAMILY_T)
709fi
710
Damien Miller0f91b4e2000-06-18 15:43:25 +1000711AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
712 AC_TRY_COMPILE(
713 [
714#include <sys/types.h>
715 ],
716 [ pid_t foo; foo = 1235; ],
717 [ ac_cv_have_pid_t="yes" ],
718 [ ac_cv_have_pid_t="no" ]
719 )
720])
721if test "x$ac_cv_have_pid_t" = "xyes" ; then
722 AC_DEFINE(HAVE_PID_T)
723fi
724
725AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
726 AC_TRY_COMPILE(
727 [
728#include <sys/types.h>
729 ],
730 [ mode_t foo; foo = 1235; ],
731 [ ac_cv_have_mode_t="yes" ],
732 [ ac_cv_have_mode_t="no" ]
733 )
734])
735if test "x$ac_cv_have_mode_t" = "xyes" ; then
736 AC_DEFINE(HAVE_MODE_T)
737fi
738
Damien Miller61e50f12000-05-08 20:49:37 +1000739
740AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
741 AC_TRY_COMPILE(
742 [
Damien Miller81171112000-04-23 11:14:01 +1000743#include <sys/types.h>
744#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000745 ],
746 [ struct sockaddr_storage s; ],
747 [ ac_cv_have_struct_sockaddr_storage="yes" ],
748 [ ac_cv_have_struct_sockaddr_storage="no" ]
749 )
750])
751if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
752 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
753fi
Damien Miller34132e52000-01-14 15:45:46 +1100754
Damien Miller61e50f12000-05-08 20:49:37 +1000755AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
756 AC_TRY_COMPILE(
757 [
Damien Miller7b22d652000-06-18 14:07:04 +1000758#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000759#include <netinet/in.h>
760 ],
761 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
762 [ ac_cv_have_struct_sockaddr_in6="yes" ],
763 [ ac_cv_have_struct_sockaddr_in6="no" ]
764 )
765])
766if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
767 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
768fi
Damien Miller34132e52000-01-14 15:45:46 +1100769
Damien Miller61e50f12000-05-08 20:49:37 +1000770AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
771 AC_TRY_COMPILE(
772 [
Damien Miller7b22d652000-06-18 14:07:04 +1000773#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000774#include <netinet/in.h>
775 ],
776 [ struct in6_addr s; s.s6_addr[0] = 0; ],
777 [ ac_cv_have_struct_in6_addr="yes" ],
778 [ ac_cv_have_struct_in6_addr="no" ]
779 )
780])
781if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
782 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
783fi
Damien Miller34132e52000-01-14 15:45:46 +1100784
Damien Miller61e50f12000-05-08 20:49:37 +1000785AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
786 AC_TRY_COMPILE(
787 [
Damien Miller81171112000-04-23 11:14:01 +1000788#include <sys/types.h>
789#include <sys/socket.h>
790#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000791 ],
792 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
793 [ ac_cv_have_struct_addrinfo="yes" ],
794 [ ac_cv_have_struct_addrinfo="no" ]
795 )
796])
797if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
798 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
799fi
800
Damien Miller78315eb2000-09-29 23:01:36 +1100801dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +1000802OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
803OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
804OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
805OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
806OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +1000807OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000808OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
809OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +1000810OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000811OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
812OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
813OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
814OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +0000815OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
816OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
817OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
818OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Damien Miller78315eb2000-09-29 23:01:36 +1100819AC_STRUCT_ST_BLKSIZE
andre2ff7b5d2000-06-03 14:57:40 +0000820
Damien Miller942da032000-08-18 13:59:06 +1000821AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
822 ac_cv_have_sun_len_in_struct_sockaddr_un, [
823 AC_TRY_COMPILE(
824 [
825#include <sys/types.h>
826#include <sys/socket.h>
827 ],
828 [ struct sockaddr_un s; s.sun_len = 1; ],
829 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
830 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
831 )
832])
833if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
834 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
835fi
836
Damien Miller61e50f12000-05-08 20:49:37 +1000837AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
838 ac_cv_have_ss_family_in_struct_ss, [
839 AC_TRY_COMPILE(
840 [
Damien Miller81171112000-04-23 11:14:01 +1000841#include <sys/types.h>
842#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000843 ],
844 [ struct sockaddr_storage s; s.ss_family = 1; ],
845 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
846 [ ac_cv_have_ss_family_in_struct_ss="no" ],
847 )
848])
849if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
850 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
851fi
852
Damien Miller61e50f12000-05-08 20:49:37 +1000853AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
854 ac_cv_have___ss_family_in_struct_ss, [
855 AC_TRY_COMPILE(
856 [
Damien Miller81171112000-04-23 11:14:01 +1000857#include <sys/types.h>
858#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000859 ],
860 [ struct sockaddr_storage s; s.__ss_family = 1; ],
861 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
862 [ ac_cv_have___ss_family_in_struct_ss="no" ]
863 )
864])
865if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
866 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
867fi
Damien Millerbf1c9b21999-12-09 10:16:54 +1100868
Damien Millerad833b32000-08-23 10:46:23 +1000869AC_CACHE_CHECK([for pw_class field in struct passwd],
870 ac_cv_have_pw_class_in_struct_passwd, [
871 AC_TRY_COMPILE(
872 [
Damien Millerad833b32000-08-23 10:46:23 +1000873#include <pwd.h>
874 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +0000875 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +1000876 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
877 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
878 )
879])
880if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
881 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
882fi
883
Damien Miller61e50f12000-05-08 20:49:37 +1000884
885AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
886 AC_TRY_LINK([],
887 [ extern char *__progname; printf("%s", __progname); ],
888 [ ac_cv_libc_defines___progname="yes" ],
889 [ ac_cv_libc_defines___progname="no" ]
890 )
891])
892if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
893 AC_DEFINE(HAVE___PROGNAME)
894fi
895
Damien Millera22ba012000-03-02 23:09:20 +1100896
Damien Millerecbb26d2000-07-15 14:59:14 +1000897AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
898 AC_TRY_LINK([],
899 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
900 [ ac_cv_libc_defines_sys_errlist="yes" ],
901 [ ac_cv_libc_defines_sys_errlist="no" ]
902 )
903])
904if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
905 AC_DEFINE(HAVE_SYS_ERRLIST)
906fi
907
908
Damien Miller11fa2cc2000-08-16 10:35:58 +1000909AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
910 AC_TRY_LINK([],
911 [ extern int sys_nerr; printf("%i", sys_nerr);],
912 [ ac_cv_libc_defines_sys_nerr="yes" ],
913 [ ac_cv_libc_defines_sys_nerr="no" ]
914 )
915])
916if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
917 AC_DEFINE(HAVE_SYS_NERR)
918fi
919
920
Damien Millera22ba012000-03-02 23:09:20 +1100921# Looking for programs, paths and files
922AC_ARG_WITH(rsh,
923 [ --with-rsh=PATH Specify path to remote shell program ],
924 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100925 if test "x$withval" != "$no" ; then
Damien Miller90dcc052000-07-08 10:17:40 +1000926 rsh_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100927 fi
928 ],
929 [
930 AC_PATH_PROG(rsh_path, rsh)
931 ]
932)
933
934AC_ARG_WITH(xauth,
935 [ --with-xauth=PATH Specify path to xauth program ],
936 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000937 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000938 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100939 fi
940 ],
941 [
Damien Miller78315eb2000-09-29 23:01:36 +1100942 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 +1000943 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100944 xauth_path="/usr/openwin/bin/xauth"
945 fi
946 ]
947)
948
Damien Millera19cf472000-11-29 13:28:50 +1100949if test -z "$xauth_path" ; then
950 XAUTH_PATH="undefined"
951 AC_SUBST(XAUTH_PATH)
952else
Damien Millera22ba012000-03-02 23:09:20 +1100953 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +1100954 XAUTH_PATH=$xauth_path
955 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +1100956fi
957if test ! -z "$rsh_path" ; then
958 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
959fi
960
961# Check for mail directory (last resort if we cannot get it from headers)
962if test ! -z "$MAIL" ; then
963 maildir=`dirname $MAIL`
964 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
965fi
966
Damien Millera22ba012000-03-02 23:09:20 +1100967if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +1100968 AC_CHECK_FILE("/dev/ptmx",
969 [
970 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
971 have_dev_ptmx=1
972 ]
973 )
Damien Millera22ba012000-03-02 23:09:20 +1100974fi
Damien Miller204ad072000-03-02 23:56:12 +1100975AC_CHECK_FILE("/dev/ptc",
976 [
977 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
978 have_dev_ptc=1
979 ]
980)
981
Damien Millera22ba012000-03-02 23:09:20 +1100982# Options from here on. Some of these are preset by platform above
983
Damien Millera22ba012000-03-02 23:09:20 +1100984# Check for user-specified random device, otherwise check /dev/urandom
985AC_ARG_WITH(random,
986 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
987 [
Damien Miller040f3832000-04-03 14:50:43 +1000988 if test "x$withval" != "xno" ; then
989 RANDOM_POOL="$withval";
990 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
991 fi
Damien Millera22ba012000-03-02 23:09:20 +1100992 ],
993 [
994 # Check for random device
995 AC_CHECK_FILE("/dev/urandom",
996 [
997 RANDOM_POOL="/dev/urandom";
998 AC_SUBST(RANDOM_POOL)
999 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1000 ]
1001 )
1002 ]
1003)
1004
1005# Check for EGD pool file
1006AC_ARG_WITH(egd-pool,
1007 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1008 [
Damien Miller040f3832000-04-03 14:50:43 +10001009 if test "x$withval" != "xno" ; then
1010 EGD_SOCKET="$withval";
1011 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1012 fi
Damien Millera22ba012000-03-02 23:09:20 +11001013 ]
1014)
1015
Damien Miller0437b332000-05-02 09:56:41 +10001016# detect pathnames for entropy gathering commands, if we need them
1017INSTALL_SSH_PRNG_CMDS=""
1018rm -f prng_commands
Damien Milleredb82922000-06-20 13:25:52 +10001019if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
Damien Miller11e37f62000-04-08 18:23:30 +10001020 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +10001021 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1022 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1023 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1024 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1025 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1026 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1027 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1028 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1029 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1030 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1031 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1032 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1033 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1034 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1035 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
Damien Miller0437b332000-05-02 09:56:41 +10001036
1037 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +10001038fi
Damien Miller0437b332000-05-02 09:56:41 +10001039AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1040
Damien Miller11e37f62000-04-08 18:23:30 +10001041
Damien Miller670a4b82000-01-22 13:53:11 +11001042AC_ARG_WITH(catman,
1043 [ --with-catman=man|cat Install preformatted manpages[no]],
1044 [
1045 MANTYPE='$(CATMAN)'
1046 if test x"$withval" != x"yes" ; then
1047 mansubdir=$withval
1048 else
1049 mansubdir=cat
1050 fi
1051 ], [
1052 if test -z "$MANTYPE" ; then
1053 MANTYPE='$(TROFFMAN)'
1054 mansubdir=man
1055 fi
1056 ]
1057)
1058AC_SUBST(MANTYPE)
1059AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001060
Damien Millera22ba012000-03-02 23:09:20 +11001061# Check whether user wants Kerberos support
Damien Miller7b22d652000-06-18 14:07:04 +10001062KRB4_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001063AC_ARG_WITH(kerberos4,
Damien Miller105b7f02000-01-07 08:45:55 +11001064 [ --with-kerberos4=PATH Enable Kerberos 4 support],
Damien Miller80297751999-11-19 13:03:25 +11001065 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001066 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001067
Ben Lindstrom23e13712000-10-29 22:49:19 +00001068 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001069 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Damien Miller105b7f02000-01-07 08:45:55 +11001070 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller29ea30d2000-03-17 10:54:15 +11001071 if test ! -z "$need_dash_r" ; then
1072 LDFLAGS="$LDFLAGS -R${withval}/lib"
1073 fi
1074 if test ! -z "$blibpath" ; then
1075 blibpath="$blibpath:${withval}/lib"
1076 fi
Damien Miller105b7f02000-01-07 08:45:55 +11001077 else
1078 if test -d /usr/include/kerberosIV ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001079 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
Damien Miller105b7f02000-01-07 08:45:55 +11001080 fi
1081 fi
1082
1083 AC_CHECK_HEADERS(krb.h)
1084 AC_CHECK_LIB(krb, main)
1085 if test "$ac_cv_header_krb_h" != yes; then
1086 AC_MSG_WARN([Cannot find krb.h, build may fail])
1087 fi
1088 if test "$ac_cv_lib_krb_main" != yes; then
1089 AC_MSG_WARN([Cannot find libkrb, build may fail])
1090 fi
1091
Damien Millerc85f9b42000-01-29 10:20:21 +11001092 KLIBS="-lkrb -ldes"
Damien Miller105b7f02000-01-07 08:45:55 +11001093 AC_CHECK_LIB(resolv, dn_expand, , )
1094 KRB4=yes
Damien Miller7b22d652000-06-18 14:07:04 +10001095 KRB4_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001096 AC_DEFINE(KRB4)
Damien Miller8bdeee21999-12-30 15:50:54 +11001097 fi
Damien Miller80297751999-11-19 13:03:25 +11001098 ]
1099)
1100
Damien Millera22ba012000-03-02 23:09:20 +11001101# Check whether user wants AFS support
Damien Miller7b22d652000-06-18 14:07:04 +10001102AFS_MSG="no"
Damien Millerc6398ef1999-11-20 12:18:40 +11001103AC_ARG_WITH(afs,
Damien Miller105b7f02000-01-07 08:45:55 +11001104 [ --with-afs=PATH Enable AFS support],
Damien Miller80297751999-11-19 13:03:25 +11001105 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001106 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001107
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001108 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001109 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001110 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller105b7f02000-01-07 08:45:55 +11001111 fi
1112
1113 if test -z "$KRB4" ; then
1114 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1115 fi
1116
Damien Miller8bdeee21999-12-30 15:50:54 +11001117 LIBS="$LIBS -lkafs"
Damien Miller105b7f02000-01-07 08:45:55 +11001118 if test ! -z "$AFS_LIBS" ; then
1119 LIBS="$LIBS $AFS_LIBS"
1120 fi
1121 AC_DEFINE(AFS)
Damien Miller7b22d652000-06-18 14:07:04 +10001122 AFS_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001123 fi
Damien Miller80297751999-11-19 13:03:25 +11001124 ]
1125)
Damien Millerc85f9b42000-01-29 10:20:21 +11001126LIBS="$LIBS $KLIBS"
Damien Miller80297751999-11-19 13:03:25 +11001127
Damien Millera22ba012000-03-02 23:09:20 +11001128# Check whether user wants S/Key support
Damien Miller7b22d652000-06-18 14:07:04 +10001129SKEY_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001130AC_ARG_WITH(skey,
Ben Lindstrom305fb002000-11-10 02:41:30 +00001131 [ --with-skey=PATH Enable S/Key support],
Damien Miller80297751999-11-19 13:03:25 +11001132 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001133 if test "x$withval" != "xno" ; then
Ben Lindstrom305fb002000-11-10 02:41:30 +00001134
1135 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001136 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001137 LDFLAGS="$LDFLAGS -L${withval}/lib"
1138 fi
1139
Damien Miller8bdeee21999-12-30 15:50:54 +11001140 AC_DEFINE(SKEY)
1141 LIBS="$LIBS -lskey"
Damien Miller7b22d652000-06-18 14:07:04 +10001142 SKEY_MSG="yes"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001143
1144 AC_CHECK_FUNC(skey_keyinfo,
1145 [],
1146 [
1147 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1148 ])
Damien Miller8bdeee21999-12-30 15:50:54 +11001149 fi
Damien Miller80297751999-11-19 13:03:25 +11001150 ]
1151)
1152
Damien Millera22ba012000-03-02 23:09:20 +11001153# Check whether user wants TCP wrappers support
Damien Miller7b22d652000-06-18 14:07:04 +10001154TCPW_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001155AC_ARG_WITH(tcp-wrappers,
Damien Miller80297751999-11-19 13:03:25 +11001156 [ --with-tcp-wrappers Enable tcpwrappers support],
1157 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001158 if test "x$withval" != "xno" ; then
Damien Miller65165f82000-03-05 17:02:45 +11001159 saved_LIBS="$LIBS"
Damien Miller105b7f02000-01-07 08:45:55 +11001160 LIBS="$LIBS -lwrap"
Damien Miller65165f82000-03-05 17:02:45 +11001161 AC_MSG_CHECKING(for libwrap)
1162 AC_TRY_LINK(
1163 [
Damien Miller81171112000-04-23 11:14:01 +10001164#include <tcpd.h>
Damien Miller65165f82000-03-05 17:02:45 +11001165 int deny_severity = 0, allow_severity = 0;
1166 ],
1167 [hosts_access(0);],
1168 [
1169 AC_MSG_RESULT(yes)
1170 AC_DEFINE(LIBWRAP)
Damien Miller7b22d652000-06-18 14:07:04 +10001171 TCPW_MSG="yes"
Damien Miller65165f82000-03-05 17:02:45 +11001172 ],
1173 [
Damien Miller7b22d652000-06-18 14:07:04 +10001174 AC_MSG_ERROR([*** libwrap missing])
Damien Miller65165f82000-03-05 17:02:45 +11001175 ]
1176 )
Damien Miller8bdeee21999-12-30 15:50:54 +11001177 fi
Damien Miller80297751999-11-19 13:03:25 +11001178 ]
1179)
1180
Damien Millera22ba012000-03-02 23:09:20 +11001181# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001182MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001183AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001184 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001185 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001186 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001187 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10001188 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001189 fi
1190 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001191)
1192
Damien Millera22ba012000-03-02 23:09:20 +11001193# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11001194AC_ARG_WITH(shadow,
1195 [ --without-shadow Disable shadow password support],
1196 [
1197 if test "x$withval" = "xno" ; then
1198 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10001199 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11001200 fi
1201 ]
1202)
1203
Damien Miller1f335fb2000-06-26 11:31:33 +10001204if test -z "$disable_shadow" ; then
1205 AC_MSG_CHECKING([if the systems has expire shadow information])
1206 AC_TRY_COMPILE(
1207 [
1208#include <sys/types.h>
1209#include <shadow.h>
1210 struct spwd sp;
1211 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1212 [ sp_expire_available=yes ], []
1213 )
1214
1215 if test "x$sp_expire_available" = "xyes" ; then
1216 AC_MSG_RESULT(yes)
1217 AC_DEFINE(HAS_SHADOW_EXPIRE)
1218 else
1219 AC_MSG_RESULT(no)
1220 fi
1221fi
1222
Damien Millera22ba012000-03-02 23:09:20 +11001223# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11001224if test ! -z "$IPADDR_IN_DISPLAY" ; then
1225 DISPLAY_HACK_MSG="yes"
1226 AC_DEFINE(IPADDR_IN_DISPLAY)
1227else
1228 DISPLAY_HACK_MSG="no"
1229 AC_ARG_WITH(ipaddr-display,
1230 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1231 [
1232 if test "x$withval" != "xno" ; then
1233 AC_DEFINE(IPADDR_IN_DISPLAY)
1234 DISPLAY_HACK_MSG="yes"
1235 fi
1236 ]
1237 )
1238fi
Damien Miller76112de1999-12-21 11:18:08 +11001239
Damien Millera22ba012000-03-02 23:09:20 +11001240# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10001241SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11001242AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11001243 [ --with-default-path=PATH Specify default \$PATH environment for server],
1244 [
1245 if test "x$withval" != "xno" ; then
Damien Millere68f92b2000-10-02 21:42:15 +11001246 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
Damien Miller7b22d652000-06-18 14:07:04 +10001247 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11001248 fi
1249 ]
1250)
1251
Damien Millera22ba012000-03-02 23:09:20 +11001252# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10001253IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11001254AC_ARG_WITH(ipv4-default,
1255 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1256 [
1257 if test "x$withval" != "xno" ; then
1258 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10001259 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11001260 fi
1261 ]
1262)
1263
Damien Miller61e50f12000-05-08 20:49:37 +10001264AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001265IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001266AC_ARG_WITH(4in6,
1267 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1268 [
1269 if test "x$withval" != "xno" ; then
1270 AC_MSG_RESULT(yes)
1271 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001272 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001273 else
1274 AC_MSG_RESULT(no)
1275 fi
1276 ],[
1277 if test "x$inet6_default_4in6" = "xyes"; then
1278 AC_MSG_RESULT([yes (default)])
1279 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001280 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001281 else
1282 AC_MSG_RESULT([no (default)])
1283 fi
1284 ]
1285)
1286
Damien Miller78315eb2000-09-29 23:01:36 +11001287AC_MSG_CHECKING(whether to install ssh as suid root)
1288AC_ARG_ENABLE(suid-ssh,
1289[ --enable-suid-ssh Install ssh as suid root (default)
1290 --disable-suid-ssh Install ssh without suid bit],
1291[ case "$enableval" in
1292 no)
1293 AC_MSG_RESULT(no)
1294 SSHMODE=0711
1295 ;;
1296 *) AC_MSG_RESULT(yes)
1297 SSHMODE=04711
1298 ;;
1299 esac ],
1300 AC_MSG_RESULT(yes)
1301 SSHMODE=04711
1302)
1303AC_SUBST(SSHMODE)
1304
1305
Damien Millera22ba012000-03-02 23:09:20 +11001306# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001307piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001308AC_ARG_WITH(pid-dir,
1309 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1310 [
1311 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001312 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001313 fi
1314 ]
1315)
Damien Miller4018c192000-04-30 09:30:44 +10001316
Damien Miller78315eb2000-09-29 23:01:36 +11001317# make sure the directory exists
1318if test ! -d $piddir ; then
1319 piddir=`eval echo ${sysconfdir}`
1320 case $piddir in
1321 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1322 esac
1323fi
1324
Damien Millerdbd250f2000-01-18 08:57:14 +11001325AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001326AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001327
andre2ff7b5d2000-06-03 14:57:40 +00001328dnl allow user to disable some login recording features
1329AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001330 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001331 [ AC_DEFINE(DISABLE_LASTLOG) ]
1332)
1333AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001334 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001335 [ AC_DEFINE(DISABLE_UTMP) ]
1336)
1337AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001338 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001339 [ AC_DEFINE(DISABLE_UTMPX) ]
1340)
1341AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001342 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001343 [ AC_DEFINE(DISABLE_WTMP) ]
1344)
1345AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001346 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001347 [ AC_DEFINE(DISABLE_WTMPX) ]
1348)
1349AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001350 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001351 [ AC_DEFINE(DISABLE_LOGIN) ]
1352)
1353AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001354 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001355 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1356)
1357AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001358 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001359 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1360)
1361AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001362 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
andre2ff7b5d2000-06-03 14:57:40 +00001363 [ conf_lastlog_location="$withval"; ],)
1364
1365dnl lastlog, [uw]tmpx? detection
1366dnl NOTE: set the paths in the platform section to avoid the
1367dnl need for command-line parameters
1368dnl lastlog and [uw]tmp are subject to a file search if all else fails
1369
1370dnl lastlog detection
1371dnl NOTE: the code itself will detect if lastlog is a directory
1372AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1373AC_TRY_COMPILE([
1374#include <sys/types.h>
1375#include <utmp.h>
1376#ifdef HAVE_LASTLOG_H
1377# include <lastlog.h>
1378#endif
Damien Miller2994e082000-06-04 15:51:47 +10001379#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001380# include <paths.h>
1381#endif
1382 ],
1383 [ char *lastlog = LASTLOG_FILE; ],
1384 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001385 [
1386 AC_MSG_RESULT(no)
1387 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1388 AC_TRY_COMPILE([
1389#include <sys/types.h>
1390#include <utmp.h>
1391#ifdef HAVE_LASTLOG_H
1392# include <lastlog.h>
1393#endif
1394#ifdef HAVE_PATHS_H
1395# include <paths.h>
1396#endif
1397 ],
1398 [ char *lastlog = _PATH_LASTLOG; ],
1399 [ AC_MSG_RESULT(yes) ],
1400 [
andree441aa32000-06-12 22:34:38 +00001401 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001402 system_lastlog_path=no
1403 ])
1404 ]
andre2ff7b5d2000-06-03 14:57:40 +00001405)
Damien Miller2994e082000-06-04 15:51:47 +10001406
andre2ff7b5d2000-06-03 14:57:40 +00001407if test -z "$conf_lastlog_location"; then
1408 if test x"$system_lastlog_path" = x"no" ; then
1409 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001410 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001411 conf_lastlog_location=$f
1412 fi
1413 done
1414 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001415 AC_MSG_WARN([** Cannot find lastlog **])
1416 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001417 fi
1418 fi
1419fi
1420
1421if test -n "$conf_lastlog_location"; then
1422 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1423fi
1424
1425dnl utmp detection
1426AC_MSG_CHECKING([if your system defines UTMP_FILE])
1427AC_TRY_COMPILE([
1428#include <sys/types.h>
1429#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001430#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001431# include <paths.h>
1432#endif
1433 ],
1434 [ char *utmp = UTMP_FILE; ],
1435 [ AC_MSG_RESULT(yes) ],
1436 [ AC_MSG_RESULT(no)
1437 system_utmp_path=no ]
1438)
1439if test -z "$conf_utmp_location"; then
1440 if test x"$system_utmp_path" = x"no" ; then
1441 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1442 if test -f $f ; then
1443 conf_utmp_location=$f
1444 fi
1445 done
1446 if test -z "$conf_utmp_location"; then
1447 AC_DEFINE(DISABLE_UTMP)
1448 fi
1449 fi
1450fi
1451if test -n "$conf_utmp_location"; then
1452 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1453fi
1454
1455dnl wtmp detection
1456AC_MSG_CHECKING([if your system defines WTMP_FILE])
1457AC_TRY_COMPILE([
1458#include <sys/types.h>
1459#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001460#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001461# include <paths.h>
1462#endif
1463 ],
1464 [ char *wtmp = WTMP_FILE; ],
1465 [ AC_MSG_RESULT(yes) ],
1466 [ AC_MSG_RESULT(no)
1467 system_wtmp_path=no ]
1468)
1469if test -z "$conf_wtmp_location"; then
1470 if test x"$system_wtmp_path" = x"no" ; then
1471 for f in /usr/adm/wtmp /var/log/wtmp; do
1472 if test -f $f ; then
1473 conf_wtmp_location=$f
1474 fi
1475 done
1476 if test -z "$conf_wtmp_location"; then
1477 AC_DEFINE(DISABLE_WTMP)
1478 fi
1479 fi
1480fi
1481if test -n "$conf_wtmp_location"; then
1482 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1483fi
1484
1485
1486dnl utmpx detection - I don't know any system so perverse as to require
1487dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1488dnl there, though.
1489AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1490AC_TRY_COMPILE([
1491#include <sys/types.h>
1492#include <utmp.h>
1493#ifdef HAVE_UTMPX_H
1494#include <utmpx.h>
1495#endif
Damien Miller2994e082000-06-04 15:51:47 +10001496#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001497# include <paths.h>
1498#endif
1499 ],
1500 [ char *utmpx = UTMPX_FILE; ],
1501 [ AC_MSG_RESULT(yes) ],
1502 [ AC_MSG_RESULT(no)
1503 system_utmpx_path=no ]
1504)
1505if test -z "$conf_utmpx_location"; then
1506 if test x"$system_utmpx_path" = x"no" ; then
1507 AC_DEFINE(DISABLE_UTMPX)
1508 fi
1509else
1510 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1511fi
1512
1513dnl wtmpx detection
1514AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1515AC_TRY_COMPILE([
1516#include <sys/types.h>
1517#include <utmp.h>
1518#ifdef HAVE_UTMPX_H
1519#include <utmpx.h>
1520#endif
Damien Miller2994e082000-06-04 15:51:47 +10001521#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001522# include <paths.h>
1523#endif
1524 ],
1525 [ char *wtmpx = WTMPX_FILE; ],
1526 [ AC_MSG_RESULT(yes) ],
1527 [ AC_MSG_RESULT(no)
1528 system_wtmpx_path=no ]
1529)
1530if test -z "$conf_wtmpx_location"; then
1531 if test x"$system_wtmpx_path" = x"no" ; then
1532 AC_DEFINE(DISABLE_WTMPX)
1533 fi
1534else
1535 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1536fi
1537
Damien Miller4018c192000-04-30 09:30:44 +10001538
1539# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001540entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001541AC_ARG_WITH(entropy-timeout,
1542 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1543 [
1544 if test "x$withval" != "xno" ; then
1545 entropy_timeout=$withval
1546 fi
1547 ]
1548)
1549AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1550
1551
Damien Miller29ea30d2000-03-17 10:54:15 +11001552if test ! -z "$blibpath" ; then
1553 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1554 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1555fi
1556
Damien Millerbac2d8a2000-09-05 16:13:06 +11001557AC_EXEEXT
1558
Damien Miller0437b332000-05-02 09:56:41 +10001559AC_OUTPUT(Makefile ssh_prng_cmds)
1560
Damien Miller7b22d652000-06-18 14:07:04 +10001561# Print summary of options
1562
1563if test x$MANTYPE = x'$(CATMAN)' ; then
1564 MAN_MSG=cat
1565else
1566 MAN_MSG=man
1567fi
1568if test ! -z "$RANDOM_POOL" ; then
1569 RAND_MSG="Device ($RANDOM_POOL)"
1570else
1571 if test ! -z "$EGD_SOCKET" ; then
1572 RAND_MSG="EGD ($EGD_SOCKET)"
1573 else
1574 RAND_MSG="Builtin (timeout $entropy_timeout)"
Damien Miller6f9c3372000-10-25 10:06:04 +11001575 BUILTIN_RNG=1
Damien Miller7b22d652000-06-18 14:07:04 +10001576 fi
1577fi
1578
1579# Someone please show me a better way :)
1580A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1581B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1582C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1583D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00001584E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Damien Miller7b22d652000-06-18 14:07:04 +10001585F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1586G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1587
1588echo ""
1589echo "OpenSSH configured has been configured with the following options."
1590echo " User binaries: $B"
Damien Millere68f92b2000-10-02 21:42:15 +11001591echo " User binaries: $B"
Damien Miller7b22d652000-06-18 14:07:04 +10001592echo " System binaries: $C"
1593echo " Configuration files: $D"
1594echo " Askpass program: $E"
1595echo " Manual pages: $F"
1596echo " PID file: $G"
1597echo " Random number collection: $RAND_MSG"
1598echo " Manpage format: $MAN_MSG"
1599echo " PAM support: ${PAM_MSG}"
1600echo " KerberosIV support: $KRB4_MSG"
1601echo " AFS support: $AFS_MSG"
1602echo " S/KEY support: $SKEY_MSG"
1603echo " TCP Wrappers support: $TCPW_MSG"
1604echo " MD5 password support: $MD5_MSG"
1605echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1606echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1607echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1608
1609echo ""
1610
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001611echo " Host: ${host}"
1612echo " Compiler: ${CC}"
1613echo " Compiler flags: ${CFLAGS}"
1614echo "Preprocessor flags: ${CPPFLAGS}"
1615echo " Linker flags: ${LDFLAGS}"
1616echo " Libraries: ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10001617
1618echo ""
1619
Damien Miller82cf0ce2000-12-20 13:34:48 +11001620if test "x$PAM_MSG" = "xyes" ; then
1621 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
1622 echo "otherwise password authentication may fail. Example PAM control files"
1623 echo "can be found in the contrib/ subdirectory"
1624 echo ""
1625fi
1626
Damien Miller6f9c3372000-10-25 10:06:04 +11001627if test ! -z "$BUILTIN_RNG" ; then
1628 echo "WARNING: you are using the builtin random number collection service."
1629 echo "Please read WARNING.RNG and request that your OS vendor includes"
1630 echo "/dev/random in future versions of their OS."
1631 echo ""
1632fi