Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 412 lines (249 sloc) 9.748 kB
0d2ceef standardize bang perl
Michael Scott authored
1 #! perl -w
433def8 [perl #33801] [PATCH] GDBMHash - a dynamic PMC that binds to GNU dbm
Leopold Toetsch authored
2 # Copyright: 2001-2005 The Perl Foundation. All Rights Reserved.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
3 # $Id$
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
4
756762f *** empty log message ***
Michael Scott authored
5 =head1 NAME
54d55b6 Patch from Nicholas Clark <nick@unfortu.net>: stops silly people
Josh Wilmes authored
6
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
7 Configure.pl - Parrot's Configuration Script
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
8
756762f *** empty log message ***
Michael Scott authored
9 =head1 SYNOPSIS
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
10
756762f *** empty log message ***
Michael Scott authored
11 % perl Configure.pl [options]
6d36c2d bunch of patches:
Leopold Toetsch authored
12
756762f *** empty log message ***
Michael Scott authored
13 =head1 DESCRIPTION
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
14
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
15 This is Parrot's configuration script. It should be run to create the
16 necessary system-specific files before building Parrot.
17
18 =head2 Command-line Options
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
19
49929e0 remove =head3
Michael Scott authored
20 General Options
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
21
756762f *** empty log message ***
Michael Scott authored
22 =over
ad4983c add --optimize Configure option
Leopold Toetsch authored
23
756762f *** empty log message ***
Michael Scott authored
24 =item C<--help>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
25
756762f *** empty log message ***
Michael Scott authored
26 Prints out a description of the options and exits.
ad4983c add --optimize Configure option
Leopold Toetsch authored
27
756762f *** empty log message ***
Michael Scott authored
28 =item C<--version>
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
29
756762f *** empty log message ***
Michael Scott authored
30 Prints out the version number of Configure.pl and exits.
c0142c7 memory allocation rework
Dan Sugalski authored
31
756762f *** empty log message ***
Michael Scott authored
32 =item C<--verbose>
c0142c7 memory allocation rework
Dan Sugalski authored
33
756762f *** empty log message ***
Michael Scott authored
34 Tells Configure.pl to output extra information about the configuration
35 data it is setting.
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
36
ab81b8c @brentdax Configure output cleanup. Retasks --verbose to include the old outpu…
brentdax authored
37 =item C<--verbose=2>
38
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
39 Tells Configure.pl to output information about i<every> setting added or
ab81b8c @brentdax Configure output cleanup. Retasks --verbose to include the old outpu…
brentdax authored
40 changed.
41
567c2b1 new Configure options: verbose-step
Leopold Toetsch authored
42 =item C<--verbose-step={N|regex}>
43
44 Run C<--verbose=2> for step number C<N> or matching description.
45
756762f *** empty log message ***
Michael Scott authored
46 =item C<--nomanicheck>
85a1fcc reenable debugging=1 default
Leopold Toetsch authored
47
756762f *** empty log message ***
Michael Scott authored
48 Tells Configure.pl not to run the MANIFEST check.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
49
20fed4c Add a --prefix argument to Configure.pl to set the installation prefix
Nicholas Clark authored
50 =item C<--prefix>
51
52 Sets the location where parrot will be installed.
53
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
54 =item C<--ask>
de4d079 Add conditional configurations for testy code.
Melvin Smith authored
55
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
56 This turns on the user prompts.
6fba438 @simoncozens Abstract the argument and opcode packing types and functions out into
simoncozens authored
57
756762f *** empty log message ***
Michael Scott authored
58 =back
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
59
49929e0 remove =head3
Michael Scott authored
60 Compile Options
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
61
da70a71 Hyperlinks for F<path/file> and C<Perl::Module>, plus tidy up C<< >>…
Michael Scott authored
62 You can add and remove option values with C<< :rem{<opt>} >> and
63 C<< :add{<opt>} >>. For example:
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
64
66c557b [perl #28473] [PATCH] ICU data directory configuration
Leopold Toetsch authored
65 perl Configure.pl --ccflags=":rem{-g} :add{-O2}"
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
66
756762f *** empty log message ***
Michael Scott authored
67 =over
19fa0d4 @tomhughes Stop Configure trying to make op_info.c and op.h as op_info.c no longer
tomhughes authored
68
756762f *** empty log message ***
Michael Scott authored
69 =item C<--debugging=0>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
70
756762f *** empty log message ***
Michael Scott authored
71 Debugging is turned on by default. Use this to disable it.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
72
62c60b6 really speed up oo1.pasm by 2
Leopold Toetsch authored
73 =item C<--profile>
74
75 Turn on profiled compile (gcc only for now)
76
756762f *** empty log message ***
Michael Scott authored
77 =item C<--optimize>
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
78
756762f *** empty log message ***
Michael Scott authored
79 Tell the compiler to do an optimization phase.
80
81 =item C<--inline>
82
83 Tell Configure that the compiler supports C<inline>.
84
85 =item C<--cc=(compiler)>
86
87 Specify which compiler to use.
88
89 =item C<--ccflags=(flags)>
90
91 Use the given compiler flags.
92
93 =item C<--ccwarn=(flags)>
94
95 Use the given compiler warning flags.
96
c528c23 The following patch enables the user to control which compilers get
Leopold Toetsch authored
97 =item C<--cxx=(compiler)>
98
99 Specify which C++ compiler to use (for ICU).
100
756762f *** empty log message ***
Michael Scott authored
101 =item C<--libs=(libs)>
102
103 Use the given libraries.
104
105 =item C<--link=(linker)>
106
107 Specify which linker to use.
108
109 =item C<--linkflags=(flags)>
110
111 Use the given linker flags
112
113 =item C<--ld=(linker)>
114
115 Specify which loader to use for shared libraries.
116
117 =item C<--ldflags=(flags)>
118
119 Use the given loader flags for shared libraries
120
121 =item C<--lex=(lexer)>
122
123 Specify which lexer to use.
124
125 =item C<--yacc=(parser)>
126
127 Specify which parser to use.
0846288 various patches 2
Leopold Toetsch authored
128
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
129 =item C<--define=val1[,val2]>
130
131 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h.
132 Currently needed to use inet_aton for systems that lack inet_pton:
133
134 --define=inet_aton
135
136 =back
137
49929e0 remove =head3
Michael Scott authored
138 Parrot Options
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
139
140 =over
141
756762f *** empty log message ***
Michael Scott authored
142 =item C<--intval=(type)>
143
144 Use the given type for C<INTVAL>.
145
146 =item C<--floatval=(type)>
147
148 Use the given type for C<FLOATVAL>.
149
150 =item C<--opcode=(type)>
151
152 Use the given type for opcodes.
153
154 =item C<--ops=(files)>
155
156 Use the given ops files.
157
158 =item C<--pmc=(files)>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
159
756762f *** empty log message ***
Michael Scott authored
160 Use the given PMC files.
161
162 =item C<--cgoto=0>
163
164 Don't build cgoto core. This is recommended when you are short of memory.
165
166 =item C<--jitcapable>
167
168 Use JIT system.
169
170 =item C<--execcapable>
171
0846288 various patches 2
Leopold Toetsch authored
172 Use JIT to emit a native executable.
756762f *** empty log message ***
Michael Scott authored
173
174 =item C<--gc=(type)>
175
176 Determine the type of garbage collection. The value for C<type> should
177 be one of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is
178 C<gc>.
179
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
180 =back
181
182 ICU Options
183
184 =over
185
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
186 =item C<--icu-config=/path/to/icu-config>
187
73ba72d [perl #36057] [PATCH] Fix some typos - 5
Leopold Toetsch authored
188 Use the specified icu-config script to determine the necessary ICU options.
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
189
190 Use --icu-config=none to disable the autodetect feature. Parrot will
191 then be build with its own ICU.
192
73ba72d [perl #36057] [PATCH] Fix some typos - 5
Leopold Toetsch authored
193 B<Note:> If you specify another ICU option than --icu-config, the
a194975 - removed error message if icu-config does not exists
Jens Rieks authored
194 autodetection functionality will be disabled.
195
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
196 =item C<--icuplatform=(platform)>
197
198 Use the given platform name to pass to ICU's runConfigureICU. (See icu/source/runConfigureICU for the list of available "platform" names, which specify both operating system and compiler.)
199
200 =item C<--icuconfigureargs=(arguments)>
201
202 Pass the given arguments to ICU's configuration script, instead of the default.
203
66c557b [perl #28473] [PATCH] ICU data directory configuration
Leopold Toetsch authored
204 =item C<--icudatadir=(path)>
205
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
206 Use the given directory to locate ICU's data file(s) at runtime
66c557b [perl #28473] [PATCH] ICU data directory configuration
Leopold Toetsch authored
207
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
208 If you have an installed unicode package, you can use these two options instead:
209
210 =item C<--icushared=(linkeroption)>
211
212 Linker command to link against ICU library version 2.6.
213
214 E.g.
215
216 --icushared='-L /opt/openoffice/program -licudata -licuuc'
217
218 (The libs in openoffice are actually version 2.2 and do not work)
219
220 =item C<--icuheaders=(header_dir)>
221
222 Location of ICU header files without the /unicode suffix. The header files must match your platform, especially F<platform.h> must be present.
223
224 E.g.
225
226 --icuheaders='/home/lt/icu/'
227
228 You might also need '--nomanicheck'.
229
756762f *** empty log message ***
Michael Scott authored
230 =back
231
c9264be more config system add ons and docs
Leopold Toetsch authored
232 Other Options
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
233
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
234 =over
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
235
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
236 =item C<--maintainer>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
237
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
238 Use this option if you want imcc's parser and lexer files to be
239 generated. Needs a working parser and lexer.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
240
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
241 =item C<--miniparrot>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
242
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
243 Build parrot assuming only pure ANSI C is available.
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
244
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
245 =item C<--expnetwork>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
246
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
247 Enable experimental networking. This is an unused option and should
248 probably be removed.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
249
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
250 =back
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
251
c9264be more config system add ons and docs
Leopold Toetsch authored
252 =head1 SEE ALSO
253
254 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
255 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
256
756762f *** empty log message ***
Michael Scott authored
257 =cut
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
258
756762f *** empty log message ***
Michael Scott authored
259 use 5.005_02;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
260
756762f *** empty log message ***
Michael Scott authored
261 use strict;
262 use vars qw($parrot_version @parrot_version);
263 use lib 'lib';
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
264
756762f *** empty log message ***
Michael Scott authored
265 use Parrot::BuildUtil;
266 use Parrot::Configure::RunSteps;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
267
756762f *** empty log message ***
Michael Scott authored
268 $| = 1;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
269
756762f *** empty log message ***
Michael Scott authored
270 $parrot_version = parrot_version();
271 @parrot_version = parrot_version();
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
272
756762f *** empty log message ***
Michael Scott authored
273 # Handle options
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
274
756762f *** empty log message ***
Michael Scott authored
275 my %args;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
276
433def8 [perl #33801] [PATCH] GDBMHash - a dynamic PMC that binds to GNU dbm
Leopold Toetsch authored
277 for (@ARGV) {
278 my($key, $value) = m/--([-\w]+)(?:=(.*))?/;
756762f *** empty log message ***
Michael Scott authored
279 $key = 'help' unless defined $key;
280 $value = 1 unless defined $value;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
281
433def8 [perl #33801] [PATCH] GDBMHash - a dynamic PMC that binds to GNU dbm
Leopold Toetsch authored
282 for ($key) {
283 m/version/ && do {
756762f *** empty log message ***
Michael Scott authored
284 my $cvsid='$Id$';
285 print <<"END";
286 Parrot Version $parrot_version Configure 2.0
287 $cvsid
288 END
289 exit;
290 };
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
291
433def8 [perl #33801] [PATCH] GDBMHash - a dynamic PMC that binds to GNU dbm
Leopold Toetsch authored
292 m/help/ && do {
756762f *** empty log message ***
Michael Scott authored
293 print <<"EOT";
294 $0 - Parrot Configure 2.0
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
295
756762f *** empty log message ***
Michael Scott authored
296 General Options:
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
297
756762f *** empty log message ***
Michael Scott authored
298 --help Show this text
299 --version Show version information
300 --verbose Output extra information
ab81b8c @brentdax Configure output cleanup. Retasks --verbose to include the old outpu…
brentdax authored
301 --verbose=2 Output every setting change
567c2b1 new Configure options: verbose-step
Leopold Toetsch authored
302 --verbose-step=N Set verbose for step N only
303 --verbose-step=regex Set verbose for step matching description
756762f *** empty log message ***
Michael Scott authored
304 --nomanicheck Don't check the MANIFEST
20fed4c Add a --prefix argument to Configure.pl to set the installation prefix
Nicholas Clark authored
305 --prefix Set the installation prefix
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
306
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
307 --ask Have Configure ask for commonly-changed info
308
309 Compile Options:
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
310
756762f *** empty log message ***
Michael Scott authored
311 You can add and remove option values with :rem{<opt>} and :add{<opt>}
312 e.g. : --ccflags="rem{-g} :add{-O2}"
313
314 --debugging=0 Disable debugging, default = 1
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
315 --profile Turn on profiled compile (gcc only for now)
756762f *** empty log message ***
Michael Scott authored
316 --optimize Optimized compile
317 --inline Compiler supports inline
0846288 various patches 2
Leopold Toetsch authored
318
756762f *** empty log message ***
Michael Scott authored
319 --cc=(compiler) Use the given compiler
320 --ccflags=(flags) Use the given compiler flags
321 --ccwarn=(flags) Use the given compiler warning flags
c528c23 The following patch enables the user to control which compilers get
Leopold Toetsch authored
322 --cxx=(compiler) Use the given C++ compiler
756762f *** empty log message ***
Michael Scott authored
323 --libs=(libs) Use the given libraries
324 --link=(linker) Use the given linker
325 --linkflags=(flags) Use the given linker flags
326 --ld=(linker) Use the given loader for shared libraries
327 --ldflags=(flags) Use the given loader flags for shared libraries
328 --lex=(lexer) Use the given lexical analyzer generator
98215bc added the new ICU options to the help text
Jens Rieks authored
329 --yacc=(parser) Use the given parser generator
0846288 various patches 2
Leopold Toetsch authored
330
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
331 --define=inet_aton Quick hack to use inet_aton instead of inet_pton
332
333 Parrot Options:
334
756762f *** empty log message ***
Michael Scott authored
335 --intval=(type) Use the given type for INTVAL
336 --floatval=(type) Use the given type for FLOATVAL
337 --opcode=(type) Use the given type for opcodes
338 --ops=(files) Use the given ops files
339 --pmc=(files) Use the given PMC files
340
341 --cgoto=0 Don't build cgoto core - recommended when short of mem
0846288 various patches 2
Leopold Toetsch authored
342 --jitcapable Use JIT
343 --execcapable Use JIT to emit a native executable
756762f *** empty log message ***
Michael Scott authored
344 --gc=(type) Determine the type of garbage collection
345 type=(gc|libc|malloc|malloc-trace) default is gc
346
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
347 ICU Options:
348
98215bc added the new ICU options to the help text
Jens Rieks authored
349 For using a system ICU, these options can be used:
350
351 --icu-config=/path/to/icu-config
352 Location of the script used for ICU autodetection.
353 You just need to specify this option if icu-config
354 is not in you PATH.
355
356 --icu-config=none can be used to disable the autodetection feature.
357 It will also be disabled if you specify any other
358 of the following ICU options.
359
360 If you do not have a full ICU installation:
361
6287366 Configure --without-icu
Leopold Toetsch authored
362 --without-icu Build parrot without ICU support
98215bc added the new ICU options to the help text
Jens Rieks authored
363 --icuheaders=(path) Location of ICU headers without /unicode
364 --icushared=(flags) Full linker command to create shared libraries
365 --icudatadir=(path) Directory to locate ICU's data file(s)
366
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
367 Other Options (may not be implemented):
368
369 --maintainer Create imcc's parser and lexer files. Needs a working
370 parser and lexer.
371 --miniparrot Build parrot assuming only pure ANSI C is available
372 --expnetwork Enable experimental networking (unused)
0846288 various patches 2
Leopold Toetsch authored
373
756762f *** empty log message ***
Michael Scott authored
374 EOT
375 exit;
376 };
433def8 [perl #33801] [PATCH] GDBMHash - a dynamic PMC that binds to GNU dbm
Leopold Toetsch authored
377 $args{$key} = $value;
756762f *** empty log message ***
Michael Scott authored
378 }
379 }
380
381 $args{debugging} = 1 unless ((exists $args{debugging}) && !$args{debugging});
382
383 print <<"END";
384 Parrot Version $parrot_version Configure 2.0
433def8 [perl #33801] [PATCH] GDBMHash - a dynamic PMC that binds to GNU dbm
Leopold Toetsch authored
385 Copyright (C) 2001-2005 The Perl Foundation. All Rights Reserved.
756762f *** empty log message ***
Michael Scott authored
386
433def8 [perl #33801] [PATCH] GDBMHash - a dynamic PMC that binds to GNU dbm
Leopold Toetsch authored
387 Hello, I'm Configure. My job is to poke and prod your system to figure out
388 how to build Parrot. The process is completely automated, unless you passed in
756762f *** empty log message ***
Michael Scott authored
389 the `--ask' flag on the command line, in which case it'll prompt you for a few
390 pieces of info.
391
392 Since you're running this script, you obviously have Perl 5--I'll be pulling
393 some defaults from its configuration.
394 END
395
396 #Run the actual steps
397 Parrot::Configure::RunSteps->runsteps(%args);
398
399 print <<"END";
400
401 Okay, we're done!
402
403 You can now use `make' (or your platform's equivalent to `make') to build your
404 Parrot. After that, you can use `make test' to run the test suite.
405
406 Happy Hacking,
407 The Parrot Team
408
409 END
410
411 exit(0);
Something went wrong with that request. Please try again.