Skip to content

HTTPS clone URL

Subversion checkout URL

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