1 dnl Process this file with autoconf to produce a configure script.
5 AC_CONFIG_HEADER(config.h)
7 dnl Checks for programs.
10 AC_CHECK_PROG(AR, ar, ar)
11 if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
13 dnl Checks for libraries.
14 dnl Replace `main' with a function in -lcrypto:
15 AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
16 dnl Replace `main' with a function in -lutil:
17 AC_CHECK_LIB(util, logout, ,AC_MSG_ERROR([*** -lutil missing - this is part of libc. ***]))
18 dnl Replace `main' with a function in -lz:
19 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
21 AC_CHECK_LIB(nsl, yp_match, , )
23 AC_CHECK_LIB(dl, dlopen, , )
25 AC_CHECK_LIB(pam, pam_authenticate, , )
27 dnl Check for OpenSSL/SSLeay directories.
28 AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
29 for dir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg ; do
31 if test -f "$dir/include/openssl/crypto.h"; then
32 AC_DEFINE(HAVE_OPENSSL)
35 if test -f "$dir/include/ssl/crypto.h"; then
39 if test -f "$dir/include/crypto.h"; then
43 AC_MSG_RESULT($ssldir)
45 AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
46 if test "$ssldir" != "/usr"; then
47 CFLAGS="$CFLAGS -I$ssldir/include"
48 LIBS="$LIBS -L$ssldir/lib"
50 LIBS="$LIBS -lssl -lcrypto"
52 dnl Check for RSAref library.
53 AC_MSG_CHECKING([for RSAref library])
55 LIBS="$saved_LIBS -lRSAglue -lrsaref"
57 [AC_MSG_RESULT(yes); ],
58 [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
60 dnl Checks for header files.
61 AC_CHECK_HEADERS(pty.h)
63 dnl Checks for library functions.
64 AC_PROG_GCC_TRADITIONAL
65 AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)
67 dnl Check whether user wants GNOME ssh-askpass
68 AC_ARG_WITH(gnome-askpass,
69 [ --with-gnome-askpass Build and use the GNOME passphrase requester],
70 [GNOME_ASKPASS="gnome-ssh-askpass"])
71 AC_SUBST(GNOME_ASKPASS)