AC_HAVE_LIBRARY is listed as an obsolete / deprecated macro in the AC 2.64 docs. So I think AC_CHECK_LIB is the better choice.

On Oct 29, 2009, at 8:40 AM, Brice Goglin wrote:

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

_______________________________________________
hwloc-devel mailing list
hwloc-de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel



--
Jeff Squyres
jsquy...@cisco.com

Reply via email to