Commit feda953c authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

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.
parent be88d378
This diff is collapsed.
......@@ -1549,7 +1549,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
-o $ol_with_threads = mach ; then
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
ol_with_threads=found
......@@ -1577,18 +1577,35 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
fi
fi
if test $ol_link_threads != no ; then
: check for cthread specific functionality here
AC_DEFINE(HAVE_MACH_CTHREADS,1,
[define if you have Mach Cthreads])
elif test $ac_cv_header_cthreads_h = yes ; then
dnl Hurd variant of Mach Cthreads
dnl uses <cthreads.h> and -lthreads
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
AC_MSG_ERROR([could not link with Mach CThreads])
fi
fi
if test $ol_with_threads = mach ; then
elif test $ol_with_threads = mach ; then
AC_MSG_ERROR([could not locate Mach CThreads])
fi
if test $ol_link_threads = mach ; then
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
if test $ol_with_threads = auto -o $ol_with_threads = yes \
......
......@@ -62,7 +62,11 @@ LDAP_END_DECL
* *
**********************************/
#include <mach/cthreads.h>
#if defined( HAVE_MACH_CTHREADS_H )
# include <mach/cthreads.h>
#elif defined( HAVE_CTHREAD_H
# include <cthreads.h>
#endif
LDAP_BEGIN_DECL
......
......@@ -343,6 +343,9 @@
/* Define if you have the <crypt.h> header file. */
#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. */
#undef HAVE_DB_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment