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