bgog...@osl.iu.edu 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

Reply via email to