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)
20 if test -f "$ssldir/include/ssl/crypto.h"; then
26 if test -z "$GOT_SSL" ; then
27 AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install])
30 AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
31 if test "$ssldir" != "/usr"; then
32 CFLAGS="$CFLAGS -I$ssldir/include"
33 LIBS="$LIBS -L$ssldir/lib"
35 LIBS="$LIBS -lssl -lcrypto"
36 AC_MSG_RESULT($ssldir)
38 dnl Check for RSAref library.
39 AC_MSG_CHECKING([for RSAref library])
41 LIBS="$saved_LIBS -lRSAglue -lrsaref"
43 [AC_MSG_RESULT(yes); ],
44 [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
46 dnl Checks for libraries.
47 AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
48 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
49 AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
50 AC_CHECK_LIB(nsl, yp_match, , )
51 AC_CHECK_LIB(socket, main, , )
53 dnl libdl is needed by PAM on Redhat systems
54 AC_CHECK_LIB(dl, dlopen, , )
55 AC_CHECK_LIB(pam, pam_authenticate, , )
57 dnl Checks for header files.
58 AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h)
60 dnl Checks for library functions.
61 AC_PROG_GCC_TRADITIONAL
62 AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin)
64 dnl Check for ut_host field in utmp
65 AC_MSG_CHECKING([whether utmp.h has ut_host field])
66 AC_EGREP_HEADER(ut_host, utmp.h,
67 [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
71 dnl Check whether user wants GNOME ssh-askpass
72 AC_ARG_WITH(gnome-askpass,
73 [ --with-gnome-askpass Build and use the GNOME passphrase requester],
74 [GNOME_ASKPASS="gnome-ssh-askpass"])
75 AC_SUBST(GNOME_ASKPASS)
77 dnl Check for user-specified random device
79 [ --with-random=FILE read randomness from FILE (default /dev/urandom)],
81 RANDOM_POOL="$withval";
82 AC_DEFINE(RANDOM_POOL, "$RANDOM_POOL")
85 dnl Check for random device
86 AC_CHECK_FILE("/dev/urandom",
88 RANDOM_POOL="/dev/urandom";
90 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
96 dnl Check for EGD pool file
98 [ --with-egd-pool=FILE read randomness from EGD pool FILE],
100 RANDOM_POOL="$withval";
102 AC_SUBST(RANDOM_POOL)
103 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
107 if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
108 AC_MSG_ERROR([No random device found, and no EGD random pool specified])
111 dnl Check whether use wants to disable the external ssh-askpass
113 [ --without-askpass Disable external ssh-askpass support],
114 [AC_DEFINE(DISABLE_EXTERNAL_ASKPASS)],
115 [INSTALL_ASKPASS="yes"]
117 AC_SUBST(INSTALL_ASKPASS)