6bf73e58fc7bac01bed6f4ed0733b1a303e4d5dc
[cacao.git] / src / mm / 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_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
17         || defined(GC_GNU_THREADS)
18 #       ifdef GC_USE_DLOPEN_WRAP
19           printf("-ldl ");
20 #       endif
21         printf("-lpthread\n");
22 #   endif
23 #   if defined(GC_FREEBSD_THREADS)
24 #       ifdef GC_USE_DLOPEN_WRAP
25           printf("-ldl ");
26 #       endif
27 #       if (__FREEBSD_version >= 500000)
28           printf("-lpthread\n");
29 #       else
30           printf("-pthread\n");
31 #       endif
32 #   endif
33 #   if defined(GC_NETBSD_THREADS)
34           printf("-lpthread -lrt\n");
35 #   endif
36
37 #   if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
38         printf("-lpthread -lrt\n");
39 #   endif
40 #   if defined(GC_SOLARIS_THREADS)
41         printf("-lthread -lposix4\n");
42                 /* Is this right for recent versions? */
43 #   endif
44 #   if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
45         printf("-lpthread\n");
46 #   endif
47 #   if defined(GC_WIN32_PTHREADS)
48 #      ifdef PTW32_STATIC_LIB
49          /* assume suffix s for static version of the win32 pthread library */
50          printf("-lpthreadGC2s -lws2_32\n");
51 #      else
52          printf("-lpthreadGC2\n");
53 #      endif
54 #   endif
55 #   if defined(GC_OSF1_THREADS)
56         printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */
57 #   endif
58     /* You need GCC 3.0.3 to build this one!           */  
59     /* DG/UX native gcc doesnt know what "-pthread" is */
60 #   if defined(GC_DGUX386_THREADS)
61         printf("-ldl -pthread\n");
62 #   endif
63     return 0;
64 }
65