bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] md5, sha1, sha256, sha512: pacify Autoconf 2.70


From: Paul Eggert
Subject: [PATCH] md5, sha1, sha256, sha512: pacify Autoconf 2.70
Date: Wed, 15 Jul 2020 11:01:01 -0700

* 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 ac0d8f3e5..bc1481896 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-07-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <bruno@clisp.org>
 
        libgmp: Avoid warning when --without-libgmp is used.
diff --git a/m4/gl-openssl.m4 b/m4/gl-openssl.m4
index 6abc025ef..e95090411 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.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]