See this arbitrary macOS Travis job: https://travis-ci.org/github/bitcoin/bitcoin/jobs/702283632#L521

Somehow `AC_CHECK_DECLS` doesn't work for builtins for clang (it does work for GCC).

However, `__builtin_prefetch` (which is detected using `AC_COMPILE_IFELSE`) does work.
{
    uint16_t v = htole16(x);
    memcpy(ptr, (char*)&v, 2);
}
void static inline WriteLE32(unsigned char* ptr, uint32_t x)
{
    uint32_t v = htole32(x);
    memcpy(ptr, (char*)&v, 4);
}
void static inline WriteLE64(unsigned char* ptr, uint64_t x)
{
    uint64_t v = htole64(x);
    memcpy(ptr, (char*)&v, 8);
}
uint32_t static inline ReadBE32(const unsigned char* ptr)
{
    uint32_t x;
    memcpy((char*)&x, ptr, 4);
    return be32toh(x);
}
uint64_t static inline ReadBE64(const unsigned char* ptr)
{
    uint64_t x;
    memcpy((char*)&x, ptr, 8);
    return be64toh(x);
}
void static inline WriteBE32(unsigned char* ptr, uint32_t x)