diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 2000-04-26 13:03:49 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 2000-04-26 13:03:49 +0000 |
commit | f0e9f522c21228f05afd15696d74e7f285e1838e (patch) | |
tree | e5b462c804ccc5342793c5ef4e07d444027d29a7 /configure.in | |
parent | 86627d9c7a8cd8e77b6824dc81d2ae301812111b (diff) | |
download | glib-f0e9f522c21228f05afd15696d74e7f285e1838e.tar.gz |
Look for both pthread_create and pthread_join in the thread library. Some
2000-04-26 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Look for both pthread_create and pthread_join in
the thread library. Some systems define one of them, but not both
in libc. Arghh. Now we really start a thread and join it later and
check, whether the thread to actually ran.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 8f95f92aa..39f205f0c 100644 --- a/configure.in +++ b/configure.in @@ -758,13 +758,16 @@ case $have_threads in LIBS="$glib_save_LIBS $add_thread_lib" - AC_MSG_CHECKING(for pthread_create$IN) + AC_MSG_CHECKING(for pthread_create/pthread_join$IN) AC_TRY_RUN([#include <pthread.h> - void* func(void* data) {} + int check_me = 0; + void* func(void* data) {check_me = 42;} main() { pthread_t t; - exit(pthread_create (&t, $defattr, func, - NULL)); + void *ret; + pthread_create (&t, $defattr, func, NULL); + pthread_join (t, &ret); + exit (check_me != 42); }], [AC_MSG_RESULT(yes) G_THREAD_LIBS="$add_thread_lib" |