+AC_CHECK_OCAML_PKG([libvirt])
+if test "$OCAML_PKG_libvirt" = "no"; then
+ AC_MSG_ERROR([Please install OCaml module 'libvirt'.])
+fi
+
+AC_CHECK_OCAML_PKG([guestfs])
+if test "$OCAML_PKG_guestfs" = "no"; then
+ AC_MSG_ERROR([Please install OCaml module 'guestfs'.])
+fi
+
+AC_CHECK_OCAML_PKG([hivex])
+if test "$OCAML_PKG_hivex" = "no"; then
+ AC_MSG_ERROR([Please install OCaml module 'hivex'.])
+fi
+
+AC_CHECK_OCAML_PKG([xml-light])
+if test "$OCAML_PKG_xml_light" = "no"; then
+ AC_MSG_ERROR([Please install OCaml module 'xml-light'.])
+fi
+
+AC_CHECK_OCAML_PKG([camomile])
+if test "$OCAML_PKG_camomile" = "no"; then
+ AC_MSG_ERROR([Please install OCaml module 'camomile' (>= 0.8, including the data module if that is separate).])
+fi
+
+AC_CHECK_OCAML_PKG([bitstring])
+if test "$OCAML_PKG_bitstring" = "no"; then
+ AC_MSG_ERROR([Please install OCaml module 'bitstring'.])
+fi
+
+AC_CHECK_OCAML_PKG([extlib])
+if test "$OCAML_PKG_extlib" = "no"; then
+ AC_MSG_ERROR([Please install OCaml module 'extlib'.])
+fi
+
+dnl Check for gdk_pixbuf_mlsource program.
+AC_PATH_PROGS([GDK_PIXBUF_MLSOURCE], [gdk_pixbuf_mlsource])
+
+dnl Optional programs.
+
+dnl XXX Other desktop environments?
+AC_CHECK_PROGS([OPENER], [gnome-open], [no])
+
+AC_CHECK_PROG([HIVEXREGEDIT], [hivexregedit], [hivexregedit], [no])
+
+AC_CHECK_PROG([PERLDOC],[perldoc],[perldoc],[no])
+if test "x$PERLDOC" = "xno" ; then
+ AC_MSG_WARN([perldoc not found - install perl to make man pages])
+fi
+AM_CONDITIONAL([HAVE_PERLDOC],[test "x$PERLDOC" != "xno"])
+