mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
Check in mach cthread fixes. Should make non-pthread detection
work better.
This commit is contained in:
parent
222ffb4a4a
commit
1c0f451699
41
configure.in
41
configure.in
@ -439,16 +439,45 @@ int argc; char **argv;
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then
|
||||
if test $ol_with_threads = auto -o $ol_with_threads = mach ; then
|
||||
dnl check for Mach CThreads
|
||||
AC_CHECK_HEADERS(mach/cthreads.h)
|
||||
if test $ac_cv_header_lwp_lwp_h = yes ; then
|
||||
AC_CHECK_LIB(lwp, cthread_fork, [have_cthreads=yes], [have_cthreads=no])
|
||||
if test $ac_cv_header_mach_cthreads_h = yes ; then
|
||||
ol_with_threads=found
|
||||
|
||||
if test $have_cthreads = yes ; then
|
||||
AC_DEFINE(HAVE_MACH_CTHREADS)
|
||||
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
|
||||
dnl A few platforms have cthread support in standard libraries
|
||||
AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
|
||||
|
||||
if test $ol_link_threads = no ; then
|
||||
dnl try -all_load
|
||||
dnl this test needs work
|
||||
AC_CACHE_CHECK([for cthread_fork with -all_load],
|
||||
[ol_cv_cthread_all_load], [
|
||||
dnl save the CPPFLAGS
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="-all_load $LIBS"
|
||||
AC_TRY_LINK([#include <mach/cthreads.h>],[
|
||||
cthread_fork((void *)0, (void *)0);
|
||||
], ol_cv_cthread_all_load=yes, ol_cv_cthread_all_load=no)
|
||||
dnl restore the LIBS
|
||||
LIBS="$save_LIBS"
|
||||
])
|
||||
|
||||
if test $ol_cv_cthread_all_load = yes ; then
|
||||
LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
|
||||
ol_link_threads=mach
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ol_link_threads != no ; then
|
||||
: check for cthread specific functionality here
|
||||
else
|
||||
AC_MSG_ERROR([could not link with Mach CThreads])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ol_with_threads = mach ; then
|
||||
AC_MSG_ERROR([could not locate Mach CThreads])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -140,9 +140,6 @@ is provided ``as is'' without express or implied warranty.
|
||||
/* define if you have NDBM */
|
||||
#undef HAVE_NDBM
|
||||
|
||||
/* define if you have Mach CThreads */
|
||||
#undef HAVE_MACH_CTHREADS
|
||||
|
||||
/* define if you have a preemptive POSIX Threads implementation */
|
||||
#undef HAVE_PREEMPTIVE_PTHREADS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user