+dnl
+dnl Check for OpenSSL, for ermt
+dnl
+if test "$ERMT" != ""; then
+ AC_CHECK_HEADER(openssl/evp.h, [evp_h=yes], [evp_h=no])
+ AC_CHECK_LIB(crypto, EVP_CIPHER_CTX_set_padding, [crypto_lib=yes], [crypto_lib=no])
+ PKG_CHECK_EXISTS([libcrypto],
+ [
+ if test -n $STATIC ; then
+ CRYPTO=`$PKG_CONFIG --libs --static libcrypto`
+ else
+ CRYPTO=`$PKG_CONFIG --libs libcrypto`
+ fi
+ ],[CRYPTO=""])
+ if test "$evp_h" = no -o "x$CRYPTO" = "x"; then
+ AC_MSG_ERROR(You need to install the OpenSSL library (version 0.9.7a or later), or configure without --enable-ermt)
+ fi
+fi
+AC_SUBST(CRYPTO)
+