when cross-compiling, lzma and zstd will be detected on build system
When cross-compiling, for example for Android, ./configure will detect lzma and zstd setups from the build system, when it should be ignoring them. It should only look in the NDK and --prefix values.
$ sudo apt install liblzma-dev
$ export host_triplet=armv7a-linux-androideabi
$ export EXTERNAL_ROOT=`pwd`/external
$ export platform=21
$ export CC=${host_triplet}${platform}-clang
$ export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
$ ./configure --host="$host_triplet" --enable-android --enable-static-libevent --with-libevent-dir=$EXTERNAL_ROOT --enable-static-openssl --with-openssl-dir=$EXTERNAL_ROOT --prefix=$EXTERNAL_ROOT
[snip]
CC src/lib/evloop/compat_libevent.o
src/lib/compress/compress_lzma.c:24:18: fatal error: lzma.h: No such file or directory
#include <lzma.h>
^
compilation terminated.
The workaround is to add --disable-lzma --disable-zstd
.