1 # gl-openssl.m4 serial 1
2 dnl Copyright (C) 2013 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_CRYPTO_CHECK],
10 [AS_HELP_STRING([--with-openssl],
11 [use libcrypto hash routines if available: default=no])],
15 if test "x$1" = xMD5; then
22 AC_SUBST([LIB_CRYPTO])
23 if test "x$with_openssl" != xno; then
24 AC_CHECK_LIB([crypto], [$1],
25 [AC_CHECK_HEADERS([openssl/$ALG_header],
26 [LIB_CRYPTO='-lcrypto'
27 AC_DEFINE([HAVE_OPENSSL_$1],[1],
28 [Define to 1 if libcrypto is used for $1])])])
29 if test "x$with_openssl" = xyes; then
30 if test "x$LIB_CRYPTO" = x; then
31 AC_MSG_WARN([openssl development library not found for $1])