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