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