`HAVE_BSWAP` should be `HAVE_BUILTIN_BSWAP`; to me `HAVE_BSWAP` suggests that the `<byteswap.h>` macros are available (`bswap_16` and friends).

Also the same comment applies about making this a compile-time check if possible.