Index: kcontrol/usbview/usbdb.cpp =================================================================== --- kcontrol/usbview/usbdb.cpp (revision 492938) +++ kcontrol/usbview/usbdb.cpp (working copy) @@ -8,6 +8,7 @@ * * ***************************************************************************/ +#include #include @@ -24,7 +25,11 @@ USBDB::USBDB() { +#ifndef USBIDS_FILE QString db = locate("data", "kcmusb/usb.ids"); +#else + QString db = USBIDS_FILE; +#endif if (db.isEmpty()) return; Index: kcontrol/usbview/Makefile.am =================================================================== --- kcontrol/usbview/Makefile.am (revision 492938) +++ kcontrol/usbview/Makefile.am (working copy) @@ -14,6 +14,8 @@ xdg_apps_DATA = kcmusb.desktop +if install_usbids usb_DATA = usb.ids usbdir = $(kde_datadir)/kcmusb +endif Index: kcontrol/usbview/configure.in.in =================================================================== --- kcontrol/usbview/configure.in.in (revision 492938) +++ kcontrol/usbview/configure.in.in (working copy) @@ -1,10 +1,16 @@ case "$host" in - *-*-linux*) + *-*-linux*|*-*-freebsd*) FOUND_USBVIEW=yes ;; - *-*-freebsd*) - FOUND_USBVIEW=yes - ;; esac AM_CONDITIONAL(include_kcontrol_usbview, test "$FOUND_USBVIEW" = "yes") + +AC_ARG_WITH([usbids], AC_HELP_STRING([--with-usbids=PATH], [Use the usb.ids file at the specified path, instead of the local copy])) + +if test "x$with_usbids" != "x" && test "x$with_usbids" != "xno"; then + AC_DEFINE_UNQUOTED(USBIDS_FILE, "$with_usbids", [Path for the usb.ids file to use]) + dont_install_usbids="yes" +fi + +AM_CONDITIONAL(install_usbids, test "x$dont_install_usbids" != "xyes")