- 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
diff --git a/configure.in b/configure.in
index 8df3ffc..a03c2af 100644
--- a/configure.in
+++ b/configure.in
@@ -6,6 +6,8 @@
dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
+AC_CHECK_PROG(AR, ar, ar)
+if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
dnl Checks for libraries.
dnl Replace `main' with a function in -lcrypto:
@@ -21,26 +23,42 @@
dnl check for pam
AC_CHECK_LIB(pam, pam_authenticate, , )
-dnl Check for stuff in path.
-AC_CHECK_PROG(AR, ar, ar)
-AC_CHECK_PROG(RANLIB, ranlib, ranlib)
+dnl Check for OpenSSL/SSLeay directories.
+AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
+for dir in /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg ; do
+ ssldir="$dir"
+ if test -f "$dir/include/openssl/crypto.h"; then
+ AC_DEFINE(HAVE_OPENSSL)
+ break
+ fi
+ if test -f "$dir/include/ssl/crypto.h"; then
+ AC_DEFINE(HAVE_SSL)
+ break
+ fi
+ if test -f "$dir/include/crypto.h"; then
+ break
+ fi
+done
+AC_MSG_RESULT($ssldir)
+AC_SUBST(ssldir)
+AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
+if test "$ssldir" != "/usr"; then
+ CFLAGS="$CFLAGS -I$ssldir/include"
+ LIBS="$LIBS -L$ssldir/lib"
+fi
+LIBS="$LIBS -lssl -lcrypto"
-dnl Check for ssl headers
-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 ***])])])
+dnl Check for RSAref library.
+AC_MSG_CHECKING([for RSAref library])
+saved_LIBS="$LIBS"
+LIBS="$saved_LIBS -lRSAglue -lrsaref"
+AC_TRY_LINK([], [],
+[AC_MSG_RESULT(yes); ],
+[AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
dnl Checks for header files.
AC_CHECK_HEADERS(pty.h)
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_UID_T
-AC_C_INLINE
-AC_TYPE_MODE_T
-AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-AC_STRUCT_ST_BLKSIZE
-AC_HEADER_TIME
-
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle)