[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Problems with pthread detection under HPUX 11.0 (ITS#14)
Forgot to attach the patch...
Index: configure.in
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/configure.in,v
retrieving revision 1.68
diff -u -r1.68 configure.in
--- configure.in 1998/12/28 19:08:17 1.68
+++ configure.in 1998/12/30 17:42:19
@@ -480,6 +480,37 @@
LIBS="$save_LIBS"
fi
+ dnl HP-UX 11 check
+ if test $ol_link_threads = no; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lpthread"
+ AC_MSG_CHECKING([for pthread_create() in HP-UX -lpthread])
+ ol_try_pthread_hpux_11=no
+ AC_CACHE_VAL(ol_cv_pthread_hpux_11,[
+ AC_TRY_LINK([
+#include <pthread.h>
+#include <elf.h>
+#ifndef ELFABI_HPUX_REL11
+ die horribly
+#endif
+ ], [pthread_create(NULL, NULL, NULL, NULL);],
+ ol_try_pthread_hpux_11=yes
+ ol_cv_pthread_hpux_11=yes,
+ ol_cv_pthread_hpux_11=no)])
+ AC_MSG_RESULT(yes)
+ LIBS="$save_LIBS"
+
+ if test $ol_cv_pthread_hpux_11=yes ; then
+ ol_link_threads=posix
+ LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
+ if test $ol_try_pthread_hpux_11=yes ; then
+ dnl Some tests below may fail, cause we aint including
+ dnl pthread.h. Force appropriate ones to yes
+ ac_cv_func_pthread_attr_init=yes
+ fi
+ fi
+ fi
+
if test $ol_link_threads = no ; then
dnl try -lc_r
save_LIBS="$LIBS"