diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ccc9421..e9693ef 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,36 @@ AC_SUBST(udev_prefix) AC_DEFINE(LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE, 1, [I know the API is subject to change]) +AC_CHECK_FILES([/usr/share/usb.ids], [usbids=/usr/share/usb.ids]) +AC_CHECK_FILES([/usr/share/hwdata/usb.ids], [usbids=/usr/share/hwdata/usb.ids]) +AC_CHECK_FILES([/usr/share/misc/usb.ids], [usbids=/usr/share/misc/usb.ids]) + +AC_ARG_WITH(usb-ids-path, + AS_HELP_STRING([--usb-ids-path=DIR], [Path to usb.ids file]), + [USB_DATABASE=${withval}], + [if test -n "$usbids" ; then + USB_DATABASE="$usbids" + else + AC_MSG_ERROR([usb.ids not found, try --with-usb-ids-path=]) + fi]) + +AC_SUBST(USB_DATABASE) + +AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids]) +AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids]) +AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids]) + +AC_ARG_WITH(pci-ids-path, + AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]), + [PCI_DATABASE=${withval}], + [if test -n "$pciids" ; then + PCI_DATABASE="$pciids" + else + AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=]) + fi]) + +AC_SUBST(PCI_DATABASE) + AC_CONFIG_FILES([ Makefile modem-probe/Makefile @@ -95,6 +125,9 @@ echo " datarootdir: ${datarootdir} mandir: ${mandir} + usb.ids: ${USB_DATABASE} + pci.ids: ${PCI_DATABASE} + compiler: ${CC} cflags: ${CFLAGS} ldflags: ${LDFLAGS} |