1   ____  _   _
2  |  _ \| |_| |__                      ``All the good things you want
3  | |_) | __| '_ \                       to do in your life have to be
4  |  __/| |_| | | |                      started in the next few hours,
5  |_|    \__|_| |_|                      days or weeks.''
6                                                -- Tom DeMarco
7  GNU Pth - The GNU Portable Threads
8
9  INSTALL
10  =======
11
12  Overview
13  --------
14
15  To install the Pth library into /path/to/pth/{bin,lib,include,man}/
16  perform the following steps in your shell:
17
18    $ ./configure
19       --prefix=/path/to/pth
20      [--enable-batch]
21      [--enable-pthread]
22      [--enable-debug]
23      [--enable-profile]
24      [--enable-optimize]
25      [--enable-maintainer]
26      [--enable-tests]
27      [--disable-shared]
28      [--disable-static]
29      [--enable-syscall-soft]
30      [--enable-syscall-hard]
31      [--with-sfio[=DIR]]
32      [--with-ex[=DIR]]
33      [--with-dmalloc[=DIR]]
34      [--with-mctx-mth=ID]
35      [--with-mctx-dsp=ID]
36      [--with-mctx-stk=ID]
37    $ make
38    $ make test
39    $ make install
40
41  Pth Options
42  -----------
43
44  The supported options have the following meaning:
45
46  --prefix=DIR: installation path prefix
47      This sets the path prefix of installation tree. By default this
48      prefix is /usr/local. For fine-tuning the installation paths
49      run `./configure --help' and watch for the various path related
50      options.
51
52  --enable-batch: build in batch mode (default=no)
53      This enables batch building. Currently this does
54      nothing more than supressing some displayed hints.
55
56  --enable-maintainer: build maintainer targets (default=no)
57      This enables some maintainer build targets.
58      Not for use by end users.
59
60  --enable-tests: build test targets (default=yes)
61      This enables the building of test targets, i.e. the various
62      test_xxx programs. If you don't want to build these use
63      --disable-tests.
64
65  --enable-pthread: build with pthread library (default=no)
66      This enables the building and installation of the
67      POSIX Threads ("pthread") emulation API for Pth.
68      This per default forces --enable-syscall-soft.
69
70  --enable-debug: build for debugging (default=no)
71      This is for debugging Pth and only interesting
72      for developers.
73
74  --enable-profile: build for profiling (default=no)
75      This enables profiling with gprof and is only
76      interesting for developers.
77
78  --enable-optimize: build with optimization (default=no)
79      This enables optimization flags, mainly for GCC.
80
81  --disable-static: build static libraries (default=yes)
82      This disables the building of static libraries (libxx.a).
83
84  --disable-shared: build shared libraries (default=yes)
85      This disables the building of shared libraries (libxx.so).
86
87  --enable-syscall-soft: use soft system call mapping (default=no)
88      This enables the soft system call mapping for pth.h and pthread.h
89
90  --enable-syscall-hard: use hard system call mapping (default=no)
91      This enables the hard system call mapping inside pth_syscall.c which
92      means that wrappers for system calls are exported by libpth.
93
94  --with-sfio[=DIR]
95      This can be used to enable Sfio support (see pth_sfiodisc function) for
96      Pth. The paths to the include and library file of Sfio has to be either
97      given via CFLAGS and LDFLAGS or the DIR argument has to specify the root
98      of the Sfio installation tree. Sfio can be found at
99      http://www.research.att.com/sw/tools/sfio/.
100
101  --with-ex[=DIR]
102      This can be used to enable OSSP ex support (exception handling)
103      for Pth. The paths to the include and library file of OSSP ex has
104      to be either given via CFLAGS and LDFLAGS or the DIR argument has
105      to specify the root of the OSSP ex installation tree. OSSP ex can
106      be found at http://www.ossp.org/pkg/ex/.
107
108  --with-dmalloc[=DIR]
109      This can be used to enable Dmalloc support (debugging memory
110      allocations) for Pth. The paths to the include and library file of
111      Dmalloc has to be either given via CFLAGS and LDFLAGS or the DIR
112      argument has to specify the root of the Dmalloc installation tree.
113      Dmalloc can be found at http://www.dmalloc.com/.
114
115  The remaining three options are really for experts only.  They force
116  particular variants for the machine context implementation.  Be carefully
117  here: Not all possibly variants of the three knobs actually work (they could
118  not work, even when we want!).
119
120  --with-mctx-mth=ID       [EXPERTS ONLY]
121      This forces Pth to use a particular machine context method.
122      Available variants are:
123      mcsc .... makecontext(2)/swapcontext(2)
124      sjlj .... setjmp(2)/longjmp(2)
125
126  --with-mctx-dsp=ID       [EXPERTS ONLY]
127      This forces Pth to use a particular machine context dispatching
128      approach. Available variants are:
129      sc ...... swapcontext(2)
130      ssjlj ... sigsetjmp(3)/siglongjmp(3)
131      sjlj .... setjmp(3)/longjmp(3) (signal mask aware)
132      usjlj ... _setjmp(3)/_longjmp(3) (signal mask aware)
133      sjlje ... setjmp(3)/longjmp(3) [emulated = plus sigprocmask(2)]
134      sjljlx .. setjmp(3)/longjmp(3), specific for anchient Linux version
135      sjljisc . setjmp(3)/longjmp(3), specific for Interactive Unix (ISC)
136      sjljw32 . setjmp(3)/longjmp(3), specific for Win32/CygWin
137
138  --with-mctx-stk=ID       [EXPERTS ONLY]
139      This forces Pth to use a particular machine context stack setup
140      approach. Available variants are:
141      none .... no standard stack setup (only for some sjljXXX above)
142      mc ...... makecontext(2)
143      sas ..... sigaltstack(2)
144      ss ...... sigstack(2)
145
146  Compiler Flags
147  --------------
148
149  Some systems require unusual options for compilation or linking that the
150  `configure' script does not know about. You can give `configure' initial
151  values for variables by setting them in the environment. Using a
152  Bourne-compatible shell, you can do that on the command line like this:
153
154    $ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
155
156  Or on systems that have the `env' program, you can do it like this:
157
158    $ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
159
160  Compiling For Multiple Architectures
161  ------------------------------------
162
163  You can compile the package for more than one kind of computer at the same
164  time, by placing the object files for each architecture in their own
165  directory.  To do this, you must use a version of `make' that supports the
166  `VPATH' variable, such as GNU `make'.  `cd' to the directory where you want
167  the object files and executables to go and run the `configure' script.
168  `configure' automatically checks for the source code in the directory that
169  `configure' is in and in `..'.
170
171  If you have to use a `make' that does not supports the `VPATH' variable, you
172  have to compile the package for one architecture at a time in the source
173  code directory.  After you have installed the package for one architecture,
174  use `make distclean' before reconfiguring for another architecture.
175
176  Installation Names
177  ------------------
178
179  By default, `make install' will install the package's files in
180  `/usr/local/bin', `/usr/local/man', etc.  You can specify an installation
181  prefix other than `/usr/local' by giving `configure' the option
182  `--prefix=PATH'.
183
184  You can specify separate installation prefixes for architecture-specific
185  files and architecture-independent files.  If you give `configure' the
186  option `--exec-prefix=PATH', the package will use PATH as the prefix for
187  installing programs and libraries.  Documentation and other data files will
188  still use the regular prefix.
189
190  In addition, if you use an unusual directory layout you can give options
191  like `--bindir=PATH' to specify different values for particular kinds of
192  files.  Run `configure --help' for a list of the directories you can set and
193  what kinds of files go in them.
194
195  Specifying the System Type
196  --------------------------
197
198  There may be some features `configure' can not figure out automatically, but
199  needs to determine by the type of host the package will run on.  Usually
200  `configure' can figure that out, but if it prints a message saying it can
201  not guess the host type, give it the `--host=TYPE' option.  TYPE can either
202  be a short name for the system type, such as `sun4', or a canonical name
203  with three fields: CPU-COMPANY-SYSTEM
204
205  See the file `config.sub' for the possible values of each field.  If
206  `config.sub' isn't included in this package, then this package doesn't need
207  to know the host type.
208
209  Sharing Defaults
210  ----------------
211
212  If you want to set default values for `configure' scripts to share, you can
213  create a site shell script called `config.site' that gives default values
214  for variables like `CC', `cache_file', and `prefix'.  `configure' looks for
215  `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site'
216  if it exists.  Or, you can set the `CONFIG_SITE' environment variable to
217  the location of the site script.
218
219