Ensure libtsk is available at compile time.
If not, daemon routines depending on it won't be available.
Signed-off-by: Matteo Cafasso <noxdafox(a)gmail.com>
---
docs/guestfs-building.pod | 4 ++++
m4/guestfs_daemon.m4 | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index f0fd8e3..af44b69 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -387,6 +387,10 @@ Optional.
Optional. For tab-completion of commands in bash.
+=item libtsk
+
+Optional. Library for filesystem forensics analysis.
+
=back
=head1 BUILDING FROM GIT
diff --git a/m4/guestfs_daemon.m4 b/m4/guestfs_daemon.m4
index 88936b2..192583b 100644
--- a/m4/guestfs_daemon.m4
+++ b/m4/guestfs_daemon.m4
@@ -118,3 +118,11 @@ PKG_CHECK_MODULES([SD_JOURNAL], [libsystemd],[
AC_MSG_WARN([systemd journal library not found, some features will be disabled])
])
])
+
+dnl libtsk sleuthkit library (optional)
+AC_CHECK_LIB([tsk],[tsk_version_print],[
+ AC_CHECK_HEADER([tsk/libtsk.h],[
+ AC_SUBST([TSK_LIBS], [-ltsk])
+ 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])])
--
2.8.0.rc3