X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure.in;h=349b82b08a08d322ef2ace2fab9292f8d9d5d675;hb=8ebec49d9ddb5c5d69b5a5e383f20125e416180e;hp=34500753cad7017b4a45d7b7c665efe5c4e10ce0;hpb=9493e8d7c191ca74937b776ac01aac6d18e2cda4;p=openldap diff --git a/configure.in b/configure.in index 34500753ca..349b82b08a 100644 --- a/configure.in +++ b/configure.in @@ -498,6 +498,37 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \ 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 +#include +#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 AC_DEFINE(HAVE_PTHREADS)