1 XCOMM $XConsortium: Threads.tmpl /main/11 1996/09/28 16:07:06 rws $
4 * For a multi-threaded application or library,
5 * Define LocalThreadsDefines in your Imakefile (unless you like the
6 * project default), then include this file.
7 * Everything else should be automatic.
10 #ifndef LocalThreadsDefines
11 #ifdef ProjectThreadsDefines
12 #define LocalThreadsDefines ProjectThreadsDefines
14 #define LocalThreadsDefines /**/
19 #ifdef ThreadedProject
20 #define LocalThreads ThreadedProject
22 #define LocalThreads YES
26 #ifndef ThreadTypeDefines
28 #define ThreadTypeDefines -DCTHREADS
30 #define ThreadTypeDefines /**/
33 #ifndef SystemMTDefines
34 #define SystemMTDefines /**/
36 #ifndef LibraryMTDefines
37 #define LibraryMTDefines /**/
39 #ifndef HasThreadSafeAPI /* does it have getpwnam_r, etc. */
40 #define HasThreadSafeAPI YES
42 #ifndef MTSafeAPIDefines
44 #define MTSafeAPIDefines -DXUSE_MTSAFE_API
46 #define MTSafeAPIDefines /**/
49 #ifndef ThreadPreStdAPIDefines
50 #define ThreadPreStdAPIDefines /* nominally for POSIX P1003.4a (Draft 4) API */
52 #ifndef CplusplusSystemMTDefines
53 #define CplusplusSystemMTDefines /**/
55 #ifndef ThreadsCompileFlags
56 #define ThreadsCompileFlags /**/
58 #ifndef ThreadsCplusplusCompileFlags
59 #define ThreadsCplusplusCompileFlags /**/
62 #ifndef ThreadsLibraries
63 #define ThreadsLibraries /**/
65 #ifndef ThreadsCplusplusLibraries
66 #define ThreadsCplusplusLibraries /**/
68 #ifndef ThreadsLoadFlags
69 #define ThreadsLoadFlags ThreadsCompileFlags
71 #ifndef ThreadsCplusplusLoadFlags
72 #define ThreadsCplusplusLoadFlags ThreadsCplusplusCompileFlags
76 THREADS_CFLAGS = ThreadsCompileFlags
77 THREADS_DEFINES = LocalThreadsDefines ThreadTypeDefines SystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
78 THREADS_LDFLAGS = ThreadsLoadFlags
79 THREADS_LIBS = ThreadsLibraries
81 THREADS_CXXFLAGS = ThreadsCplusplusCompileFlags
82 THREADS_CXXDEFINES = LocalThreadsDefines ThreadTypeDefines CplusplusSystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
83 THREADS_CXXLDFLAGS = ThreadsCplusplusLoadFlags
84 THREADS_CXXLIBS = ThreadsCplusplusLibraries