]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
librdmacm: Add a check for libpthread during librdmacm configure.
authorRoland Dreier <rolandd@cisco.com>
Wed, 15 Dec 2010 20:29:27 +0000 (12:29 -0800)
committerSean Hefty <sean.hefty@intel.com>
Wed, 15 Dec 2010 20:29:27 +0000 (12:29 -0800)
Add a check for libpthread during librdmacm configure.  This will add
libpthread to the list of libraries that librdmacm is linked to.
Currently librdmacm gets libpthread implicitly through libibverbs, but
this breaks when using a linker that does not implicitly link with such
dependencies; eg the new gold linker is such a linker:

<http://wiki.debian.org/qa.debian.org/FTBFS#A2009-11-
02Packagesfailingbecausebinutils-gold.2BAC8-indirectlinking>

Addresses: http://bugs.debian.org/555380
Addresses: https://bugs.launchpad.net/ubuntu/+source/librdmacm/+bug/687983

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
configure.in

index d4ae89fc8b25832a7b28997d61cfef3753b175eb..ea10985ea202d31d45374802626dc4c43bfa4d46 100644 (file)
@@ -45,6 +45,8 @@ AC_C_CONST
 AC_CHECK_SIZEOF(long)
 
 dnl Checks for libraries
+AC_CHECK_LIB(pthread, pthread_mutex_init, [],
+    AC_MSG_ERROR([pthread_mutex_init() not found.  librdmacm requires libpthread.]))
 if test "$disable_libcheck" != "yes"; then
 AC_CHECK_LIB(ibverbs, ibv_get_device_list, [],
     AC_MSG_ERROR([ibv_get_device_list() not found.  librdmacm requires libibverbs.]))