+dnl libmagic (highly recommended)
+AC_CHECK_LIB([magic],[magic_file],
+ [AC_CHECK_HEADER([magic.h],
+ [AC_SUBST([MAGIC_LIBS], ["-lmagic"])
+ AC_DEFINE([HAVE_LIBMAGIC],[1],[libmagic found at compile time.])
+ ], [])
+ ],
+ [AC_MSG_WARN([libmagic not found, some core features will be disabled])])
+
+dnl libvirt (required)
+PKG_CHECK_MODULES([LIBVIRT], [libvirt])
+AC_SUBST([LIBVIRT_CFLAGS])
+AC_SUBST([LIBVIRT_LIBS])
+
+dnl Check for PCRE (highly recommended)
+PKG_CHECK_MODULES([PCRE], [libpcre],
+ [AC_SUBST([PCRE_CFLAGS])
+ AC_SUBST([PCRE_LIBS])
+ AC_DEFINE([HAVE_PCRE],[1],[PCRE found at compile time.])
+ ],
+ [AC_MSG_WARN([PCRE not found, some core features will be disabled])])
+
+dnl libxml2 (required)
+PKG_CHECK_MODULES([LIBXML2], [libxml-2.0])
+AC_SUBST([LIBXML2_CFLAGS])
+AC_SUBST([LIBXML2_LIBS])
+
+
+dnl hivex library (highly recommended)