Tizen 2.1 base
[platform/upstream/gcd.git] / dispatch-1.0 / INSTALL
1 Grand Central Dispatch (GCD)
2
3 GCD is a concurrent programming framework first shipped with Mac OS X Snow
4 Leopard.  This package is an open source bundling of libdispatch, the core
5 user space library implementing GCD.  At the time of writing, support for
6 the BSD kqueue API, and specifically extensions introduced in Mac OS X Snow
7 Leopard and FreeBSD 9-CURRENT, are required to use libdispatch.  Other
8 systems are currently unsupported.
9
10   Configuring and installing libdispatch
11
12 GCD is built using autoconf, automake, and libtool, and has a number of
13 compile-time configuration options that should be reviewed before starting.
14 An uncustomized install requires:
15
16         ./configure
17         make
18         make install
19
20 The following configure options may be of general interest:
21
22 --with-apple-libc-source
23
24         Specify the path to Apple's Libc package, so that appropriate headers
25         can be found and used.
26
27 --with-apple-xnu-source
28
29         Specify the path to Apple's XNU package, so that appropriate headers
30         can be found and used.
31
32 --with-blocks-runtime
33
34         On systems where -fblocks is supported, specify an additional library
35         path in which libBlocksRuntime can be found.  This is not required on
36         Mac OS X, where the Blocks runtime is included in libSystem, but is
37         required on FreeBSD.
38
39 Some sites will wish to build using a non-default C compiler; for example,
40 this is desirable on FreeBSD so that libdispatch is built with clang and
41 blocks support.  A typically FreeBSD configuration will use:
42
43         CC=clang ./configure --with-blocks-runtime=/usr/local/lib
44         make
45         make install
46
47 The following options are likely only to be required if building libdispatch
48 as part of Mac OS X's libSystem:
49
50 --enable-legacy-api
51
52         Enable a legacy (deprecated) API used by some early GCD applications.
53
54 --disable-libdispatch-init-constructor
55
56         Do not tag libdispatch's init routine as __constructor, in which case
57         it must be run manually before libdispatch routines can be called.
58         For the libdispatch code compiled directly into libSystem, the init
59         routine is called automatically during process start.
60
61 --enable-apple-crashreporter-info
62
63         Set global variables during a libdispatch crash to provide additional
64         debugging information for CrashReporter.
65
66 --enable-apple-tsd-optimizations
67
68         Use a non-portable allocation scheme for pthread per-thread data
69         (TSD) keys when built into libSystem on Mac OS X.  This should not be
70         used on other OS's, nor on Mac OS X when building as a stand-alone
71         library.
72
73 --enable-apple-semaphore-optimizations
74
75         libdispatch contains hand-optimized assembly for use with libdispatch
76         semaphores.
77
78   Typical configuration commands
79
80 The following command lines create the default config.h required to build
81 libdispatch with libSystem in Mac OS X Snow Leopard:
82
83         sh autogen.sh
84         ./configure \
85             --with-apple-libc-source=/path/to/10.6.0/Libc-583 \
86             --with-apple-xnu-source=/path/to/10.6.0/xnu-1456.1.26 \
87             --enable-legacy-api \
88             --disable-libdispatch-init-constructor \
89             --enable-apple-crashreporter-info \
90             --enable-apple-tsd-optimizations \
91             --enable-apple-semaphore-optimizations
92
93 Typical configuration line for FreeBSD 8.x and 9.x:
94
95         sh autogen.sh
96         CC=clang ./configure --with-blocks-runtime=/usr/local/lib