Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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