Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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