diff options
author | Dick Porter <dick@acm.org> | 2001-09-23 16:46:54 +0400 |
---|---|---|
committer | Dick Porter <dick@acm.org> | 2001-09-23 16:46:54 +0400 |
commit | b94c52ccbf2697d627b61ef5f3ab1482057d2bbd (patch) | |
tree | 4d8c30c0d34f7e41f65cb07175f515452442ec77 | |
parent | 70b4ec9404b6f0c8178172d320d36b95137f9c22 (diff) |
Cope with systems that have pthread.h but no libpthread
svn path=/trunk/mono/; revision=935
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | mono/metadata/threads.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 2ecf6c455bf..0bf4e6f9b66 100644 --- a/configure.in +++ b/configure.in @@ -36,16 +36,18 @@ AC_SUBST(GMODULE_LIBS) dnl ***************************** dnl *** Checks for libpthread *** dnl ***************************** -AC_CHECK_HEADERS(pthread.h) AC_CHECK_LIB(pthread, pthread_create, [ THREAD_LIBS=-lpthread AM_CONDITIONAL(THREADS_PTHREAD, true) + AC_DEFINE(HAVE_PTHREAD) ], [ AC_MSG_RESULT([Cannot find libpthread]) # Check for other thread systems here, set THREAD_LIBS to # whatever is needed, and define # AM_CONDITIONAL(THREADS_foo, true), and add it to the - # section in mono/metadata/Makefile.am + # section in mono/metadata/Makefile.am, AC_DEFINE(HAVE_foo), + # add that to acconfig.h, add the section for that in + # mono/metadata/threads.h ]) AC_SUBST(THREAD_LIBS) diff --git a/mono/metadata/threads.h b/mono/metadata/threads.h index 73e51d282e7..c3af7e5caa7 100644 --- a/mono/metadata/threads.h +++ b/mono/metadata/threads.h @@ -15,7 +15,7 @@ extern void mono_thread_init(void); extern void mono_thread_cleanup(void); -#ifdef HAVE_PTHREAD_H +#ifdef HAVE_PTHREAD #include <mono/metadata/threads-pthread.h> #else #warning "No thread support found!" |