+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 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 libvirt (highly recommended)
+PKG_CHECK_MODULES([LIBVIRT], [libvirt],
+ [AC_SUBST([LIBVIRT_CFLAGS])
+ AC_SUBST([LIBVIRT_LIBS])
+ AC_DEFINE([HAVE_LIBVIRT],[1],[libvirt found at compile time.])
+ ],
+ [AC_MSG_WARN([libvirt not found, some core features will be disabled])])
+AM_CONDITIONAL([HAVE_LIBVIRT],[test "x$LIBVIRT_LIBS" != "x"])
+
+dnl libxml2 (highly recommended)
+PKG_CHECK_MODULES([LIBXML2], [libxml-2.0],
+ [AC_SUBST([LIBXML2_CFLAGS])
+ AC_SUBST([LIBXML2_LIBS])
+ AC_DEFINE([HAVE_LIBXML2],[1],[libxml2 found at compile time.])
+ ],
+ [AC_MSG_WARN([libxml2 not found, some core features will be disabled])])
+AM_CONDITIONAL([HAVE_LIBXML2],[test "x$LIBXML2_LIBS" != "x"])
+
+dnl hivex library (highly recommended)