2 # Copyright: 2001-2006 The Perl Foundation. All Rights Reserved.
7 Configure.pl - Parrot's Configuration Script
11 % perl Configure.pl [options]
15 This is Parrot's configuration script. It should be run to create the necessary
16 system-specific files before building Parrot.
18 =head2 Command-line Options
26 Prints out a description of the options and exits.
30 Prints out the version number of Configure.pl and exits.
34 Tells Configure.pl to output extra information about the configuration data it
39 Tells Configure.pl to output information about i<every> setting added or
42 =item C<--verbose-step={N|regex}>
44 Run C<--verbose=2> for step number C<N> or matching description.
46 =item C<--nomanicheck>
48 Tells Configure.pl not to run the MANIFEST check.
52 Sets the location where parrot will be installed.
56 This turns on the user prompts.
64 =item C<--debugging=0>
66 Debugging is turned on by default. Use this to disable it.
68 =item C<--parrot_is_shared>
70 Link parrot dynamically.
74 Turn on profiled compile (gcc only for now)
78 Add perl5's $Config{optimize} to the compiler flags.
80 =item C<--optimize=flags>
82 Add C<flags> to the compiler flags.
86 Tell Configure that the compiler supports C<inline>.
88 =item C<--cc=(compiler)>
90 Specify which compiler to use.
92 =item C<--ccflags=(flags)>
94 Use the given compiler flags.
96 =item C<--ccwarn=(flags)>
98 Use the given compiler warning flags.
100 =item C<--cxx=(compiler)>
102 Specify which C++ compiler to use (for ICU).
104 =item C<--libs=(libs)>
106 Use the given libraries.
108 =item C<--link=(linker)>
110 Specify which linker to use.
112 =item C<--linkflags=(flags)>
114 Use the given linker flags
116 =item C<--ld=(linker)>
118 Specify which loader to use for shared libraries.
120 =item C<--ldflags=(flags)>
122 Use the given loader flags for shared libraries
124 =item C<--lex=(lexer)>
126 Specify which lexer to use.
128 =item C<--yacc=(parser)>
130 Specify which parser to use.
132 =item C<--define=val1[,val2]>
134 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
135 needed to use inet_aton for systems that lack inet_pton:
145 =item C<--intval=(type)>
147 Use the given type for C<INTVAL>.
149 =item C<--floatval=(type)>
151 Use the given type for C<FLOATVAL>.
153 =item C<--opcode=(type)>
155 Use the given type for opcodes.
157 =item C<--ops=(files)>
159 Use the given ops files.
161 =item C<--pmc=(files)>
163 Use the given PMC files.
167 Don't build cgoto core. This is recommended when you are short of memory.
169 =item C<--jitcapable>
173 =item C<--execcapable>
175 Use JIT to emit a native executable.
179 Determine the type of garbage collection. The value for C<type> should be one
180 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
188 =item C<--icu-config=/path/to/icu-config>
190 Use the specified icu-config script to determine the necessary ICU options.
192 Use --icu-config=none to disable the autodetect feature. Parrot will then be
195 B<Note:> If you specify another ICU option than --icu-config, the autodetection
196 functionality will be disabled.
198 =item C<--icushared=(linkeroption)>
200 Linker command to link against ICU library.
204 --icushared='-L /opt/openoffice/program -licudata -licuuc'
206 (The libs in openoffice are actually version 2.2 and do not work)
208 =item C<--icuheaders=(header_dir)>
210 Location of ICU header files without the /unicode suffix.
214 --icuheaders='/home/lt/icu/'
222 =item C<--maintainer>
224 Use this option if you want imcc's parser and lexer files to be generated.
225 Needs a working parser and lexer.
227 =item C<--miniparrot>
229 Build parrot assuming only pure ANSI C is available.
231 =item C<--expnetwork>
233 Enable experimental networking. This is an unused option and should probably be
240 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
241 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
248 use vars
qw($parrot_version @parrot_version);
251 use Parrot::BuildUtil;
252 use Parrot::Configure;
256 $parrot_version = parrot_version();
257 @parrot_version = parrot_version();
264 my($key, $value) = m/--([-\w]+)(?:=(.*))?/;
265 $key = 'help' unless defined $key;
266 $value = 1 unless defined $value;
272 Parrot Version $parrot_version Configure 2.0
280 $0 - Parrot Configure 2.0
284 --help Show this text
285 --version Show version information
286 --verbose Output extra information
287 --verbose=2 Output every setting change
288 --verbose-step=N Set verbose for step N only
289 --verbose-step=regex Set verbose for step matching description
290 --nomanicheck Don't check the MANIFEST
291 --prefix Set the installation prefix
293 --ask Have Configure ask for commonly-changed info
297 You can add and remove option values with :rem{<opt>} and :add{<opt>}
298 e.g. : --ccflags=":rem{-g} :add{-O2}"
300 --debugging=0 Disable debugging, default = 1
301 --inline Compiler supports inline
302 --optimize Optimized compile
303 --optimize=flags Add given optimizer flags
304 --parrot_is_shared Link parrot dynamically
305 --profile Turn on profiled compile (gcc only for now)
307 --cc=(compiler) Use the given compiler
308 --ccflags=(flags) Use the given compiler flags
309 --ccwarn=(flags) Use the given compiler warning flags
310 --cxx=(compiler) Use the given C++ compiler
311 --libs=(libs) Use the given libraries
312 --link=(linker) Use the given linker
313 --linkflags=(flags) Use the given linker flags
314 --ld=(linker) Use the given loader for shared libraries
315 --ldflags=(flags) Use the given loader flags for shared libraries
316 --lex=(lexer) Use the given lexical analyzer generator
317 --yacc=(parser) Use the given parser generator
319 --define=inet_aton Quick hack to use inet_aton instead of inet_pton
323 --intval=(type) Use the given type for INTVAL
324 --floatval=(type) Use the given type for FLOATVAL
325 --opcode=(type) Use the given type for opcodes
326 --ops=(files) Use the given ops files
327 --pmc=(files) Use the given PMC files
329 --cgoto=0 Don't build cgoto core - recommended when short of mem
331 --execcapable Use JIT to emit a native executable
332 --gc=(type) Determine the type of garbage collection
333 type=(gc|libc|malloc|malloc-trace) default is gc
337 For using a system ICU, these options can be used:
339 --icu-config=/path/to/icu-config
340 Location of the script used for ICU autodetection.
341 You just need to specify this option if icu-config
344 --icu-config=none can be used to disable the autodetection feature.
345 It will also be disabled if you specify any other
346 of the following ICU options.
348 If you do not have a full ICU installation:
350 --without-icu Build parrot without ICU support
351 --icuheaders=(path) Location of ICU headers without /unicode
352 --icushared=(flags) Full linker command to create shared libraries
353 --icudatadir=(path) Directory to locate ICU's data file(s)
355 Other Options (may not be implemented):
357 --maintainer Create imcc's parser and lexer files. Needs a working
359 --miniparrot Build parrot assuming only pure ANSI C is available
360 --expnetwork Enable experimental networking (unused)
365 $args{$key} = $value;
369 $args{debugging
} = 1 unless ((exists $args{debugging
}) && !$args{debugging
});
370 $args{maintainer
} = 1 if defined $args{lex
} or defined $args{yacc
};
373 Parrot Version $parrot_version Configure 2.0
374 Copyright (C) 2001-2006 The Perl Foundation. All Rights Reserved.
376 Hello, I'm Configure. My job is to poke and prod your system to figure out
377 how to build Parrot. The process is completely automated, unless you passed in
378 the `--ask' flag on the command line, in which case it'll prompt you for a few
381 Since you're running this script, you obviously have Perl 5--I'll be pulling
382 some defaults from its configuration.
385 # EDIT HERE TO ADD NEW TESTS
443 my $conf = Parrot
::Configure
->new;
445 # XXX $Parrot::Configure::Step::conf is a temporty hack
446 no warnings
qw(once);
447 $Parrot::Configure
::Step
::conf
= $conf;
449 $conf->add_steps(@steps);
450 $conf->options->set(%args);
451 # Run the actual steps
452 $conf->runsteps or exit(1);
454 # tell users what to do next
455 my $make = $conf->data->get('make');
461 You can now use `$make' to build your Parrot. After that,
462 you can use `$make test' to run the test suite.