Skip to content

HTTPS clone URL

Subversion checkout URL

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