diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 81 |
1 files changed, 56 insertions, 25 deletions
diff --git a/configure.in b/configure.in index fc59cbb8b..b16c12919 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1,44 +1,25 @@ | |||
1 | dnl Process this file with autoconf to produce a configure script. | 1 | AC_INIT(ssh.c) |
2 | |||
3 | AC_INIT(auth-krb4.c) | ||
4 | 2 | ||
5 | AC_CONFIG_HEADER(config.h) | 3 | AC_CONFIG_HEADER(config.h) |
6 | 4 | ||
7 | dnl Checks for programs. | 5 | dnl Checks for programs. |
8 | AC_PROG_CC | 6 | AC_PROG_CC |
7 | AC_PROG_CPP | ||
9 | AC_PROG_RANLIB | 8 | AC_PROG_RANLIB |
10 | AC_CHECK_PROG(AR, ar, ar) | 9 | AC_CHECK_PROG(AR, ar, ar) |
11 | if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi | 10 | if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi |
12 | 11 | ||
13 | dnl Checks for libraries. | ||
14 | dnl Replace `main' with a function in -lcrypto: | ||
15 | AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***])) | ||
16 | dnl Replace `main' with a function in -lutil: | ||
17 | AC_CHECK_LIB(util, logout, ,AC_MSG_ERROR([*** -lutil missing - this is part of libc. ***])) | ||
18 | dnl Replace `main' with a function in -lz: | ||
19 | AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***])) | ||
20 | dnl check for nsl | ||
21 | AC_CHECK_LIB(nsl, yp_match, , ) | ||
22 | dnl check for dl | ||
23 | AC_CHECK_LIB(dl, dlopen, , ) | ||
24 | dnl check for pam | ||
25 | AC_CHECK_LIB(pam, pam_authenticate, , ) | ||
26 | |||
27 | dnl Check for OpenSSL/SSLeay directories. | 12 | dnl Check for OpenSSL/SSLeay directories. |
28 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) | 13 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) |
29 | for dir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg ; do | 14 | for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do |
30 | ssldir="$dir" | 15 | if test -f "$ssldir/include/openssl/crypto.h"; then |
31 | if test -f "$dir/include/openssl/crypto.h"; then | ||
32 | AC_DEFINE(HAVE_OPENSSL) | 16 | AC_DEFINE(HAVE_OPENSSL) |
33 | break | 17 | break |
34 | fi | 18 | fi |
35 | if test -f "$dir/include/ssl/crypto.h"; then | 19 | if test -f "$ssldir/include/ssl/crypto.h"; then |
36 | AC_DEFINE(HAVE_SSL) | 20 | AC_DEFINE(HAVE_SSL) |
37 | break | 21 | break |
38 | fi | 22 | fi |
39 | if test -f "$dir/include/crypto.h"; then | ||
40 | break | ||
41 | fi | ||
42 | done | 23 | done |
43 | AC_MSG_RESULT($ssldir) | 24 | AC_MSG_RESULT($ssldir) |
44 | AC_SUBST(ssldir) | 25 | AC_SUBST(ssldir) |
@@ -57,17 +38,67 @@ AC_TRY_LINK([], [], | |||
57 | [AC_MSG_RESULT(yes); ], | 38 | [AC_MSG_RESULT(yes); ], |
58 | [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS") | 39 | [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS") |
59 | 40 | ||
41 | dnl Checks for libraries. | ||
42 | AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***])) | ||
43 | AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***])) | ||
44 | AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil") | ||
45 | AC_CHECK_LIB(nsl, yp_match, , ) | ||
46 | AC_CHECK_LIB(socket, main, , ) | ||
47 | |||
48 | dnl libdl is needed by PAM on Redhat systems | ||
49 | AC_CHECK_LIB(dl, dlopen, , ) | ||
50 | AC_CHECK_LIB(pam, pam_authenticate, , ) | ||
51 | |||
60 | dnl Checks for header files. | 52 | dnl Checks for header files. |
61 | AC_CHECK_HEADERS(pty.h) | 53 | AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h) |
62 | 54 | ||
63 | dnl Checks for library functions. | 55 | dnl Checks for library functions. |
64 | AC_PROG_GCC_TRADITIONAL | 56 | AC_PROG_GCC_TRADITIONAL |
65 | AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle) | 57 | AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle) |
66 | 58 | ||
59 | dnl Check for ut_host field in utmp | ||
60 | AC_MSG_CHECKING([whether utmp.h has ut_host field]) | ||
61 | AC_EGREP_HEADER(ut_host, utmp.h, | ||
62 | [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ], | ||
63 | [AC_MSG_RESULT(no)] | ||
64 | ) | ||
65 | |||
67 | dnl Check whether user wants GNOME ssh-askpass | 66 | dnl Check whether user wants GNOME ssh-askpass |
68 | AC_ARG_WITH(gnome-askpass, | 67 | AC_ARG_WITH(gnome-askpass, |
69 | [ --with-gnome-askpass Build and use the GNOME passphrase requester], | 68 | [ --with-gnome-askpass Build and use the GNOME passphrase requester], |
70 | [GNOME_ASKPASS="gnome-ssh-askpass"]) | 69 | [GNOME_ASKPASS="gnome-ssh-askpass"]) |
71 | AC_SUBST(GNOME_ASKPASS) | 70 | AC_SUBST(GNOME_ASKPASS) |
72 | 71 | ||
72 | dnl Check for user-specified random device | ||
73 | AC_ARG_WITH(random, | ||
74 | [ --with-random=FILE read randomness from FILE (default /dev/urandom)], | ||
75 | [ | ||
76 | RANDOM_POOL="$withval"; | ||
77 | AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL") | ||
78 | ], | ||
79 | [ | ||
80 | dnl Check for random device | ||
81 | AC_CHECK_FILE("/dev/urandom", | ||
82 | [ | ||
83 | RANDOM_POOL="/dev/urandom"; | ||
84 | AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL") | ||
85 | ] | ||
86 | ) | ||
87 | ] | ||
88 | ) | ||
89 | |||
90 | dnl Check for EGD pool file | ||
91 | AC_ARG_WITH(egd-pool, | ||
92 | [ --with-egd-pool=FILE read randomness from EGD pool FILE], | ||
93 | [ | ||
94 | RANDOM_POOL="$withval"; | ||
95 | AC_DEFINE(HAVE_EGD) | ||
96 | AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL") | ||
97 | ] | ||
98 | ) | ||
99 | |||
100 | if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then | ||
101 | AC_MSG_ERROR([No random device found, and no EGD random pool specified]) | ||
102 | fi | ||
103 | |||
73 | AC_OUTPUT(Makefile) | 104 | AC_OUTPUT(Makefile) |