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