Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 378 lines (222 sloc) 7.923 kB
3ace369 @particle #39826: [CAGE] convert C<perl -w> to C<use warnings;>
particle authored
1 #! perl
29b08db @bschmalhofer Require Perl 5.6.0, not 5.8.0, in Configure.pl.
bschmalhofer authored
2
a5b614c @bschmalhofer [config]
bschmalhofer authored
3 # Copyright (C) 2001-2008, The Perl Foundation.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
4 # $Id$
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
5
dc40427 @coke [codingstd] require version in a way that avoids a complaint from per…
coke authored
6 use 5.008;
3477cc0 @jkeenan Applying patch submitted in
jkeenan authored
7 use strict;
8 use warnings;
9 use lib 'lib';
10
11 use Parrot::Configure;
12 use Parrot::Configure::Options qw( process_options );
13 use Parrot::Configure::Options::Test;
a725b2f @jkeenan Refactor preparatory code found in lib/Parrot/Configure/Options/Test.…
jkeenan authored
14 use Parrot::Configure::Options::Test::Prepare qw(
15 get_preconfiguration_tests
16 get_postconfiguration_tests
17 );
3477cc0 @jkeenan Applying patch submitted in
jkeenan authored
18 use Parrot::Configure::Messages qw(
19 print_introduction
20 print_conclusion
21 );
22 use Parrot::Configure::Step::List qw( get_steps_list );
b65b944 @NotFound Update .parrot_current_rev in Configure if possible
NotFound authored
23 use Parrot::Revision;
3477cc0 @jkeenan Applying patch submitted in
jkeenan authored
24
25 $| = 1; # $OUTPUT_AUTOFLUSH = 1;
26
27 # Install Option text was taken from:
28 #
29 # autoconf (GNU Autoconf) 2.59
30 # Written by David J. MacKenzie and Akim Demaille.
31 #
32 # Copyright (C) 2003 Free Software Foundation, Inc.
33 # This is free software; see the source for copying conditions. There is NO
34 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35
36 # from Parrot::Configure::Options
37 my $args = process_options(
38 {
39 mode => 'configure',
40 argv => [@ARGV],
41 }
42 );
43 exit(1) unless defined $args;
44
45 my $opttest = Parrot::Configure::Options::Test->new($args);
46
47 # configuration tests will only be run if you requested them
48 # as command-line option
a725b2f @jkeenan Refactor preparatory code found in lib/Parrot/Configure/Options/Test.…
jkeenan authored
49 $opttest->run_configure_tests( get_preconfiguration_tests() );
3477cc0 @jkeenan Applying patch submitted in
jkeenan authored
50
51 my $parrot_version = $Parrot::Configure::Options::Conf::parrot_version;
52
53 # from Parrot::Configure::Messages
54 print_introduction($parrot_version);
55
b65b944 @NotFound Update .parrot_current_rev in Configure if possible
NotFound authored
56 # Update revision number if needed
57 Parrot::Revision::update();
58
a5b614c @bschmalhofer [config]
bschmalhofer authored
59 my $conf = Parrot::Configure->new();
3477cc0 @jkeenan Applying patch submitted in
jkeenan authored
60
61 # from Parrot::Configure::Step::List
62 $conf->add_steps( get_steps_list() );
63
64 # from Parrot::Configure::Data
65 $conf->options->set( %{$args} );
66
d154d3a @jkeenan Reposition one inline comment; add another.
jkeenan authored
67 # Log files created by Configure.pl in MANIFEST.configure.generated
7bb2d0e @jkeenan Applying patch submitted in
jkeenan authored
68 $conf->{active_configuration} = 1;
d154d3a @jkeenan Reposition one inline comment; add another.
jkeenan authored
69
70 # Run the actual steps from Parrot::Configure
3477cc0 @jkeenan Applying patch submitted in
jkeenan authored
71 $conf->runsteps or exit(1);
72
73 # build tests will only be run if you requested them
74 # as command-line option
a725b2f @jkeenan Refactor preparatory code found in lib/Parrot/Configure/Options/Test.…
jkeenan authored
75 $opttest->run_build_tests( get_postconfiguration_tests() );
3477cc0 @jkeenan Applying patch submitted in
jkeenan authored
76
77 my $make = $conf->data->get('make');
78 # from Parrot::Configure::Messages
79 ( print_conclusion( $conf, $make ) ) ? exit 0 : exit 1;
80
81 ################### DOCUMENTATION ###################
82
756762f *** empty log message ***
Michael Scott authored
83 =head1 NAME
54d55b6 Patch from Nicholas Clark <nick@unfortu.net>: stops silly people
Josh Wilmes authored
84
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
85 Configure.pl - Parrot's Configuration Script
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
86
756762f *** empty log message ***
Michael Scott authored
87 =head1 SYNOPSIS
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
88
756762f *** empty log message ***
Michael Scott authored
89 % perl Configure.pl [options]
6d36c2d bunch of patches:
Leopold Toetsch authored
90
756762f *** empty log message ***
Michael Scott authored
91 =head1 DESCRIPTION
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
92
d10b19e @petdance Perl programs are programs, not scripts
petdance authored
93 This is Parrot's configuration program. It should be run to create
94 the necessary system-specific files before building Parrot.
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
95
96 =head2 Command-line Options
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
97
49929e0 remove =head3
Michael Scott authored
98 General Options
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
99
756762f *** empty log message ***
Michael Scott authored
100 =over
ad4983c add --optimize Configure option
Leopold Toetsch authored
101
756762f *** empty log message ***
Michael Scott authored
102 =item C<--help>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
103
756762f *** empty log message ***
Michael Scott authored
104 Prints out a description of the options and exits.
ad4983c add --optimize Configure option
Leopold Toetsch authored
105
756762f *** empty log message ***
Michael Scott authored
106 =item C<--version>
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
107
756762f *** empty log message ***
Michael Scott authored
108 Prints out the version number of Configure.pl and exits.
c0142c7 memory allocation rework
Dan Sugalski authored
109
756762f *** empty log message ***
Michael Scott authored
110 =item C<--verbose>
c0142c7 memory allocation rework
Dan Sugalski authored
111
6f5b538 @jhoblitt podtidy configure files
jhoblitt authored
112 Tells Configure.pl to output extra information about the configuration data it
113 is setting.
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
114
ab81b8c @brentdax Configure output cleanup. Retasks --verbose to include the old outpu…
brentdax authored
115 =item C<--verbose=2>
116
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
117 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
118 changed.
119
d79c782 @jkeenan Applying patch submitted in
jkeenan authored
120 =item C<--verbose-step={N|regex}>
567c2b1 new Configure options: verbose-step
Leopold Toetsch authored
121
d79c782 @jkeenan Applying patch submitted in
jkeenan authored
122 Run C<--verbose=2> for step number C<N> or matching description.
567c2b1 new Configure options: verbose-step
Leopold Toetsch authored
123
a5e7643 @jkeenan Committing patch submitted for RT 45523 and 45525. Add --fatal and
jkeenan authored
124 =item C<--fatal>
125
126 Tells Configure.pl to halt completely if any configuration step fails.
127
128 =item C<--fatal-step={init::alpha,inter::beta,auto::gamma}>
129
130 Tells Configure.pl to halt completely if any configuration step in
131 comma-delimited string individually fails.
132
756762f *** empty log message ***
Michael Scott authored
133 =item C<--nomanicheck>
85a1fcc reenable debugging=1 default
Leopold Toetsch authored
134
756762f *** empty log message ***
Michael Scott authored
135 Tells Configure.pl not to run the MANIFEST check.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
136
20fed4c Add a --prefix argument to Configure.pl to set the installation prefix
Nicholas Clark authored
137 =item C<--prefix>
138
139 Sets the location where parrot will be installed.
140
3af6759 @particle [config]: add --languages='list of languages' option to allow (re)gen…
particle authored
141 =item C<--languages="list of languages">
142
143 Specify a list of languages to process (space separated.)
144 Used in combination with C<--step=gen::languages> to regenerate makefiles.
3070bbb @tewk [Config] added --step runs a single step
tewk authored
145
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
146 =item C<--ask>
de4d079 Add conditional configurations for testy code.
Melvin Smith authored
147
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
148 This turns on the user prompts.
6fba438 @simoncozens Abstract the argument and opcode packing types and functions out into
simoncozens authored
149
84c64a2 @jkeenan Applying to trunk patch submitted in RT 42690. particle requested a …
jkeenan authored
150 =item C<--test>
151
152 Run certain tests along with F<Configure.pl>:
153
154 =over 4
155
156 =item C<--test=configure>
157
158 Run tests found in F<t/configure/> I<before> beginning configuration. These
159 tests demonstrate that Parrot's configuration tools will work properly once
160 configuration has begun.
161
162 =item C<--test=build>
163
164 Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
165 F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
166 completed. These tests demonstrate (a) that certain of Parrot's configuration
167 tools are working properly post-configuration; and (b) that certain of
168 Parrot's build tools will work properly once you call F<make>.
169
170 =item C<--test>
171
172 Run the tests described in C<--test=configure>, conduct configuration, then
173 run the tests described in C<--test=build>.
174
175 =back
176
756762f *** empty log message ***
Michael Scott authored
177 =back
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
178
49929e0 remove =head3
Michael Scott authored
179 Compile Options
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
180
756762f *** empty log message ***
Michael Scott authored
181 =over
19fa0d4 @tomhughes Stop Configure trying to make op_info.c and op.h as op_info.c no longer
tomhughes authored
182
756762f *** empty log message ***
Michael Scott authored
183 =item C<--debugging=0>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
184
756762f *** empty log message ***
Michael Scott authored
185 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
186
82a8718 @particle config: add --parrot_is_shared option to docs
particle authored
187 =item C<--parrot_is_shared>
188
189 Link parrot dynamically.
190
2ddc05f [config] New Configure.pl option --m=32
Leopold Toetsch authored
191 =item C<--m=32>
192
fe05e8a @ambs Some enhancements on linelength.t
ambs authored
193 Create a 32-bit executable on 64-architectures like x86_64. This
194 option appends -m32 to compiler and linker programs and does
195 s/lib64/lib/g on link flags.
2ddc05f [config] New Configure.pl option --m=32
Leopold Toetsch authored
196
197 This option is experimental. See F<config/init/defaults.pm> for more.
198
62c60b6 really speed up oo1.pasm by 2
Leopold Toetsch authored
199 =item C<--profile>
200
201 Turn on profiled compile (gcc only for now)
202
efd9dcb @paultcochrane Added --cage option. Part of patch (#39802) courtesy of Kevin Tew
paultcochrane authored
203 =item C<--cage>
204
205 [CAGE] compile includes many additional warnings
206
756762f *** empty log message ***
Michael Scott authored
207 =item C<--optimize>
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
208
2fc8aec @bschmalhofer This patch makes it easier to compile parrot with a compiler other than
bschmalhofer authored
209 Add perl5's $Config{optimize} to the compiler flags.
210
211 =item C<--optimize=flags>
212
213 Add C<flags> to the compiler flags.
756762f *** empty log message ***
Michael Scott authored
214
215 =item C<--inline>
216
217 Tell Configure that the compiler supports C<inline>.
218
219 =item C<--cc=(compiler)>
220
221 Specify which compiler to use.
222
223 =item C<--ccflags=(flags)>
224
225 Use the given compiler flags.
226
227 =item C<--ccwarn=(flags)>
228
229 Use the given compiler warning flags.
230
c528c23 The following patch enables the user to control which compilers get
Leopold Toetsch authored
231 =item C<--cxx=(compiler)>
232
233 Specify which C++ compiler to use (for ICU).
234
756762f *** empty log message ***
Michael Scott authored
235 =item C<--libs=(libs)>
236
237 Use the given libraries.
238
239 =item C<--link=(linker)>
240
241 Specify which linker to use.
242
243 =item C<--linkflags=(flags)>
244
245 Use the given linker flags
246
247 =item C<--ld=(linker)>
248
249 Specify which loader to use for shared libraries.
250
251 =item C<--ldflags=(flags)>
252
253 Use the given loader flags for shared libraries
254
255 =item C<--lex=(lexer)>
256
257 Specify which lexer to use.
258
259 =item C<--yacc=(parser)>
260
261 Specify which parser to use.
0846288 various patches 2
Leopold Toetsch authored
262
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
263 =item C<--define=val1[,val2]>
264
6f5b538 @jhoblitt podtidy configure files
jhoblitt authored
265 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
266 needed to use inet_aton for systems that lack inet_pton:
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
267
268 --define=inet_aton
269
270 =back
271
49929e0 remove =head3
Michael Scott authored
272 Parrot Options
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
273
274 =over
275
756762f *** empty log message ***
Michael Scott authored
276 =item C<--intval=(type)>
277
278 Use the given type for C<INTVAL>.
279
280 =item C<--floatval=(type)>
281
282 Use the given type for C<FLOATVAL>.
283
284 =item C<--opcode=(type)>
285
286 Use the given type for opcodes.
287
288 =item C<--ops=(files)>
289
290 Use the given ops files.
291
292 =item C<--pmc=(files)>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
293
756762f *** empty log message ***
Michael Scott authored
294 Use the given PMC files.
295
296 =item C<--cgoto=0>
297
298 Don't build cgoto core. This is recommended when you are short of memory.
299
300 =item C<--jitcapable>
301
302 Use JIT system.
303
304 =item C<--execcapable>
305
0846288 various patches 2
Leopold Toetsch authored
306 Use JIT to emit a native executable.
756762f *** empty log message ***
Michael Scott authored
307
308 =item C<--gc=(type)>
309
6f5b538 @jhoblitt podtidy configure files
jhoblitt authored
310 Determine the type of garbage collection. The value for C<type> should be one
311 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
756762f *** empty log message ***
Michael Scott authored
312
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
313 =back
314
9407a53 @coke Re: [perl #41051] [PATCH]: Configure.pl: Spell out what 'ICU' means
coke authored
315 International Components For Unicode (ICU) Options
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
316
317 =over
318
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
319 =item C<--icu-config=/path/to/icu-config>
320
73ba72d [perl #36057] [PATCH] Fix some typos - 5
Leopold Toetsch authored
321 Use the specified icu-config script to determine the necessary ICU options.
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
322
6f5b538 @jhoblitt podtidy configure files
jhoblitt authored
323 Use --icu-config=none to disable the autodetect feature. Parrot will then be
324 build without ICU.
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
325
6f5b538 @jhoblitt podtidy configure files
jhoblitt authored
326 B<Note:> If you specify another ICU option than --icu-config, the autodetection
327 functionality will be disabled.
a194975 - removed error message if icu-config does not exists
Jens Rieks authored
328
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
329 =item C<--icushared=(linkeroption)>
330
5ec035c Config cleanup - icu
Leopold Toetsch authored
331 Linker command to link against ICU library.
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
332
333 E.g.
334
335 --icushared='-L /opt/openoffice/program -licudata -licuuc'
336
337 (The libs in openoffice are actually version 2.2 and do not work)
338
339 =item C<--icuheaders=(header_dir)>
340
6f5b538 @jhoblitt podtidy configure files
jhoblitt authored
341 Location of ICU header files without the /unicode suffix.
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
342
343 E.g.
344
345 --icuheaders='/home/lt/icu/'
346
756762f *** empty log message ***
Michael Scott authored
347 =back
348
c9264be more config system add ons and docs
Leopold Toetsch authored
349 Other Options
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
350
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
351 =over
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
352
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
353 =item C<--maintainer>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
354
6f5b538 @jhoblitt podtidy configure files
jhoblitt authored
355 Use this option if you want imcc's parser and lexer files to be generated.
356 Needs a working parser and lexer.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
357
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
358 =item C<--miniparrot>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
359
b4b718e Update configuration system documentation (based on patches provided …
Michael Scott authored
360 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
361
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
362 =back
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
363
c9264be more config system add ons and docs
Leopold Toetsch authored
364 =head1 SEE ALSO
365
366 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
367 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
368
756762f *** empty log message ***
Michael Scott authored
369 =cut
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
370
b91d268 @bschmalhofer #40278: [CAGE] perl coding standards coda.
bschmalhofer authored
371 # Local Variables:
372 # mode: cperl
373 # cperl-indent-level: 4
374 # fill-column: 100
375 # End:
376 # vim: expandtab shiftwidth=4:
25830bb @jkeenan Applying patch submitted in
jkeenan authored
377
Something went wrong with that request. Please try again.