On Wednesday, 2 November 2016 21:26:19 CET Matteo Cafasso wrote:
Signed-off-by: Matteo Cafasso <noxdafox(a)gmail.com>
---
appliance/packagelist.in | 1 +
daemon/Makefile.am | 3 ++-
m4/guestfs_daemon.m4 | 8 ++++++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/appliance/packagelist.in b/appliance/packagelist.in
index f278f66..5982df8 100644
--- a/appliance/packagelist.in
+++ b/appliance/packagelist.in
@@ -232,6 +232,7 @@ jfsutils
kmod
less
libxml2
+libyara3
This is specific for Debian/Ubuntu, so needs to be placed there.
lsof
lsscsi
lvm2
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 23f60eb..3a25f43 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -222,7 +222,8 @@ guestfsd_LDADD = \
$(LIBINTL) \
$(SERVENT_LIB) \
$(PCRE_LIBS) \
- $(TSK_LIBS)
+ $(TSK_LIBS) \
+ $(YARA_LIBS)
guestfsd_CPPFLAGS = \
-I$(top_srcdir)/gnulib/lib \
diff --git a/m4/guestfs_daemon.m4 b/m4/guestfs_daemon.m4
index 12123df..9dc7c6c 100644
--- a/m4/guestfs_daemon.m4
+++ b/m4/guestfs_daemon.m4
@@ -126,3 +126,11 @@ AC_CHECK_LIB([tsk],[tsk_version_print],[
AC_DEFINE([HAVE_LIBTSK], [1], [Define to 1 if The Sleuth Kit library (libtsk) is
available.])
], [])
],[AC_MSG_WARN([The Sleuth Kit library (libtsk) not found])])
+
+dnl yara library (optional)
+AC_CHECK_LIB([yara],[yr_initialize],[
+ AC_CHECK_HEADER([yara.h],[
+ AC_SUBST([YARA_LIBS], [-lyara])
+ AC_DEFINE([HAVE_LIBYARA], [1], [Define to 1 if Yara library is available.])
+ ], [])
+],[AC_MSG_WARN([Yara library not found])])
Newer version of YARA have pkg-config support, so that should be checked
first, falling back to manual library detection.
Thanks,
--
Pino Toscano