NEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested...
[gnulib.git] / m4 / gl-openssl.m4
index c8f9dd9..6d66412 100644 (file)
@@ -1,5 +1,5 @@
 # gl-openssl.m4 serial 3
-dnl Copyright (C) 2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2013-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,12 @@ gl_SET_CRYPTO_CHECK_DEFAULT([no])
 
 AC_DEFUN([gl_CRYPTO_CHECK],
 [
+  dnl gnulib users set this before gl_INIT with gl_SET_CRYPTO_CHECK_DEFAULT()
   m4_divert_once([DEFAULTS], [with_openssl_default='gl_CRYPTO_CHECK_DEFAULT'])
 
+  dnl Only clear once, so crypto routines can be checked for individually
+  m4_divert_once([DEFAULTS], [LIB_CRYPTO=])
+
   AC_ARG_WITH([openssl],
     [AS_HELP_STRING([--with-openssl],
       [use libcrypto hash routines. Valid ARGs are:
@@ -29,7 +33,6 @@ AC_DEFUN([gl_CRYPTO_CHECK],
     ALG_header=sha.h
   fi
 
-  LIB_CRYPTO=
   AC_SUBST([LIB_CRYPTO])
   if test "x$with_openssl" != xno; then
     AC_CHECK_LIB([crypto], [$1],