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