commit 40d5394383d9283d2c0b04b41ba26bb6e2105a9e from: Thomas Adam date: Wed Mar 08 09:27:14 2023 UTC portable: configure: use SHA_2{,56}_H Don't use a custom variable when the header checks for these are already available. From Christian "naddy" Weisgerber. commit - c2417a8ec6a4fad60404fd1eb3a338f0f3fdaa58 commit + 40d5394383d9283d2c0b04b41ba26bb6e2105a9e blob - 66a5f987364d3134eda0122154ca04ee9767dcc8 blob + 74bf0048c37b744fb7da933a0adcd8fd7b57117c --- configure.ac +++ configure.ac @@ -85,10 +85,6 @@ AC_CHECK_HEADERS([ \ unistd.h \ wchar.h \ ]) - -if test "x$ac_cv_header_sha256_h" = xyes; then - AC_DEFINE([HAVE_SHA256], [1], [SHA256 support]) -fi AM_CONDITIONAL([HAVE_SHA2], [test "x$ac_cv_header_sha2_h" = xyes]) blob - 065d1bfc0cfa10452af7c14c15af4ccacf8188c8 blob + 1c15d7ae3f47aa1f84dc41b33db1978bcb41aa6d --- include/got_compat2.h +++ include/got_compat2.h @@ -222,12 +222,12 @@ typedef struct _SHA2_CTX { #ifdef HAVE_SHA1_AS_SHA1 # include #endif -#ifdef HAVE_SHA2 +#ifdef HAVE_SHA2_H # include #else # include "sha2.h" #endif -#ifdef HAVE_SHA256 +#ifdef HAVE_SHA256_H # include #endif #endif