blob: a03c2af2cff557d87f41e398f40b9a2427d25964 [file] [log] [blame]
Damien Miller7f6ea021999-10-28 13:25:17 +10001dnl Process this file with autoconf to produce a configure script.
2AC_INIT(auth-krb4.c)
3
4AC_CONFIG_HEADER(config.h)
5
6dnl Checks for programs.
7AC_PROG_CC
8AC_PROG_RANLIB
Damien Millerc7b38ce1999-11-09 10:28:04 +11009AC_CHECK_PROG(AR, ar, ar)
10if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
Damien Miller7f6ea021999-10-28 13:25:17 +100011
12dnl Checks for libraries.
13dnl Replace `main' with a function in -lcrypto:
14AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
15dnl Replace `main' with a function in -lutil:
16AC_CHECK_LIB(util, logout, ,AC_MSG_ERROR([*** -lutil missing - this is part of libc. ***]))
17dnl Replace `main' with a function in -lz:
18AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
Damien Miller65b3c131999-10-29 12:37:01 +100019dnl check for nsl
20AC_CHECK_LIB(nsl, yp_match, , )
Damien Miller7f6ea021999-10-28 13:25:17 +100021dnl check for dl
Damien Miller356a0b01999-11-08 15:30:59 +110022AC_CHECK_LIB(dl, dlopen, , )
Damien Miller7f6ea021999-10-28 13:25:17 +100023dnl check for pam
Damien Miller356a0b01999-11-08 15:30:59 +110024AC_CHECK_LIB(pam, pam_authenticate, , )
Damien Miller7f6ea021999-10-28 13:25:17 +100025
Damien Millerc7b38ce1999-11-09 10:28:04 +110026dnl Check for OpenSSL/SSLeay directories.
27AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
28for dir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg ; do
29 ssldir="$dir"
30 if test -f "$dir/include/openssl/crypto.h"; then
31 AC_DEFINE(HAVE_OPENSSL)
32 break
33 fi
34 if test -f "$dir/include/ssl/crypto.h"; then
35 AC_DEFINE(HAVE_SSL)
36 break
37 fi
38 if test -f "$dir/include/crypto.h"; then
39 break
40 fi
41done
42AC_MSG_RESULT($ssldir)
43AC_SUBST(ssldir)
44AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
45if test "$ssldir" != "/usr"; then
46 CFLAGS="$CFLAGS -I$ssldir/include"
47 LIBS="$LIBS -L$ssldir/lib"
48fi
49LIBS="$LIBS -lssl -lcrypto"
Damien Miller7f6ea021999-10-28 13:25:17 +100050
Damien Millerc7b38ce1999-11-09 10:28:04 +110051dnl Check for RSAref library.
52AC_MSG_CHECKING([for RSAref library])
53saved_LIBS="$LIBS"
54LIBS="$saved_LIBS -lRSAglue -lrsaref"
55AC_TRY_LINK([], [],
56[AC_MSG_RESULT(yes); ],
57[AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
Damien Miller7f6ea021999-10-28 13:25:17 +100058
59dnl Checks for header files.
Damien Miller356a0b01999-11-08 15:30:59 +110060AC_CHECK_HEADERS(pty.h)
Damien Miller7f6ea021999-10-28 13:25:17 +100061
Damien Miller7f6ea021999-10-28 13:25:17 +100062dnl Checks for library functions.
63AC_PROG_GCC_TRADITIONAL
Damien Miller356a0b01999-11-08 15:30:59 +110064AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)
Damien Miller7f6ea021999-10-28 13:25:17 +100065
66AC_OUTPUT(Makefile)