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.
47 =item C<--nomanicheck>
49 Tells Configure.pl not to run the MANIFEST check.
53 Sets the location where parrot will be installed.
57 execute a single configure step
61 This turns on the user prompts.
65 Run certain tests along with F<Configure.pl>:
69 =item C<--test=configure>
71 Run tests found in F<t/configure/> I<before> beginning configuration. These
72 tests demonstrate that Parrot's configuration tools will work properly once
73 configuration has begun.
77 Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
78 F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
79 completed. These tests demonstrate (a) that certain of Parrot's configuration
80 tools are working properly post-configuration; and (b) that certain of
81 Parrot's build tools will work properly once you call F<make>.
85 Run the tests described in C<--test=configure>, conduct configuration, then
86 run the tests described in C<--test=build>.
96 =item C<--debugging=0>
98 Debugging is turned on by default. Use this to disable it.
100 =item C<--parrot_is_shared>
102 Link parrot dynamically.
106 Create a 32-bit executable on 64-architectures like x86_64. This
107 option appends -m32 to compiler and linker programs and does
108 s/lib64/lib/g on link flags.
110 This option is experimental. See F<config/init/defaults.pm> for more.
114 Turn on profiled compile (gcc only for now)
118 [CAGE] compile includes many additional warnings
122 Add perl5's $Config{optimize} to the compiler flags.
124 =item C<--optimize=flags>
126 Add C<flags> to the compiler flags.
130 Tell Configure that the compiler supports C<inline>.
132 =item C<--cc=(compiler)>
134 Specify which compiler to use.
136 =item C<--ccflags=(flags)>
138 Use the given compiler flags.
140 =item C<--ccwarn=(flags)>
142 Use the given compiler warning flags.
144 =item C<--cxx=(compiler)>
146 Specify which C++ compiler to use (for ICU).
148 =item C<--libs=(libs)>
150 Use the given libraries.
152 =item C<--link=(linker)>
154 Specify which linker to use.
156 =item C<--linkflags=(flags)>
158 Use the given linker flags
160 =item C<--ld=(linker)>
162 Specify which loader to use for shared libraries.
164 =item C<--ldflags=(flags)>
166 Use the given loader flags for shared libraries
168 =item C<--lex=(lexer)>
170 Specify which lexer to use.
172 =item C<--yacc=(parser)>
174 Specify which parser to use.
176 =item C<--define=val1[,val2]>
178 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
179 needed to use inet_aton for systems that lack inet_pton:
189 =item C<--intval=(type)>
191 Use the given type for C<INTVAL>.
193 =item C<--floatval=(type)>
195 Use the given type for C<FLOATVAL>.
197 =item C<--opcode=(type)>
199 Use the given type for opcodes.
201 =item C<--ops=(files)>
203 Use the given ops files.
205 =item C<--pmc=(files)>
207 Use the given PMC files.
211 Don't build cgoto core. This is recommended when you are short of memory.
213 =item C<--jitcapable>
217 =item C<--execcapable>
219 Use JIT to emit a native executable.
223 Determine the type of garbage collection. The value for C<type> should be one
224 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
228 International Components For Unicode (ICU) Options
232 =item C<--icu-config=/path/to/icu-config>
234 Use the specified icu-config script to determine the necessary ICU options.
236 Use --icu-config=none to disable the autodetect feature. Parrot will then be
239 B<Note:> If you specify another ICU option than --icu-config, the autodetection
240 functionality will be disabled.
242 =item C<--icushared=(linkeroption)>
244 Linker command to link against ICU library.
248 --icushared='-L /opt/openoffice/program -licudata -licuuc'
250 (The libs in openoffice are actually version 2.2 and do not work)
252 =item C<--icuheaders=(header_dir)>
254 Location of ICU header files without the /unicode suffix.
258 --icuheaders='/home/lt/icu/'
266 =item C<--maintainer>
268 Use this option if you want imcc's parser and lexer files to be generated.
269 Needs a working parser and lexer.
271 =item C<--miniparrot>
273 Build parrot assuming only pure ANSI C is available.
279 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
280 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
288 $Data::Dumper
::Indent
= 1;
291 use Parrot
::BuildUtil
;
292 use Parrot
::Configure
;
293 use Parrot
::Configure
::Options
qw( process_options );
294 use Parrot
::Configure
::Options
::Test
;
295 use Parrot
::Configure
::Messages
qw(
299 use Parrot
::Configure
::Step
::List
qw( get_steps_list );
301 my $parrot_version = Parrot
::BuildUtil
::parrot_version
();
303 $| = 1; # $OUTPUT_AUTOFLUSH = 1;
305 # Install Option text was taken from:
307 # autoconf (GNU Autoconf) 2.59
308 # Written by David J. MacKenzie and Akim Demaille.
310 # Copyright (C) 2003 Free Software Foundation, Inc.
311 # This is free software; see the source for copying conditions. There is NO
312 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
314 # from Parrot::Configure::Options
315 my $args = process_options
( {
318 parrot_version
=> $parrot_version,
321 exit unless defined $args;
323 my $opttest = Parrot
::Configure
::Options
::Test
->new($args);
324 # configuration tests will only be run if you requested them
325 # as command-line option
326 $opttest->run_configure_tests();
328 # from Parrot::Configure::Messages
329 print_introduction
($parrot_version);
331 my $conf = Parrot
::Configure
->new;
333 # from Parrot::Configure::Step::List
334 $conf->add_steps(get_steps_list
());
337 # from Parrot::Configure::Data
338 $conf->options->set(%args);
340 if ( exists $args{step
} ) {
341 # from Parrot::Configure::Data
342 $conf->data()->slurp();
343 # from Parrot::Configure
344 $conf->runstep( $args{step
} );
348 # Run the actual steps
349 # from Parrot::Configure
350 $conf->runsteps or exit(1);
353 # build tests will only be run if you requested them
354 # as command-line option
355 $opttest->run_build_tests();
357 # from Parrot::Configure::Messages
358 print_conclusion
($conf->data->get('make'));
362 ################### DOCUMENTATION ###################
367 # cperl-indent-level: 4
370 # vim: expandtab shiftwidth=4: