blob: fc59cbb8bf9fd0bb9094b5c65591b5d026d28ccb [file] [log] [blame]
Damien Miller7f6ea021999-10-28 13:25:17 +10001dnl Process this file with autoconf to produce a configure script.
Damien Millere0d444c1999-11-09 14:23:45 +11002
Damien Miller7f6ea021999-10-28 13:25:17 +10003AC_INIT(auth-krb4.c)
4
5AC_CONFIG_HEADER(config.h)
6
7dnl Checks for programs.
8AC_PROG_CC
9AC_PROG_RANLIB
Damien Millerc7b38ce1999-11-09 10:28:04 +110010AC_CHECK_PROG(AR, ar, ar)
11if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
Damien Miller7f6ea021999-10-28 13:25:17 +100012
13dnl Checks for libraries.
14dnl Replace `main' with a function in -lcrypto:
15AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
16dnl Replace `main' with a function in -lutil:
17AC_CHECK_LIB(util, logout, ,AC_MSG_ERROR([*** -lutil missing - this is part of libc. ***]))
18dnl Replace `main' with a function in -lz:
19AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
Damien Miller65b3c131999-10-29 12:37:01 +100020dnl check for nsl
21AC_CHECK_LIB(nsl, yp_match, , )
Damien Miller7f6ea021999-10-28 13:25:17 +100022dnl check for dl
Damien Miller356a0b01999-11-08 15:30:59 +110023AC_CHECK_LIB(dl, dlopen, , )
Damien Miller7f6ea021999-10-28 13:25:17 +100024dnl check for pam
Damien Miller356a0b01999-11-08 15:30:59 +110025AC_CHECK_LIB(pam, pam_authenticate, , )
Damien Miller7f6ea021999-10-28 13:25:17 +100026
Damien Millerc7b38ce1999-11-09 10:28:04 +110027dnl Check for OpenSSL/SSLeay directories.
28AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
29for dir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg ; do
30 ssldir="$dir"
31 if test -f "$dir/include/openssl/crypto.h"; then
32 AC_DEFINE(HAVE_OPENSSL)
33 break
34 fi
35 if test -f "$dir/include/ssl/crypto.h"; then
36 AC_DEFINE(HAVE_SSL)
37 break
38 fi
39 if test -f "$dir/include/crypto.h"; then
40 break
41 fi
42done
43AC_MSG_RESULT($ssldir)
44AC_SUBST(ssldir)
45AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
46if test "$ssldir" != "/usr"; then
47 CFLAGS="$CFLAGS -I$ssldir/include"
48 LIBS="$LIBS -L$ssldir/lib"
49fi
50LIBS="$LIBS -lssl -lcrypto"
Damien Miller7f6ea021999-10-28 13:25:17 +100051
Damien Millerc7b38ce1999-11-09 10:28:04 +110052dnl Check for RSAref library.
53AC_MSG_CHECKING([for RSAref library])
54saved_LIBS="$LIBS"
55LIBS="$saved_LIBS -lRSAglue -lrsaref"
56AC_TRY_LINK([], [],
57[AC_MSG_RESULT(yes); ],
58[AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
Damien Miller7f6ea021999-10-28 13:25:17 +100059
60dnl Checks for header files.
Damien Miller356a0b01999-11-08 15:30:59 +110061AC_CHECK_HEADERS(pty.h)
Damien Miller7f6ea021999-10-28 13:25:17 +100062
Damien Miller7f6ea021999-10-28 13:25:17 +100063dnl Checks for library functions.
64AC_PROG_GCC_TRADITIONAL
Damien Miller356a0b01999-11-08 15:30:59 +110065AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)
Damien Miller7f6ea021999-10-28 13:25:17 +100066
Damien Millere0d444c1999-11-09 14:23:45 +110067dnl Check whether user wants GNOME ssh-askpass
68AC_ARG_WITH(gnome-askpass,
69 [ --with-gnome-askpass Build and use the GNOME passphrase requester],
70 [GNOME_ASKPASS="gnome-ssh-askpass"])
71AC_SUBST(GNOME_ASKPASS)
72
Damien Miller7f6ea021999-10-28 13:25:17 +100073AC_OUTPUT(Makefile)