Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 1 | AC_INIT(ssh.c) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 2 | |
| 3 | AC_CONFIG_HEADER(config.h) |
Damien Miller | 856799b | 2000-03-15 21:18:10 +1100 | [diff] [blame] | 4 | AC_PROG_CC |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 5 | AC_CANONICAL_HOST |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 6 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 7 | # Checks for programs. |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 8 | AC_PROG_CPP |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 9 | AC_PROG_RANLIB |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 10 | AC_PROG_INSTALL |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 11 | AC_CHECK_PROG(AR, ar, ar) |
Damien Miller | e79334a | 1999-12-29 10:03:37 +1100 | [diff] [blame] | 12 | AC_PATH_PROG(PERL, perl) |
| 13 | AC_SUBST(PERL) |
Damien Miller | 8d1fd57 | 2000-05-17 21:34:07 +1000 | [diff] [blame] | 14 | AC_PATH_PROG(ENT, ent) |
| 15 | AC_SUBST(ENT) |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 16 | AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin) |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 17 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 18 | # Use LOGIN_PROGRAM from environment if possible |
| 19 | if test ! -z "$LOGIN_PROGRAM" ; then |
| 20 | AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM") |
| 21 | else |
| 22 | # Search for login |
| 23 | AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login) |
| 24 | if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then |
| 25 | AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK") |
| 26 | fi |
| 27 | fi |
| 28 | |
Damien Miller | 166bd44 | 2000-03-16 10:48:25 +1100 | [diff] [blame] | 29 | if test -z "$LD" ; then |
| 30 | LD=$CC |
| 31 | fi |
| 32 | AC_SUBST(LD) |
| 33 | |
| 34 | # C Compiler features |
| 35 | AC_C_INLINE |
| 36 | if test "$GCC" = "yes"; then |
| 37 | CFLAGS="$CFLAGS -Wall" |
| 38 | fi |
| 39 | |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 40 | CFLAGS="$CFLAGS -I. -I${srcdir-.}" |
| 41 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 42 | # Check for some target-specific stuff |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 43 | case "$host" in |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 44 | *-*-aix*) |
| 45 | AFS_LIBS="-lld" |
Damien Miller | db81959 | 2000-03-14 13:44:01 +1100 | [diff] [blame] | 46 | CFLAGS="$CFLAGS -I/usr/local/include" |
| 47 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 48 | if (test "$LD" != "gcc" && test -z "$blibpath"); then |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 49 | blibpath="/usr/lib:/lib:/usr/local/lib" |
| 50 | fi |
Damien Miller | d2c208a | 2000-05-17 22:00:02 +1000 | [diff] [blame] | 51 | AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)]) |
Damien Miller | eca71f8 | 2000-01-20 22:38:27 +1100 | [diff] [blame] | 52 | AC_DEFINE(BROKEN_GETADDRINFO) |
andre | e441aa3 | 2000-06-12 22:34:38 +0000 | [diff] [blame] | 53 | MANTYPE='$(CATMAN)' |
| 54 | mansubdir=cat |
andre | 60f3c98 | 2000-06-03 16:18:19 +0000 | [diff] [blame] | 55 | dnl AIX handles lastlog as part of its login message |
| 56 | AC_DEFINE(DISABLE_LASTLOG) |
Damien Miller | 5fc8565 | 2000-07-09 23:53:07 +1000 | [diff] [blame] | 57 | MANTYPE='$(CATMAN)' |
| 58 | mansubdir=cat |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 59 | ;; |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 60 | *-*-cygwin*) |
Damien Miller | ef767ac | 2000-10-17 23:14:08 +1100 | [diff] [blame] | 61 | LIBS="$LIBS -lregex /usr/lib/textmode.o" |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 62 | AC_DEFINE(HAVE_CYGWIN) |
| 63 | AC_DEFINE(DISABLE_PAM) |
| 64 | AC_DEFINE(DISABLE_SHADOW) |
| 65 | AC_DEFINE(IPV4_DEFAULT) |
| 66 | AC_DEFINE(IP_TOS_IS_BROKEN) |
| 67 | AC_DEFINE(BROKEN_VHANGUP) |
| 68 | no_pam=1 |
| 69 | no_libsocket=1 |
| 70 | no_libnsl=1 |
| 71 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 72 | *-*-hpux10*) |
| 73 | if test -z "$GCC"; then |
Damien Miller | fda78d9 | 2000-05-20 15:33:44 +1000 | [diff] [blame] | 74 | CFLAGS="$CFLAGS -Ae" |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 75 | fi |
| 76 | CFLAGS="$CFLAGS -D_HPUX_SOURCE" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 77 | IPADDR_IN_DISPLAY=yes |
Damien Miller | b078567 | 2000-08-23 09:10:39 +1000 | [diff] [blame] | 78 | AC_DEFINE(USE_PIPES) |
Damien Miller | 8a1e6a6 | 2000-09-16 15:55:52 +1100 | [diff] [blame] | 79 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | d6f204d | 2000-09-23 13:57:27 +1100 | [diff] [blame] | 80 | AC_DEFINE(DISABLE_UTMP) |
Kevin Steves | 8848b24 | 2000-10-18 13:11:44 +0000 | [diff] [blame] | 81 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Damien Miller | 8a1e6a6 | 2000-09-16 15:55:52 +1100 | [diff] [blame] | 82 | LIBS="$LIBS -lsec" |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 83 | MANTYPE='$(CATMAN)' |
| 84 | mansubdir=cat |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 85 | ;; |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 86 | *-*-hpux11*) |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 87 | CFLAGS="$CFLAGS -D_HPUX_SOURCE" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 88 | IPADDR_IN_DISPLAY=yes |
Damien Miller | 5552d7a | 2000-08-30 09:53:24 +1100 | [diff] [blame] | 89 | AC_DEFINE(USE_PIPES) |
Damien Miller | 8a1e6a6 | 2000-09-16 15:55:52 +1100 | [diff] [blame] | 90 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | d6f204d | 2000-09-23 13:57:27 +1100 | [diff] [blame] | 91 | AC_DEFINE(DISABLE_UTMP) |
Kevin Steves | 8848b24 | 2000-10-18 13:11:44 +0000 | [diff] [blame] | 92 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Damien Miller | 8a1e6a6 | 2000-09-16 15:55:52 +1100 | [diff] [blame] | 93 | LIBS="$LIBS -lsec" |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 94 | MANTYPE='$(CATMAN)' |
| 95 | mansubdir=cat |
| 96 | ;; |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 97 | *-*-irix5*) |
Damien Miller | db81959 | 2000-03-14 13:44:01 +1100 | [diff] [blame] | 98 | CFLAGS="$CFLAGS -I/usr/local/include" |
Damien Miller | 9e11089 | 2000-06-07 21:05:46 +1000 | [diff] [blame] | 99 | LDFLAGS="$LDFLAGS" |
Damien Miller | 190d5a8 | 2000-09-30 09:43:19 +1100 | [diff] [blame] | 100 | PATH="$PATH:/usr/etc" |
Damien Miller | 0727893 | 2000-01-22 14:05:37 +1100 | [diff] [blame] | 101 | MANTYPE='$(CATMAN)' |
Damien Miller | 1808f38 | 2000-01-06 12:03:12 +1100 | [diff] [blame] | 102 | no_libsocket=1 |
| 103 | no_libnsl=1 |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 104 | AC_DEFINE(BROKEN_INET_NTOA) |
Damien Miller | 1808f38 | 2000-01-06 12:03:12 +1100 | [diff] [blame] | 105 | ;; |
| 106 | *-*-irix6*) |
Damien Miller | db81959 | 2000-03-14 13:44:01 +1100 | [diff] [blame] | 107 | CFLAGS="$CFLAGS -I/usr/local/include" |
Damien Miller | 9e11089 | 2000-06-07 21:05:46 +1000 | [diff] [blame] | 108 | LDFLAGS="$LDFLAGS" |
Damien Miller | 190d5a8 | 2000-09-30 09:43:19 +1100 | [diff] [blame] | 109 | PATH="$PATH:/usr/etc" |
Damien Miller | 0727893 | 2000-01-22 14:05:37 +1100 | [diff] [blame] | 110 | MANTYPE='$(CATMAN)' |
Damien Miller | 91606b1 | 2000-06-28 08:22:29 +1000 | [diff] [blame] | 111 | AC_DEFINE(WITH_IRIX_ARRAY) |
| 112 | AC_DEFINE(WITH_IRIX_PROJECT) |
| 113 | AC_DEFINE(WITH_IRIX_AUDIT) |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 114 | no_libsocket=1 |
| 115 | no_libnsl=1 |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 116 | AC_DEFINE(BROKEN_INET_NTOA) |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 117 | ;; |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 118 | *-*-linux*) |
| 119 | no_dev_ptmx=1 |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 120 | AC_DEFINE(DONT_TRY_OTHER_AF) |
Damien Miller | 4e99720 | 2000-07-09 21:21:52 +1000 | [diff] [blame] | 121 | AC_DEFINE(PAM_TTY_KLUDGE) |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 122 | inet6_default_4in6=yes |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 123 | ;; |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 124 | mips-sony-bsd|mips-sony-newsos4) |
| 125 | AC_DEFINE(HAVE_NEWS4) |
| 126 | SONY=1 |
| 127 | AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT), |
| 128 | AC_MSG_ERROR([*** libiberty missing - please install first ***]) |
| 129 | ) |
| 130 | ;; |
Damien Miller | ee1c0b3 | 2000-01-21 00:18:15 +1100 | [diff] [blame] | 131 | *-*-netbsd*) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 132 | need_dash_r=1 |
Damien Miller | ee1c0b3 | 2000-01-21 00:18:15 +1100 | [diff] [blame] | 133 | ;; |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 134 | *-next-*) |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 135 | conf_lastlog_location="/usr/adm/lastlog" |
Damien Miller | e5192fa | 2000-08-29 14:30:37 +1100 | [diff] [blame] | 136 | conf_utmp_location=/etc/utmp |
| 137 | conf_wtmp_location=/usr/adm/wtmp |
| 138 | MAIL=/usr/spool/mail |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 139 | AC_DEFINE(HAVE_NEXT) |
Ben Lindstrom | b4df15d | 2000-10-15 00:17:36 +0000 | [diff] [blame] | 140 | AC_DEFINE(BROKEN_REALPATH) |
Ben Lindstrom | 76020ba | 2000-10-25 16:55:00 +0000 | [diff] [blame] | 141 | AC_DEFINE(USE_PIPES) |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 142 | CFLAGS="$CFLAGS -I/usr/local/include" |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 143 | ;; |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 144 | *-*-solaris*) |
Damien Miller | db81959 | 2000-03-14 13:44:01 +1100 | [diff] [blame] | 145 | CFLAGS="$CFLAGS -I/usr/local/include" |
Damien Miller | 08c788a | 2000-03-16 07:52:29 +1100 | [diff] [blame] | 146 | LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 147 | need_dash_r=1 |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 148 | # hardwire lastlog location (can't detect it on some versions) |
| 149 | conf_lastlog_location="/var/adm/lastlog" |
Damien Miller | a1cb644 | 2000-06-09 11:58:35 +1000 | [diff] [blame] | 150 | AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) |
| 151 | sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` |
| 152 | if test "$sol2ver" -ge 8; then |
| 153 | AC_MSG_RESULT(yes) |
| 154 | AC_DEFINE(DISABLE_UTMP) |
| 155 | AC_DEFINE(DISABLE_WTMP) |
| 156 | else |
| 157 | AC_MSG_RESULT(no) |
| 158 | fi |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 159 | ;; |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 160 | *-*-sunos4*) |
| 161 | CFLAGS="$CFLAGS -DSUNOS4" |
| 162 | AC_CHECK_FUNCS(getpwanam) |
Damien Miller | 36ccb5c | 2000-08-09 16:34:27 +1000 | [diff] [blame] | 163 | conf_utmp_location=/etc/utmp |
| 164 | conf_wtmp_location=/var/adm/wtmp |
| 165 | conf_lastlog_location=/var/adm/lastlog |
Damien Miller | b078567 | 2000-08-23 09:10:39 +1000 | [diff] [blame] | 166 | AC_DEFINE(USE_PIPES) |
Damien Miller | 36ccb5c | 2000-08-09 16:34:27 +1000 | [diff] [blame] | 167 | MANTYPE='$(CATMAN)' |
| 168 | mansubdir=cat |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 169 | ;; |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 170 | *-sni-sysv*) |
| 171 | CFLAGS="$CFLAGS -I/usr/local/include" |
| 172 | LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib" |
| 173 | MANTYPE='$(CATMAN)' |
| 174 | AC_DEFINE(IP_TOS_IS_BROKEN) |
| 175 | mansubdir=cat |
Damien Miller | b2dc28e | 2000-07-12 09:18:33 +1000 | [diff] [blame] | 176 | LIBS="$LIBS -lgen -lnsl -lucb" |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 177 | ;; |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 178 | *-*-sysv4.2*) |
| 179 | CFLAGS="$CFLAGS -I/usr/local/include" |
| 180 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
| 181 | MANTYPE='$(CATMAN)' |
| 182 | mansubdir=cat |
| 183 | LIBS="$LIBS -lgen -lsocket -lnsl -lresolv" |
| 184 | enable_suid_ssh=no |
| 185 | ;; |
| 186 | *-*-sysv5*) |
| 187 | CFLAGS="$CFLAGS -I/usr/local/include" |
| 188 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
| 189 | MANTYPE='$(CATMAN)' |
| 190 | mansubdir=cat |
| 191 | LIBS="$LIBS -lgen -lsocket" |
| 192 | enable_suid_ssh=no |
| 193 | ;; |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 194 | *-*-sysv*) |
Damien Miller | db81959 | 2000-03-14 13:44:01 +1100 | [diff] [blame] | 195 | CFLAGS="$CFLAGS -I/usr/local/include" |
| 196 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | 0e1cf7c | 2000-01-26 12:15:30 +1100 | [diff] [blame] | 197 | MANTYPE='$(CATMAN)' |
| 198 | mansubdir=cat |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 199 | LIBS="$LIBS -lgen -lsocket" |
| 200 | ;; |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 201 | *-*-sco3.2v4*) |
Damien Miller | 238a9fa | 2000-08-31 09:20:05 +1100 | [diff] [blame] | 202 | AC_DEFINE(USE_PIPES) |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 203 | CFLAGS="$CFLAGS -Dftruncate=chsize -I/usr/local/include" |
| 204 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
| 205 | MANTYPE='$(CATMAN)' |
| 206 | mansubdir=cat |
| 207 | LIBS="$LIBS -lgen -lsocket -los -lprot -lx" |
| 208 | no_dev_ptmx=1 |
| 209 | RANLIB=true |
| 210 | AC_DEFINE(BROKEN_SYS_TERMIO_H) |
| 211 | rsh_path="/usr/bin/rcmd" |
| 212 | AC_DEFINE(HAVE_SCO_PROTECTED_PW) |
| 213 | ;; |
| 214 | *-*-sco3.2v5*) |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 215 | CFLAGS="$CFLAGS -I/usr/local/include" |
| 216 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
| 217 | MANTYPE='$(CATMAN)' |
| 218 | mansubdir=cat |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 219 | LIBS="$LIBS -lgen -lsocket -lprot -lx" |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 220 | no_dev_ptmx=1 |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 221 | rsh_path="/usr/bin/rcmd" |
| 222 | AC_DEFINE(HAVE_SCO_PROTECTED_PW) |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 223 | ;; |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 224 | *-dec-osf*) |
| 225 | # This is untested |
| 226 | if test ! -z "USE_SIA" ; then |
| 227 | AC_MSG_CHECKING(for Digital Unix Security Integration Architecture) |
| 228 | if test -f /etc/sia/matrix.conf; then |
| 229 | AC_MSG_RESULT(yes) |
| 230 | AC_DEFINE(HAVE_OSF_SIA) |
| 231 | AC_DEFINE(DISABLE_LOGIN) |
| 232 | LIBS="$LIBS -lsecurity -ldb -lm -laud" |
| 233 | else |
| 234 | AC_MSG_RESULT(no) |
| 235 | fi |
| 236 | fi |
| 237 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 238 | esac |
| 239 | |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 240 | # Allow user to specify flags |
| 241 | AC_ARG_WITH(cflags, |
| 242 | [ --with-cflags Specify additional flags to pass to compiler], |
| 243 | [ |
| 244 | if test "x$withval" != "xno" ; then |
| 245 | CFLAGS="$CFLAGS $withval" |
| 246 | fi |
| 247 | ] |
| 248 | ) |
| 249 | AC_ARG_WITH(ldflags, |
Ben Lindstrom | 2ed9818 | 2000-11-06 07:15:43 +0000 | [diff] [blame^] | 250 | [ --with-ldflags Specify additional flags to pass to linker], |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 251 | [ |
| 252 | if test "x$withval" != "xno" ; then |
| 253 | LDFLAGS="$LDFLAGS $withval" |
| 254 | fi |
| 255 | ] |
| 256 | ) |
| 257 | AC_ARG_WITH(libs, |
| 258 | [ --with-libs Specify additional libraries to link with], |
| 259 | [ |
| 260 | if test "x$withval" != "xno" ; then |
| 261 | LIBS="$LIBS $withval" |
| 262 | fi |
| 263 | ] |
| 264 | ) |
| 265 | |
| 266 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 267 | # Checks for libraries. |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 268 | AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***])) |
| 269 | AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil") |
Damien Miller | 6f9c337 | 2000-10-25 10:06:04 +1100 | [diff] [blame] | 270 | |
| 271 | AC_CHECK_FUNC(regcomp, |
| 272 | [], |
| 273 | [ |
| 274 | AC_CHECK_LIB(pcre, pcre_info, |
| 275 | AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre") |
| 276 | ] |
| 277 | ) |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 278 | |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 279 | if test -z "$no_libsocket" ; then |
| 280 | AC_CHECK_LIB(nsl, yp_match, , ) |
| 281 | fi |
| 282 | if test -z "$no_libnsl" ; then |
| 283 | AC_CHECK_LIB(socket, main, , ) |
Damien Miller | 32b3cf2 | 1999-12-26 10:21:48 +1100 | [diff] [blame] | 284 | fi |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 285 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 286 | # Checks for header files. |
Damien Miller | 874d77b | 2000-10-14 16:23:11 +1100 | [diff] [blame] | 287 | AC_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/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 Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 288 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 289 | dnl Checks for library functions. |
Ben Lindstrom | 67e21e1 | 2000-11-05 09:08:45 +0000 | [diff] [blame] | 290 | AC_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 Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 291 | dnl Checks for time functions |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 292 | AC_CHECK_FUNCS(gettimeofday time) |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 293 | dnl Checks for libutil functions |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 294 | AC_CHECK_FUNCS(login logout updwtmp logwtmp) |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 295 | dnl Checks for utmp functions |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 296 | AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent) |
| 297 | AC_CHECK_FUNCS(utmpname) |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 298 | dnl Checks for utmpx functions |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 299 | AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline ) |
| 300 | AC_CHECK_FUNCS(setutxent utmpxname) |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 301 | |
Damien Miller | 5fc8565 | 2000-07-09 23:53:07 +1000 | [diff] [blame] | 302 | AC_CHECK_FUNC(getuserattr, |
| 303 | [AC_DEFINE(HAVE_GETUSERATTR)], |
| 304 | [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])] |
| 305 | ) |
| 306 | |
Damien Miller | 04f8014 | 1999-11-19 15:32:34 +1100 | [diff] [blame] | 307 | AC_CHECK_FUNC(login, |
| 308 | [AC_DEFINE(HAVE_LOGIN)], |
| 309 | [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])] |
| 310 | ) |
| 311 | |
| 312 | AC_CHECK_FUNC(daemon, |
| 313 | [AC_DEFINE(HAVE_DAEMON)], |
| 314 | [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] |
| 315 | ) |
| 316 | |
Damien Miller | 9fb07e4 | 2000-03-05 16:22:59 +1100 | [diff] [blame] | 317 | AC_CHECK_FUNC(getpagesize, |
| 318 | [AC_DEFINE(HAVE_GETPAGESIZE)], |
| 319 | [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] |
| 320 | ) |
| 321 | |
Damien Miller | cb170cb | 2000-07-01 16:52:55 +1000 | [diff] [blame] | 322 | # Check for broken snprintf |
| 323 | if test "x$ac_cv_func_snprintf" = "xyes" ; then |
| 324 | AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) |
| 325 | AC_TRY_RUN( |
| 326 | [ |
| 327 | #include <stdio.h> |
| 328 | int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');} |
| 329 | ], |
| 330 | [AC_MSG_RESULT(yes)], |
| 331 | [ |
| 332 | AC_MSG_RESULT(no) |
| 333 | AC_DEFINE(BROKEN_SNPRINTF) |
| 334 | AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) |
| 335 | ] |
| 336 | ) |
| 337 | fi |
| 338 | |
Damien Miller | 606f880 | 2000-09-16 15:39:56 +1100 | [diff] [blame] | 339 | AC_FUNC_GETPGRP |
| 340 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 341 | PAM_MSG="no" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 342 | AC_ARG_WITH(pam, |
| 343 | [ --without-pam Disable PAM support ], |
| 344 | [ |
| 345 | if test "x$withval" = "xno" ; then |
| 346 | no_pam=1 |
| 347 | AC_DEFINE(DISABLE_PAM) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 348 | PAM_MSG="disabled" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 349 | fi |
| 350 | ] |
| 351 | ) |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 352 | if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 353 | AC_CHECK_LIB(dl, dlopen, , ) |
| 354 | LIBS="$LIBS -lpam" |
| 355 | |
Damien Miller | 0e65eed | 2000-05-17 22:16:05 +1000 | [diff] [blame] | 356 | AC_CHECK_FUNCS(pam_getenvlist) |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 357 | |
Damien Miller | 1f335fb | 2000-06-26 11:31:33 +1000 | [diff] [blame] | 358 | disable_shadow=yes |
| 359 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 360 | PAM_MSG="yes" |
| 361 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 362 | # Check PAM strerror arguments (old PAM) |
| 363 | AC_MSG_CHECKING([whether pam_strerror takes only one argument]) |
| 364 | AC_TRY_COMPILE( |
| 365 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 366 | #include <stdlib.h> |
| 367 | #include <security/pam_appl.h> |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 368 | ], |
| 369 | [(void)pam_strerror((pam_handle_t *)NULL, -1);], |
| 370 | [AC_MSG_RESULT(no)], |
| 371 | [ |
| 372 | AC_DEFINE(HAVE_OLD_PAM) |
| 373 | AC_MSG_RESULT(yes) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 374 | PAM_MSG="yes (old library)" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 375 | ] |
| 376 | ) |
| 377 | fi |
| 378 | |
| 379 | # The big search for OpenSSL |
| 380 | AC_ARG_WITH(ssl-dir, |
| 381 | [ --with-ssl-dir=PATH Specify path to OpenSSL installation ], |
| 382 | [ |
Ben Lindstrom | 23e1371 | 2000-10-29 22:49:19 +0000 | [diff] [blame] | 383 | if test "x$withval" != "xno" ; then |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 384 | tryssldir=$withval |
| 385 | fi |
| 386 | ] |
| 387 | ) |
| 388 | |
| 389 | saved_LIBS="$LIBS" |
Damien Miller | a1ad480 | 2000-03-15 10:04:54 +1100 | [diff] [blame] | 390 | saved_LDFLAGS="$LDFLAGS" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 391 | saved_CFLAGS="$CFLAGS" |
| 392 | if test "x$prefix" != "xNONE" ; then |
| 393 | tryssldir="$tryssldir $prefix" |
| 394 | fi |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 395 | AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [ |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 396 | |
Damien Miller | a1b61e1 | 2000-09-16 17:02:16 +1100 | [diff] [blame] | 397 | 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 Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 398 | if test ! -z "$ssldir" ; then |
| 399 | LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" |
| 400 | CFLAGS="$saved_CFLAGS -I$ssldir/include" |
| 401 | if test ! -z "$need_dash_r" ; then |
| 402 | LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" |
| 403 | fi |
Damien Miller | a1ad480 | 2000-03-15 10:04:54 +1100 | [diff] [blame] | 404 | else |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 405 | LDFLAGS="$saved_LDFLAGS" |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 406 | fi |
| 407 | |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 408 | LIBS="$saved_LIBS -lcrypto" |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 409 | |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 410 | # Basic test to check for compatible version and correct linking |
| 411 | # *does not* test for RSA - that comes later. |
| 412 | AC_TRY_RUN( |
| 413 | [ |
Damien Miller | e59ce62 | 2000-05-01 20:54:17 +1000 | [diff] [blame] | 414 | #include <string.h> |
| 415 | #include <openssl/rand.h> |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 416 | int main(void) |
| 417 | { |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 418 | char a[2048]; |
| 419 | memset(a, 0, sizeof(a)); |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 420 | RAND_add(a, sizeof(a), sizeof(a)); |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 421 | return(RAND_status() <= 0); |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 422 | } |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 423 | ], |
| 424 | [ |
| 425 | found_crypto=1 |
| 426 | break; |
| 427 | ], [] |
| 428 | ) |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 429 | |
| 430 | if test ! -z "$found_crypto" ; then |
| 431 | break; |
| 432 | fi |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 433 | done |
| 434 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 435 | if test -z "$found_crypto" ; then |
| 436 | AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install]) |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 437 | fi |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 438 | if test -z "$ssldir" ; then |
| 439 | ssldir="(system)" |
| 440 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 441 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 442 | ac_cv_openssldir=$ssldir |
| 443 | ]) |
| 444 | |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 445 | if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 446 | AC_DEFINE(HAVE_OPENSSL) |
| 447 | dnl Need to recover ssldir - test above runs in subshell |
| 448 | ssldir=$ac_cv_openssldir |
Damien Miller | a1ad480 | 2000-03-15 10:04:54 +1100 | [diff] [blame] | 449 | CFLAGS="$saved_CFLAGS -I$ssldir/include" |
| 450 | LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" |
| 451 | if test ! -z "$need_dash_r" ; then |
| 452 | LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 453 | fi |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 454 | if test ! -z "$blibpath" ; then |
| 455 | blibpath="$blibpath:$ssldir:$ssldir/lib" |
| 456 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 457 | fi |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 458 | LIBS="$saved_LIBS -lcrypto" |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 459 | |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 460 | # Now test RSA support |
| 461 | saved_LIBS="$LIBS" |
| 462 | AC_MSG_CHECKING([for RSA support]) |
| 463 | for WANTS_RSAREF in "" 1 ; do |
| 464 | if test -z "$WANTS_RSAREF" ; then |
| 465 | LIBS="$saved_LIBS" |
| 466 | else |
| 467 | LIBS="$saved_LIBS -lRSAglue -lrsaref" |
| 468 | fi |
| 469 | AC_TRY_RUN([ |
| 470 | #include <string.h> |
| 471 | #include <openssl/rand.h> |
| 472 | #include <openssl/rsa.h> |
| 473 | #include <openssl/bn.h> |
| 474 | #include <openssl/sha.h> |
| 475 | int main(void) |
| 476 | { |
| 477 | int num; RSA *key; static unsigned char p_in[] = "blahblah"; |
| 478 | unsigned char c[256], p[256]; |
| 479 | memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c)); |
| 480 | if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1); |
| 481 | num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING); |
| 482 | return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING)); |
| 483 | } |
| 484 | ], |
| 485 | [ |
| 486 | rsa_works=1 |
| 487 | break; |
| 488 | ], []) |
| 489 | done |
| 490 | |
| 491 | if test ! -z "$no_rsa" ; then |
| 492 | AC_MSG_RESULT(disabled) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 493 | RSA_MSG="disabled" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 494 | else |
| 495 | if test -z "$rsa_works" ; then |
| 496 | AC_MSG_WARN([*** No RSA support found *** ]) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 497 | RSA_MSG="no" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 498 | else |
| 499 | if test -z "$WANTS_RSAREF" ; then |
| 500 | AC_MSG_RESULT(yes) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 501 | RSA_MSG="yes" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 502 | else |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 503 | RSA_MSG="yes (using RSAref)" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 504 | AC_MSG_RESULT(using RSAref) |
| 505 | LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref" |
| 506 | fi |
| 507 | fi |
| 508 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 509 | |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 510 | # Cheap hack to ensure NEWS-OS libraries are arranged right. |
| 511 | if test ! -z "$SONY" ; then |
| 512 | LIBS="$LIBS -liberty"; |
| 513 | fi |
| 514 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 515 | # Checks for data types |
Damien Miller | e0f4574 | 2000-01-18 09:12:06 +1100 | [diff] [blame] | 516 | AC_CHECK_SIZEOF(char, 1) |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 517 | AC_CHECK_SIZEOF(short int, 2) |
| 518 | AC_CHECK_SIZEOF(int, 4) |
| 519 | AC_CHECK_SIZEOF(long int, 4) |
| 520 | AC_CHECK_SIZEOF(long long int, 8) |
| 521 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 522 | # More checks for data types |
Damien Miller | caf6dd6 | 2000-08-29 11:33:50 +1100 | [diff] [blame] | 523 | AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ |
| 524 | AC_TRY_COMPILE( |
| 525 | [ #include <sys/types.h> ], |
| 526 | [ u_int a; a = 1;], |
| 527 | [ ac_cv_have_u_int="yes" ], |
| 528 | [ ac_cv_have_u_int="no" ] |
| 529 | ) |
| 530 | ]) |
| 531 | if test "x$ac_cv_have_u_int" = "xyes" ; then |
| 532 | AC_DEFINE(HAVE_U_INT) |
| 533 | have_u_int=1 |
| 534 | fi |
| 535 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 536 | AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [ |
| 537 | AC_TRY_COMPILE( |
| 538 | [ #include <sys/types.h> ], |
| 539 | [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], |
| 540 | [ ac_cv_have_intxx_t="yes" ], |
| 541 | [ ac_cv_have_intxx_t="no" ] |
| 542 | ) |
| 543 | ]) |
| 544 | if test "x$ac_cv_have_intxx_t" = "xyes" ; then |
| 545 | AC_DEFINE(HAVE_INTXX_T) |
| 546 | have_intxx_t=1 |
| 547 | fi |
| 548 | |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 549 | AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [ |
| 550 | AC_TRY_COMPILE( |
| 551 | [ #include <sys/types.h> ], |
| 552 | [ int64_t a; a = 1;], |
| 553 | [ ac_cv_have_int64_t="yes" ], |
| 554 | [ ac_cv_have_int64_t="no" ] |
| 555 | ) |
| 556 | ]) |
| 557 | if test "x$ac_cv_have_int64_t" = "xyes" ; then |
| 558 | AC_DEFINE(HAVE_INT64_T) |
| 559 | have_int64_t=1 |
| 560 | fi |
| 561 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 562 | AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ |
| 563 | AC_TRY_COMPILE( |
| 564 | [ #include <sys/types.h> ], |
| 565 | [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], |
| 566 | [ ac_cv_have_u_intxx_t="yes" ], |
| 567 | [ ac_cv_have_u_intxx_t="no" ] |
| 568 | ) |
| 569 | ]) |
| 570 | if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then |
| 571 | AC_DEFINE(HAVE_U_INTXX_T) |
| 572 | have_u_intxx_t=1 |
| 573 | fi |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 574 | |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 575 | AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [ |
| 576 | AC_TRY_COMPILE( |
| 577 | [ #include <sys/types.h> ], |
| 578 | [ u_int64_t a; a = 1;], |
| 579 | [ ac_cv_have_u_int64_t="yes" ], |
| 580 | [ ac_cv_have_u_int64_t="no" ] |
| 581 | ) |
| 582 | ]) |
| 583 | if test "x$ac_cv_have_u_int64_t" = "xyes" ; then |
| 584 | AC_DEFINE(HAVE_U_INT64_T) |
| 585 | have_u_int64_t=1 |
| 586 | fi |
| 587 | |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 588 | if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ |
| 589 | test "x$ac_cv_header_sys_bitypes_h" = "xyes") |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 590 | then |
| 591 | AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) |
| 592 | AC_TRY_COMPILE( |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 593 | [ |
| 594 | #include <sys/bitypes.h> |
| 595 | ], |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 596 | [ |
Damien Miller | 70494d1 | 2000-04-03 15:57:06 +1000 | [diff] [blame] | 597 | int8_t a; int16_t b; int32_t c; |
| 598 | u_int8_t e; u_int16_t f; u_int32_t g; |
| 599 | a = b = c = e = f = g = 1; |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 600 | ], |
| 601 | [ |
| 602 | AC_DEFINE(HAVE_U_INTXX_T) |
| 603 | AC_DEFINE(HAVE_INTXX_T) |
| 604 | AC_MSG_RESULT(yes) |
| 605 | ], |
| 606 | [AC_MSG_RESULT(no)] |
| 607 | ) |
| 608 | fi |
| 609 | |
Damien Miller | d6121d2 | 2000-03-17 23:26:46 +1100 | [diff] [blame] | 610 | if test -z "$have_u_intxx_t" ; then |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 611 | AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ |
| 612 | AC_TRY_COMPILE( |
| 613 | [ |
| 614 | #include <sys/types.h> |
| 615 | ], |
| 616 | [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ], |
| 617 | [ ac_cv_have_uintxx_t="yes" ], |
| 618 | [ ac_cv_have_uintxx_t="no" ] |
| 619 | ) |
| 620 | ]) |
| 621 | if test "x$ac_cv_have_uintxx_t" = "xyes" ; then |
| 622 | AC_DEFINE(HAVE_UINTXX_T) |
| 623 | fi |
Damien Miller | d6121d2 | 2000-03-17 23:26:46 +1100 | [diff] [blame] | 624 | fi |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 625 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 626 | AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [ |
| 627 | AC_TRY_COMPILE( |
| 628 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 629 | #include <sys/types.h> |
| 630 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 631 | ], |
| 632 | [socklen_t foo; foo = 1235;], |
| 633 | [ ac_cv_have_socklen_t="yes" ], |
| 634 | [ ac_cv_have_socklen_t="no" ] |
| 635 | ) |
| 636 | ]) |
| 637 | if test "x$ac_cv_have_socklen_t" = "xyes" ; then |
| 638 | AC_DEFINE(HAVE_SOCKLEN_T) |
| 639 | fi |
Damien Miller | 74d0d4a | 1999-12-29 02:24:35 +1100 | [diff] [blame] | 640 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 641 | AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ |
| 642 | AC_TRY_COMPILE( |
| 643 | [ |
| 644 | #include <sys/types.h> |
| 645 | ], |
| 646 | [ size_t foo; foo = 1235; ], |
| 647 | [ ac_cv_have_size_t="yes" ], |
| 648 | [ ac_cv_have_size_t="no" ] |
| 649 | ) |
| 650 | ]) |
| 651 | if test "x$ac_cv_have_size_t" = "xyes" ; then |
| 652 | AC_DEFINE(HAVE_SIZE_T) |
| 653 | fi |
Damien Miller | 9505851 | 1999-12-29 10:36:45 +1100 | [diff] [blame] | 654 | |
Damien Miller | 615f939 | 2000-05-17 22:53:33 +1000 | [diff] [blame] | 655 | AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ |
| 656 | AC_TRY_COMPILE( |
| 657 | [ |
| 658 | #include <sys/types.h> |
| 659 | ], |
| 660 | [ ssize_t foo; foo = 1235; ], |
| 661 | [ ac_cv_have_ssize_t="yes" ], |
| 662 | [ ac_cv_have_ssize_t="no" ] |
| 663 | ) |
| 664 | ]) |
| 665 | if test "x$ac_cv_have_ssize_t" = "xyes" ; then |
| 666 | AC_DEFINE(HAVE_SSIZE_T) |
| 667 | fi |
| 668 | |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 669 | AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ |
| 670 | AC_TRY_COMPILE( |
| 671 | [ |
| 672 | #include <sys/types.h> |
| 673 | #include <sys/socket.h> |
| 674 | ], |
| 675 | [ sa_family_t foo; foo = 1235; ], |
| 676 | [ ac_cv_have_sa_family_t="yes" ], |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 677 | [ AC_TRY_COMPILE( |
| 678 | [ |
| 679 | #include <sys/types.h> |
| 680 | #include <sys/socket.h> |
| 681 | #include <netinet/in.h> |
| 682 | ], |
| 683 | [ sa_family_t foo; foo = 1235; ], |
| 684 | [ ac_cv_have_sa_family_t="yes" ], |
| 685 | |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 686 | [ ac_cv_have_sa_family_t="no" ] |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 687 | )] |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 688 | ) |
| 689 | ]) |
| 690 | if test "x$ac_cv_have_sa_family_t" = "xyes" ; then |
| 691 | AC_DEFINE(HAVE_SA_FAMILY_T) |
| 692 | fi |
| 693 | |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 694 | AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ |
| 695 | AC_TRY_COMPILE( |
| 696 | [ |
| 697 | #include <sys/types.h> |
| 698 | ], |
| 699 | [ pid_t foo; foo = 1235; ], |
| 700 | [ ac_cv_have_pid_t="yes" ], |
| 701 | [ ac_cv_have_pid_t="no" ] |
| 702 | ) |
| 703 | ]) |
| 704 | if test "x$ac_cv_have_pid_t" = "xyes" ; then |
| 705 | AC_DEFINE(HAVE_PID_T) |
| 706 | fi |
| 707 | |
| 708 | AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ |
| 709 | AC_TRY_COMPILE( |
| 710 | [ |
| 711 | #include <sys/types.h> |
| 712 | ], |
| 713 | [ mode_t foo; foo = 1235; ], |
| 714 | [ ac_cv_have_mode_t="yes" ], |
| 715 | [ ac_cv_have_mode_t="no" ] |
| 716 | ) |
| 717 | ]) |
| 718 | if test "x$ac_cv_have_mode_t" = "xyes" ; then |
| 719 | AC_DEFINE(HAVE_MODE_T) |
| 720 | fi |
| 721 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 722 | |
| 723 | AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ |
| 724 | AC_TRY_COMPILE( |
| 725 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 726 | #include <sys/types.h> |
| 727 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 728 | ], |
| 729 | [ struct sockaddr_storage s; ], |
| 730 | [ ac_cv_have_struct_sockaddr_storage="yes" ], |
| 731 | [ ac_cv_have_struct_sockaddr_storage="no" ] |
| 732 | ) |
| 733 | ]) |
| 734 | if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then |
| 735 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) |
| 736 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 737 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 738 | AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ |
| 739 | AC_TRY_COMPILE( |
| 740 | [ |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 741 | #include <sys/types.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 742 | #include <netinet/in.h> |
| 743 | ], |
| 744 | [ struct sockaddr_in6 s; s.sin6_family = 0; ], |
| 745 | [ ac_cv_have_struct_sockaddr_in6="yes" ], |
| 746 | [ ac_cv_have_struct_sockaddr_in6="no" ] |
| 747 | ) |
| 748 | ]) |
| 749 | if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then |
| 750 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) |
| 751 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 752 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 753 | AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ |
| 754 | AC_TRY_COMPILE( |
| 755 | [ |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 756 | #include <sys/types.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 757 | #include <netinet/in.h> |
| 758 | ], |
| 759 | [ struct in6_addr s; s.s6_addr[0] = 0; ], |
| 760 | [ ac_cv_have_struct_in6_addr="yes" ], |
| 761 | [ ac_cv_have_struct_in6_addr="no" ] |
| 762 | ) |
| 763 | ]) |
| 764 | if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then |
| 765 | AC_DEFINE(HAVE_STRUCT_IN6_ADDR) |
| 766 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 767 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 768 | AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ |
| 769 | AC_TRY_COMPILE( |
| 770 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 771 | #include <sys/types.h> |
| 772 | #include <sys/socket.h> |
| 773 | #include <netdb.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 774 | ], |
| 775 | [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ], |
| 776 | [ ac_cv_have_struct_addrinfo="yes" ], |
| 777 | [ ac_cv_have_struct_addrinfo="no" ] |
| 778 | ) |
| 779 | ]) |
| 780 | if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then |
| 781 | AC_DEFINE(HAVE_STRUCT_ADDRINFO) |
| 782 | fi |
| 783 | |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 784 | dnl Checks for structure members |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 785 | OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP) |
| 786 | OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX) |
| 787 | OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX) |
| 788 | OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP) |
| 789 | OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP) |
Damien Miller | ad1bc5f | 2000-05-20 14:53:09 +1000 | [diff] [blame] | 790 | OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX) |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 791 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP) |
| 792 | OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP) |
Damien Miller | 8e81ed3 | 2000-07-01 13:17:42 +1000 | [diff] [blame] | 793 | OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX) |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 794 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP) |
| 795 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX) |
| 796 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP) |
| 797 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 798 | OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP) |
| 799 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP) |
| 800 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX) |
| 801 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 802 | AC_STRUCT_ST_BLKSIZE |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 803 | |
Damien Miller | 942da03 | 2000-08-18 13:59:06 +1000 | [diff] [blame] | 804 | AC_CACHE_CHECK([for sun_len field in struct sockaddr_un], |
| 805 | ac_cv_have_sun_len_in_struct_sockaddr_un, [ |
| 806 | AC_TRY_COMPILE( |
| 807 | [ |
| 808 | #include <sys/types.h> |
| 809 | #include <sys/socket.h> |
| 810 | ], |
| 811 | [ struct sockaddr_un s; s.sun_len = 1; ], |
| 812 | [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ], |
| 813 | [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ], |
| 814 | ) |
| 815 | ]) |
| 816 | if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then |
| 817 | AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN) |
| 818 | fi |
| 819 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 820 | AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], |
| 821 | ac_cv_have_ss_family_in_struct_ss, [ |
| 822 | AC_TRY_COMPILE( |
| 823 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 824 | #include <sys/types.h> |
| 825 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 826 | ], |
| 827 | [ struct sockaddr_storage s; s.ss_family = 1; ], |
| 828 | [ ac_cv_have_ss_family_in_struct_ss="yes" ], |
| 829 | [ ac_cv_have_ss_family_in_struct_ss="no" ], |
| 830 | ) |
| 831 | ]) |
| 832 | if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then |
| 833 | AC_DEFINE(HAVE_SS_FAMILY_IN_SS) |
| 834 | fi |
| 835 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 836 | AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], |
| 837 | ac_cv_have___ss_family_in_struct_ss, [ |
| 838 | AC_TRY_COMPILE( |
| 839 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 840 | #include <sys/types.h> |
| 841 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 842 | ], |
| 843 | [ struct sockaddr_storage s; s.__ss_family = 1; ], |
| 844 | [ ac_cv_have___ss_family_in_struct_ss="yes" ], |
| 845 | [ ac_cv_have___ss_family_in_struct_ss="no" ] |
| 846 | ) |
| 847 | ]) |
| 848 | if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then |
| 849 | AC_DEFINE(HAVE___SS_FAMILY_IN_SS) |
| 850 | fi |
Damien Miller | bf1c9b2 | 1999-12-09 10:16:54 +1100 | [diff] [blame] | 851 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 852 | AC_CACHE_CHECK([for pw_class field in struct passwd], |
| 853 | ac_cv_have_pw_class_in_struct_passwd, [ |
| 854 | AC_TRY_COMPILE( |
| 855 | [ |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 856 | #include <pwd.h> |
| 857 | ], |
Kevin Steves | 48b7cc0 | 2000-10-07 13:24:00 +0000 | [diff] [blame] | 858 | [ struct passwd p; p.pw_class = 0; ], |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 859 | [ ac_cv_have_pw_class_in_struct_passwd="yes" ], |
| 860 | [ ac_cv_have_pw_class_in_struct_passwd="no" ] |
| 861 | ) |
| 862 | ]) |
| 863 | if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then |
| 864 | AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) |
| 865 | fi |
| 866 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 867 | |
| 868 | AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ |
| 869 | AC_TRY_LINK([], |
| 870 | [ extern char *__progname; printf("%s", __progname); ], |
| 871 | [ ac_cv_libc_defines___progname="yes" ], |
| 872 | [ ac_cv_libc_defines___progname="no" ] |
| 873 | ) |
| 874 | ]) |
| 875 | if test "x$ac_cv_libc_defines___progname" = "xyes" ; then |
| 876 | AC_DEFINE(HAVE___PROGNAME) |
| 877 | fi |
| 878 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 879 | |
Damien Miller | ecbb26d | 2000-07-15 14:59:14 +1000 | [diff] [blame] | 880 | AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ |
| 881 | AC_TRY_LINK([], |
| 882 | [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);], |
| 883 | [ ac_cv_libc_defines_sys_errlist="yes" ], |
| 884 | [ ac_cv_libc_defines_sys_errlist="no" ] |
| 885 | ) |
| 886 | ]) |
| 887 | if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then |
| 888 | AC_DEFINE(HAVE_SYS_ERRLIST) |
| 889 | fi |
| 890 | |
| 891 | |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 892 | AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ |
| 893 | AC_TRY_LINK([], |
| 894 | [ extern int sys_nerr; printf("%i", sys_nerr);], |
| 895 | [ ac_cv_libc_defines_sys_nerr="yes" ], |
| 896 | [ ac_cv_libc_defines_sys_nerr="no" ] |
| 897 | ) |
| 898 | ]) |
| 899 | if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then |
| 900 | AC_DEFINE(HAVE_SYS_NERR) |
| 901 | fi |
| 902 | |
| 903 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 904 | # Looking for programs, paths and files |
| 905 | AC_ARG_WITH(rsh, |
| 906 | [ --with-rsh=PATH Specify path to remote shell program ], |
| 907 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 908 | if test "x$withval" != "$no" ; then |
Damien Miller | 90dcc05 | 2000-07-08 10:17:40 +1000 | [diff] [blame] | 909 | rsh_path=$withval |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 910 | fi |
| 911 | ], |
| 912 | [ |
| 913 | AC_PATH_PROG(rsh_path, rsh) |
| 914 | ] |
| 915 | ) |
| 916 | |
| 917 | AC_ARG_WITH(xauth, |
| 918 | [ --with-xauth=PATH Specify path to xauth program ], |
| 919 | [ |
Ben Lindstrom | 76020ba | 2000-10-25 16:55:00 +0000 | [diff] [blame] | 920 | if test "x$withval" != "xno" ; then |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 921 | xauth_path=$withval |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 922 | fi |
| 923 | ], |
| 924 | [ |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 925 | AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin) |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 926 | if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 927 | xauth_path="/usr/openwin/bin/xauth" |
| 928 | fi |
| 929 | ] |
| 930 | ) |
| 931 | |
| 932 | if test ! -z "$xauth_path" ; then |
| 933 | AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") |
| 934 | fi |
| 935 | if test ! -z "$rsh_path" ; then |
| 936 | AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path") |
| 937 | fi |
| 938 | |
| 939 | # Check for mail directory (last resort if we cannot get it from headers) |
| 940 | if test ! -z "$MAIL" ; then |
| 941 | maildir=`dirname $MAIL` |
| 942 | AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") |
| 943 | fi |
| 944 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 945 | if test -z "$no_dev_ptmx" ; then |
Damien Miller | 204ad07 | 2000-03-02 23:56:12 +1100 | [diff] [blame] | 946 | AC_CHECK_FILE("/dev/ptmx", |
| 947 | [ |
| 948 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) |
| 949 | have_dev_ptmx=1 |
| 950 | ] |
| 951 | ) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 952 | fi |
Damien Miller | 204ad07 | 2000-03-02 23:56:12 +1100 | [diff] [blame] | 953 | AC_CHECK_FILE("/dev/ptc", |
| 954 | [ |
| 955 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) |
| 956 | have_dev_ptc=1 |
| 957 | ] |
| 958 | ) |
| 959 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 960 | # Options from here on. Some of these are preset by platform above |
| 961 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 962 | # Check for user-specified random device, otherwise check /dev/urandom |
| 963 | AC_ARG_WITH(random, |
| 964 | [ --with-random=FILE read randomness from FILE (default=/dev/urandom)], |
| 965 | [ |
Damien Miller | 040f383 | 2000-04-03 14:50:43 +1000 | [diff] [blame] | 966 | if test "x$withval" != "xno" ; then |
| 967 | RANDOM_POOL="$withval"; |
| 968 | AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL") |
| 969 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 970 | ], |
| 971 | [ |
| 972 | # Check for random device |
| 973 | AC_CHECK_FILE("/dev/urandom", |
| 974 | [ |
| 975 | RANDOM_POOL="/dev/urandom"; |
| 976 | AC_SUBST(RANDOM_POOL) |
| 977 | AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL") |
| 978 | ] |
| 979 | ) |
| 980 | ] |
| 981 | ) |
| 982 | |
| 983 | # Check for EGD pool file |
| 984 | AC_ARG_WITH(egd-pool, |
| 985 | [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)], |
| 986 | [ |
Damien Miller | 040f383 | 2000-04-03 14:50:43 +1000 | [diff] [blame] | 987 | if test "x$withval" != "xno" ; then |
| 988 | EGD_SOCKET="$withval"; |
| 989 | AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET") |
| 990 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 991 | ] |
| 992 | ) |
| 993 | |
Damien Miller | 0437b33 | 2000-05-02 09:56:41 +1000 | [diff] [blame] | 994 | # detect pathnames for entropy gathering commands, if we need them |
| 995 | INSTALL_SSH_PRNG_CMDS="" |
| 996 | rm -f prng_commands |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 997 | if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then |
Damien Miller | 11e37f6 | 2000-04-08 18:23:30 +1000 | [diff] [blame] | 998 | # Use these commands to collect entropy |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 999 | OSSH_PATH_ENTROPY_PROG(PROG_LS, ls) |
| 1000 | OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat) |
| 1001 | OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp) |
| 1002 | OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig) |
| 1003 | OSSH_PATH_ENTROPY_PROG(PROG_PS, ps) |
| 1004 | OSSH_PATH_ENTROPY_PROG(PROG_W, w) |
| 1005 | OSSH_PATH_ENTROPY_PROG(PROG_WHO, who) |
| 1006 | OSSH_PATH_ENTROPY_PROG(PROG_LAST, last) |
| 1007 | OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog) |
| 1008 | OSSH_PATH_ENTROPY_PROG(PROG_DF, df) |
| 1009 | OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat) |
| 1010 | OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime) |
| 1011 | OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs) |
| 1012 | OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail) |
| 1013 | OSSH_PATH_ENTROPY_PROG(PROG_LS, ls) |
Damien Miller | 0437b33 | 2000-05-02 09:56:41 +1000 | [diff] [blame] | 1014 | |
| 1015 | INSTALL_SSH_PRNG_CMDS="yes" |
Damien Miller | 11e37f6 | 2000-04-08 18:23:30 +1000 | [diff] [blame] | 1016 | fi |
Damien Miller | 0437b33 | 2000-05-02 09:56:41 +1000 | [diff] [blame] | 1017 | AC_SUBST(INSTALL_SSH_PRNG_CMDS) |
| 1018 | |
Damien Miller | 11e37f6 | 2000-04-08 18:23:30 +1000 | [diff] [blame] | 1019 | |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 1020 | AC_ARG_WITH(catman, |
| 1021 | [ --with-catman=man|cat Install preformatted manpages[no]], |
| 1022 | [ |
| 1023 | MANTYPE='$(CATMAN)' |
| 1024 | if test x"$withval" != x"yes" ; then |
| 1025 | mansubdir=$withval |
| 1026 | else |
| 1027 | mansubdir=cat |
| 1028 | fi |
| 1029 | ], [ |
| 1030 | if test -z "$MANTYPE" ; then |
| 1031 | MANTYPE='$(TROFFMAN)' |
| 1032 | mansubdir=man |
| 1033 | fi |
| 1034 | ] |
| 1035 | ) |
| 1036 | AC_SUBST(MANTYPE) |
| 1037 | AC_SUBST(mansubdir) |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1038 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1039 | # Check whether user wants Kerberos support |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1040 | KRB4_MSG="no" |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1041 | AC_ARG_WITH(kerberos4, |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1042 | [ --with-kerberos4=PATH Enable Kerberos 4 support], |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1043 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 1044 | if test "x$withval" != "xno" ; then |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1045 | |
Ben Lindstrom | 23e1371 | 2000-10-29 22:49:19 +0000 | [diff] [blame] | 1046 | if test "x$withval" != "xyes" ; then |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1047 | CFLAGS="$CFLAGS -I${withval}/include" |
| 1048 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 1049 | if test ! -z "$need_dash_r" ; then |
| 1050 | LDFLAGS="$LDFLAGS -R${withval}/lib" |
| 1051 | fi |
| 1052 | if test ! -z "$blibpath" ; then |
| 1053 | blibpath="$blibpath:${withval}/lib" |
| 1054 | fi |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1055 | else |
| 1056 | if test -d /usr/include/kerberosIV ; then |
| 1057 | CFLAGS="$CFLAGS -I/usr/include/kerberosIV" |
| 1058 | fi |
| 1059 | fi |
| 1060 | |
| 1061 | AC_CHECK_HEADERS(krb.h) |
| 1062 | AC_CHECK_LIB(krb, main) |
| 1063 | if test "$ac_cv_header_krb_h" != yes; then |
| 1064 | AC_MSG_WARN([Cannot find krb.h, build may fail]) |
| 1065 | fi |
| 1066 | if test "$ac_cv_lib_krb_main" != yes; then |
| 1067 | AC_MSG_WARN([Cannot find libkrb, build may fail]) |
| 1068 | fi |
| 1069 | |
Damien Miller | c85f9b4 | 2000-01-29 10:20:21 +1100 | [diff] [blame] | 1070 | KLIBS="-lkrb -ldes" |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1071 | AC_CHECK_LIB(resolv, dn_expand, , ) |
| 1072 | KRB4=yes |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1073 | KRB4_MSG="yes" |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1074 | AC_DEFINE(KRB4) |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1075 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1076 | ] |
| 1077 | ) |
| 1078 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1079 | # Check whether user wants AFS support |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1080 | AFS_MSG="no" |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 1081 | AC_ARG_WITH(afs, |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1082 | [ --with-afs=PATH Enable AFS support], |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1083 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 1084 | if test "x$withval" != "xno" ; then |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1085 | |
Ben Lindstrom | 76020ba | 2000-10-25 16:55:00 +0000 | [diff] [blame] | 1086 | if test "x$withval" != "xyes" ; then |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1087 | CFLAGS="$CFLAGS -I${withval}/include" |
| 1088 | LFLAGS="$LFLAGS -L${withval}/lib" |
| 1089 | fi |
| 1090 | |
| 1091 | if test -z "$KRB4" ; then |
| 1092 | AC_MSG_WARN([AFS requires Kerberos IV support, build may fail]) |
| 1093 | fi |
| 1094 | |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1095 | LIBS="$LIBS -lkafs" |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1096 | if test ! -z "$AFS_LIBS" ; then |
| 1097 | LIBS="$LIBS $AFS_LIBS" |
| 1098 | fi |
| 1099 | AC_DEFINE(AFS) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1100 | AFS_MSG="yes" |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1101 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1102 | ] |
| 1103 | ) |
Damien Miller | c85f9b4 | 2000-01-29 10:20:21 +1100 | [diff] [blame] | 1104 | LIBS="$LIBS $KLIBS" |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1105 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1106 | # Check whether user wants S/Key support |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1107 | SKEY_MSG="no" |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1108 | AC_ARG_WITH(skey, |
| 1109 | [ --with-skey Enable S/Key support], |
| 1110 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 1111 | if test "x$withval" != "xno" ; then |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1112 | AC_DEFINE(SKEY) |
| 1113 | LIBS="$LIBS -lskey" |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1114 | SKEY_MSG="yes" |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1115 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1116 | ] |
| 1117 | ) |
| 1118 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1119 | # Check whether user wants TCP wrappers support |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1120 | TCPW_MSG="no" |
Damien Miller | f7c0f82 | 1999-11-22 22:31:49 +1100 | [diff] [blame] | 1121 | AC_ARG_WITH(tcp-wrappers, |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1122 | [ --with-tcp-wrappers Enable tcpwrappers support], |
| 1123 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 1124 | if test "x$withval" != "xno" ; then |
Damien Miller | 65165f8 | 2000-03-05 17:02:45 +1100 | [diff] [blame] | 1125 | saved_LIBS="$LIBS" |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 1126 | LIBS="$LIBS -lwrap" |
Damien Miller | 65165f8 | 2000-03-05 17:02:45 +1100 | [diff] [blame] | 1127 | AC_MSG_CHECKING(for libwrap) |
| 1128 | AC_TRY_LINK( |
| 1129 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1130 | #include <tcpd.h> |
Damien Miller | 65165f8 | 2000-03-05 17:02:45 +1100 | [diff] [blame] | 1131 | int deny_severity = 0, allow_severity = 0; |
| 1132 | ], |
| 1133 | [hosts_access(0);], |
| 1134 | [ |
| 1135 | AC_MSG_RESULT(yes) |
| 1136 | AC_DEFINE(LIBWRAP) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1137 | TCPW_MSG="yes" |
Damien Miller | 65165f8 | 2000-03-05 17:02:45 +1100 | [diff] [blame] | 1138 | ], |
| 1139 | [ |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1140 | AC_MSG_ERROR([*** libwrap missing]) |
Damien Miller | 65165f8 | 2000-03-05 17:02:45 +1100 | [diff] [blame] | 1141 | ] |
| 1142 | ) |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1143 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 1144 | ] |
| 1145 | ) |
| 1146 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1147 | # Check whether to enable MD5 passwords |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1148 | MD5_MSG="no" |
Damien Miller | f7c0f82 | 1999-11-22 22:31:49 +1100 | [diff] [blame] | 1149 | AC_ARG_WITH(md5-passwords, |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 1150 | [ --with-md5-passwords Enable use of MD5 passwords], |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1151 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 1152 | if test "x$withval" != "xno" ; then |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1153 | AC_DEFINE(HAVE_MD5_PASSWORDS) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1154 | MD5_MSG="yes" |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1155 | fi |
| 1156 | ] |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 1157 | ) |
| 1158 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1159 | # Whether to disable shadow password support |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 1160 | AC_ARG_WITH(shadow, |
| 1161 | [ --without-shadow Disable shadow password support], |
| 1162 | [ |
| 1163 | if test "x$withval" = "xno" ; then |
| 1164 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | 1f335fb | 2000-06-26 11:31:33 +1000 | [diff] [blame] | 1165 | disable_shadow=yes |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 1166 | fi |
| 1167 | ] |
| 1168 | ) |
| 1169 | |
Damien Miller | 1f335fb | 2000-06-26 11:31:33 +1000 | [diff] [blame] | 1170 | if test -z "$disable_shadow" ; then |
| 1171 | AC_MSG_CHECKING([if the systems has expire shadow information]) |
| 1172 | AC_TRY_COMPILE( |
| 1173 | [ |
| 1174 | #include <sys/types.h> |
| 1175 | #include <shadow.h> |
| 1176 | struct spwd sp; |
| 1177 | ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ], |
| 1178 | [ sp_expire_available=yes ], [] |
| 1179 | ) |
| 1180 | |
| 1181 | if test "x$sp_expire_available" = "xyes" ; then |
| 1182 | AC_MSG_RESULT(yes) |
| 1183 | AC_DEFINE(HAS_SHADOW_EXPIRE) |
| 1184 | else |
| 1185 | AC_MSG_RESULT(no) |
| 1186 | fi |
| 1187 | fi |
| 1188 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1189 | # Use ip address instead of hostname in $DISPLAY |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 1190 | if test ! -z "$IPADDR_IN_DISPLAY" ; then |
| 1191 | DISPLAY_HACK_MSG="yes" |
| 1192 | AC_DEFINE(IPADDR_IN_DISPLAY) |
| 1193 | else |
| 1194 | DISPLAY_HACK_MSG="no" |
| 1195 | AC_ARG_WITH(ipaddr-display, |
| 1196 | [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], |
| 1197 | [ |
| 1198 | if test "x$withval" != "xno" ; then |
| 1199 | AC_DEFINE(IPADDR_IN_DISPLAY) |
| 1200 | DISPLAY_HACK_MSG="yes" |
| 1201 | fi |
| 1202 | ] |
| 1203 | ) |
| 1204 | fi |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 1205 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1206 | # Whether to mess with the default path |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1207 | SERVER_PATH_MSG="(default)" |
Damien Miller | e7f626c | 1999-12-31 09:49:44 +1100 | [diff] [blame] | 1208 | AC_ARG_WITH(default-path, |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 1209 | [ --with-default-path=PATH Specify default \$PATH environment for server], |
| 1210 | [ |
| 1211 | if test "x$withval" != "xno" ; then |
Damien Miller | e68f92b | 2000-10-02 21:42:15 +1100 | [diff] [blame] | 1212 | AC_DEFINE_UNQUOTED(USER_PATH, "$withval") |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1213 | SERVER_PATH_MSG="$withval" |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 1214 | fi |
| 1215 | ] |
| 1216 | ) |
| 1217 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1218 | # Whether to force IPv4 by default (needed on broken glibc Linux) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1219 | IPV4_HACK_MSG="no" |
Damien Miller | 7d80e34 | 2000-01-19 14:36:49 +1100 | [diff] [blame] | 1220 | AC_ARG_WITH(ipv4-default, |
| 1221 | [ --with-ipv4-default Use IPv4 by connections unless '-6' specified], |
| 1222 | [ |
| 1223 | if test "x$withval" != "xno" ; then |
| 1224 | AC_DEFINE(IPV4_DEFAULT) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1225 | IPV4_HACK_MSG="yes" |
Damien Miller | 7d80e34 | 2000-01-19 14:36:49 +1100 | [diff] [blame] | 1226 | fi |
| 1227 | ] |
| 1228 | ) |
| 1229 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1230 | AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses]) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1231 | IPV4_IN6_HACK_MSG="no" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 1232 | AC_ARG_WITH(4in6, |
| 1233 | [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses], |
| 1234 | [ |
| 1235 | if test "x$withval" != "xno" ; then |
| 1236 | AC_MSG_RESULT(yes) |
| 1237 | AC_DEFINE(IPV4_IN_IPV6) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1238 | IPV4_IN6_HACK_MSG="yes" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 1239 | else |
| 1240 | AC_MSG_RESULT(no) |
| 1241 | fi |
| 1242 | ],[ |
| 1243 | if test "x$inet6_default_4in6" = "xyes"; then |
| 1244 | AC_MSG_RESULT([yes (default)]) |
| 1245 | AC_DEFINE(IPV4_IN_IPV6) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1246 | IPV4_IN6_HACK_MSG="yes" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 1247 | else |
| 1248 | AC_MSG_RESULT([no (default)]) |
| 1249 | fi |
| 1250 | ] |
| 1251 | ) |
| 1252 | |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1253 | AC_MSG_CHECKING(whether to install ssh as suid root) |
| 1254 | AC_ARG_ENABLE(suid-ssh, |
| 1255 | [ --enable-suid-ssh Install ssh as suid root (default) |
| 1256 | --disable-suid-ssh Install ssh without suid bit], |
| 1257 | [ case "$enableval" in |
| 1258 | no) |
| 1259 | AC_MSG_RESULT(no) |
| 1260 | SSHMODE=0711 |
| 1261 | ;; |
| 1262 | *) AC_MSG_RESULT(yes) |
| 1263 | SSHMODE=04711 |
| 1264 | ;; |
| 1265 | esac ], |
| 1266 | AC_MSG_RESULT(yes) |
| 1267 | SSHMODE=04711 |
| 1268 | ) |
| 1269 | AC_SUBST(SSHMODE) |
| 1270 | |
| 1271 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1272 | # Where to place sshd.pid |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 1273 | piddir=/var/run |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 1274 | AC_ARG_WITH(pid-dir, |
| 1275 | [ --with-pid-dir=PATH Specify location of ssh.pid file], |
| 1276 | [ |
| 1277 | if test "x$withval" != "xno" ; then |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 1278 | piddir=$withval |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 1279 | fi |
| 1280 | ] |
| 1281 | ) |
Damien Miller | 4018c19 | 2000-04-30 09:30:44 +1000 | [diff] [blame] | 1282 | |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1283 | # make sure the directory exists |
| 1284 | if test ! -d $piddir ; then |
| 1285 | piddir=`eval echo ${sysconfdir}` |
| 1286 | case $piddir in |
| 1287 | NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; |
| 1288 | esac |
| 1289 | fi |
| 1290 | |
Damien Miller | dbd250f | 2000-01-18 08:57:14 +1100 | [diff] [blame] | 1291 | AC_DEFINE_UNQUOTED(PIDDIR, "$piddir") |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 1292 | AC_SUBST(piddir) |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 1293 | |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1294 | dnl allow user to disable some login recording features |
| 1295 | AC_ARG_ENABLE(lastlog, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1296 | [ --disable-lastlog disable use of lastlog even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1297 | [ AC_DEFINE(DISABLE_LASTLOG) ] |
| 1298 | ) |
| 1299 | AC_ARG_ENABLE(utmp, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1300 | [ --disable-utmp disable use of utmp even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1301 | [ AC_DEFINE(DISABLE_UTMP) ] |
| 1302 | ) |
| 1303 | AC_ARG_ENABLE(utmpx, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1304 | [ --disable-utmpx disable use of utmpx even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1305 | [ AC_DEFINE(DISABLE_UTMPX) ] |
| 1306 | ) |
| 1307 | AC_ARG_ENABLE(wtmp, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1308 | [ --disable-wtmp disable use of wtmp even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1309 | [ AC_DEFINE(DISABLE_WTMP) ] |
| 1310 | ) |
| 1311 | AC_ARG_ENABLE(wtmpx, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1312 | [ --disable-wtmpx disable use of wtmpx even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1313 | [ AC_DEFINE(DISABLE_WTMPX) ] |
| 1314 | ) |
| 1315 | AC_ARG_ENABLE(libutil, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1316 | [ --disable-libutil disable use of libutil (login() etc.) [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1317 | [ AC_DEFINE(DISABLE_LOGIN) ] |
| 1318 | ) |
| 1319 | AC_ARG_ENABLE(pututline, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1320 | [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1321 | [ AC_DEFINE(DISABLE_PUTUTLINE) ] |
| 1322 | ) |
| 1323 | AC_ARG_ENABLE(pututxline, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1324 | [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1325 | [ AC_DEFINE(DISABLE_PUTUTXLINE) ] |
| 1326 | ) |
| 1327 | AC_ARG_WITH(lastlog, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 1328 | [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1329 | [ conf_lastlog_location="$withval"; ],) |
| 1330 | |
| 1331 | dnl lastlog, [uw]tmpx? detection |
| 1332 | dnl NOTE: set the paths in the platform section to avoid the |
| 1333 | dnl need for command-line parameters |
| 1334 | dnl lastlog and [uw]tmp are subject to a file search if all else fails |
| 1335 | |
| 1336 | dnl lastlog detection |
| 1337 | dnl NOTE: the code itself will detect if lastlog is a directory |
| 1338 | AC_MSG_CHECKING([if your system defines LASTLOG_FILE]) |
| 1339 | AC_TRY_COMPILE([ |
| 1340 | #include <sys/types.h> |
| 1341 | #include <utmp.h> |
| 1342 | #ifdef HAVE_LASTLOG_H |
| 1343 | # include <lastlog.h> |
| 1344 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1345 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1346 | # include <paths.h> |
| 1347 | #endif |
| 1348 | ], |
| 1349 | [ char *lastlog = LASTLOG_FILE; ], |
| 1350 | [ AC_MSG_RESULT(yes) ], |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1351 | [ |
| 1352 | AC_MSG_RESULT(no) |
| 1353 | AC_MSG_CHECKING([if your system defines _PATH_LASTLOG]) |
| 1354 | AC_TRY_COMPILE([ |
| 1355 | #include <sys/types.h> |
| 1356 | #include <utmp.h> |
| 1357 | #ifdef HAVE_LASTLOG_H |
| 1358 | # include <lastlog.h> |
| 1359 | #endif |
| 1360 | #ifdef HAVE_PATHS_H |
| 1361 | # include <paths.h> |
| 1362 | #endif |
| 1363 | ], |
| 1364 | [ char *lastlog = _PATH_LASTLOG; ], |
| 1365 | [ AC_MSG_RESULT(yes) ], |
| 1366 | [ |
andre | e441aa3 | 2000-06-12 22:34:38 +0000 | [diff] [blame] | 1367 | AC_MSG_RESULT(no) |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1368 | system_lastlog_path=no |
| 1369 | ]) |
| 1370 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1371 | ) |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1372 | |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1373 | if test -z "$conf_lastlog_location"; then |
| 1374 | if test x"$system_lastlog_path" = x"no" ; then |
| 1375 | for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 1376 | if (test -d "$f" || test -f "$f") ; then |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1377 | conf_lastlog_location=$f |
| 1378 | fi |
| 1379 | done |
| 1380 | if test -z "$conf_lastlog_location"; then |
andre | 45cad51 | 2000-06-12 23:27:31 +0000 | [diff] [blame] | 1381 | AC_MSG_WARN([** Cannot find lastlog **]) |
| 1382 | dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1383 | fi |
| 1384 | fi |
| 1385 | fi |
| 1386 | |
| 1387 | if test -n "$conf_lastlog_location"; then |
| 1388 | AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") |
| 1389 | fi |
| 1390 | |
| 1391 | dnl utmp detection |
| 1392 | AC_MSG_CHECKING([if your system defines UTMP_FILE]) |
| 1393 | AC_TRY_COMPILE([ |
| 1394 | #include <sys/types.h> |
| 1395 | #include <utmp.h> |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1396 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1397 | # include <paths.h> |
| 1398 | #endif |
| 1399 | ], |
| 1400 | [ char *utmp = UTMP_FILE; ], |
| 1401 | [ AC_MSG_RESULT(yes) ], |
| 1402 | [ AC_MSG_RESULT(no) |
| 1403 | system_utmp_path=no ] |
| 1404 | ) |
| 1405 | if test -z "$conf_utmp_location"; then |
| 1406 | if test x"$system_utmp_path" = x"no" ; then |
| 1407 | for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do |
| 1408 | if test -f $f ; then |
| 1409 | conf_utmp_location=$f |
| 1410 | fi |
| 1411 | done |
| 1412 | if test -z "$conf_utmp_location"; then |
| 1413 | AC_DEFINE(DISABLE_UTMP) |
| 1414 | fi |
| 1415 | fi |
| 1416 | fi |
| 1417 | if test -n "$conf_utmp_location"; then |
| 1418 | AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") |
| 1419 | fi |
| 1420 | |
| 1421 | dnl wtmp detection |
| 1422 | AC_MSG_CHECKING([if your system defines WTMP_FILE]) |
| 1423 | AC_TRY_COMPILE([ |
| 1424 | #include <sys/types.h> |
| 1425 | #include <utmp.h> |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1426 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1427 | # include <paths.h> |
| 1428 | #endif |
| 1429 | ], |
| 1430 | [ char *wtmp = WTMP_FILE; ], |
| 1431 | [ AC_MSG_RESULT(yes) ], |
| 1432 | [ AC_MSG_RESULT(no) |
| 1433 | system_wtmp_path=no ] |
| 1434 | ) |
| 1435 | if test -z "$conf_wtmp_location"; then |
| 1436 | if test x"$system_wtmp_path" = x"no" ; then |
| 1437 | for f in /usr/adm/wtmp /var/log/wtmp; do |
| 1438 | if test -f $f ; then |
| 1439 | conf_wtmp_location=$f |
| 1440 | fi |
| 1441 | done |
| 1442 | if test -z "$conf_wtmp_location"; then |
| 1443 | AC_DEFINE(DISABLE_WTMP) |
| 1444 | fi |
| 1445 | fi |
| 1446 | fi |
| 1447 | if test -n "$conf_wtmp_location"; then |
| 1448 | AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") |
| 1449 | fi |
| 1450 | |
| 1451 | |
| 1452 | dnl utmpx detection - I don't know any system so perverse as to require |
| 1453 | dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out |
| 1454 | dnl there, though. |
| 1455 | AC_MSG_CHECKING([if your system defines UTMPX_FILE]) |
| 1456 | AC_TRY_COMPILE([ |
| 1457 | #include <sys/types.h> |
| 1458 | #include <utmp.h> |
| 1459 | #ifdef HAVE_UTMPX_H |
| 1460 | #include <utmpx.h> |
| 1461 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1462 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1463 | # include <paths.h> |
| 1464 | #endif |
| 1465 | ], |
| 1466 | [ char *utmpx = UTMPX_FILE; ], |
| 1467 | [ AC_MSG_RESULT(yes) ], |
| 1468 | [ AC_MSG_RESULT(no) |
| 1469 | system_utmpx_path=no ] |
| 1470 | ) |
| 1471 | if test -z "$conf_utmpx_location"; then |
| 1472 | if test x"$system_utmpx_path" = x"no" ; then |
| 1473 | AC_DEFINE(DISABLE_UTMPX) |
| 1474 | fi |
| 1475 | else |
| 1476 | AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") |
| 1477 | fi |
| 1478 | |
| 1479 | dnl wtmpx detection |
| 1480 | AC_MSG_CHECKING([if your system defines WTMPX_FILE]) |
| 1481 | AC_TRY_COMPILE([ |
| 1482 | #include <sys/types.h> |
| 1483 | #include <utmp.h> |
| 1484 | #ifdef HAVE_UTMPX_H |
| 1485 | #include <utmpx.h> |
| 1486 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 1487 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1488 | # include <paths.h> |
| 1489 | #endif |
| 1490 | ], |
| 1491 | [ char *wtmpx = WTMPX_FILE; ], |
| 1492 | [ AC_MSG_RESULT(yes) ], |
| 1493 | [ AC_MSG_RESULT(no) |
| 1494 | system_wtmpx_path=no ] |
| 1495 | ) |
| 1496 | if test -z "$conf_wtmpx_location"; then |
| 1497 | if test x"$system_wtmpx_path" = x"no" ; then |
| 1498 | AC_DEFINE(DISABLE_WTMPX) |
| 1499 | fi |
| 1500 | else |
| 1501 | AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") |
| 1502 | fi |
| 1503 | |
Damien Miller | 4018c19 | 2000-04-30 09:30:44 +1000 | [diff] [blame] | 1504 | |
| 1505 | # Change default command timeout for builtin PRNG |
Damien Miller | 14c12cb | 2000-06-07 22:20:23 +1000 | [diff] [blame] | 1506 | entropy_timeout=200 |
Damien Miller | 4018c19 | 2000-04-30 09:30:44 +1000 | [diff] [blame] | 1507 | AC_ARG_WITH(entropy-timeout, |
| 1508 | [ --with-entropy-timeout Specify entropy gathering command timeout (msec)], |
| 1509 | [ |
| 1510 | if test "x$withval" != "xno" ; then |
| 1511 | entropy_timeout=$withval |
| 1512 | fi |
| 1513 | ] |
| 1514 | ) |
| 1515 | AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) |
| 1516 | |
| 1517 | |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 1518 | if test ! -z "$blibpath" ; then |
| 1519 | LDFLAGS="$LDFLAGS -blibpath:$blibpath" |
| 1520 | AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile]) |
| 1521 | fi |
| 1522 | |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 1523 | AC_EXEEXT |
| 1524 | |
Damien Miller | 0437b33 | 2000-05-02 09:56:41 +1000 | [diff] [blame] | 1525 | AC_OUTPUT(Makefile ssh_prng_cmds) |
| 1526 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1527 | # Print summary of options |
| 1528 | |
| 1529 | if test x$MANTYPE = x'$(CATMAN)' ; then |
| 1530 | MAN_MSG=cat |
| 1531 | else |
| 1532 | MAN_MSG=man |
| 1533 | fi |
| 1534 | if test ! -z "$RANDOM_POOL" ; then |
| 1535 | RAND_MSG="Device ($RANDOM_POOL)" |
| 1536 | else |
| 1537 | if test ! -z "$EGD_SOCKET" ; then |
| 1538 | RAND_MSG="EGD ($EGD_SOCKET)" |
| 1539 | else |
| 1540 | RAND_MSG="Builtin (timeout $entropy_timeout)" |
Damien Miller | 6f9c337 | 2000-10-25 10:06:04 +1100 | [diff] [blame] | 1541 | BUILTIN_RNG=1 |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1542 | fi |
| 1543 | fi |
| 1544 | |
| 1545 | # Someone please show me a better way :) |
| 1546 | A=`eval echo ${prefix}` ; A=`eval echo ${A}` |
| 1547 | B=`eval echo ${bindir}` ; B=`eval echo ${B}` |
| 1548 | C=`eval echo ${sbindir}` ; C=`eval echo ${C}` |
| 1549 | D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}` |
Kevin Steves | e0f4914 | 2000-10-14 17:51:48 +0000 | [diff] [blame] | 1550 | E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}` |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1551 | F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}` |
| 1552 | G=`eval echo ${piddir}` ; G=`eval echo ${G}` |
| 1553 | |
| 1554 | echo "" |
| 1555 | echo "OpenSSH configured has been configured with the following options." |
| 1556 | echo " User binaries: $B" |
Damien Miller | e68f92b | 2000-10-02 21:42:15 +1100 | [diff] [blame] | 1557 | echo " User binaries: $B" |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1558 | echo " System binaries: $C" |
| 1559 | echo " Configuration files: $D" |
| 1560 | echo " Askpass program: $E" |
| 1561 | echo " Manual pages: $F" |
| 1562 | echo " PID file: $G" |
| 1563 | echo " Random number collection: $RAND_MSG" |
| 1564 | echo " Manpage format: $MAN_MSG" |
| 1565 | echo " PAM support: ${PAM_MSG}" |
| 1566 | echo " KerberosIV support: $KRB4_MSG" |
| 1567 | echo " AFS support: $AFS_MSG" |
| 1568 | echo " S/KEY support: $SKEY_MSG" |
| 1569 | echo " TCP Wrappers support: $TCPW_MSG" |
| 1570 | echo " MD5 password support: $MD5_MSG" |
| 1571 | echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" |
| 1572 | echo " Use IPv4 by default hack: $IPV4_HACK_MSG" |
| 1573 | echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" |
| 1574 | |
| 1575 | echo "" |
| 1576 | |
Damien Miller | e68f92b | 2000-10-02 21:42:15 +1100 | [diff] [blame] | 1577 | echo " Host: ${host}" |
| 1578 | echo " Compiler: ${CC}" |
| 1579 | echo " Compiler flags: ${CFLAGS}" |
| 1580 | echo " Linker flags: ${LDFLAGS}" |
| 1581 | echo " Libraries: ${LIBS}" |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1582 | |
| 1583 | echo "" |
| 1584 | |
Damien Miller | 6f9c337 | 2000-10-25 10:06:04 +1100 | [diff] [blame] | 1585 | if test ! -z "$BUILTIN_RNG" ; then |
| 1586 | echo "WARNING: you are using the builtin random number collection service." |
| 1587 | echo "Please read WARNING.RNG and request that your OS vendor includes" |
| 1588 | echo "/dev/random in future versions of their OS." |
| 1589 | echo "" |
| 1590 | fi |