Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 350 lines (210 sloc) 7.743 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 Simon Cozens 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 Brent Royal-Gordon 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 Brent Royal-Gordon 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 Brent Royal-Gordon Configure output cleanup. Retasks --verbose to include the old output f...
brentdax authored
37 =item C<--verbose=2>
38
39 Tells Configure.pl to output information about i<every> setting added or
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 Simon Cozens 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 Simon Cozens 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 Tom Hughes 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 Brent Royal-Gordon 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 Brent Royal-Gordon 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
756762f *** empty log message ***
Michael Scott authored
188 =back
189
49929e0 remove =head3
Michael Scott authored
190 Other Options (may not be implemented)
205f653 Brent Royal-Gordon Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
191
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
192 =over
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
193
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
194 =item C<--maintainer>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
195
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
196 Use this option if you want imcc's parser and lexer files to be
197 generated. Needs a working parser and lexer.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
198
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
199 =item C<--miniparrot>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
200
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
201 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
202
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
203 =item C<--expnetwork>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
204
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
205 Enable experimental networking. This is an unused option and should
206 probably be removed.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
207
0fc6ac6 Brent Royal-Gordon Configure.pl 2.0.
brentdax authored
208 =back
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
209
756762f *** empty log message ***
Michael Scott authored
210 =cut
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
211
756762f *** empty log message ***
Michael Scott authored
212 use 5.005_02;
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
213
756762f *** empty log message ***
Michael Scott authored
214 use strict;
215 use vars qw($parrot_version @parrot_version);
216 use lib 'lib';
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
217
756762f *** empty log message ***
Michael Scott authored
218 use Parrot::BuildUtil;
219 use Parrot::Configure::RunSteps;
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
220
756762f *** empty log message ***
Michael Scott authored
221 $| = 1;
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
222
756762f *** empty log message ***
Michael Scott authored
223 $parrot_version = parrot_version();
224 @parrot_version = parrot_version();
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
225
756762f *** empty log message ***
Michael Scott authored
226 # Handle options
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
227
756762f *** empty log message ***
Michael Scott authored
228 my %args;
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
229
756762f *** empty log message ***
Michael Scott authored
230 for(@ARGV) {
231 my($key, $value)=/--(\w+)(?:=(.*))?/;
232 $key = 'help' unless defined $key;
233 $value = 1 unless defined $value;
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
234
756762f *** empty log message ***
Michael Scott authored
235 for($key) {
236 /version/ && do {
237 my $cvsid='$Id$';
238 print <<"END";
239 Parrot Version $parrot_version Configure 2.0
240 $cvsid
241 END
242 exit;
243 };
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
244
756762f *** empty log message ***
Michael Scott authored
245 /help/ && do {
246 print <<"EOT";
247 $0 - Parrot Configure 2.0
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
248
756762f *** empty log message ***
Michael Scott authored
249 General Options:
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
250
756762f *** empty log message ***
Michael Scott authored
251 --help Show this text
252 --version Show version information
253 --verbose Output extra information
ab81b8c Brent Royal-Gordon Configure output cleanup. Retasks --verbose to include the old output f...
brentdax authored
254 --verbose=2 Output every setting change
756762f *** empty log message ***
Michael Scott authored
255 --nomanicheck Don't check the MANIFEST
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
256
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
257 --ask Have Configure ask for commonly-changed info
258
259 Compile Options:
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
260
756762f *** empty log message ***
Michael Scott authored
261 You can add and remove option values with :rem{<opt>} and :add{<opt>}
262 e.g. : --ccflags="rem{-g} :add{-O2}"
263
264 --debugging=0 Disable debugging, default = 1
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
265 --profile Turn on profiled compile (gcc only for now)
756762f *** empty log message ***
Michael Scott authored
266 --optimize Optimized compile
267 --inline Compiler supports inline
0846288 various patches 2
Leopold Toetsch authored
268
756762f *** empty log message ***
Michael Scott authored
269 --cc=(compiler) Use the given compiler
270 --ccflags=(flags) Use the given compiler flags
271 --ccwarn=(flags) Use the given compiler warning flags
272 --libs=(libs) Use the given libraries
273 --link=(linker) Use the given linker
274 --linkflags=(flags) Use the given linker flags
275 --ld=(linker) Use the given loader for shared libraries
276 --ldflags=(flags) Use the given loader flags for shared libraries
277 --lex=(lexer) Use the given lexical analyzer generator
278 --yacc=(parser) Use the given parser generator
0846288 various patches 2
Leopold Toetsch authored
279
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
280 --define=inet_aton Quick hack to use inet_aton instead of inet_pton
281
282 Parrot Options:
283
756762f *** empty log message ***
Michael Scott authored
284 --intval=(type) Use the given type for INTVAL
285 --floatval=(type) Use the given type for FLOATVAL
286 --opcode=(type) Use the given type for opcodes
287 --ops=(files) Use the given ops files
288 --pmc=(files) Use the given PMC files
289
290 --cgoto=0 Don't build cgoto core - recommended when short of mem
0846288 various patches 2
Leopold Toetsch authored
291 --jitcapable Use JIT
292 --execcapable Use JIT to emit a native executable
756762f *** empty log message ***
Michael Scott authored
293 --gc=(type) Determine the type of garbage collection
294 type=(gc|libc|malloc|malloc-trace) default is gc
295
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
296 ICU Options:
297
298 --icuplatform=(platform) Platform name to pass to ICU's runConfigureICU
299 --icuconfigureargs=(args) Arguments to pass to ICU's configuration script
300 --icudatadir=(path) Directory to locate ICU's data file(s)
66c557b [perl #28473] [PATCH] ICU data directory configuration
Leopold Toetsch authored
301
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
302 Other Options (may not be implemented):
303
304 --maintainer Create imcc's parser and lexer files. Needs a working
305 parser and lexer.
306 --miniparrot Build parrot assuming only pure ANSI C is available
307 --expnetwork Enable experimental networking (unused)
0846288 various patches 2
Leopold Toetsch authored
308
756762f *** empty log message ***
Michael Scott authored
309 EOT
310 exit;
311 };
312 $args{$key}=$value;
313 }
314 }
315
316 $args{debugging} = 1 unless ((exists $args{debugging}) && !$args{debugging});
317
318 print <<"END";
319 Parrot Version $parrot_version Configure 2.0
320 Copyright (C) 2001-2003 The Perl Foundation. All Rights Reserved.
321
322 Hello, I'm Configure. My job is to poke and prod your system to figure out
323 how to build Parrot. The process is completely automated, unless you passed in
324 the `--ask' flag on the command line, in which case it'll prompt you for a few
325 pieces of info.
326
327 Since you're running this script, you obviously have Perl 5--I'll be pulling
328 some defaults from its configuration.
329 END
330
331
332 #Run the actual steps
333 Parrot::Configure::RunSteps->runsteps(%args);
334
335
0846288 various patches 2
Leopold Toetsch authored
336
756762f *** empty log message ***
Michael Scott authored
337 print <<"END";
338
339 Okay, we're done!
340
341 You can now use `make' (or your platform's equivalent to `make') to build your
342 Parrot. After that, you can use `make test' to run the test suite.
343
344 Happy Hacking,
345 The Parrot Team
346
347 END
348
349 exit(0);
Something went wrong with that request. Please try again.