summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2000-04-26 13:03:49 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2000-04-26 13:03:49 +0000
commitf0e9f522c21228f05afd15696d74e7f285e1838e (patch)
treee5b462c804ccc5342793c5ef4e07d444027d29a7 /configure.in
parent86627d9c7a8cd8e77b6824dc81d2ae301812111b (diff)
downloadglib-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.in11
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"