blob: 08cd9e125a1bad419908d944365624d5b6635c58 [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"
Ben Lindstrom5adbad22000-12-27 07:06:21 +0000148 CFLAGS="$CFLAGS \${CPPFLAGS}"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000149 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100150*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000151 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller08c788a2000-03-16 07:52:29 +1100152 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
Damien Millera22ba012000-03-02 23:09:20 +1100153 need_dash_r=1
Damien Miller82cf0ce2000-12-20 13:34:48 +1100154 AC_DEFINE(PAM_SUN_CODEBASE)
andre2ff7b5d2000-06-03 14:57:40 +0000155 # hardwire lastlog location (can't detect it on some versions)
156 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000157 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
158 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
159 if test "$sol2ver" -ge 8; then
160 AC_MSG_RESULT(yes)
161 AC_DEFINE(DISABLE_UTMP)
162 AC_DEFINE(DISABLE_WTMP)
163 else
164 AC_MSG_RESULT(no)
165 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100166 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000167*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000168 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000169 AC_CHECK_FUNCS(getpwanam)
Damien Miller82cf0ce2000-12-20 13:34:48 +1100170 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000171 conf_utmp_location=/etc/utmp
172 conf_wtmp_location=/var/adm/wtmp
173 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000174 AC_DEFINE(USE_PIPES)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000175 MANTYPE='$(CATMAN)'
176 mansubdir=cat
Damien Millerdfc83f42000-05-20 15:02:59 +1000177 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000178*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000179 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller2ae714f2000-07-11 09:29:50 +1000180 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
181 MANTYPE='$(CATMAN)'
182 AC_DEFINE(IP_TOS_IS_BROKEN)
183 mansubdir=cat
Damien Millerb2dc28e2000-07-12 09:18:33 +1000184 LIBS="$LIBS -lgen -lnsl -lucb"
Damien Miller2ae714f2000-07-11 09:29:50 +1000185 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100186*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000187 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100188 LDFLAGS="$LDFLAGS -L/usr/local/lib"
189 MANTYPE='$(CATMAN)'
190 mansubdir=cat
191 LIBS="$LIBS -lgen -lsocket -lnsl -lresolv"
192 enable_suid_ssh=no
193 ;;
194*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000195 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100196 LDFLAGS="$LDFLAGS -L/usr/local/lib"
197 MANTYPE='$(CATMAN)'
198 mansubdir=cat
199 LIBS="$LIBS -lgen -lsocket"
200 enable_suid_ssh=no
201 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100202*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000203 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100204 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller0e1cf7c2000-01-26 12:15:30 +1100205 MANTYPE='$(CATMAN)'
206 mansubdir=cat
Damien Miller75b1d102000-01-07 14:01:41 +1100207 LIBS="$LIBS -lgen -lsocket"
208 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100209*-*-sco3.2v4*)
Damien Miller238a9fa2000-08-31 09:20:05 +1100210 AC_DEFINE(USE_PIPES)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000211 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100212 LDFLAGS="$LDFLAGS -L/usr/local/lib"
213 MANTYPE='$(CATMAN)'
214 mansubdir=cat
Ben Lindstrom980754c2000-11-12 00:04:24 +0000215 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
Damien Miller78315eb2000-09-29 23:01:36 +1100216 no_dev_ptmx=1
217 RANLIB=true
218 AC_DEFINE(BROKEN_SYS_TERMIO_H)
219 rsh_path="/usr/bin/rcmd"
220 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000221 AC_DEFINE(DISABLE_SHADOW)
Damien Miller78315eb2000-09-29 23:01:36 +1100222 ;;
223*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000224 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000225 LDFLAGS="$LDFLAGS -L/usr/local/lib"
226 MANTYPE='$(CATMAN)'
227 mansubdir=cat
Ben Lindstrom980754c2000-11-12 00:04:24 +0000228 LIBS="$LIBS -lgen -lsocket -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000229 no_dev_ptmx=1
Damien Miller78315eb2000-09-29 23:01:36 +1100230 rsh_path="/usr/bin/rcmd"
231 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000232 AC_DEFINE(DISABLE_SHADOW)
Damien Millera66626b2000-06-13 18:57:53 +1000233 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000234*-dec-osf*)
235# This is untested
236 if test ! -z "USE_SIA" ; then
237 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
238 if test -f /etc/sia/matrix.conf; then
239 AC_MSG_RESULT(yes)
240 AC_DEFINE(HAVE_OSF_SIA)
241 AC_DEFINE(DISABLE_LOGIN)
242 LIBS="$LIBS -lsecurity -ldb -lm -laud"
243 else
244 AC_MSG_RESULT(no)
245 fi
246 fi
247 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100248esac
249
Damien Millere37bfc12000-06-05 09:37:43 +1000250# Allow user to specify flags
251AC_ARG_WITH(cflags,
252 [ --with-cflags Specify additional flags to pass to compiler],
253 [
254 if test "x$withval" != "xno" ; then
255 CFLAGS="$CFLAGS $withval"
256 fi
257 ]
258)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000259AC_ARG_WITH(cppflags,
260 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
261 [
262 if test "x$withval" != "xno"; then
263 CPPFLAGS="$CPPFLAGS $withval"
264 fi
265 ]
266)
Damien Millere37bfc12000-06-05 09:37:43 +1000267AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000268 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000269 [
270 if test "x$withval" != "xno" ; then
271 LDFLAGS="$LDFLAGS $withval"
272 fi
273 ]
274)
275AC_ARG_WITH(libs,
276 [ --with-libs Specify additional libraries to link with],
277 [
278 if test "x$withval" != "xno" ; then
279 LIBS="$LIBS $withval"
280 fi
281 ]
282)
283
284
Damien Millera22ba012000-03-02 23:09:20 +1100285# Checks for libraries.
Damien Millerab18c411999-11-11 10:40:23 +1100286AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
287AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
Damien Miller6f9c3372000-10-25 10:06:04 +1100288
289AC_CHECK_FUNC(regcomp,
290 [],
291 [
292 AC_CHECK_LIB(pcre, pcre_info,
293 AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
294 ]
295)
Damien Millerab18c411999-11-11 10:40:23 +1100296
Damien Millerbeb4ba51999-12-28 15:09:35 +1100297if test -z "$no_libsocket" ; then
298 AC_CHECK_LIB(nsl, yp_match, , )
299fi
300if test -z "$no_libnsl" ; then
301 AC_CHECK_LIB(socket, main, , )
Damien Miller32b3cf21999-12-26 10:21:48 +1100302fi
Damien Millerab18c411999-11-11 10:40:23 +1100303
Damien Millera22ba012000-03-02 23:09:20 +1100304# Checks for header files.
Kevin Steves2c65ada2000-12-06 22:25:40 +0000305AC_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 +1100306
Damien Millerad833b32000-08-23 10:46:23 +1000307dnl Checks for library functions.
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000308AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strsep strtok_r sysconf vsnprintf vhangup vis waitpid _getpty __b64_ntop)
Damien Millerad833b32000-08-23 10:46:23 +1000309dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000310AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000311dnl Checks for libutil functions
Ben Lindstrome2fb8d32000-12-28 00:07:07 +0000312AC_CHECK_HEADERS(libutil.h)
andre2ff7b5d2000-06-03 14:57:40 +0000313AC_CHECK_FUNCS(login logout updwtmp logwtmp)
Damien Millerad833b32000-08-23 10:46:23 +1000314dnl Checks for utmp functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000315AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
andre2ff7b5d2000-06-03 14:57:40 +0000316AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000317dnl Checks for utmpx functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000318AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
andre2ff7b5d2000-06-03 14:57:40 +0000319AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100320
Damien Miller5fc85652000-07-09 23:53:07 +1000321AC_CHECK_FUNC(getuserattr,
322 [AC_DEFINE(HAVE_GETUSERATTR)],
323 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
324)
325
Damien Miller04f80141999-11-19 15:32:34 +1100326AC_CHECK_FUNC(login,
327 [AC_DEFINE(HAVE_LOGIN)],
328 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
329)
330
331AC_CHECK_FUNC(daemon,
332 [AC_DEFINE(HAVE_DAEMON)],
333 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
334)
335
Damien Miller9fb07e42000-03-05 16:22:59 +1100336AC_CHECK_FUNC(getpagesize,
337 [AC_DEFINE(HAVE_GETPAGESIZE)],
338 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
339)
340
Damien Millercb170cb2000-07-01 16:52:55 +1000341# Check for broken snprintf
342if test "x$ac_cv_func_snprintf" = "xyes" ; then
343 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
344 AC_TRY_RUN(
345 [
346#include <stdio.h>
347int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
348 ],
349 [AC_MSG_RESULT(yes)],
350 [
351 AC_MSG_RESULT(no)
352 AC_DEFINE(BROKEN_SNPRINTF)
353 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
354 ]
355 )
356fi
357
Damien Miller606f8802000-09-16 15:39:56 +1100358AC_FUNC_GETPGRP
359
Damien Miller7b22d652000-06-18 14:07:04 +1000360PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100361AC_ARG_WITH(pam,
362 [ --without-pam Disable PAM support ],
363 [
364 if test "x$withval" = "xno" ; then
365 no_pam=1
366 AC_DEFINE(DISABLE_PAM)
Damien Miller7b22d652000-06-18 14:07:04 +1000367 PAM_MSG="disabled"
Damien Millera22ba012000-03-02 23:09:20 +1100368 fi
369 ]
370)
Damien Milleredb82922000-06-20 13:25:52 +1000371if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100372 AC_CHECK_LIB(dl, dlopen, , )
373 LIBS="$LIBS -lpam"
374
Damien Miller0e65eed2000-05-17 22:16:05 +1000375 AC_CHECK_FUNCS(pam_getenvlist)
Damien Miller1bead332000-04-30 00:47:29 +1000376
Damien Miller1f335fb2000-06-26 11:31:33 +1000377 disable_shadow=yes
378
Damien Miller7b22d652000-06-18 14:07:04 +1000379 PAM_MSG="yes"
380
Damien Millera22ba012000-03-02 23:09:20 +1100381 # Check PAM strerror arguments (old PAM)
382 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
383 AC_TRY_COMPILE(
384 [
Damien Miller81171112000-04-23 11:14:01 +1000385#include <stdlib.h>
386#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100387 ],
388 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
389 [AC_MSG_RESULT(no)],
390 [
391 AC_DEFINE(HAVE_OLD_PAM)
392 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000393 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100394 ]
395 )
396fi
397
398# The big search for OpenSSL
399AC_ARG_WITH(ssl-dir,
400 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
401 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000402 if test "x$withval" != "xno" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100403 tryssldir=$withval
404 fi
405 ]
406)
407
408saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100409saved_LDFLAGS="$LDFLAGS"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000410saved_CPPFLAGS="$CPPFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100411if test "x$prefix" != "xNONE" ; then
412 tryssldir="$tryssldir $prefix"
413fi
Damien Miller61e50f12000-05-08 20:49:37 +1000414AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera22ba012000-03-02 23:09:20 +1100415
Damien Millera1b61e12000-09-16 17:02:16 +1100416 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 +1000417 if test ! -z "$ssldir" ; then
418 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000419 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Miller61e50f12000-05-08 20:49:37 +1000420 if test ! -z "$need_dash_r" ; then
421 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
422 fi
Damien Millera1ad4802000-03-15 10:04:54 +1100423 else
Damien Miller61e50f12000-05-08 20:49:37 +1000424 LDFLAGS="$saved_LDFLAGS"
Damien Millerb85dcad2000-03-11 11:37:00 +1100425 fi
426
Damien Miller3b512e12000-05-17 23:29:18 +1000427 LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000428
Damien Miller3b512e12000-05-17 23:29:18 +1000429 # Basic test to check for compatible version and correct linking
430 # *does not* test for RSA - that comes later.
431 AC_TRY_RUN(
432 [
Damien Millere59ce622000-05-01 20:54:17 +1000433#include <string.h>
434#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000435int main(void)
436{
Damien Miller3b512e12000-05-17 23:29:18 +1000437 char a[2048];
438 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000439 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000440 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000441}
Damien Miller3b512e12000-05-17 23:29:18 +1000442 ],
443 [
444 found_crypto=1
445 break;
446 ], []
447 )
Damien Miller61e50f12000-05-08 20:49:37 +1000448
449 if test ! -z "$found_crypto" ; then
450 break;
451 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100452 done
453
Damien Miller61e50f12000-05-08 20:49:37 +1000454 if test -z "$found_crypto" ; then
455 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
Damien Millerb85dcad2000-03-11 11:37:00 +1100456 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000457 if test -z "$ssldir" ; then
458 ssldir="(system)"
459 fi
Damien Millera22ba012000-03-02 23:09:20 +1100460
Damien Miller61e50f12000-05-08 20:49:37 +1000461 ac_cv_openssldir=$ssldir
462])
463
Damien Milleredb82922000-06-20 13:25:52 +1000464if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000465 AC_DEFINE(HAVE_OPENSSL)
466 dnl Need to recover ssldir - test above runs in subshell
467 ssldir=$ac_cv_openssldir
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000468 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Millera1ad4802000-03-15 10:04:54 +1100469 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
470 if test ! -z "$need_dash_r" ; then
471 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
Damien Millera22ba012000-03-02 23:09:20 +1100472 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100473 if test ! -z "$blibpath" ; then
474 blibpath="$blibpath:$ssldir:$ssldir/lib"
475 fi
Damien Millera22ba012000-03-02 23:09:20 +1100476fi
Damien Miller3b512e12000-05-17 23:29:18 +1000477LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000478
Damien Miller3b512e12000-05-17 23:29:18 +1000479# Now test RSA support
480saved_LIBS="$LIBS"
481AC_MSG_CHECKING([for RSA support])
482for WANTS_RSAREF in "" 1 ; do
483 if test -z "$WANTS_RSAREF" ; then
484 LIBS="$saved_LIBS"
485 else
486 LIBS="$saved_LIBS -lRSAglue -lrsaref"
487 fi
488 AC_TRY_RUN([
489#include <string.h>
490#include <openssl/rand.h>
491#include <openssl/rsa.h>
492#include <openssl/bn.h>
493#include <openssl/sha.h>
494int main(void)
495{
496 int num; RSA *key; static unsigned char p_in[] = "blahblah";
497 unsigned char c[256], p[256];
498 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
499 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
500 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
501 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
502}
503 ],
504 [
505 rsa_works=1
506 break;
507 ], [])
508done
509
510if test ! -z "$no_rsa" ; then
511 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000512 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000513else
514 if test -z "$rsa_works" ; then
515 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000516 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000517 else
518 if test -z "$WANTS_RSAREF" ; then
519 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000520 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000521 else
Damien Miller7b22d652000-06-18 14:07:04 +1000522 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000523 AC_MSG_RESULT(using RSAref)
524 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
525 fi
526 fi
527fi
Damien Millera22ba012000-03-02 23:09:20 +1100528
Ben Lindstromb5628642000-10-18 00:02:25 +0000529# Cheap hack to ensure NEWS-OS libraries are arranged right.
530if test ! -z "$SONY" ; then
531 LIBS="$LIBS -liberty";
532fi
533
Damien Millera22ba012000-03-02 23:09:20 +1100534# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100535AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100536AC_CHECK_SIZEOF(short int, 2)
537AC_CHECK_SIZEOF(int, 4)
538AC_CHECK_SIZEOF(long int, 4)
539AC_CHECK_SIZEOF(long long int, 8)
540
Damien Millera22ba012000-03-02 23:09:20 +1100541# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +1100542AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
543 AC_TRY_COMPILE(
544 [ #include <sys/types.h> ],
545 [ u_int a; a = 1;],
546 [ ac_cv_have_u_int="yes" ],
547 [ ac_cv_have_u_int="no" ]
548 )
549])
550if test "x$ac_cv_have_u_int" = "xyes" ; then
551 AC_DEFINE(HAVE_U_INT)
552 have_u_int=1
553fi
554
Damien Miller61e50f12000-05-08 20:49:37 +1000555AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
556 AC_TRY_COMPILE(
557 [ #include <sys/types.h> ],
558 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
559 [ ac_cv_have_intxx_t="yes" ],
560 [ ac_cv_have_intxx_t="no" ]
561 )
562])
563if test "x$ac_cv_have_intxx_t" = "xyes" ; then
564 AC_DEFINE(HAVE_INTXX_T)
565 have_intxx_t=1
566fi
567
Damien Miller578783e2000-09-23 14:12:24 +1100568AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
569 AC_TRY_COMPILE(
570 [ #include <sys/types.h> ],
571 [ int64_t a; a = 1;],
572 [ ac_cv_have_int64_t="yes" ],
573 [ ac_cv_have_int64_t="no" ]
574 )
575])
576if test "x$ac_cv_have_int64_t" = "xyes" ; then
577 AC_DEFINE(HAVE_INT64_T)
578 have_int64_t=1
579fi
580
Damien Miller61e50f12000-05-08 20:49:37 +1000581AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
582 AC_TRY_COMPILE(
583 [ #include <sys/types.h> ],
584 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
585 [ ac_cv_have_u_intxx_t="yes" ],
586 [ ac_cv_have_u_intxx_t="no" ]
587 )
588])
589if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
590 AC_DEFINE(HAVE_U_INTXX_T)
591 have_u_intxx_t=1
592fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100593
Damien Miller578783e2000-09-23 14:12:24 +1100594AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
595 AC_TRY_COMPILE(
596 [ #include <sys/types.h> ],
597 [ u_int64_t a; a = 1;],
598 [ ac_cv_have_u_int64_t="yes" ],
599 [ ac_cv_have_u_int64_t="no" ]
600 )
601])
602if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
603 AC_DEFINE(HAVE_U_INT64_T)
604 have_u_int64_t=1
605fi
606
Damien Milleredb82922000-06-20 13:25:52 +1000607if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
608 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100609then
610 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
611 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000612 [
613#include <sys/bitypes.h>
614 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100615 [
Damien Miller70494d12000-04-03 15:57:06 +1000616 int8_t a; int16_t b; int32_t c;
617 u_int8_t e; u_int16_t f; u_int32_t g;
618 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100619 ],
620 [
621 AC_DEFINE(HAVE_U_INTXX_T)
622 AC_DEFINE(HAVE_INTXX_T)
623 AC_MSG_RESULT(yes)
624 ],
625 [AC_MSG_RESULT(no)]
626 )
627fi
628
Damien Millerd6121d22000-03-17 23:26:46 +1100629if test -z "$have_u_intxx_t" ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000630 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
631 AC_TRY_COMPILE(
632 [
633#include <sys/types.h>
634 ],
635 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
636 [ ac_cv_have_uintxx_t="yes" ],
637 [ ac_cv_have_uintxx_t="no" ]
638 )
639 ])
640 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
641 AC_DEFINE(HAVE_UINTXX_T)
642 fi
Damien Millerd6121d22000-03-17 23:26:46 +1100643fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100644
Damien Miller61e50f12000-05-08 20:49:37 +1000645AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
646 AC_TRY_COMPILE(
647 [
Damien Miller81171112000-04-23 11:14:01 +1000648#include <sys/types.h>
649#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000650 ],
651 [socklen_t foo; foo = 1235;],
652 [ ac_cv_have_socklen_t="yes" ],
653 [ ac_cv_have_socklen_t="no" ]
654 )
655])
656if test "x$ac_cv_have_socklen_t" = "xyes" ; then
657 AC_DEFINE(HAVE_SOCKLEN_T)
658fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100659
Damien Miller61e50f12000-05-08 20:49:37 +1000660AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
661 AC_TRY_COMPILE(
662 [
663#include <sys/types.h>
664 ],
665 [ size_t foo; foo = 1235; ],
666 [ ac_cv_have_size_t="yes" ],
667 [ ac_cv_have_size_t="no" ]
668 )
669])
670if test "x$ac_cv_have_size_t" = "xyes" ; then
671 AC_DEFINE(HAVE_SIZE_T)
672fi
Damien Miller95058511999-12-29 10:36:45 +1100673
Damien Miller615f9392000-05-17 22:53:33 +1000674AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
675 AC_TRY_COMPILE(
676 [
677#include <sys/types.h>
678 ],
679 [ ssize_t foo; foo = 1235; ],
680 [ ac_cv_have_ssize_t="yes" ],
681 [ ac_cv_have_ssize_t="no" ]
682 )
683])
684if test "x$ac_cv_have_ssize_t" = "xyes" ; then
685 AC_DEFINE(HAVE_SSIZE_T)
686fi
687
Damien Millerb54b40e2000-06-23 08:23:34 +1000688AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
689 AC_TRY_COMPILE(
690 [
691#include <sys/types.h>
692#include <sys/socket.h>
693 ],
694 [ sa_family_t foo; foo = 1235; ],
695 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +1100696 [ AC_TRY_COMPILE(
697 [
698#include <sys/types.h>
699#include <sys/socket.h>
700#include <netinet/in.h>
701 ],
702 [ sa_family_t foo; foo = 1235; ],
703 [ ac_cv_have_sa_family_t="yes" ],
704
Damien Millerb54b40e2000-06-23 08:23:34 +1000705 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +1100706 )]
Damien Millerb54b40e2000-06-23 08:23:34 +1000707 )
708])
709if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
710 AC_DEFINE(HAVE_SA_FAMILY_T)
711fi
712
Damien Miller0f91b4e2000-06-18 15:43:25 +1000713AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
714 AC_TRY_COMPILE(
715 [
716#include <sys/types.h>
717 ],
718 [ pid_t foo; foo = 1235; ],
719 [ ac_cv_have_pid_t="yes" ],
720 [ ac_cv_have_pid_t="no" ]
721 )
722])
723if test "x$ac_cv_have_pid_t" = "xyes" ; then
724 AC_DEFINE(HAVE_PID_T)
725fi
726
727AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
728 AC_TRY_COMPILE(
729 [
730#include <sys/types.h>
731 ],
732 [ mode_t foo; foo = 1235; ],
733 [ ac_cv_have_mode_t="yes" ],
734 [ ac_cv_have_mode_t="no" ]
735 )
736])
737if test "x$ac_cv_have_mode_t" = "xyes" ; then
738 AC_DEFINE(HAVE_MODE_T)
739fi
740
Damien Miller61e50f12000-05-08 20:49:37 +1000741
742AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
743 AC_TRY_COMPILE(
744 [
Damien Miller81171112000-04-23 11:14:01 +1000745#include <sys/types.h>
746#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000747 ],
748 [ struct sockaddr_storage s; ],
749 [ ac_cv_have_struct_sockaddr_storage="yes" ],
750 [ ac_cv_have_struct_sockaddr_storage="no" ]
751 )
752])
753if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
754 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
755fi
Damien Miller34132e52000-01-14 15:45:46 +1100756
Damien Miller61e50f12000-05-08 20:49:37 +1000757AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
758 AC_TRY_COMPILE(
759 [
Damien Miller7b22d652000-06-18 14:07:04 +1000760#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000761#include <netinet/in.h>
762 ],
763 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
764 [ ac_cv_have_struct_sockaddr_in6="yes" ],
765 [ ac_cv_have_struct_sockaddr_in6="no" ]
766 )
767])
768if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
769 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
770fi
Damien Miller34132e52000-01-14 15:45:46 +1100771
Damien Miller61e50f12000-05-08 20:49:37 +1000772AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
773 AC_TRY_COMPILE(
774 [
Damien Miller7b22d652000-06-18 14:07:04 +1000775#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000776#include <netinet/in.h>
777 ],
778 [ struct in6_addr s; s.s6_addr[0] = 0; ],
779 [ ac_cv_have_struct_in6_addr="yes" ],
780 [ ac_cv_have_struct_in6_addr="no" ]
781 )
782])
783if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
784 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
785fi
Damien Miller34132e52000-01-14 15:45:46 +1100786
Damien Miller61e50f12000-05-08 20:49:37 +1000787AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
788 AC_TRY_COMPILE(
789 [
Damien Miller81171112000-04-23 11:14:01 +1000790#include <sys/types.h>
791#include <sys/socket.h>
792#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000793 ],
794 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
795 [ ac_cv_have_struct_addrinfo="yes" ],
796 [ ac_cv_have_struct_addrinfo="no" ]
797 )
798])
799if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
800 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
801fi
802
Damien Miller78315eb2000-09-29 23:01:36 +1100803dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +1000804OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
805OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
806OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
807OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
808OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +1000809OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000810OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
811OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +1000812OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000813OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
814OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
815OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
816OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +0000817OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
818OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
819OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
820OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Damien Miller78315eb2000-09-29 23:01:36 +1100821AC_STRUCT_ST_BLKSIZE
andre2ff7b5d2000-06-03 14:57:40 +0000822
Damien Miller942da032000-08-18 13:59:06 +1000823AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
824 ac_cv_have_sun_len_in_struct_sockaddr_un, [
825 AC_TRY_COMPILE(
826 [
827#include <sys/types.h>
828#include <sys/socket.h>
829 ],
830 [ struct sockaddr_un s; s.sun_len = 1; ],
831 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
832 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
833 )
834])
835if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
836 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
837fi
838
Damien Miller61e50f12000-05-08 20:49:37 +1000839AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
840 ac_cv_have_ss_family_in_struct_ss, [
841 AC_TRY_COMPILE(
842 [
Damien Miller81171112000-04-23 11:14:01 +1000843#include <sys/types.h>
844#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000845 ],
846 [ struct sockaddr_storage s; s.ss_family = 1; ],
847 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
848 [ ac_cv_have_ss_family_in_struct_ss="no" ],
849 )
850])
851if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
852 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
853fi
854
Damien Miller61e50f12000-05-08 20:49:37 +1000855AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
856 ac_cv_have___ss_family_in_struct_ss, [
857 AC_TRY_COMPILE(
858 [
Damien Miller81171112000-04-23 11:14:01 +1000859#include <sys/types.h>
860#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000861 ],
862 [ struct sockaddr_storage s; s.__ss_family = 1; ],
863 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
864 [ ac_cv_have___ss_family_in_struct_ss="no" ]
865 )
866])
867if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
868 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
869fi
Damien Millerbf1c9b21999-12-09 10:16:54 +1100870
Damien Millerad833b32000-08-23 10:46:23 +1000871AC_CACHE_CHECK([for pw_class field in struct passwd],
872 ac_cv_have_pw_class_in_struct_passwd, [
873 AC_TRY_COMPILE(
874 [
Damien Millerad833b32000-08-23 10:46:23 +1000875#include <pwd.h>
876 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +0000877 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +1000878 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
879 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
880 )
881])
882if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
883 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
884fi
885
Damien Miller61e50f12000-05-08 20:49:37 +1000886
887AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
888 AC_TRY_LINK([],
889 [ extern char *__progname; printf("%s", __progname); ],
890 [ ac_cv_libc_defines___progname="yes" ],
891 [ ac_cv_libc_defines___progname="no" ]
892 )
893])
894if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
895 AC_DEFINE(HAVE___PROGNAME)
896fi
897
Damien Millera22ba012000-03-02 23:09:20 +1100898
Damien Millerecbb26d2000-07-15 14:59:14 +1000899AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
900 AC_TRY_LINK([],
901 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
902 [ ac_cv_libc_defines_sys_errlist="yes" ],
903 [ ac_cv_libc_defines_sys_errlist="no" ]
904 )
905])
906if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
907 AC_DEFINE(HAVE_SYS_ERRLIST)
908fi
909
910
Damien Miller11fa2cc2000-08-16 10:35:58 +1000911AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
912 AC_TRY_LINK([],
913 [ extern int sys_nerr; printf("%i", sys_nerr);],
914 [ ac_cv_libc_defines_sys_nerr="yes" ],
915 [ ac_cv_libc_defines_sys_nerr="no" ]
916 )
917])
918if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
919 AC_DEFINE(HAVE_SYS_NERR)
920fi
921
922
Damien Millera22ba012000-03-02 23:09:20 +1100923# Looking for programs, paths and files
924AC_ARG_WITH(rsh,
925 [ --with-rsh=PATH Specify path to remote shell program ],
926 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100927 if test "x$withval" != "$no" ; then
Damien Miller90dcc052000-07-08 10:17:40 +1000928 rsh_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100929 fi
930 ],
931 [
932 AC_PATH_PROG(rsh_path, rsh)
933 ]
934)
935
936AC_ARG_WITH(xauth,
937 [ --with-xauth=PATH Specify path to xauth program ],
938 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000939 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000940 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100941 fi
942 ],
943 [
Damien Miller78315eb2000-09-29 23:01:36 +1100944 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 +1000945 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100946 xauth_path="/usr/openwin/bin/xauth"
947 fi
948 ]
949)
950
Damien Millera19cf472000-11-29 13:28:50 +1100951if test -z "$xauth_path" ; then
952 XAUTH_PATH="undefined"
953 AC_SUBST(XAUTH_PATH)
954else
Damien Millera22ba012000-03-02 23:09:20 +1100955 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +1100956 XAUTH_PATH=$xauth_path
957 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +1100958fi
959if test ! -z "$rsh_path" ; then
960 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
961fi
962
963# Check for mail directory (last resort if we cannot get it from headers)
964if test ! -z "$MAIL" ; then
965 maildir=`dirname $MAIL`
966 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
967fi
968
Damien Millera22ba012000-03-02 23:09:20 +1100969if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +1100970 AC_CHECK_FILE("/dev/ptmx",
971 [
972 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
973 have_dev_ptmx=1
974 ]
975 )
Damien Millera22ba012000-03-02 23:09:20 +1100976fi
Damien Miller204ad072000-03-02 23:56:12 +1100977AC_CHECK_FILE("/dev/ptc",
978 [
979 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
980 have_dev_ptc=1
981 ]
982)
983
Damien Millera22ba012000-03-02 23:09:20 +1100984# Options from here on. Some of these are preset by platform above
985
Damien Millera22ba012000-03-02 23:09:20 +1100986# Check for user-specified random device, otherwise check /dev/urandom
987AC_ARG_WITH(random,
988 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
989 [
Damien Miller040f3832000-04-03 14:50:43 +1000990 if test "x$withval" != "xno" ; then
991 RANDOM_POOL="$withval";
992 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
993 fi
Damien Millera22ba012000-03-02 23:09:20 +1100994 ],
995 [
996 # Check for random device
997 AC_CHECK_FILE("/dev/urandom",
998 [
999 RANDOM_POOL="/dev/urandom";
1000 AC_SUBST(RANDOM_POOL)
1001 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1002 ]
1003 )
1004 ]
1005)
1006
1007# Check for EGD pool file
1008AC_ARG_WITH(egd-pool,
1009 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1010 [
Damien Miller040f3832000-04-03 14:50:43 +10001011 if test "x$withval" != "xno" ; then
1012 EGD_SOCKET="$withval";
1013 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1014 fi
Damien Millera22ba012000-03-02 23:09:20 +11001015 ]
1016)
1017
Damien Miller0437b332000-05-02 09:56:41 +10001018# detect pathnames for entropy gathering commands, if we need them
1019INSTALL_SSH_PRNG_CMDS=""
1020rm -f prng_commands
Damien Milleredb82922000-06-20 13:25:52 +10001021if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
Damien Miller11e37f62000-04-08 18:23:30 +10001022 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +10001023 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1024 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1025 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1026 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1027 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1028 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1029 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1030 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1031 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1032 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1033 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1034 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1035 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1036 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1037 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
Damien Miller0437b332000-05-02 09:56:41 +10001038
1039 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +10001040fi
Damien Miller0437b332000-05-02 09:56:41 +10001041AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1042
Damien Miller11e37f62000-04-08 18:23:30 +10001043
Damien Miller670a4b82000-01-22 13:53:11 +11001044AC_ARG_WITH(catman,
1045 [ --with-catman=man|cat Install preformatted manpages[no]],
1046 [
1047 MANTYPE='$(CATMAN)'
1048 if test x"$withval" != x"yes" ; then
1049 mansubdir=$withval
1050 else
1051 mansubdir=cat
1052 fi
1053 ], [
1054 if test -z "$MANTYPE" ; then
1055 MANTYPE='$(TROFFMAN)'
1056 mansubdir=man
1057 fi
1058 ]
1059)
1060AC_SUBST(MANTYPE)
1061AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001062
Damien Millera22ba012000-03-02 23:09:20 +11001063# Check whether user wants Kerberos support
Damien Miller7b22d652000-06-18 14:07:04 +10001064KRB4_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001065AC_ARG_WITH(kerberos4,
Damien Miller105b7f02000-01-07 08:45:55 +11001066 [ --with-kerberos4=PATH Enable Kerberos 4 support],
Damien Miller80297751999-11-19 13:03:25 +11001067 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001068 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001069
Ben Lindstrom23e13712000-10-29 22:49:19 +00001070 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001071 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Damien Miller105b7f02000-01-07 08:45:55 +11001072 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller29ea30d2000-03-17 10:54:15 +11001073 if test ! -z "$need_dash_r" ; then
1074 LDFLAGS="$LDFLAGS -R${withval}/lib"
1075 fi
1076 if test ! -z "$blibpath" ; then
1077 blibpath="$blibpath:${withval}/lib"
1078 fi
Damien Miller105b7f02000-01-07 08:45:55 +11001079 else
1080 if test -d /usr/include/kerberosIV ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001081 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
Damien Miller105b7f02000-01-07 08:45:55 +11001082 fi
1083 fi
1084
1085 AC_CHECK_HEADERS(krb.h)
1086 AC_CHECK_LIB(krb, main)
1087 if test "$ac_cv_header_krb_h" != yes; then
1088 AC_MSG_WARN([Cannot find krb.h, build may fail])
1089 fi
1090 if test "$ac_cv_lib_krb_main" != yes; then
1091 AC_MSG_WARN([Cannot find libkrb, build may fail])
1092 fi
1093
Damien Millerc85f9b42000-01-29 10:20:21 +11001094 KLIBS="-lkrb -ldes"
Damien Miller105b7f02000-01-07 08:45:55 +11001095 AC_CHECK_LIB(resolv, dn_expand, , )
1096 KRB4=yes
Damien Miller7b22d652000-06-18 14:07:04 +10001097 KRB4_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001098 AC_DEFINE(KRB4)
Damien Miller8bdeee21999-12-30 15:50:54 +11001099 fi
Damien Miller80297751999-11-19 13:03:25 +11001100 ]
1101)
1102
Damien Millera22ba012000-03-02 23:09:20 +11001103# Check whether user wants AFS support
Damien Miller7b22d652000-06-18 14:07:04 +10001104AFS_MSG="no"
Damien Millerc6398ef1999-11-20 12:18:40 +11001105AC_ARG_WITH(afs,
Damien Miller105b7f02000-01-07 08:45:55 +11001106 [ --with-afs=PATH Enable AFS support],
Damien Miller80297751999-11-19 13:03:25 +11001107 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001108 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001109
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001110 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001111 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001112 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller105b7f02000-01-07 08:45:55 +11001113 fi
1114
1115 if test -z "$KRB4" ; then
1116 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1117 fi
1118
Damien Miller8bdeee21999-12-30 15:50:54 +11001119 LIBS="$LIBS -lkafs"
Damien Miller105b7f02000-01-07 08:45:55 +11001120 if test ! -z "$AFS_LIBS" ; then
1121 LIBS="$LIBS $AFS_LIBS"
1122 fi
1123 AC_DEFINE(AFS)
Damien Miller7b22d652000-06-18 14:07:04 +10001124 AFS_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001125 fi
Damien Miller80297751999-11-19 13:03:25 +11001126 ]
1127)
Damien Millerc85f9b42000-01-29 10:20:21 +11001128LIBS="$LIBS $KLIBS"
Damien Miller80297751999-11-19 13:03:25 +11001129
Damien Millera22ba012000-03-02 23:09:20 +11001130# Check whether user wants S/Key support
Damien Miller7b22d652000-06-18 14:07:04 +10001131SKEY_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001132AC_ARG_WITH(skey,
Ben Lindstrom305fb002000-11-10 02:41:30 +00001133 [ --with-skey=PATH Enable S/Key support],
Damien Miller80297751999-11-19 13:03:25 +11001134 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001135 if test "x$withval" != "xno" ; then
Ben Lindstrom305fb002000-11-10 02:41:30 +00001136
1137 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001138 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001139 LDFLAGS="$LDFLAGS -L${withval}/lib"
1140 fi
1141
Damien Miller8bdeee21999-12-30 15:50:54 +11001142 AC_DEFINE(SKEY)
1143 LIBS="$LIBS -lskey"
Damien Miller7b22d652000-06-18 14:07:04 +10001144 SKEY_MSG="yes"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001145
1146 AC_CHECK_FUNC(skey_keyinfo,
1147 [],
1148 [
1149 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1150 ])
Damien Miller8bdeee21999-12-30 15:50:54 +11001151 fi
Damien Miller80297751999-11-19 13:03:25 +11001152 ]
1153)
1154
Damien Millera22ba012000-03-02 23:09:20 +11001155# Check whether user wants TCP wrappers support
Damien Miller7b22d652000-06-18 14:07:04 +10001156TCPW_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001157AC_ARG_WITH(tcp-wrappers,
Damien Miller80297751999-11-19 13:03:25 +11001158 [ --with-tcp-wrappers Enable tcpwrappers support],
1159 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001160 if test "x$withval" != "xno" ; then
Damien Miller65165f82000-03-05 17:02:45 +11001161 saved_LIBS="$LIBS"
Damien Miller105b7f02000-01-07 08:45:55 +11001162 LIBS="$LIBS -lwrap"
Damien Miller65165f82000-03-05 17:02:45 +11001163 AC_MSG_CHECKING(for libwrap)
1164 AC_TRY_LINK(
1165 [
Damien Miller81171112000-04-23 11:14:01 +10001166#include <tcpd.h>
Damien Miller65165f82000-03-05 17:02:45 +11001167 int deny_severity = 0, allow_severity = 0;
1168 ],
1169 [hosts_access(0);],
1170 [
1171 AC_MSG_RESULT(yes)
1172 AC_DEFINE(LIBWRAP)
Damien Miller7b22d652000-06-18 14:07:04 +10001173 TCPW_MSG="yes"
Damien Miller65165f82000-03-05 17:02:45 +11001174 ],
1175 [
Damien Miller7b22d652000-06-18 14:07:04 +10001176 AC_MSG_ERROR([*** libwrap missing])
Damien Miller65165f82000-03-05 17:02:45 +11001177 ]
1178 )
Damien Miller8bdeee21999-12-30 15:50:54 +11001179 fi
Damien Miller80297751999-11-19 13:03:25 +11001180 ]
1181)
1182
Damien Millera22ba012000-03-02 23:09:20 +11001183# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001184MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001185AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001186 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001187 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001188 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001189 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10001190 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001191 fi
1192 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001193)
1194
Damien Millera22ba012000-03-02 23:09:20 +11001195# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11001196AC_ARG_WITH(shadow,
1197 [ --without-shadow Disable shadow password support],
1198 [
1199 if test "x$withval" = "xno" ; then
1200 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10001201 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11001202 fi
1203 ]
1204)
1205
Damien Miller1f335fb2000-06-26 11:31:33 +10001206if test -z "$disable_shadow" ; then
1207 AC_MSG_CHECKING([if the systems has expire shadow information])
1208 AC_TRY_COMPILE(
1209 [
1210#include <sys/types.h>
1211#include <shadow.h>
1212 struct spwd sp;
1213 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1214 [ sp_expire_available=yes ], []
1215 )
1216
1217 if test "x$sp_expire_available" = "xyes" ; then
1218 AC_MSG_RESULT(yes)
1219 AC_DEFINE(HAS_SHADOW_EXPIRE)
1220 else
1221 AC_MSG_RESULT(no)
1222 fi
1223fi
1224
Damien Millera22ba012000-03-02 23:09:20 +11001225# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11001226if test ! -z "$IPADDR_IN_DISPLAY" ; then
1227 DISPLAY_HACK_MSG="yes"
1228 AC_DEFINE(IPADDR_IN_DISPLAY)
1229else
1230 DISPLAY_HACK_MSG="no"
1231 AC_ARG_WITH(ipaddr-display,
1232 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1233 [
1234 if test "x$withval" != "xno" ; then
1235 AC_DEFINE(IPADDR_IN_DISPLAY)
1236 DISPLAY_HACK_MSG="yes"
1237 fi
1238 ]
1239 )
1240fi
Damien Miller76112de1999-12-21 11:18:08 +11001241
Damien Millera22ba012000-03-02 23:09:20 +11001242# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10001243SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11001244AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11001245 [ --with-default-path=PATH Specify default \$PATH environment for server],
1246 [
1247 if test "x$withval" != "xno" ; then
Damien Millere68f92b2000-10-02 21:42:15 +11001248 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
Damien Miller7b22d652000-06-18 14:07:04 +10001249 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11001250 fi
1251 ]
1252)
1253
Damien Millera22ba012000-03-02 23:09:20 +11001254# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10001255IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11001256AC_ARG_WITH(ipv4-default,
1257 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1258 [
1259 if test "x$withval" != "xno" ; then
1260 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10001261 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11001262 fi
1263 ]
1264)
1265
Damien Miller61e50f12000-05-08 20:49:37 +10001266AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001267IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001268AC_ARG_WITH(4in6,
1269 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1270 [
1271 if test "x$withval" != "xno" ; then
1272 AC_MSG_RESULT(yes)
1273 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001274 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001275 else
1276 AC_MSG_RESULT(no)
1277 fi
1278 ],[
1279 if test "x$inet6_default_4in6" = "xyes"; then
1280 AC_MSG_RESULT([yes (default)])
1281 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001282 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001283 else
1284 AC_MSG_RESULT([no (default)])
1285 fi
1286 ]
1287)
1288
Damien Miller78315eb2000-09-29 23:01:36 +11001289AC_MSG_CHECKING(whether to install ssh as suid root)
1290AC_ARG_ENABLE(suid-ssh,
1291[ --enable-suid-ssh Install ssh as suid root (default)
1292 --disable-suid-ssh Install ssh without suid bit],
1293[ case "$enableval" in
1294 no)
1295 AC_MSG_RESULT(no)
1296 SSHMODE=0711
1297 ;;
1298 *) AC_MSG_RESULT(yes)
1299 SSHMODE=04711
1300 ;;
1301 esac ],
1302 AC_MSG_RESULT(yes)
1303 SSHMODE=04711
1304)
1305AC_SUBST(SSHMODE)
1306
1307
Damien Millera22ba012000-03-02 23:09:20 +11001308# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001309piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001310AC_ARG_WITH(pid-dir,
1311 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1312 [
1313 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001314 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001315 fi
1316 ]
1317)
Damien Miller4018c192000-04-30 09:30:44 +10001318
Damien Miller78315eb2000-09-29 23:01:36 +11001319# make sure the directory exists
1320if test ! -d $piddir ; then
1321 piddir=`eval echo ${sysconfdir}`
1322 case $piddir in
1323 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1324 esac
1325fi
1326
Damien Millerdbd250f2000-01-18 08:57:14 +11001327AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001328AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001329
andre2ff7b5d2000-06-03 14:57:40 +00001330dnl allow user to disable some login recording features
1331AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001332 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001333 [ AC_DEFINE(DISABLE_LASTLOG) ]
1334)
1335AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001336 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001337 [ AC_DEFINE(DISABLE_UTMP) ]
1338)
1339AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001340 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001341 [ AC_DEFINE(DISABLE_UTMPX) ]
1342)
1343AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001344 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001345 [ AC_DEFINE(DISABLE_WTMP) ]
1346)
1347AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001348 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001349 [ AC_DEFINE(DISABLE_WTMPX) ]
1350)
1351AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001352 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001353 [ AC_DEFINE(DISABLE_LOGIN) ]
1354)
1355AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001356 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001357 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1358)
1359AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001360 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001361 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1362)
1363AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001364 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
andre2ff7b5d2000-06-03 14:57:40 +00001365 [ conf_lastlog_location="$withval"; ],)
1366
1367dnl lastlog, [uw]tmpx? detection
1368dnl NOTE: set the paths in the platform section to avoid the
1369dnl need for command-line parameters
1370dnl lastlog and [uw]tmp are subject to a file search if all else fails
1371
1372dnl lastlog detection
1373dnl NOTE: the code itself will detect if lastlog is a directory
1374AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1375AC_TRY_COMPILE([
1376#include <sys/types.h>
1377#include <utmp.h>
1378#ifdef HAVE_LASTLOG_H
1379# include <lastlog.h>
1380#endif
Damien Miller2994e082000-06-04 15:51:47 +10001381#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001382# include <paths.h>
1383#endif
1384 ],
1385 [ char *lastlog = LASTLOG_FILE; ],
1386 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001387 [
1388 AC_MSG_RESULT(no)
1389 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1390 AC_TRY_COMPILE([
1391#include <sys/types.h>
1392#include <utmp.h>
1393#ifdef HAVE_LASTLOG_H
1394# include <lastlog.h>
1395#endif
1396#ifdef HAVE_PATHS_H
1397# include <paths.h>
1398#endif
1399 ],
1400 [ char *lastlog = _PATH_LASTLOG; ],
1401 [ AC_MSG_RESULT(yes) ],
1402 [
andree441aa32000-06-12 22:34:38 +00001403 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001404 system_lastlog_path=no
1405 ])
1406 ]
andre2ff7b5d2000-06-03 14:57:40 +00001407)
Damien Miller2994e082000-06-04 15:51:47 +10001408
andre2ff7b5d2000-06-03 14:57:40 +00001409if test -z "$conf_lastlog_location"; then
1410 if test x"$system_lastlog_path" = x"no" ; then
1411 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001412 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001413 conf_lastlog_location=$f
1414 fi
1415 done
1416 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001417 AC_MSG_WARN([** Cannot find lastlog **])
1418 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001419 fi
1420 fi
1421fi
1422
1423if test -n "$conf_lastlog_location"; then
1424 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1425fi
1426
1427dnl utmp detection
1428AC_MSG_CHECKING([if your system defines UTMP_FILE])
1429AC_TRY_COMPILE([
1430#include <sys/types.h>
1431#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001432#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001433# include <paths.h>
1434#endif
1435 ],
1436 [ char *utmp = UTMP_FILE; ],
1437 [ AC_MSG_RESULT(yes) ],
1438 [ AC_MSG_RESULT(no)
1439 system_utmp_path=no ]
1440)
1441if test -z "$conf_utmp_location"; then
1442 if test x"$system_utmp_path" = x"no" ; then
1443 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1444 if test -f $f ; then
1445 conf_utmp_location=$f
1446 fi
1447 done
1448 if test -z "$conf_utmp_location"; then
1449 AC_DEFINE(DISABLE_UTMP)
1450 fi
1451 fi
1452fi
1453if test -n "$conf_utmp_location"; then
1454 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1455fi
1456
1457dnl wtmp detection
1458AC_MSG_CHECKING([if your system defines WTMP_FILE])
1459AC_TRY_COMPILE([
1460#include <sys/types.h>
1461#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001462#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001463# include <paths.h>
1464#endif
1465 ],
1466 [ char *wtmp = WTMP_FILE; ],
1467 [ AC_MSG_RESULT(yes) ],
1468 [ AC_MSG_RESULT(no)
1469 system_wtmp_path=no ]
1470)
1471if test -z "$conf_wtmp_location"; then
1472 if test x"$system_wtmp_path" = x"no" ; then
1473 for f in /usr/adm/wtmp /var/log/wtmp; do
1474 if test -f $f ; then
1475 conf_wtmp_location=$f
1476 fi
1477 done
1478 if test -z "$conf_wtmp_location"; then
1479 AC_DEFINE(DISABLE_WTMP)
1480 fi
1481 fi
1482fi
1483if test -n "$conf_wtmp_location"; then
1484 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1485fi
1486
1487
1488dnl utmpx detection - I don't know any system so perverse as to require
1489dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1490dnl there, though.
1491AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1492AC_TRY_COMPILE([
1493#include <sys/types.h>
1494#include <utmp.h>
1495#ifdef HAVE_UTMPX_H
1496#include <utmpx.h>
1497#endif
Damien Miller2994e082000-06-04 15:51:47 +10001498#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001499# include <paths.h>
1500#endif
1501 ],
1502 [ char *utmpx = UTMPX_FILE; ],
1503 [ AC_MSG_RESULT(yes) ],
1504 [ AC_MSG_RESULT(no)
1505 system_utmpx_path=no ]
1506)
1507if test -z "$conf_utmpx_location"; then
1508 if test x"$system_utmpx_path" = x"no" ; then
1509 AC_DEFINE(DISABLE_UTMPX)
1510 fi
1511else
1512 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1513fi
1514
1515dnl wtmpx detection
1516AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1517AC_TRY_COMPILE([
1518#include <sys/types.h>
1519#include <utmp.h>
1520#ifdef HAVE_UTMPX_H
1521#include <utmpx.h>
1522#endif
Damien Miller2994e082000-06-04 15:51:47 +10001523#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001524# include <paths.h>
1525#endif
1526 ],
1527 [ char *wtmpx = WTMPX_FILE; ],
1528 [ AC_MSG_RESULT(yes) ],
1529 [ AC_MSG_RESULT(no)
1530 system_wtmpx_path=no ]
1531)
1532if test -z "$conf_wtmpx_location"; then
1533 if test x"$system_wtmpx_path" = x"no" ; then
1534 AC_DEFINE(DISABLE_WTMPX)
1535 fi
1536else
1537 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1538fi
1539
Damien Miller4018c192000-04-30 09:30:44 +10001540
1541# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001542entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001543AC_ARG_WITH(entropy-timeout,
1544 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1545 [
1546 if test "x$withval" != "xno" ; then
1547 entropy_timeout=$withval
1548 fi
1549 ]
1550)
1551AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1552
1553
Damien Miller29ea30d2000-03-17 10:54:15 +11001554if test ! -z "$blibpath" ; then
1555 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1556 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1557fi
1558
Damien Millerbac2d8a2000-09-05 16:13:06 +11001559AC_EXEEXT
1560
Damien Miller0437b332000-05-02 09:56:41 +10001561AC_OUTPUT(Makefile ssh_prng_cmds)
1562
Damien Miller7b22d652000-06-18 14:07:04 +10001563# Print summary of options
1564
1565if test x$MANTYPE = x'$(CATMAN)' ; then
1566 MAN_MSG=cat
1567else
1568 MAN_MSG=man
1569fi
1570if test ! -z "$RANDOM_POOL" ; then
1571 RAND_MSG="Device ($RANDOM_POOL)"
1572else
1573 if test ! -z "$EGD_SOCKET" ; then
1574 RAND_MSG="EGD ($EGD_SOCKET)"
1575 else
1576 RAND_MSG="Builtin (timeout $entropy_timeout)"
Damien Miller6f9c3372000-10-25 10:06:04 +11001577 BUILTIN_RNG=1
Damien Miller7b22d652000-06-18 14:07:04 +10001578 fi
1579fi
1580
1581# Someone please show me a better way :)
1582A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1583B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1584C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1585D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00001586E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Damien Miller7b22d652000-06-18 14:07:04 +10001587F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1588G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1589
1590echo ""
1591echo "OpenSSH configured has been configured with the following options."
1592echo " User binaries: $B"
Damien Millere68f92b2000-10-02 21:42:15 +11001593echo " User binaries: $B"
Damien Miller7b22d652000-06-18 14:07:04 +10001594echo " System binaries: $C"
1595echo " Configuration files: $D"
1596echo " Askpass program: $E"
1597echo " Manual pages: $F"
1598echo " PID file: $G"
1599echo " Random number collection: $RAND_MSG"
1600echo " Manpage format: $MAN_MSG"
1601echo " PAM support: ${PAM_MSG}"
1602echo " KerberosIV support: $KRB4_MSG"
1603echo " AFS support: $AFS_MSG"
1604echo " S/KEY support: $SKEY_MSG"
1605echo " TCP Wrappers support: $TCPW_MSG"
1606echo " MD5 password support: $MD5_MSG"
1607echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1608echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1609echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1610
1611echo ""
1612
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001613echo " Host: ${host}"
1614echo " Compiler: ${CC}"
1615echo " Compiler flags: ${CFLAGS}"
1616echo "Preprocessor flags: ${CPPFLAGS}"
1617echo " Linker flags: ${LDFLAGS}"
1618echo " Libraries: ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10001619
1620echo ""
1621
Damien Miller82cf0ce2000-12-20 13:34:48 +11001622if test "x$PAM_MSG" = "xyes" ; then
1623 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
1624 echo "otherwise password authentication may fail. Example PAM control files"
1625 echo "can be found in the contrib/ subdirectory"
1626 echo ""
1627fi
1628
Damien Miller6f9c3372000-10-25 10:06:04 +11001629if test ! -z "$BUILTIN_RNG" ; then
1630 echo "WARNING: you are using the builtin random number collection service."
1631 echo "Please read WARNING.RNG and request that your OS vendor includes"
1632 echo "/dev/random in future versions of their OS."
1633 echo ""
1634fi