Eliminate the AC_CHECK_LIB / AC_CHECK_HEADER tests for Yara, for the following reasons:
- Upstream Yara has provided a pkg-config file since 2015, so the (now-fixed) pkg-config check should always find it, without the AC_CHECK_LIB / AC_CHECK_HEADER fallback branch. - In a subsequent patch, we'll want to test for the incompatible Yara API changes described at <https://github.com/VirusTotal/yara/wiki/Backward-incompatible-changes-in-YARA-4.0-API>. That's easy to do with pkg-config, but impossible with AC_CHECK_*, without a custom test. Namely, both AC_CHECK_DECLS and AC_CHECK_TYPES appear unable to check the parameter list of a function pointer typedef (namely YR_CALLBACK_FUNC and YR_COMPILER_CALLBACK_FUNC). And writing a dedicated test for this is overkill. Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- m4/guestfs-daemon.m4 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/m4/guestfs-daemon.m4 b/m4/guestfs-daemon.m4 index 0790f8848249..316a811d30a9 100644 --- a/m4/guestfs-daemon.m4 +++ b/m4/guestfs-daemon.m4 @@ -138,11 +138,4 @@ PKG_CHECK_MODULES([YARA], [yara],[ AC_SUBST([YARA_CFLAGS]) AC_SUBST([YARA_LIBS]) AC_DEFINE([HAVE_YARA],[1],[yara library found at compile time.]) -],[ - AC_CHECK_LIB([yara],[yr_initialize],[ - AC_CHECK_HEADER([yara.h],[ - AC_SUBST([YARA_LIBS], [-lyara]) - AC_DEFINE([HAVE_YARA], [1], [Define to 1 if Yara library is available.]) - ], []) - ],[AC_MSG_WARN([Yara library not found])]) -]) +],[AC_MSG_WARN([Yara library not found])]) -- 2.19.1.3.g30247aa5d201 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs