File: INSTALL

package info (click to toggle)
libdispatch 0~svn188-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,448 kB
  • ctags: 1,652
  • sloc: sh: 10,139; ansic: 8,999; makefile: 229; objc: 37; cpp: 14
file content (96 lines) | stat: -rw-r--r-- 3,214 bytes parent folder | download | duplicates (3)
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
Grand Central Dispatch (GCD)

GCD is a concurrent programming framework first shipped with Mac OS X Snow
Leopard.  This package is an open source bundling of libdispatch, the core
user space library implementing GCD.  At the time of writing, support for
the BSD kqueue API, and specifically extensions introduced in Mac OS X Snow
Leopard and FreeBSD 9-CURRENT, are required to use libdispatch.  Other
systems are currently unsupported.

  Configuring and installing libdispatch

GCD is built using autoconf, automake, and libtool, and has a number of
compile-time configuration options that should be reviewed before starting.
An uncustomized install requires:

	./configure
	make
	make install

The following configure options may be of general interest:

--with-apple-libc-source

	Specify the path to Apple's Libc package, so that appropriate headers
	can be found and used.

--with-apple-xnu-source

	Specify the path to Apple's XNU package, so that appropriate headers
	can be found and used.

--with-blocks-runtime

	On systems where -fblocks is supported, specify an additional library
	path in which libBlocksRuntime can be found.  This is not required on
	Mac OS X, where the Blocks runtime is included in libSystem, but is
	required on FreeBSD.

Some sites will wish to build using a non-default C compiler; for example,
this is desirable on FreeBSD so that libdispatch is built with clang and
blocks support.  A typically FreeBSD configuration will use:

	CC=clang ./configure --with-blocks-runtime=/usr/local/lib
	make
	make install

The following options are likely only to be required if building libdispatch
as part of Mac OS X's libSystem:

--enable-legacy-api

	Enable a legacy (deprecated) API used by some early GCD applications.

--disable-libdispatch-init-constructor

	Do not tag libdispatch's init routine as __constructor, in which case
	it must be run manually before libdispatch routines can be called.
	For the libdispatch code compiled directly into libSystem, the init
	routine is called automatically during process start.

--enable-apple-crashreporter-info

	Set global variables during a libdispatch crash to provide additional
	debugging information for CrashReporter.

--enable-apple-tsd-optimizations

	Use a non-portable allocation scheme for pthread per-thread data
	(TSD) keys when built into libSystem on Mac OS X.  This should not be
	used on other OS's, nor on Mac OS X when building as a stand-alone
	library.

--enable-apple-semaphore-optimizations

	libdispatch contains hand-optimized assembly for use with libdispatch
	semaphores.

  Typical configuration commands

The following command lines create the default config.h required to build
libdispatch with libSystem in Mac OS X Snow Leopard:

	sh autogen.sh
	./configure \
	    --with-apple-libc-source=/path/to/10.6.0/Libc-583 \
	    --with-apple-xnu-source=/path/to/10.6.0/xnu-1456.1.26 \
	    --enable-legacy-api \
	    --disable-libdispatch-init-constructor \
	    --enable-apple-crashreporter-info \
	    --enable-apple-tsd-optimizations \
	    --enable-apple-semaphore-optimizations

Typical configuration line for FreeBSD 8.x and 9.x:

	sh autogen.sh
	CC=clang ./configure --with-blocks-runtime=/usr/local/lib