Skip to content

Commit 8251431

Browse files
committed
build, refactor: Rely on AC_DEFINE([ENABLE_X86_SHANI])
This change deduplicates the `ENABLE_X86_SHANI` macro in the build system.
1 parent 4e515e4 commit 8251431

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ crypto_libbitcoin_crypto_avx2_a_SOURCES = crypto/sha256_avx2.cpp
511511
crypto_libbitcoin_crypto_x86_shani_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
512512
crypto_libbitcoin_crypto_x86_shani_a_CPPFLAGS = $(AM_CPPFLAGS)
513513
crypto_libbitcoin_crypto_x86_shani_a_CXXFLAGS += $(X86_SHANI_CXXFLAGS)
514-
crypto_libbitcoin_crypto_x86_shani_a_CPPFLAGS += -DENABLE_X86_SHANI
515514
crypto_libbitcoin_crypto_x86_shani_a_SOURCES = crypto/sha256_x86_shani.cpp
516515

517516
crypto_libbitcoin_crypto_arm_shani_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)

src/crypto/sha256_x86_shani.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
// Written and placed in public domain by Jeffrey Walton.
77
// Based on code from Intel, and by Sean Gulley for the miTLS project.
88

9+
#if defined(HAVE_CONFIG_H)
10+
#include <config/bitcoin-config.h>
11+
#endif //HAVE_CONFIG_H
12+
913
#ifdef ENABLE_X86_SHANI
1014

1115
#include <stdint.h>

0 commit comments

Comments
 (0)