]> Savannah Git Hosting - gnulib.git/commitdiff
md5, sha1, sha256, sha512: pacify Autoconf 2.70
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 Jul 2020 17:57:05 +0000 (10:57 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 Jul 2020 17:57:44 +0000 (10:57 -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
m4/gl-openssl.m4

index ac0d8f3e53fe39084559c732e30ac509335996aa..bc1481896b338f9989de8765e285ed039d42e102 100644 (file)
--- 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.
index 6abc025efc3df436b056a98c0c8d3321f2634455..e95090411bf0c2e6dbccf1aa5103f7cbaa67d20a 100644 (file)
@@ -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.])])])