- hivex >= 1.2.1 (http://libguestfs.org/download)
+- (Optional) Berkeley DB 'db_dump' and 'db_load' utilities
+ (db4-utils or db4.X-util or similar)
+
- (Optional) FUSE to build the FUSE module
- perldoc (pod2man, pod2text) to generate the manual pages and
AC_CHECK_PROG([PO4A],[po4a],[po4a],[no])
AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
+dnl Check for db_dump, db_load (optional).
+AC_CHECK_PROGS([DB_DUMP],[db_dump db4_dump db4.8_dump],[no])
+AC_CHECK_PROGS([DB_LOAD],[db_load db4_load db4.8_load],[no])
+if test "x$DB_DUMP" != "xno"; then
+ AC_DEFINE_UNQUOTED([DB_DUMP],["$DB_DUMP"],[Name of db_dump program.])
+fi
+if test "x$DB_LOAD" != "xno"; then
+ AC_DEFINE_UNQUOTED([DB_LOAD],["$DB_LOAD"],[Name of db_load program.])
+fi
+
dnl Check for QEMU for running binaries on this $host_cpu, fall
dnl back to basic 'qemu'. Allow the user to override it.
default_qemu="qemu-kvm kvm qemu-system-$host_cpu qemu"
return safe_strdup (g, fs->hostname ? : "unknown");
}
+#ifdef DB_DUMP
static struct guestfs_application_list *list_applications_rpm (guestfs_h *g, struct inspect_fs *fs);
+#endif
static struct guestfs_application_list *list_applications_deb (guestfs_h *g, struct inspect_fs *fs);
static struct guestfs_application_list *list_applications_windows (guestfs_h *g, struct inspect_fs *fs);
static void add_application (guestfs_h *g, struct guestfs_application_list *, const char *name, const char *display_name, int32_t epoch, const char *version, const char *release, const char *install_path, const char *publisher, const char *url, const char *description);
case OS_TYPE_LINUX:
switch (fs->package_format) {
case OS_PACKAGE_FORMAT_RPM:
+#ifdef DB_DUMP
ret = list_applications_rpm (g, fs);
if (ret == NULL)
return NULL;
+#endif
break;
case OS_PACKAGE_FORMAT_DEB:
return ret;
}
+#ifdef DB_DUMP
static struct guestfs_application_list *
list_applications_rpm (guestfs_h *g, struct inspect_fs *fs)
{
char line[1024];
size_t len;
- snprintf (cmd, cmd_len, "db_dump -p '%s'", tmpfile);
+ snprintf (cmd, cmd_len, DB_DUMP " -p '%s'", tmpfile);
if (g->verbose)
fprintf (stderr, "list_applications_rpm: %s\n", cmd);
return ret;
}
+#endif /* defined DB_DUMP */
static struct guestfs_application_list *
list_applications_deb (guestfs_h *g, struct inspect_fs *fs)