diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 125 |
1 files changed, 98 insertions, 27 deletions
diff --git a/configure.in b/configure.in index 86d6a3241..b5ffee79e 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1,6 +1,7 @@ | |||
1 | AC_INIT(ssh.c) | 1 | AC_INIT(ssh.c) |
2 | 2 | ||
3 | AC_CONFIG_HEADER(config.h) | 3 | AC_CONFIG_HEADER(config.h) |
4 | AC_CANONICAL_HOST | ||
4 | 5 | ||
5 | dnl Checks for programs. | 6 | dnl Checks for programs. |
6 | AC_PROG_CC | 7 | AC_PROG_CC |
@@ -9,10 +10,35 @@ AC_PROG_RANLIB | |||
9 | AC_PROG_INSTALL | 10 | AC_PROG_INSTALL |
10 | AC_CHECK_PROG(AR, ar, ar) | 11 | AC_CHECK_PROG(AR, ar, ar) |
11 | 12 | ||
13 | dnl Check for the path to xauth | ||
14 | AC_PATH_PROG(xauth_path, xauth) | ||
15 | AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") | ||
16 | |||
12 | dnl Checks for compiler characteristics | 17 | dnl Checks for compiler characteristics |
13 | if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi | 18 | if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi |
19 | |||
14 | AC_C_INLINE | 20 | AC_C_INLINE |
15 | 21 | ||
22 | dnl Check for some target-specific stuff | ||
23 | case "$host" in | ||
24 | *-*-hpux10*) | ||
25 | if test -z "$GCC"; then | ||
26 | CFLAGS="$CFLAGS -Aa" | ||
27 | fi | ||
28 | CFLAGS="$CFLAGS -D_HPUX_SOURCE" | ||
29 | AC_DEFINE(IPADDR_IN_DISPLAY) | ||
30 | AC_MSG_CHECKING(for HPUX trusted system password database) | ||
31 | if test -f /tcb/files/auth/system/default; then | ||
32 | AC_MSG_RESULT(yes) | ||
33 | AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW) | ||
34 | LIBS="$LIBS -lsec" | ||
35 | else | ||
36 | AC_MSG_RESULT(no) | ||
37 | AC_DEFINE(DISABLE_SHADOW) | ||
38 | fi | ||
39 | ;; | ||
40 | esac | ||
41 | |||
16 | dnl Check for OpenSSL/SSLeay directories. | 42 | dnl Check for OpenSSL/SSLeay directories. |
17 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) | 43 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) |
18 | for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do | 44 | for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do |
@@ -59,10 +85,10 @@ AC_CHECK_LIB(dl, dlopen, , ) | |||
59 | AC_CHECK_LIB(pam, pam_authenticate, , ) | 85 | AC_CHECK_LIB(pam, pam_authenticate, , ) |
60 | 86 | ||
61 | dnl Checks for header files. | 87 | dnl Checks for header files. |
62 | AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow.h util.h utmp.h utmpx.h sys/poll.h sys/select.h sys/stropts.h sys/time.h) | 88 | AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow_h util.h utmp.h utmpx.h sys/bsdtty.h sys/poll.h sys/select.h sys/stropts.h sys/time.h) |
63 | 89 | ||
64 | dnl Checks for library functions. | 90 | dnl Checks for library functions. |
65 | AC_CHECK_FUNCS(arc4random mkdtemp openpty _getpty setenv setlogin setproctitle snprintf strlcat strlcpy vsnprintf) | 91 | AC_CHECK_FUNCS(arc4random mkdtemp openpty _getpty setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy vsnprintf) |
66 | 92 | ||
67 | AC_CHECK_FUNC(login, | 93 | AC_CHECK_FUNC(login, |
68 | [AC_DEFINE(HAVE_LOGIN)], | 94 | [AC_DEFINE(HAVE_LOGIN)], |
@@ -209,27 +235,46 @@ AC_EGREP_HEADER(ut_host, utmpx.h, | |||
209 | ) | 235 | ) |
210 | 236 | ||
211 | dnl Look for lastlog location | 237 | dnl Look for lastlog location |
212 | AC_MSG_CHECKING([location of lastlog file]) | 238 | AC_ARG_WITH(lastlog, |
213 | for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do | 239 | [ --with-lastlog Location of lastlog file], |
214 | if test -f $lastlog ; then | 240 | [ |
215 | gotlastlog="file" | 241 | if test "x$withval" = "xno" ; then |
216 | break | 242 | AC_DEFINE(DISABLE_LASTLOG) |
217 | fi | 243 | else |
218 | if test -d $lastlog ; then | 244 | AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$withval") |
219 | gotlastlog="dir" | 245 | fi |
220 | break | 246 | ], |
221 | fi | 247 | [ |
222 | done | 248 | AC_MSG_CHECKING([location of lastlog file]) |
223 | if test -z "$gotlastlog" ; then | 249 | for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do |
224 | AC_MSG_ERROR([*** Cannot find lastlog ***]) | 250 | if test -f $lastlog ; then |
225 | else | 251 | gotlastlog="file" |
226 | if test "x$gotlastlog" = "xdir" ; then | 252 | break |
227 | AC_DEFINE(LASTLOG_IS_DIR) | 253 | fi |
228 | AC_MSG_ERROR([*** Directory-based lastlogs are not yet supported ***]) | 254 | if test -d $lastlog ; then |
229 | fi | 255 | gotlastlog="dir" |
230 | AC_MSG_RESULT($lastlog) | 256 | break |
231 | AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog") | 257 | fi |
232 | fi | 258 | done |
259 | if test -z "$gotlastlog" ; then | ||
260 | AC_MSG_WARN([*** Cannot find lastlog ***]) | ||
261 | nolastlog=1 | ||
262 | else | ||
263 | if test "x$gotlastlog" = "xdir" ; then | ||
264 | AC_DEFINE(LASTLOG_IS_DIR) | ||
265 | AC_MSG_WARN([*** Directory-based lastlogs are not yet supported ***]) | ||
266 | nolastlog=1 | ||
267 | fi | ||
268 | AC_MSG_RESULT($lastlog) | ||
269 | AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog") | ||
270 | fi | ||
271 | ] | ||
272 | ) | ||
273 | |||
274 | if test ! -z "$nolastlog" ; then | ||
275 | AC_MSG_WARN([*** Disabling lastlog support *** ]) | ||
276 | AC_DEFINE(DISABLE_LASTLOG) | ||
277 | fi | ||
233 | 278 | ||
234 | AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) | 279 | AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) |
235 | AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)) | 280 | AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)) |
@@ -293,11 +338,37 @@ AC_ARG_WITH(md5-passwords, | |||
293 | dnl Check whether to enable utmpx support | 338 | dnl Check whether to enable utmpx support |
294 | AC_ARG_WITH(utmpx, | 339 | AC_ARG_WITH(utmpx, |
295 | [ --with-utmpx Enable utmpx support], | 340 | [ --with-utmpx Enable utmpx support], |
296 | [AC_DEFINE(USE_UTMPX)] | 341 | [ |
342 | if test "x$withval" != "xno" ; then | ||
343 | AC_DEFINE(USE_UTMPX) | ||
344 | fi | ||
345 | ] | ||
297 | ) | 346 | ) |
298 | 347 | ||
299 | dnl Check for the path to xauth | 348 | dnl Whether to disable shadow password support |
300 | AC_PATH_PROG(xauth_path, xauth) | 349 | AC_ARG_WITH(shadow, |
301 | AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") | 350 | [ --without-shadow Disable shadow password support], |
351 | [ | ||
352 | if test "x$withval" = "xno" ; then | ||
353 | AC_DEFINE(DISABLE_SHADOW) | ||
354 | fi | ||
355 | ] | ||
356 | ) | ||
357 | |||
358 | dnl Use ip address instead of hostname in $DISPLAY | ||
359 | AC_ARG_WITH(ipaddr-display, | ||
360 | [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], | ||
361 | [ | ||
362 | if test "x$withval" = "xno" ; then | ||
363 | AC_DEFINE(IPADDR_IN_DISPLAY) | ||
364 | fi | ||
365 | ] | ||
366 | ) | ||
367 | |||
368 | dnl Check for mail directory (last resort if we cannot get it from headers) | ||
369 | if test ! -z "$MAIL" ; then | ||
370 | maildir=`dirname $MAIL` | ||
371 | AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") | ||
372 | fi | ||
302 | 373 | ||
303 | AC_OUTPUT(Makefile) | 374 | AC_OUTPUT(Makefile) |