[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 1/6] appliance: add libyara dependency



Signed-off-by: Matteo Cafasso <noxdafox 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
 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])])
--
2.10.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]