1 dnl Based on the one from the Boinc project by Reinhard
3 AC_DEFUN([AX_CHECK_SSL],
4 [AC_MSG_CHECKING(for OpenSSL)
8 AC_HELP_STRING([--with-ssl],
9 [Use SSL (in specified installation directory)]),
10 [check_ssl_dir="$withval"],
12 for dir in $check_ssl_dir /usr /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local ; do
14 if test -f "$dir/include/openssl/ssl.h"; then
17 SSL_CFLAGS="-I$ssldir/include -I$ssldir/include/openssl";
20 if test -f "$dir/include/ssl.h"; then
23 SSL_CFLAGS="-I$ssldir/include/";
27 AC_MSG_RESULT($found_ssl)
28 if test x_$found_ssl != x_yes; then
30 ----------------------------------------------------------------------
31 Cannot find SSL libraries.
33 Please install OpenSSL or specify installation directory with
35 ----------------------------------------------------------------------
38 printf "OpenSSL found in $ssldir\n";
39 SSL_LIBS="-lssl -lcrypto";
40 SSL_LDFLAGS="-L$ssldir/lib";
41 AC_DEFINE_UNQUOTED([USE_OPENSSL],[1],
42 ["Define to 1 if you want to use the OpenSSL crypto library"])