~ubuntu-branches/ubuntu/karmic/python-scipy/karmic

« back to all changes in this revision

Viewing changes to scipy/sandbox/xplt/src/play/unix/README.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Notes on plib configuration
 
2
---------------------------
 
3
 
 
4
There are two configuration files:
 
5
 
 
6
config.h       - #defines for source code in plib/*/*.[ch]
 
7
../../Make.cfg - Makefile definitions required to compile or load
 
8
                 (common to all packages)
 
9
 
 
10
Both of these can hopefully be computed by the config.sh script; if
 
11
not, you may be able to do the job by hand.
 
12
 
 
13
------------------------------------------------------------------------
 
14
_POSIX_SOURCE, _XOPEN_SOURCE_EXTENDED, _HPUX_SOURCE macros:
 
15
 
 
16
I want to try to use the POSIX standard whenever possible and
 
17
applicable.  System header files known to be affected on some systems
 
18
include:
 
19
<signal.h>, <dirent.h>, <sys/types.h>, <unistd.h>, <pwd.h>, <time.h>
 
20
 
 
21
The files files.c and ugetc.c need _POSIX_SOURCE before <stdio.h> in
 
22
order to get the fileno macro declared.  The dir.c, pathnm.c,
 
23
usernm.c, and uinbg.c files use explicitly POSIX functions and also
 
24
declare the macro.
 
25
 
 
26
A few plib features are implemented using non-POSIX functions.  At
 
27
these places in the source code, I undef _POSIX_SOURCE.  The timers
 
28
gettimeofday (timew.c) and getrusage (timeu.c) are the only examples
 
29
so far; HPUX additionally needs _HPUX_SOURCE in the former case.
 
30
 
 
31
The poll/select functions in uevent.c and upoll.c are the other
 
32
non-POSIX routines and have caused some problems.  HPUX wants
 
33
_HPUX_SOURCE defined, and Digital UNIX wants _XOPEN_SOURCE_EXTENDED
 
34
defined in order to pick up the poll.h header correctly.
 
35
 
 
36
A yorick package using a specifically POSIX feature should declare
 
37
_POSIX_SOURCE before any other includes.  If a specifically non-ANSI
 
38
feature is used, _POSIX_SOURCE should be undef'd after config.h but
 
39
before any system headers are included (note that pstdio.h and
 
40
pstdlib.h indirectly include system headers).
 
41
------------------------------------------------------------------------
 
42
 
 
43
#define USE_GETRUSAGE
 
44
-or-
 
45
#define USE_TIMES
 
46
-or-
 
47
neither
 
48
 
 
49
------------------------------------------------------------------------
 
50
On systems which have the BSD getrusage function, it generally provides
 
51
the most accurate CPU timer (much better than the POSIX times often).
 
52
The POSIX times function is an alternative; if neither is defined, the
 
53
timeu.c source falls back to the ANSI clock function.
 
54
------------------------------------------------------------------------
 
55
 
 
56
/* plib/unix/timew.c- specify which wall timing function to use
 
57
 *   - gettimeofday needs <sys/time.h>
 
58
 *   - if undefined, will use ANSI C time and difftime functions */
 
59
#define USE_GETTIMEOFDAY
 
60
-or-
 
61
nothing
 
62
 
 
63
------------------------------------------------------------------------
 
64
The BSD gettimeofday routine is the preferred wall clock timer; it is
 
65
the one used universally by the X11 library, so you ought to get
 
66
agreement between X server times and p_wall_secs with it.  The
 
67
fallback in timew.c if USE_GETTIMEOFDAY is not defined is the ANSI C
 
68
time and difftime functions.
 
69
------------------------------------------------------------------------
 
70
 
 
71
nothing
 
72
-or-
 
73
#define NO_PASSWD
 
74
 
 
75
------------------------------------------------------------------------
 
76
The POSIX getlogin, getpwuid, and getuid functions permit expansion of
 
77
~user/... pathnames (pathnm.c).  If these functions are not present,
 
78
define NO_PASSWD and that functionality will be disabled.  This also
 
79
affects the p_getuser function (usernm.c), which falls back to the
 
80
deprecated cuserid function if NO_PASSWD is defined.
 
81
------------------------------------------------------------------------
 
82
 
 
83
nothing
 
84
-or-
 
85
#define USE_TIOCGPGRP_IOCTL <sys/termios.h>
 
86
-or-
 
87
#define USE_TIOCGPGRP_IOCTL <sgtty.h>
 
88
 
 
89
------------------------------------------------------------------------
 
90
If the POSIX tcgetpgrp function is missing (used to determine whether
 
91
the program is running as a background task in uinbg.c), define
 
92
USE_TIOCGPGRP_IOCTL as the name of the system header file which
 
93
defines the TIOCGPGRP ioctl.
 
94
------------------------------------------------------------------------
 
95
 
 
96
nothing
 
97
-or-
 
98
/* plib/unix/dir.c- use getwd instead of POSIX getcwd */
 
99
#define USE_GETWD
 
100
 
 
101
------------------------------------------------------------------------
 
102
If the POSIX getcwd function is missing (used to find current working
 
103
directory in dir.c), define USE_GETWD to use getwd instead.
 
104
------------------------------------------------------------------------
 
105
 
 
106
nothing
 
107
-or-
 
108
#define DIRENT_HEADER <sys/dir.h>
 
109
-or-
 
110
#define DIRENT_HEADER <sys/ndir.h>
 
111
-or-
 
112
#define DIRENT_HEADER <ndir.h>
 
113
 
 
114
------------------------------------------------------------------------
 
115
If the POSIX dirent.h header is missing or broken, define DIRENT_HEADER
 
116
as the name of the system header file containing the directory handling
 
117
functions.  See dir.c more more.
 
118
------------------------------------------------------------------------
 
119
 
 
120
nothing
 
121
-or-
 
122
#define USE_SYS_POLL_H
 
123
 
 
124
-or-
 
125
 
 
126
#define USE_SELECT
 
127
-and-
 
128
nothing
 
129
-or-
 
130
#define HAVE_SYS_SELECT_H
 
131
-or none, one, or both of-
 
132
#define NO_SYS_TIME_H
 
133
#define NEED_SELECT_PROTO
 
134
 
 
135
------------------------------------------------------------------------
 
136
To handle multiple input sources, you need either the poll function or
 
137
the select function.  I prefer the poll interface (and select was
 
138
apparently broken on at least one IRIX system).  If <poll.h> exists,
 
139
you don't need any defines; if <sys/poll.h> exists, define
 
140
USE_SYS_POLL_H.
 
141
 
 
142
If poll is missing or you need to use select instead (upoll.c implements
 
143
a barebones poll in terms of select), define USE_SELECT.  In that case,
 
144
define HAVE_SYS_SELECT_H if <sys/select.h> is present; otherwise you
 
145
may need to define NO_SYS_TIME_H (you will need either <sys/time.h> or
 
146
<time.h>).  You may also need to define NEED_SELECT_PROTO.
 
147
 
 
148
See uevent.c and upoll.c for more.
 
149
------------------------------------------------------------------------
 
150
 
 
151
in config.h:
 
152
-exactly one of-
 
153
#define FPU_DIGITAL
 
154
#define FPU_AIX
 
155
#define FPU_HPUX
 
156
#define FPU_IRIX
 
157
#define FPU_SUN4
 
158
#define FPU_SOLARIS
 
159
#define FPU_UNICOS
 
160
#define FPU_ALPHA_LINUX
 
161
#define FPU_GCC_I86
 
162
#define FPU_GCC_POWERPC
 
163
#define FPU_GCC_SPARC
 
164
#define FPU_GCC_M68K
 
165
#define FPU_GCC_ARM
 
166
#define FPU_IGNORE
 
167
 
 
168
in config.mak:
 
169
FPELIB =
 
170
-or-
 
171
FPELIB = -lsunmath
 
172
-or-
 
173
FPELIB = -lfpe
 
174
 
 
175
------------------------------------------------------------------------
 
176
UNIX systems usually do not deliver SIGFPE (floating point exception
 
177
signals) by default.  The code to turn on SIGFPE delivery is highly
 
178
system dependent.  You must define exactly one of the above symbols
 
179
in order to compile fpuset.c.  The fputest.c program will tell you if
 
180
you have succeeded in turning on SIGFPE delivery (config.sh runs it).
 
181
 
 
182
FPU_HPUX, FPU_SUN4, and FPU_UNICOS require routines in libm (-lm).
 
183
 
 
184
FPU_SUN4 may require libsunmath (-lsunmath), and FPU_IRIX requires
 
185
libfpe (-lfpe).  In these two cases, the config.mak file will set the
 
186
FPELIB flag to the required loader option.  Otherwise, FPELIB will be
 
187
set to nil.
 
188
------------------------------------------------------------------------
 
189
 
 
190
in config.mak:
 
191
 
 
192
XINC =
 
193
-or-
 
194
XINC = -Ipath_to_X11/Xlib.h
 
195
 
 
196
-and-
 
197
 
 
198
XLIB =
 
199
-or-
 
200
XLIB = -Lpath_to_libX11
 
201
 
 
202
------------------------------------------------------------------------
 
203
The X11 headers and libraries may be hidden from the compiler without
 
204
appropriate -I and -L options, which are written into config.mak.
 
205
------------------------------------------------------------------------