[Libguestfs] [PATCH 4/5] configure: output clearer message when missing libmagic

Lin Ma lma at suse.com
Tue Apr 10 07:42:55 UTC 2018


Some of users probably don't know which packages they exactly need to
install while they experienced the error message:

libmagic (part of the "file" command) is required.

So add corresponding package information into error message.

Signed-off-by: Lin Ma <lma at suse.com>
---
 m4/guestfs-libraries.m4 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
index 647bea9ec..17cf556d9 100644
--- a/m4/guestfs-libraries.m4
+++ b/m4/guestfs-libraries.m4
@@ -263,7 +263,8 @@ AC_CHECK_LIB([magic],[magic_file],[
     ], [])
 ],[])
 AS_IF([test -z "$MAGIC_LIBS"],
-    [AC_MSG_ERROR([libmagic (part of the "file" command) is required])])
+    [AC_MSG_ERROR([libmagic (part of the "file" command) is required.
+                   Please install the file devel package])])
 
 dnl libvirt (highly recommended)
 AC_ARG_WITH([libvirt],[
-- 
2.15.1




More information about the Libguestfs mailing list