summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bender <pebender@san.rr.com>2010-06-02 17:35:44 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-06-02 17:35:44 +0200
commit76e6bc280809f91c2660cbeba41e8ed6b2cbd02c (patch)
treebdc031aab537bf524c16b3eebc8d9a600fa649ca
parentab6e9d3dde47214b00a55a8ee1f7bfae0ec3af65 (diff)
configure.ac: fix cross compilation
"Be aware that, like most Autoconf macros, they test a feature of the host machine, and therefore, they die when cross-compiling"
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 81233bf29b..df8a95b3bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,17 +87,21 @@ if test "x$enable_extras" = xyes; then
PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
- 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])
+ 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(pci-ids-path,
- AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file]),
+ [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])
+ AC_MSG_CHECKING([for PCI database location])
+ AC_MSG_RESULT([$PCI_DATABASE])
AC_SUBST(PCI_DATABASE)
AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))