3 # Copyright (C) 2001-2007, The Perl Foundation.
8 Configure.pl - Parrot's Configuration Script
12 % perl Configure.pl [options]
16 This is Parrot's configuration program. It should be run to create
17 the necessary system-specific files before building Parrot.
19 =head2 Command-line Options
27 Prints out a description of the options and exits.
31 Prints out the version number of Configure.pl and exits.
35 Tells Configure.pl to output extra information about the configuration data it
40 Tells Configure.pl to output information about i<every> setting added or
43 =item C<--verbose-step={N|regex}>
45 Run C<--verbose=2> for step number C<N> or matching description.
49 Tells Configure.pl to halt completely if any configuration step fails.
51 =item C<--fatal-step={init::alpha,inter::beta,auto::gamma}>
53 Tells Configure.pl to halt completely if any configuration step in
54 comma-delimited string individually fails.
56 =item C<--nomanicheck>
58 Tells Configure.pl not to run the MANIFEST check.
62 Sets the location where parrot will be installed.
64 =item C<--languages="list of languages">
66 Specify a list of languages to process (space separated.)
67 Used in combination with C<--step=gen::languages> to regenerate makefiles.
71 This turns on the user prompts.
75 Run certain tests along with F<Configure.pl>:
79 =item C<--test=configure>
81 Run tests found in F<t/configure/> I<before> beginning configuration. These
82 tests demonstrate that Parrot's configuration tools will work properly once
83 configuration has begun.
87 Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
88 F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
89 completed. These tests demonstrate (a) that certain of Parrot's configuration
90 tools are working properly post-configuration; and (b) that certain of
91 Parrot's build tools will work properly once you call F<make>.
95 Run the tests described in C<--test=configure>, conduct configuration, then
96 run the tests described in C<--test=build>.
106 =item C<--debugging=0>
108 Debugging is turned on by default. Use this to disable it.
110 =item C<--parrot_is_shared>
112 Link parrot dynamically.
116 Create a 32-bit executable on 64-architectures like x86_64. This
117 option appends -m32 to compiler and linker programs and does
118 s/lib64/lib/g on link flags.
120 This option is experimental. See F<config/init/defaults.pm> for more.
124 Turn on profiled compile (gcc only for now)
128 [CAGE] compile includes many additional warnings
132 Add perl5's $Config{optimize} to the compiler flags.
134 =item C<--optimize=flags>
136 Add C<flags> to the compiler flags.
140 Tell Configure that the compiler supports C<inline>.
142 =item C<--cc=(compiler)>
144 Specify which compiler to use.
146 =item C<--ccflags=(flags)>
148 Use the given compiler flags.
150 =item C<--ccwarn=(flags)>
152 Use the given compiler warning flags.
154 =item C<--cxx=(compiler)>
156 Specify which C++ compiler to use (for ICU).
158 =item C<--libs=(libs)>
160 Use the given libraries.
162 =item C<--link=(linker)>
164 Specify which linker to use.
166 =item C<--linkflags=(flags)>
168 Use the given linker flags
170 =item C<--ld=(linker)>
172 Specify which loader to use for shared libraries.
174 =item C<--ldflags=(flags)>
176 Use the given loader flags for shared libraries
178 =item C<--lex=(lexer)>
180 Specify which lexer to use.
182 =item C<--yacc=(parser)>
184 Specify which parser to use.
186 =item C<--define=val1[,val2]>
188 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
189 needed to use inet_aton for systems that lack inet_pton:
199 =item C<--intval=(type)>
201 Use the given type for C<INTVAL>.
203 =item C<--floatval=(type)>
205 Use the given type for C<FLOATVAL>.
207 =item C<--opcode=(type)>
209 Use the given type for opcodes.
211 =item C<--ops=(files)>
213 Use the given ops files.
215 =item C<--pmc=(files)>
217 Use the given PMC files.
221 Don't build cgoto core. This is recommended when you are short of memory.
223 =item C<--jitcapable>
227 =item C<--execcapable>
229 Use JIT to emit a native executable.
233 Determine the type of garbage collection. The value for C<type> should be one
234 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
238 International Components For Unicode (ICU) Options
242 =item C<--icu-config=/path/to/icu-config>
244 Use the specified icu-config script to determine the necessary ICU options.
246 Use --icu-config=none to disable the autodetect feature. Parrot will then be
249 B<Note:> If you specify another ICU option than --icu-config, the autodetection
250 functionality will be disabled.
252 =item C<--icushared=(linkeroption)>
254 Linker command to link against ICU library.
258 --icushared='-L /opt/openoffice/program -licudata -licuuc'
260 (The libs in openoffice are actually version 2.2 and do not work)
262 =item C<--icuheaders=(header_dir)>
264 Location of ICU header files without the /unicode suffix.
268 --icuheaders='/home/lt/icu/'
276 =item C<--maintainer>
278 Use this option if you want imcc's parser and lexer files to be generated.
279 Needs a working parser and lexer.
281 =item C<--miniparrot>
283 Build parrot assuming only pure ANSI C is available.
289 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
290 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
299 use Parrot
::Configure
;
300 use Parrot
::Configure
::Options
qw( process_options );
301 use Parrot
::Configure
::Options
::Test
;
302 use Parrot
::Configure
::Messages
qw(
306 use Parrot
::Configure
::Step
::List
qw( get_steps_list );
308 $| = 1; # $OUTPUT_AUTOFLUSH = 1;
310 # Install Option text was taken from:
312 # autoconf (GNU Autoconf) 2.59
313 # Written by David J. MacKenzie and Akim Demaille.
315 # Copyright (C) 2003 Free Software Foundation, Inc.
316 # This is free software; see the source for copying conditions. There is NO
317 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
319 # from Parrot::Configure::Options
320 my $args = process_options
(
326 exit(1) unless defined $args;
328 my $opttest = Parrot
::Configure
::Options
::Test
->new($args);
330 # configuration tests will only be run if you requested them
331 # as command-line option
332 $opttest->run_configure_tests();
334 my $parrot_version = $Parrot::Configure
::Options
::Conf
::parrot_version
;
336 # from Parrot::Configure::Messages
337 print_introduction
($parrot_version);
339 my $conf = Parrot
::Configure
->new;
341 # from Parrot::Configure::Step::List
342 $conf->add_steps( get_steps_list
() );
344 # from Parrot::Configure::Data
345 $conf->options->set( %{$args} );
347 # Run the actual steps
348 # from Parrot::Configure
349 $conf->runsteps or exit(1);
351 # build tests will only be run if you requested them
352 # as command-line option
353 $opttest->run_build_tests();
355 my $make = $conf->data->get('make');
356 # from Parrot::Configure::Messages
357 ( print_conclusion
( $conf, $make ) ) ?
exit 0 : exit 1;
359 ################### DOCUMENTATION ###################
363 # cperl-indent-level: 4
366 # vim: expandtab shiftwidth=4: