summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in81
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 @@
1dnl Process this file with autoconf to produce a configure script. 1AC_INIT(ssh.c)
2
3AC_INIT(auth-krb4.c)
4 2
5AC_CONFIG_HEADER(config.h) 3AC_CONFIG_HEADER(config.h)
6 4
7dnl Checks for programs. 5dnl Checks for programs.
8AC_PROG_CC 6AC_PROG_CC
7AC_PROG_CPP
9AC_PROG_RANLIB 8AC_PROG_RANLIB
10AC_CHECK_PROG(AR, ar, ar) 9AC_CHECK_PROG(AR, ar, ar)
11if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi 10if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
12 11
13dnl Checks for libraries.
14dnl Replace `main' with a function in -lcrypto:
15AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
16dnl Replace `main' with a function in -lutil:
17AC_CHECK_LIB(util, logout, ,AC_MSG_ERROR([*** -lutil missing - this is part of libc. ***]))
18dnl Replace `main' with a function in -lz:
19AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
20dnl check for nsl
21AC_CHECK_LIB(nsl, yp_match, , )
22dnl check for dl
23AC_CHECK_LIB(dl, dlopen, , )
24dnl check for pam
25AC_CHECK_LIB(pam, pam_authenticate, , )
26
27dnl Check for OpenSSL/SSLeay directories. 12dnl Check for OpenSSL/SSLeay directories.
28AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) 13AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
29for dir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg ; do 14for 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
42done 23done
43AC_MSG_RESULT($ssldir) 24AC_MSG_RESULT($ssldir)
44AC_SUBST(ssldir) 25AC_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
41dnl Checks for libraries.
42AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
43AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
44AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
45AC_CHECK_LIB(nsl, yp_match, , )
46AC_CHECK_LIB(socket, main, , )
47
48dnl libdl is needed by PAM on Redhat systems
49AC_CHECK_LIB(dl, dlopen, , )
50AC_CHECK_LIB(pam, pam_authenticate, , )
51
60dnl Checks for header files. 52dnl Checks for header files.
61AC_CHECK_HEADERS(pty.h) 53AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h)
62 54
63dnl Checks for library functions. 55dnl Checks for library functions.
64AC_PROG_GCC_TRADITIONAL 56AC_PROG_GCC_TRADITIONAL
65AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle) 57AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)
66 58
59dnl Check for ut_host field in utmp
60AC_MSG_CHECKING([whether utmp.h has ut_host field])
61AC_EGREP_HEADER(ut_host, utmp.h,
62 [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
63 [AC_MSG_RESULT(no)]
64)
65
67dnl Check whether user wants GNOME ssh-askpass 66dnl Check whether user wants GNOME ssh-askpass
68AC_ARG_WITH(gnome-askpass, 67AC_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"])
71AC_SUBST(GNOME_ASKPASS) 70AC_SUBST(GNOME_ASKPASS)
72 71
72dnl Check for user-specified random device
73AC_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
90dnl Check for EGD pool file
91AC_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
100if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
101 AC_MSG_ERROR([No random device found, and no EGD random pool specified])
102fi
103
73AC_OUTPUT(Makefile) 104AC_OUTPUT(Makefile)