diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-09 10:28:04 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-09 10:28:04 +1100 |
commit | c7b38ceed6030484c61c71ea9fafaca6b34a297e (patch) | |
tree | 4ad64e48a77da1772b19ab6578ad8877ab75ba3a /configure.in | |
parent | e8d9068a36e2528dbaf48c192cd1f97e8beafdfe (diff) |
- Autodetection of SSL/Crypto library location via autoconf
- Fixed location of ssh-askpass to follow autoconf
- Integrated Makefile patch from Niels Kristian Bech Jensen <nkbj@image.dk>
- Autodetection of RSAref library for US users
- Minor doc updates
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/configure.in b/configure.in index 8df3ffc76..a03c2af2c 100644 --- a/configure.in +++ b/configure.in | |||
@@ -6,6 +6,8 @@ AC_CONFIG_HEADER(config.h) | |||
6 | dnl Checks for programs. | 6 | dnl Checks for programs. |
7 | AC_PROG_CC | 7 | AC_PROG_CC |
8 | AC_PROG_RANLIB | 8 | AC_PROG_RANLIB |
9 | AC_CHECK_PROG(AR, ar, ar) | ||
10 | if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi | ||
9 | 11 | ||
10 | dnl Checks for libraries. | 12 | dnl Checks for libraries. |
11 | dnl Replace `main' with a function in -lcrypto: | 13 | dnl Replace `main' with a function in -lcrypto: |
@@ -21,26 +23,42 @@ AC_CHECK_LIB(dl, dlopen, , ) | |||
21 | dnl check for pam | 23 | dnl check for pam |
22 | AC_CHECK_LIB(pam, pam_authenticate, , ) | 24 | AC_CHECK_LIB(pam, pam_authenticate, , ) |
23 | 25 | ||
24 | dnl Check for stuff in path. | 26 | dnl Check for OpenSSL/SSLeay directories. |
25 | AC_CHECK_PROG(AR, ar, ar) | 27 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) |
26 | AC_CHECK_PROG(RANLIB, ranlib, ranlib) | 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" | ||
27 | 50 | ||
28 | dnl Check for ssl headers | 51 | dnl Check for RSAref library. |
29 | AC_CHECK_HEADER(openssl/bn.h, [AC_DEFINE(HAVE_OPENSSL)], [AC_CHECK_HEADER(ssl/bn.h, [AC_DEFINE(HAVE_SSL)], [AC_MSG_ERROR([*** ssl library missing - please install first ***])])]) | 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") | ||
30 | 58 | ||
31 | dnl Checks for header files. | 59 | dnl Checks for header files. |
32 | AC_CHECK_HEADERS(pty.h) | 60 | AC_CHECK_HEADERS(pty.h) |
33 | 61 | ||
34 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
35 | AC_C_CONST | ||
36 | AC_TYPE_UID_T | ||
37 | AC_C_INLINE | ||
38 | AC_TYPE_MODE_T | ||
39 | AC_TYPE_OFF_T | ||
40 | AC_TYPE_SIZE_T | ||
41 | AC_STRUCT_ST_BLKSIZE | ||
42 | AC_HEADER_TIME | ||
43 | |||
44 | dnl Checks for library functions. | 62 | dnl Checks for library functions. |
45 | AC_PROG_GCC_TRADITIONAL | 63 | AC_PROG_GCC_TRADITIONAL |
46 | AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle) | 64 | AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle) |