1 dnl Process this file with autoconf to produce a configure script.
4 AC_CONFIG_HEADER(config.h)
6 dnl Checks for programs.
9 AC_CHECK_PROG(AR, ar, ar)
10 if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
12 dnl Checks for libraries.
13 dnl Replace `main' with a function in -lcrypto:
14 AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
15 dnl Replace `main' with a function in -lutil:
16 AC_CHECK_LIB(util, logout, ,AC_MSG_ERROR([*** -lutil missing - this is part of libc. ***]))
17 dnl Replace `main' with a function in -lz:
18 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
20 AC_CHECK_LIB(nsl, yp_match, , )
22 AC_CHECK_LIB(dl, dlopen, , )
24 AC_CHECK_LIB(pam, pam_authenticate, , )
26 dnl Check for OpenSSL/SSLeay directories.
27 AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
28 for dir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg ; do
30 if test -f "$dir/include/openssl/crypto.h"; then
31 AC_DEFINE(HAVE_OPENSSL)
34 if test -f "$dir/include/ssl/crypto.h"; then
38 if test -f "$dir/include/crypto.h"; then
42 AC_MSG_RESULT($ssldir)
44 AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
45 if test "$ssldir" != "/usr"; then
46 CFLAGS="$CFLAGS -I$ssldir/include"
47 LIBS="$LIBS -L$ssldir/lib"
49 LIBS="$LIBS -lssl -lcrypto"
51 dnl Check for RSAref library.
52 AC_MSG_CHECKING([for RSAref library])
54 LIBS="$saved_LIBS -lRSAglue -lrsaref"
56 [AC_MSG_RESULT(yes); ],
57 [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
59 dnl Checks for header files.
60 AC_CHECK_HEADERS(pty.h)
62 dnl Checks for library functions.
63 AC_PROG_GCC_TRADITIONAL
64 AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)