Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r1252
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2009-10-29 08:40:18


bgoglin_at_[hidden] wrote:
> Author: bgoglin
> Date: 2009-10-29 03:56:40 EDT (Thu, 29 Oct 2009)
> New Revision: 1252
> URL: https://svn.open-mpi.org/trac/hwloc/changeset/1252
>
> Log:
> pciutils only got a .pc recently (in 2.2.6), so add configure code to manually check for its headers and library
> Text files modified:
> branches/libpci/configure.ac | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> Modified: branches/libpci/configure.ac
> ==============================================================================
> --- branches/libpci/configure.ac (original)
> +++ branches/libpci/configure.ac 2009-10-29 03:56:40 EDT (Thu, 29 Oct 2009)
> @@ -376,6 +376,16 @@
>
> if test "x$enable_pci" = "xyes"; then
> PKG_CHECK_MODULES([PCI], [libpci], [:], [enable_pci="no"])
> + # manually check pciutils in case a old one without .pc is installed
> + if test "x$enable_pci" = "xno"; then
> + AC_CHECK_HEADERS([pci/pci.h], [
> + AC_CHECK_LIB([pci], [pci_cleanup], [enable_pci=yes]

By the way, I used AC_CHECK_LIB instead of AC_HAVE_LIBRARY without any
good reason here. The only difference seems to be that the former checks
for an actual function name in the lib. I don't know if/how the libpci
ABI actually changed in the past. Is their any common sense driving such
a choice? AC_SEARCH_LIBS is sometimes recommended but I don't think it
matters for libpci.

Brice