mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Cthread changes for the Hurd.
--- Copyright 2001, Igor Khavkine, All rights reserved. This is free software; you can redistribute and use it under the same terms as OpenLDAP itself.
This commit is contained in:
parent
be88d37840
commit
feda953cc4
4 changed files with 403 additions and 317 deletions
31
configure.in
31
configure.in
|
|
@ -1549,7 +1549,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
||||||
-o $ol_with_threads = mach ; then
|
-o $ol_with_threads = mach ; then
|
||||||
|
|
||||||
dnl check for Mach CThreads
|
dnl check for Mach CThreads
|
||||||
AC_CHECK_HEADERS(mach/cthreads.h)
|
AC_CHECK_HEADERS(mach/cthreads.h cthread.h)
|
||||||
if test $ac_cv_header_mach_cthreads_h = yes ; then
|
if test $ac_cv_header_mach_cthreads_h = yes ; then
|
||||||
ol_with_threads=found
|
ol_with_threads=found
|
||||||
|
|
||||||
|
|
@ -1577,17 +1577,34 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $ol_link_threads != no ; then
|
elif test $ac_cv_header_cthreads_h = yes ; then
|
||||||
: check for cthread specific functionality here
|
dnl Hurd variant of Mach Cthreads
|
||||||
AC_DEFINE(HAVE_MACH_CTHREADS,1,
|
dnl uses <cthreads.h> and -lthreads
|
||||||
[define if you have Mach Cthreads])
|
|
||||||
|
ol_with_threads=found
|
||||||
|
|
||||||
|
dnl save the flags
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -lthreads"
|
||||||
|
AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
|
||||||
|
if test $ol_link_threads = yes ; then
|
||||||
|
LTHREAD_LIBS="-lthreads"
|
||||||
|
ol_link_threads=mach
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([could not link with Mach CThreads])
|
AC_MSG_ERROR([could not link with Mach CThreads])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
elif test $ol_with_threads = mach ; then
|
||||||
|
AC_MSG_ERROR([could not locate Mach CThreads])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $ol_with_threads = mach ; then
|
if test $ol_link_threads = mach ; then
|
||||||
AC_MSG_ERROR([could not locate Mach CThreads])
|
AC_DEFINE(HAVE_MACH_CTHREADS,1,
|
||||||
|
[define if you have Mach Cthreads])
|
||||||
|
elif test $ol_with_threads = found ; then
|
||||||
|
AC_MSG_ERROR([could not link with Mach CThreads])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,11 @@ LDAP_END_DECL
|
||||||
* *
|
* *
|
||||||
**********************************/
|
**********************************/
|
||||||
|
|
||||||
|
#if defined( HAVE_MACH_CTHREADS_H )
|
||||||
# include <mach/cthreads.h>
|
# include <mach/cthreads.h>
|
||||||
|
#elif defined( HAVE_CTHREAD_H
|
||||||
|
# include <cthreads.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
LDAP_BEGIN_DECL
|
LDAP_BEGIN_DECL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -343,6 +343,9 @@
|
||||||
/* Define if you have the <crypt.h> header file. */
|
/* Define if you have the <crypt.h> header file. */
|
||||||
#undef HAVE_CRYPT_H
|
#undef HAVE_CRYPT_H
|
||||||
|
|
||||||
|
/* Define if you have the <cthread.h> header file. */
|
||||||
|
#undef HAVE_CTHREAD_H
|
||||||
|
|
||||||
/* Define if you have the <db.h> header file. */
|
/* Define if you have the <db.h> header file. */
|
||||||
#undef HAVE_DB_H
|
#undef HAVE_DB_H
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue