[systemd-commits] configure.ac

Kay Sievers kay at kemper.freedesktop.org
Mon May 21 17:37:21 PDT 2012


 configure.ac |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)

New commits:
commit 9a203affa6e1866f9b9b68501d10102d21c9d0da
Author: Kay Sievers <kay at vrfy.org>
Date:   Tue May 22 02:35:44 2012 +0200

    build-sys: use libpci's pkgconfig file to find the pci.ids file

diff --git a/configure.ac b/configure.ac
index 864c544..e651e44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -416,33 +416,28 @@ fi
 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
 
 # ------------------------------------------------------------------------------
-if test "x$cross_compiling" = "xno" ; then
-       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])
-fi
-
 AC_ARG_WITH(usb-ids-path,
-       [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
-       [USB_DATABASE=${withval}],
-       [if test -n "$usbids" ; then
-              USB_DATABASE="$usbids"
-       else
-              PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
-              AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
-       fi])
+        [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
+        [USB_DATABASE=${withval}],
+        [if test -n "$usbids" ; then
+                USB_DATABASE="$usbids"
+        else
+                PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
+                AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
+        fi])
 AC_MSG_CHECKING([for USB database location])
 AC_MSG_RESULT([$USB_DATABASE])
 AC_SUBST(USB_DATABASE)
 
 AC_ARG_WITH(pci-ids-path,
-       [AS_HELP_STRING([--with-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])
+        [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
+        [PCI_DATABASE=${withval}],
+        [if test -n "$pciids" ; then
+                PCI_DATABASE="$pciids"
+        else
+                PKG_CHECK_MODULES(LIBPCI, libpci >= 3)
+                AC_SUBST([PCI_DATABASE], [$($PKG_CONFIG --variable=idsdir libpci)/pci.ids])
+        fi])
 AC_MSG_CHECKING([for PCI database location])
 AC_MSG_RESULT([$PCI_DATABASE])
 AC_SUBST(PCI_DATABASE)



More information about the systemd-commits mailing list