if test $? = 0; then
LIBCRYPTO_LIBS=`$PKG_CONFIG libcrypto --libs-only-l 2>/dev/null`
LIBCRYPTO_INCLUDES=`$PKG_CONFIG libcrypto --cflags-only-I 2>/dev/null`
+ ssldir=`$PKG_CONFIG libcrypto --variable=prefix 2>/dev/null`
found=true
fi
fi
# it will just work!
fi
+ if $found; then
+ AC_DEFINE([HAVE_LIBCRYPTO], [1], [Define to 1 if you have OpenSSL libcrypto])
+ fi
+
# try the preprocessor and linker with our new flags,
# being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
[AC_LANG_PROGRAM([#include <openssl/crypto.h>], [ERR_load_CRYPTO_strings()])],
[
AC_MSG_RESULT([yes])
+ AC_CHECK_FUNCS([RAND_bytes RAND_pseudo_bytes])
$1
], [
AC_MSG_RESULT([no])
AC_SUBST([LIBCRYPTO_INCLUDES])
AC_SUBST([LIBCRYPTO_LIBS])
AC_SUBST([LIBCRYPTO_LDFLAGS])
+ AM_CONDITIONAL([HAVE_LIBCRYPTO], [test "x$LIBCRYPTO_LIBS" != "x"])
])