Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid AC_CHECK_LIB(deflate)'s default ACTION-IF-FOUND behaviour
The other foo_devel=ok/etc tests that do separate AC_CHECK_HEADER/ AC_CHECK_LIB checks with the default AC_CHECK_LIB ACTION-IF-FOUND always instantly fail if either header or library is missing. However for libdeflate this is only the case for --with-libdeflate=yes. By default or with --with-libdeflate=check, the intention is to carry on as per --without-libdeflate when either header or library is missing. For the case when libdeflate.h is missing but the library is found (admittedly an odd case!), the default AC_CHECK_LIB ACTION-IF-FOUND also defines HAVE_LIBDEFLATE -- leading to later build failures as we (ab)use that macro to mean both HAVE_LIBDEFLATE_H and HAVE_LIBDEFLATE. Instead use a no-op found action, and only AC_DEFINE(HAVE_LIBDEFLATE) and add to $LIBS when *both* checks have succeeded.
- Loading branch information