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.
59 =item C<--languages="list of languages">
61 Specify a list of languages to process (space separated.)
62 Used in combination with C<--step=gen::languages> to regenerate makefiles.
66 This turns on the user prompts.
70 Run certain tests along with F<Configure.pl>:
74 =item C<--test=configure>
76 Run tests found in F<t/configure/> I<before> beginning configuration. These
77 tests demonstrate that Parrot's configuration tools will work properly once
78 configuration has begun.
82 Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
83 F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
84 completed. These tests demonstrate (a) that certain of Parrot's configuration
85 tools are working properly post-configuration; and (b) that certain of
86 Parrot's build tools will work properly once you call F<make>.
90 Run the tests described in C<--test=configure>, conduct configuration, then
91 run the tests described in C<--test=build>.
101 =item C<--debugging=0>
103 Debugging is turned on by default. Use this to disable it.
105 =item C<--parrot_is_shared>
107 Link parrot dynamically.
111 Create a 32-bit executable on 64-architectures like x86_64. This
112 option appends -m32 to compiler and linker programs and does
113 s/lib64/lib/g on link flags.
115 This option is experimental. See F<config/init/defaults.pm> for more.
119 Turn on profiled compile (gcc only for now)
123 [CAGE] compile includes many additional warnings
127 Add perl5's $Config{optimize} to the compiler flags.
129 =item C<--optimize=flags>
131 Add C<flags> to the compiler flags.
135 Tell Configure that the compiler supports C<inline>.
137 =item C<--cc=(compiler)>
139 Specify which compiler to use.
141 =item C<--ccflags=(flags)>
143 Use the given compiler flags.
145 =item C<--ccwarn=(flags)>
147 Use the given compiler warning flags.
149 =item C<--cxx=(compiler)>
151 Specify which C++ compiler to use (for ICU).
153 =item C<--libs=(libs)>
155 Use the given libraries.
157 =item C<--link=(linker)>
159 Specify which linker to use.
161 =item C<--linkflags=(flags)>
163 Use the given linker flags
165 =item C<--ld=(linker)>
167 Specify which loader to use for shared libraries.
169 =item C<--ldflags=(flags)>
171 Use the given loader flags for shared libraries
173 =item C<--lex=(lexer)>
175 Specify which lexer to use.
177 =item C<--yacc=(parser)>
179 Specify which parser to use.
181 =item C<--define=val1[,val2]>
183 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
184 needed to use inet_aton for systems that lack inet_pton:
194 =item C<--intval=(type)>
196 Use the given type for C<INTVAL>.
198 =item C<--floatval=(type)>
200 Use the given type for C<FLOATVAL>.
202 =item C<--opcode=(type)>
204 Use the given type for opcodes.
206 =item C<--ops=(files)>
208 Use the given ops files.
210 =item C<--pmc=(files)>
212 Use the given PMC files.
216 Don't build cgoto core. This is recommended when you are short of memory.
218 =item C<--jitcapable>
222 =item C<--execcapable>
224 Use JIT to emit a native executable.
228 Determine the type of garbage collection. The value for C<type> should be one
229 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
233 International Components For Unicode (ICU) Options
237 =item C<--icu-config=/path/to/icu-config>
239 Use the specified icu-config script to determine the necessary ICU options.
241 Use --icu-config=none to disable the autodetect feature. Parrot will then be
244 B<Note:> If you specify another ICU option than --icu-config, the autodetection
245 functionality will be disabled.
247 =item C<--icushared=(linkeroption)>
249 Linker command to link against ICU library.
253 --icushared='-L /opt/openoffice/program -licudata -licuuc'
255 (The libs in openoffice are actually version 2.2 and do not work)
257 =item C<--icuheaders=(header_dir)>
259 Location of ICU header files without the /unicode suffix.
263 --icuheaders='/home/lt/icu/'
271 =item C<--maintainer>
273 Use this option if you want imcc's parser and lexer files to be generated.
274 Needs a working parser and lexer.
276 =item C<--miniparrot>
278 Build parrot assuming only pure ANSI C is available.
284 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
285 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
293 $Data::Dumper
::Indent
= 1;
296 use Parrot
::BuildUtil
;
297 use Parrot
::Configure
;
298 use Parrot
::Configure
::Options
qw( process_options );
299 use Parrot
::Configure
::Options
::Test
;
300 use Parrot
::Configure
::Messages
qw(
304 use Parrot
::Configure
::Step
::List
qw( get_steps_list );
306 my $parrot_version = Parrot
::BuildUtil
::parrot_version
();
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
( {
323 parrot_version
=> $parrot_version,
326 exit unless defined $args;
329 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 # from Parrot::Configure::Messages
335 print_introduction
($parrot_version) unless exists $args{step
};
337 my $conf = Parrot
::Configure
->new;
339 # from Parrot::Configure::Step::List
340 $conf->add_steps(get_steps_list
());
342 # from Parrot::Configure::Data
343 $conf->options->set(%args);
345 if ( exists $args{step
} ) {
346 # from Parrot::Configure::Data
347 $conf->data()->slurp();
348 $conf->data()->slurp_temp()
349 if $args{step
} =~ /gen::makefiles/;
350 # from Parrot::Configure
351 $conf->runstep( $args{step
} );
355 # Run the actual steps
356 # from Parrot::Configure
357 $conf->runsteps or exit(1);
360 # build tests will only be run if you requested them
361 # as command-line option
362 $opttest->run_build_tests();
364 # from Parrot::Configure::Messages
365 print_conclusion
($conf->data->get('make')) unless exists $args{step
};
369 ################### DOCUMENTATION ###################
374 # cperl-indent-level: 4
377 # vim: expandtab shiftwidth=4: