]> andersk Git - openssh.git/blob - configure.in
- Autodetection of SSL/Crypto library location via autoconf
[openssh.git] / configure.in
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
9 AC_CHECK_PROG(AR, ar, ar)
10 if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
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 ***]))
19 dnl check for nsl
20 AC_CHECK_LIB(nsl, yp_match, , )
21 dnl check for dl
22 AC_CHECK_LIB(dl, dlopen, , )
23 dnl check for pam
24 AC_CHECK_LIB(pam, pam_authenticate, , )
25
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"
50
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")
58
59 dnl Checks for header files.
60 AC_CHECK_HEADERS(pty.h)
61
62 dnl Checks for library functions.
63 AC_PROG_GCC_TRADITIONAL
64 AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)
65
66 AC_OUTPUT(Makefile)
This page took 0.68739 seconds and 5 git commands to generate.