3 # Copyright (C) 2001-2006, 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.
69 =item C<--debugging=0>
71 Debugging is turned on by default. Use this to disable it.
73 =item C<--parrot_is_shared>
75 Link parrot dynamically.
79 Create a 32-bit executable on 64-architectures like x86_64. This
80 option appends -m32 to compiler and linker programs and does
81 s/lib64/lib/g on link flags.
83 This option is experimental. See F<config/init/defaults.pm> for more.
87 Turn on profiled compile (gcc only for now)
91 [CAGE] compile includes many additional warnings
95 Add perl5's $Config{optimize} to the compiler flags.
97 =item C<--optimize=flags>
99 Add C<flags> to the compiler flags.
103 Tell Configure that the compiler supports C<inline>.
105 =item C<--cc=(compiler)>
107 Specify which compiler to use.
109 =item C<--ccflags=(flags)>
111 Use the given compiler flags.
113 =item C<--ccwarn=(flags)>
115 Use the given compiler warning flags.
117 =item C<--cxx=(compiler)>
119 Specify which C++ compiler to use (for ICU).
121 =item C<--libs=(libs)>
123 Use the given libraries.
125 =item C<--link=(linker)>
127 Specify which linker to use.
129 =item C<--linkflags=(flags)>
131 Use the given linker flags
133 =item C<--ld=(linker)>
135 Specify which loader to use for shared libraries.
137 =item C<--ldflags=(flags)>
139 Use the given loader flags for shared libraries
141 =item C<--lex=(lexer)>
143 Specify which lexer to use.
145 =item C<--yacc=(parser)>
147 Specify which parser to use.
149 =item C<--define=val1[,val2]>
151 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
152 needed to use inet_aton for systems that lack inet_pton:
162 =item C<--intval=(type)>
164 Use the given type for C<INTVAL>.
166 =item C<--floatval=(type)>
168 Use the given type for C<FLOATVAL>.
170 =item C<--opcode=(type)>
172 Use the given type for opcodes.
174 =item C<--ops=(files)>
176 Use the given ops files.
178 =item C<--pmc=(files)>
180 Use the given PMC files.
184 Don't build cgoto core. This is recommended when you are short of memory.
186 =item C<--jitcapable>
190 =item C<--execcapable>
192 Use JIT to emit a native executable.
196 Determine the type of garbage collection. The value for C<type> should be one
197 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
201 International Components For Unicode (ICU) Options
205 =item C<--icu-config=/path/to/icu-config>
207 Use the specified icu-config script to determine the necessary ICU options.
209 Use --icu-config=none to disable the autodetect feature. Parrot will then be
212 B<Note:> If you specify another ICU option than --icu-config, the autodetection
213 functionality will be disabled.
215 =item C<--icushared=(linkeroption)>
217 Linker command to link against ICU library.
221 --icushared='-L /opt/openoffice/program -licudata -licuuc'
223 (The libs in openoffice are actually version 2.2 and do not work)
225 =item C<--icuheaders=(header_dir)>
227 Location of ICU header files without the /unicode suffix.
231 --icuheaders='/home/lt/icu/'
239 =item C<--maintainer>
241 Use this option if you want imcc's parser and lexer files to be generated.
242 Needs a working parser and lexer.
244 =item C<--miniparrot>
246 Build parrot assuming only pure ANSI C is available.
252 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
253 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
261 $Data::Dumper
::Indent
= 1;
264 use Parrot
::BuildUtil
;
265 use Parrot
::Configure
;
266 use Parrot
::Configure
::Options
qw( process_options );
267 use Parrot
::Configure
::Messages
qw(
271 use Parrot
::Configure
::Step
::List
qw( get_steps_list );
273 my $parrot_version = Parrot
::BuildUtil
::parrot_version
();
275 $| = 1; # $OUTPUT_AUTOFLUSH = 1;
277 # Install Option text was taken from:
279 # autoconf (GNU Autoconf) 2.59
280 # Written by David J. MacKenzie and Akim Demaille.
282 # Copyright (C) 2003 Free Software Foundation, Inc.
283 # This is free software; see the source for copying conditions. There is NO
284 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
286 # from Parrot::Configure::Options
287 my $args = process_options
( {
290 parrot_version
=> $parrot_version,
293 exit unless defined $args;
297 # from Parrot::Configure::Messages
298 print_introduction
($parrot_version);
300 my $conf = Parrot
::Configure
->new;
302 # from Parrot::Configure::Step::List
303 $conf->add_steps(get_steps_list
());
305 # from Parrot::Configure::Data
306 $conf->options->set(%args);
308 if ( exists $args{step
} ) {
309 # from Parrot::Configure::Data
310 $conf->data()->slurp();
311 # from Parrot::Configure
312 $conf->runstep( $args{step
} );
316 # Run the actual steps
317 # from Parrot::Configure
318 $conf->runsteps or exit(1);
321 # tell users what to do next
322 # from Parrot::Configure::Messages
323 print_conclusion
($conf->data->get('make'));
327 ################### DOCUMENTATION ###################
332 # cperl-indent-level: 4
335 # vim: expandtab shiftwidth=4: