On the master branch @ 10dab907e73ba984deb813e20f6e3fc9ec359a17, the x86_64 assembly check in both the Autotools and CMake build systems can fail depending on externally provided flags. For example:
0$ env CFLAGS="-Wall -Werror" ./configure --with-asm=x86_64
1<snip>
2checking for x86_64 assembly availability... no
3configure: error: x86_64 assembly requested but not available
or
0$ env CFLAGS="-Wall -Werror" cmake -B build -DSECP256K1_ASM=x86_64
1<snip>
2-- Performing Test HAVE_X86_64_ASM
3-- Performing Test HAVE_X86_64_ASM - Failed
4CMake Error at CMakeLists.txt:111 (message):
5 x86_64 assembly requested but not available.
6
7
8-- Configuring incomplete, errors occurred!
The same issue occurs in CI jobs that build on Windows using clang-cl.
This PR fixes both build systems.