aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config/cf/Threads.tmpl
blob: bb0a7e805c6b0b43f60f8df5ebd8ecd2e39f5e4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
XCOMM $Xorg: Threads.tmpl,v 1.3 2000/08/17 19:41:46 cpqbld Exp $



XCOMM $XFree86: xc/config/cf/Threads.tmpl,v 3.3tsi Exp $

/*
 * For a multi-threaded application or library,
 * Define LocalThreadsDefines in your Imakefile (unless you like the
 * project default), then include this file.
 * Everything else should be automatic. 
 */

#ifndef LocalThreadsDefines
#ifdef ProjectThreadsDefines
#define LocalThreadsDefines ProjectThreadsDefines
#else
#define LocalThreadsDefines /**/
#endif
#endif

#ifndef LocalThreads
#ifdef ThreadedProject
#define LocalThreads ThreadedProject
#else
#define LocalThreads YES
#endif
#endif

#ifndef HasCThreads
#define HasCThreads NO
#endif

#ifndef ThreadTypeDefines
#if HasCThreads
#define ThreadTypeDefines -DCTHREADS
#else
#define ThreadTypeDefines /**/
#endif
#endif
#ifndef SystemMTDefines
#define SystemMTDefines /**/
#endif
#ifndef LibraryMTDefines
#define LibraryMTDefines /**/
#endif
#ifndef HasThreadSafeAPI		/* does it have getpwnam_r, etc. */
#define HasThreadSafeAPI YES
#endif
#ifndef MTSafeAPIDefines
#if HasThreadSafeAPI
#define MTSafeAPIDefines -DXUSE_MTSAFE_API
#else
#define MTSafeAPIDefines /**/
#endif
#endif
#ifndef ThreadPreStdAPIDefines
#define ThreadPreStdAPIDefines /* nominally for POSIX P1003.4a (Draft 4) API */
#endif
#ifndef CplusplusSystemMTDefines
# ifdef SystemMTDefines
#  define CplusplusSystemMTDefines SystemMTDefines
# else
#  define CplusplusSystemMTDefines /**/
# endif
#endif
#ifndef ThreadsCompileFlags
#define ThreadsCompileFlags /**/
#endif
#ifndef ThreadsCplusplusCompileFlags
# ifdef ThreadsCompileFlags
#  define ThreadsCplusplusCompileFlags ThreadsCompileFlags
# else
#  define ThreadsCplusplusCompileFlags /**/
# endif
#endif

#ifndef ThreadsLibraries
#define ThreadsLibraries /**/
#endif
#ifndef ThreadsCplusplusLibraries
# ifdef ThreadsLibraries
#  define ThreadsCplusplusLibraries ThreadsLibraries
# else
#  define ThreadsCplusplusLibraries /**/
# endif
#endif
#ifndef ThreadsLoadFlags
#define ThreadsLoadFlags ThreadsCompileFlags
#endif
#ifndef ThreadsCplusplusLoadFlags
#define ThreadsCplusplusLoadFlags ThreadsCplusplusCompileFlags
#endif

#if LocalThreads
    THREADS_CFLAGS = ThreadsCompileFlags
   THREADS_DEFINES = LocalThreadsDefines ThreadTypeDefines SystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
   THREADS_LDFLAGS = ThreadsLoadFlags
      THREADS_LIBS = ThreadsLibraries

  THREADS_CXXFLAGS = ThreadsCplusplusCompileFlags
THREADS_CXXDEFINES = LocalThreadsDefines ThreadTypeDefines CplusplusSystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
THREADS_CXXLDFLAGS = ThreadsCplusplusLoadFlags
   THREADS_CXXLIBS = ThreadsCplusplusLibraries
#endif