Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 1 | dnl Process this file with autoconf to produce a configure script. |
| 2 | AC_INIT(auth-krb4.c) |
| 3 | |
| 4 | AC_CONFIG_HEADER(config.h) |
| 5 | |
| 6 | dnl Checks for programs. |
| 7 | AC_PROG_CC |
| 8 | AC_PROG_RANLIB |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame^] | 9 | AC_CHECK_PROG(AR, ar, ar) |
| 10 | if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 11 | |
| 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 ***])) |
Damien Miller | 65b3c13 | 1999-10-29 12:37:01 +1000 | [diff] [blame] | 19 | dnl check for nsl |
| 20 | AC_CHECK_LIB(nsl, yp_match, , ) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 21 | dnl check for dl |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 22 | AC_CHECK_LIB(dl, dlopen, , ) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 23 | dnl check for pam |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 24 | AC_CHECK_LIB(pam, pam_authenticate, , ) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 25 | |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame^] | 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 |
| 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 |
| 41 | done |
| 42 | AC_MSG_RESULT($ssldir) |
| 43 | AC_SUBST(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" |
| 48 | fi |
| 49 | LIBS="$LIBS -lssl -lcrypto" |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 50 | |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame^] | 51 | dnl Check for RSAref library. |
| 52 | AC_MSG_CHECKING([for RSAref library]) |
| 53 | saved_LIBS="$LIBS" |
| 54 | LIBS="$saved_LIBS -lRSAglue -lrsaref" |
| 55 | AC_TRY_LINK([], [], |
| 56 | [AC_MSG_RESULT(yes); ], |
| 57 | [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS") |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 58 | |
| 59 | dnl Checks for header files. |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 60 | AC_CHECK_HEADERS(pty.h) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 61 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 62 | dnl Checks for library functions. |
| 63 | AC_PROG_GCC_TRADITIONAL |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 64 | AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 65 | |
| 66 | AC_OUTPUT(Makefile) |