3 AC_CONFIG_HEADER(config.h)
5 dnl Checks for programs.
9 AC_CHECK_PROG(AR, ar, ar)
10 if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
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)
19 if test -f "$ssldir/include/ssl/crypto.h"; then
24 AC_MSG_RESULT($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"
31 LIBS="$LIBS -lssl -lcrypto"
33 dnl Check for RSAref library.
34 AC_MSG_CHECKING([for RSAref library])
36 LIBS="$saved_LIBS -lRSAglue -lrsaref"
38 [AC_MSG_RESULT(yes); ],
39 [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
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, , )
48 dnl libdl is needed by PAM on Redhat systems
49 AC_CHECK_LIB(dl, dlopen, , )
50 AC_CHECK_LIB(pam, pam_authenticate, , )
52 dnl Checks for header files.
53 AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h)
55 dnl Checks for library functions.
56 AC_PROG_GCC_TRADITIONAL
57 AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)
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); ],
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)
72 dnl Check for user-specified random device
74 [ --with-random=FILE read randomness from FILE (default /dev/urandom)],
76 RANDOM_POOL="$withval";
77 AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL")
80 dnl Check for random device
81 AC_CHECK_FILE("/dev/urandom",
83 RANDOM_POOL="/dev/urandom";
84 AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL")
90 dnl Check for EGD pool file
92 [ --with-egd-pool=FILE read randomness from EGD pool FILE],
94 RANDOM_POOL="$withval";
96 AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL")
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])