8d7baf9efe60b5f98162972014f2afc590816ecd
[cacao.git] / src / boehm-gc / threadlibs.c
1 #include "config.h"
2
3 # include "gc_config_macros.h"
4 # include "private/gcconfig.h"
5 # include <stdio.h>
6
7 int main()
8 {
9 #   if defined(GC_USE_LD_WRAP)
10         printf("-Wl,--wrap -Wl,dlopen "
11                "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
12                "-Wl,--wrap -Wl,pthread_detach "
13                "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
14 #   endif
15 #   if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
16         || defined(GC_SOLARIS_PTHREADS) \
17         || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
18         printf("-lpthread\n");
19 #   endif
20 #   if defined(GC_FREEBSD_THREADS)
21 #       if (__FREEBSD_version >= 500000)
22           printf("-lpthread\n");
23 #       else
24           printf("-pthread\n");
25 #       endif
26 #   endif
27 #   if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
28         printf("-lpthread -lrt\n");
29 #   endif
30 #   if defined(GC_SOLARIS_THREADS) && !defined(GC_SOLARIS_PTHREADS)
31         printf("-lthread -ldl\n");
32 #   endif
33 #   if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
34         printf("-lpthread\n");
35 #   endif
36 #   if defined(GC_OSF1_THREADS)
37         printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */
38 #   endif
39     /* You need GCC 3.0.3 to build this one!           */  
40     /* DG/UX native gcc doesnt know what "-pthread" is */
41 #   if defined(GC_DGUX386_THREADS)
42         printf("-ldl -pthread\n");
43 #   endif
44     return 0;
45 }
46