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|name|regex}>
45 Run one step with C<--verbose=2>; step indicated by step number C<N>, by step
46 name (I<e.g.>, C<--verbose-step=inter::make>), or by matching description.
48 =item C<--nomanicheck>
50 Tells Configure.pl not to run the MANIFEST check.
54 Sets the location where parrot will be installed.
58 Execute a single configure step.
60 =item C<--languages="list of languages">
62 Specify a list of languages to process (space separated.)
63 Used in combination with C<--step=gen::languages> to regenerate makefiles.
67 This turns on the user prompts.
71 Run certain tests along with F<Configure.pl>:
75 =item C<--test=configure>
77 Run tests found in F<t/configure/> I<before> beginning configuration. These
78 tests demonstrate that Parrot's configuration tools will work properly once
79 configuration has begun.
83 Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
84 F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
85 completed. These tests demonstrate (a) that certain of Parrot's configuration
86 tools are working properly post-configuration; and (b) that certain of
87 Parrot's build tools will work properly once you call F<make>.
91 Run the tests described in C<--test=configure>, conduct configuration, then
92 run the tests described in C<--test=build>.
102 =item C<--debugging=0>
104 Debugging is turned on by default. Use this to disable it.
106 =item C<--parrot_is_shared>
108 Link parrot dynamically.
112 Create a 32-bit executable on 64-architectures like x86_64. This
113 option appends -m32 to compiler and linker programs and does
114 s/lib64/lib/g on link flags.
116 This option is experimental. See F<config/init/defaults.pm> for more.
120 Turn on profiled compile (gcc only for now)
124 [CAGE] compile includes many additional warnings
128 Add perl5's $Config{optimize} to the compiler flags.
130 =item C<--optimize=flags>
132 Add C<flags> to the compiler flags.
136 Tell Configure that the compiler supports C<inline>.
138 =item C<--cc=(compiler)>
140 Specify which compiler to use.
142 =item C<--ccflags=(flags)>
144 Use the given compiler flags.
146 =item C<--ccwarn=(flags)>
148 Use the given compiler warning flags.
150 =item C<--cxx=(compiler)>
152 Specify which C++ compiler to use (for ICU).
154 =item C<--libs=(libs)>
156 Use the given libraries.
158 =item C<--link=(linker)>
160 Specify which linker to use.
162 =item C<--linkflags=(flags)>
164 Use the given linker flags
166 =item C<--ld=(linker)>
168 Specify which loader to use for shared libraries.
170 =item C<--ldflags=(flags)>
172 Use the given loader flags for shared libraries
174 =item C<--lex=(lexer)>
176 Specify which lexer to use.
178 =item C<--yacc=(parser)>
180 Specify which parser to use.
182 =item C<--define=val1[,val2]>
184 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
185 needed to use inet_aton for systems that lack inet_pton:
195 =item C<--intval=(type)>
197 Use the given type for C<INTVAL>.
199 =item C<--floatval=(type)>
201 Use the given type for C<FLOATVAL>.
203 =item C<--opcode=(type)>
205 Use the given type for opcodes.
207 =item C<--ops=(files)>
209 Use the given ops files.
211 =item C<--pmc=(files)>
213 Use the given PMC files.
217 Don't build cgoto core. This is recommended when you are short of memory.
219 =item C<--jitcapable>
223 =item C<--execcapable>
225 Use JIT to emit a native executable.
229 Determine the type of garbage collection. The value for C<type> should be one
230 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
234 International Components For Unicode (ICU) Options
238 =item C<--icu-config=/path/to/icu-config>
240 Use the specified icu-config script to determine the necessary ICU options.
242 Use --icu-config=none to disable the autodetect feature. Parrot will then be
245 B<Note:> If you specify another ICU option than --icu-config, the autodetection
246 functionality will be disabled.
248 =item C<--icushared=(linkeroption)>
250 Linker command to link against ICU library.
254 --icushared='-L /opt/openoffice/program -licudata -licuuc'
256 (The libs in openoffice are actually version 2.2 and do not work)
258 =item C<--icuheaders=(header_dir)>
260 Location of ICU header files without the /unicode suffix.
264 --icuheaders='/home/lt/icu/'
272 =item C<--maintainer>
274 Use this option if you want imcc's parser and lexer files to be generated.
275 Needs a working parser and lexer.
277 =item C<--miniparrot>
279 Build parrot assuming only pure ANSI C is available.
285 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
286 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
295 use Parrot
::BuildUtil
;
296 use Parrot
::Configure
;
297 use Parrot
::Configure
::Options
qw( process_options );
298 use Parrot
::Configure
::Options
::Test
;
299 use Parrot
::Configure
::Messages
qw(
303 use Parrot
::Configure
::Step
::List
qw( get_steps_list );
305 my $parrot_version = Parrot
::BuildUtil
::parrot_version
();
307 $| = 1; # $OUTPUT_AUTOFLUSH = 1;
309 # Install Option text was taken from:
311 # autoconf (GNU Autoconf) 2.59
312 # Written by David J. MacKenzie and Akim Demaille.
314 # Copyright (C) 2003 Free Software Foundation, Inc.
315 # This is free software; see the source for copying conditions. There is NO
316 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
318 # from Parrot::Configure::Options
319 my $args = process_options
( {
322 parrot_version
=> $parrot_version,
325 exit(1) unless defined $args;
327 my $opttest = Parrot
::Configure
::Options
::Test
->new($args);
328 # configuration tests will only be run if you requested them
329 # as command-line option
330 $opttest->run_configure_tests();
332 # from Parrot::Configure::Messages
333 print_introduction
($parrot_version) unless exists $args->{step
};
335 my $conf = Parrot
::Configure
->new;
337 # from Parrot::Configure::Step::List
338 $conf->add_steps(get_steps_list
());
340 # from Parrot::Configure::Data
341 $conf->options->set(%{$args});
343 if ( exists $args->{step
} ) {
344 # from Parrot::Configure::Data
345 $conf->data()->slurp();
346 $conf->data()->slurp_temp()
347 if $args->{step
} =~ /gen::makefiles/;
348 # from Parrot::Configure
349 $conf->run_single_step( $args->{step
} );
353 # Run the actual steps
354 # from Parrot::Configure
355 $conf->runsteps or exit(1);
358 # build tests will only be run if you requested them
359 # as command-line option
360 $opttest->run_build_tests();
362 # from Parrot::Configure::Messages
363 print_conclusion
($conf->data->get('make')) unless exists $args->{step
};
366 ################### DOCUMENTATION ###################
371 # cperl-indent-level: 4
374 # vim: expandtab shiftwidth=4: