From 2d431ac35c4943a3655c07ba91870d2323321b43 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 15 Jul 2020 10:57:05 -0700 Subject: [PATCH] md5, sha1, sha256, sha512: pacify Autoconf 2.70 * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use m4_if rather than a shell if, so that the argument to AC_CHECK_HEADERS is a simple string that does not require shell evaluation. This fixes a warning generated by Autoconf 2.69b. --- ChangeLog | 8 ++++++++ m4/gl-openssl.m4 | 11 +++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac0d8f3e53..bc1481896b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-07-15 Paul Eggert + + md5, sha1, sha256, sha512: pacify Autoconf 2.70 + * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use m4_if rather than a + shell if, so that the argument to AC_CHECK_HEADERS is + a simple string that does not require shell evaluation. + This fixes a warning generated by Autoconf 2.69b. + 2020-07-12 Bruno Haible libgmp: Avoid warning when --without-libgmp is used. diff --git a/m4/gl-openssl.m4 b/m4/gl-openssl.m4 index 6abc025efc..e95090411b 100644 --- a/m4/gl-openssl.m4 +++ b/m4/gl-openssl.m4 @@ -1,4 +1,4 @@ -# gl-openssl.m4 serial 4 +# gl-openssl.m4 serial 5 dnl Copyright (C) 2013-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -31,12 +31,6 @@ AC_DEFUN([gl_CRYPTO_CHECK], [], [with_openssl=$with_openssl_default]) - if test "x$1" = xMD5; then - ALG_header=md5.h - else - ALG_header=sha.h - fi - AC_SUBST([LIB_CRYPTO]) if test "x$with_openssl" != xno; then if test "x$with_openssl" = xauto-gpl-compat; then @@ -55,7 +49,8 @@ AC_DEFUN([gl_CRYPTO_CHECK], if test "x$with_openssl" != xauto-gpl-compat || test "x$gl_cv_openssl_gpl_compat" = xyes; then AC_CHECK_LIB([crypto], [$1], - [AC_CHECK_HEADERS([openssl/$ALG_header], + [AC_CHECK_HEADERS( + m4_if([$1], [MD5], [openssl/md5.h], [openssl/sha.h]), [LIB_CRYPTO=-lcrypto AC_DEFINE([HAVE_OPENSSL_$1], [1], [Define to 1 if libcrypto is used for $1.])])]) -- 2.39.5