1 dnl $Id: ssl-check.m4,v 1.3.2.1 2001-12-15 12:44:34 srittau Exp $
2 dnl Autoconf macro to check for SSL or OpenSSL
4 AC_DEFUN([AC_PATH_SSL], [
5 AC_ARG_WITH(ssl-dir, [ --with-ssl-dir=PATH specify path to OpenSSL installation (must contain
6 lib and include dirs)],
8 if test "x$withval" = "xno"; then
10 elif test "x$withval" = "xyes"; then
14 dnl FIXME: should only try in $withval
25 if test "$tryssl" = "yes"; then
26 AC_MSG_CHECKING([for SSL])
27 for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl /usr/local/ssl ; do
28 if test -f "$ssldir/include/openssl/cast.h" ; then
29 SSL_CFLAGS="$SSL_CFLAGS -I$ssldir/include -I$ssldir/include/openssl"
30 SSL_LIBS="$SSL_LIBS -L$ssldir/lib -L$ssldir -lcrypto"
31 if test "x$need_dash_r" = "xyes"; then
32 SSL_LIBS="$SSL_LIBS -R$ssldir/lib -R$ssldir"
34 AC_MSG_RESULT([$ssldir (enabling RANDNUM and DHX support)])
36 dnl FIXME: The following looks crude and probably doesn't work properly.
37 dnl Check for the crypto library:
38 AC_CHECK_LIB(crypto, main)
39 dnl Check for "DES" library (for SSLeay, not openssl):
40 AC_CHECK_LIB(des, main)
42 AC_DEFINE(OPENSSL_DHX, 1)
48 if test "x$compile_ssl" = "xno"; then