summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-01-27 18:54:55 +0100
committerBjörn Jacke <bj@sernet.de>2010-01-27 18:59:16 +0100
commit6bade10a1eb21689613770f9a54e0a080663029c (patch)
tree24ab28aae8354f46c2be2aef137704987a21f4c7 /source3
parentdffb5ad2bf75fc0bcb69dce5cde52c8a1ea9c4f9 (diff)
downloadsamba-6bade10a1eb21689613770f9a54e0a080663029c.tar.gz
samba-6bade10a1eb21689613770f9a54e0a080663029c.tar.bz2
samba-6bade10a1eb21689613770f9a54e0a080663029c.zip
s3: get pthread detection also on HP-UX right
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in
index a5d0b0669b..2766d07d18 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6361,17 +6361,28 @@ if test "x$PTHREAD_LDFLAGS" = xerror; then
PTHREAD_LDFLAGS="-lpthread" ])
fi
+# especially for HP-UX, where the AC_CHECK_FUNC macro fails to test for
+# pthread_attr_init. On pthread_mutex_lock it works there...
+if test "x$PTHREAD_LDFLAGS" = xerror; then
+ AC_CHECK_LIB(pthread, pthread_mutex_lock, [
+ PTHREAD_CFLAGS=="-D_REENTRANT"
+ PTHREAD_LDFLAGS="-lpthread" ])
+fi
+
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LDFLAGS)
samba_cv_HAVE_PTHREAD=no
if test x"$PTHREAD_CFLAGS" != xerror -a x"$PTHREAD_LDFLAGS" != xerror; then
samba_cv_HAVE_PTHREAD=yes
- # now check for pthread.h with pthread-correct CFLAGS:
+ # now check for pthread.h with pthread-correct CFLAGS and LDFLAGS:
ac_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ ac_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
AC_CHECK_HEADERS(pthread.h)
CFLAGS=$ac_save_CFLAGS
+ LDFLAGS=$ac_save_LDFLAGS
fi
#################################################