alsa-kFreeBSD The configure script puts the alsa dependency on 1.0.18, provided by libasound2-dev on linux packages. On kFreeBSD, alsa is provided by liboss4-salsa-dev, which only provides up to 1.0.5. Reduce it then to fix FTBFS.
plugingui/image.cc: Fix imagecachetest on big-endian systems. The original code used memcpy which is incorrect on big-endian systems.
src/atomic.h: Fix enginetest on architectures without 64-bit lock free atomics (like 32-bit mips). The code assumed that all atomics except for std::string were lock free which is not true in all architectures.
test/atomictest.cc: Disable podAtomicsAreLockFree because atomics may legitimately not be lock free on some architectures.
test/memcheckertest.cc: Disable tests which rely on the amount of free memory. These tests may fail spuriously if the build system has low free memory (where free does not include swap, buffers, etc).