1# gc-sm3.m4 serial 2 2dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. 3dnl This file is free software; the Free Software Foundation 4dnl gives unlimited permission to copy and/or distribute it, 5dnl with or without modifications, as long as this notice is preserved. 6 7AC_DEFUN([gl_GC_SM3], 8[ 9 AC_REQUIRE([gl_GC]) 10 AC_CACHE_CHECK([whether libgcrypt supports SM3], 11 [gl_cv_libcrypt_md_sm3], 12 [AC_COMPILE_IFELSE( 13 [AC_LANG_PROGRAM([[ 14 #include <gcrypt.h> 15 int a = GCRY_MD_SM3; 16 ]], [[]]) 17 ], 18 [gl_cv_libcrypt_md_sm3=yes], 19 [gl_cv_libcrypt_md_sm3=no]) 20 ]) 21 if test $gl_cv_libcrypt_md_sm3 = yes; then 22 AC_DEFINE([LIBGCRYPT_HAS_MD_SM3], [1], 23 [Define if libgcrypt supports the MD algorithm SM3.]) 24 fi 25]) 26