]> andersk Git - openssh.git/blob - configure.in
- Added (untested) Entropy Gathering Daemon (EGD) support
[openssh.git] / configure.in
1 AC_INIT(ssh.c)
2
3 AC_CONFIG_HEADER(config.h)
4
5 dnl Checks for programs.
6 AC_PROG_CC
7 AC_PROG_CPP
8 AC_PROG_RANLIB
9 AC_CHECK_PROG(AR, ar, ar)
10 if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
11
12 dnl Check for OpenSSL/SSLeay directories.
13 AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
14 for ssldir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do
15     if test -f "$ssldir/include/openssl/crypto.h"; then
16         AC_DEFINE(HAVE_OPENSSL)
17         break
18     fi
19     if test -f "$ssldir/include/ssl/crypto.h"; then
20         AC_DEFINE(HAVE_SSL)
21         break
22     fi
23 done
24 AC_MSG_RESULT($ssldir)
25 AC_SUBST(ssldir)
26 AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
27 if test "$ssldir" != "/usr"; then
28         CFLAGS="$CFLAGS -I$ssldir/include"
29         LIBS="$LIBS -L$ssldir/lib"
30 fi
31 LIBS="$LIBS -lssl -lcrypto"
32
33 dnl Check for RSAref library.
34 AC_MSG_CHECKING([for RSAref library])
35 saved_LIBS="$LIBS"
36 LIBS="$saved_LIBS -lRSAglue -lrsaref"
37 AC_TRY_LINK([], [],
38 [AC_MSG_RESULT(yes); ],
39 [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
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
52 dnl Checks for header files.
53 AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h)
54
55 dnl Checks for library functions.
56 AC_PROG_GCC_TRADITIONAL
57 AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)
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
66 dnl Check whether user wants GNOME ssh-askpass
67 AC_ARG_WITH(gnome-askpass,
68         [  --with-gnome-askpass    Build and use the GNOME passphrase requester],
69         [GNOME_ASKPASS="gnome-ssh-askpass"])
70 AC_SUBST(GNOME_ASKPASS)
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
104 AC_OUTPUT(Makefile)
This page took 0.167951 seconds and 5 git commands to generate.