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