configure:10238: checking whether LDFLAGS is valid
configure:10258: gcc -o conftest -O3 -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl@1.1/include -fPIC -mmacosx-version-min=10.7 -arch x86_64 -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib -fPIC -Bstatic -lz -arch x86_64 conftest.c >&5
ld: warning: dylib (/usr/local/opt/zlib/lib/libz.dylib) was built for newer macOS version (12.0) than being linked (10.7)
You'll need other shared libraries built for the targeting version.
Libraries built for newer version may not work on older versions.