3 # Copyright (C) 2001-2008, The Perl Foundation.
11 use Parrot
::Configure
;
12 use Parrot
::Configure
::Options
qw( process_options );
13 use Parrot
::Configure
::Options
::Test
;
14 use Parrot
::Configure
::Messages
qw(
18 use Parrot
::Configure
::Step
::List
qw( get_steps_list );
20 $| = 1; # $OUTPUT_AUTOFLUSH = 1;
22 # Install Option text was taken from:
24 # autoconf (GNU Autoconf) 2.59
25 # Written by David J. MacKenzie and Akim Demaille.
27 # Copyright (C) 2003 Free Software Foundation, Inc.
28 # This is free software; see the source for copying conditions. There is NO
29 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31 # from Parrot::Configure::Options
32 my $args = process_options
(
38 exit(1) unless defined $args;
40 my $opttest = Parrot
::Configure
::Options
::Test
->new($args);
42 # configuration tests will only be run if you requested them
43 # as command-line option
44 $opttest->run_configure_tests();
46 my $parrot_version = $Parrot::Configure
::Options
::Conf
::parrot_version
;
48 # from Parrot::Configure::Messages
49 print_introduction
($parrot_version);
51 my $conf = Parrot
::Configure
->new();
53 # from Parrot::Configure::Step::List
54 $conf->add_steps( get_steps_list
() );
56 # from Parrot::Configure::Data
57 $conf->options->set( %{$args} );
59 # Run the actual steps
60 # from Parrot::Configure
61 $conf->{active_configuration
} = 1;
62 $conf->runsteps or exit(1);
64 # build tests will only be run if you requested them
65 # as command-line option
66 $opttest->run_build_tests();
68 my $make = $conf->data->get('make');
69 # from Parrot::Configure::Messages
70 ( print_conclusion
( $conf, $make ) ) ?
exit 0 : exit 1;
72 ################### DOCUMENTATION ###################
76 Configure.pl - Parrot's Configuration Script
80 % perl Configure.pl [options]
84 This is Parrot's configuration program. It should be run to create
85 the necessary system-specific files before building Parrot.
87 =head2 Command-line Options
95 Prints out a description of the options and exits.
99 Prints out the version number of Configure.pl and exits.
103 Tells Configure.pl to output extra information about the configuration data it
108 Tells Configure.pl to output information about i<every> setting added or
111 =item C<--verbose-step={N|regex}>
113 Run C<--verbose=2> for step number C<N> or matching description.
117 Tells Configure.pl to halt completely if any configuration step fails.
119 =item C<--fatal-step={init::alpha,inter::beta,auto::gamma}>
121 Tells Configure.pl to halt completely if any configuration step in
122 comma-delimited string individually fails.
124 =item C<--nomanicheck>
126 Tells Configure.pl not to run the MANIFEST check.
130 Sets the location where parrot will be installed.
132 =item C<--languages="list of languages">
134 Specify a list of languages to process (space separated.)
135 Used in combination with C<--step=gen::languages> to regenerate makefiles.
139 This turns on the user prompts.
143 Run certain tests along with F<Configure.pl>:
147 =item C<--test=configure>
149 Run tests found in F<t/configure/> I<before> beginning configuration. These
150 tests demonstrate that Parrot's configuration tools will work properly once
151 configuration has begun.
153 =item C<--test=build>
155 Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
156 F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
157 completed. These tests demonstrate (a) that certain of Parrot's configuration
158 tools are working properly post-configuration; and (b) that certain of
159 Parrot's build tools will work properly once you call F<make>.
163 Run the tests described in C<--test=configure>, conduct configuration, then
164 run the tests described in C<--test=build>.
174 =item C<--debugging=0>
176 Debugging is turned on by default. Use this to disable it.
178 =item C<--parrot_is_shared>
180 Link parrot dynamically.
184 Create a 32-bit executable on 64-architectures like x86_64. This
185 option appends -m32 to compiler and linker programs and does
186 s/lib64/lib/g on link flags.
188 This option is experimental. See F<config/init/defaults.pm> for more.
192 Turn on profiled compile (gcc only for now)
196 [CAGE] compile includes many additional warnings
200 Add perl5's $Config{optimize} to the compiler flags.
202 =item C<--optimize=flags>
204 Add C<flags> to the compiler flags.
208 Tell Configure that the compiler supports C<inline>.
210 =item C<--cc=(compiler)>
212 Specify which compiler to use.
214 =item C<--ccflags=(flags)>
216 Use the given compiler flags.
218 =item C<--ccwarn=(flags)>
220 Use the given compiler warning flags.
222 =item C<--cxx=(compiler)>
224 Specify which C++ compiler to use (for ICU).
226 =item C<--libs=(libs)>
228 Use the given libraries.
230 =item C<--link=(linker)>
232 Specify which linker to use.
234 =item C<--linkflags=(flags)>
236 Use the given linker flags
238 =item C<--ld=(linker)>
240 Specify which loader to use for shared libraries.
242 =item C<--ldflags=(flags)>
244 Use the given loader flags for shared libraries
246 =item C<--lex=(lexer)>
248 Specify which lexer to use.
250 =item C<--yacc=(parser)>
252 Specify which parser to use.
254 =item C<--define=val1[,val2]>
256 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
257 needed to use inet_aton for systems that lack inet_pton:
267 =item C<--intval=(type)>
269 Use the given type for C<INTVAL>.
271 =item C<--floatval=(type)>
273 Use the given type for C<FLOATVAL>.
275 =item C<--opcode=(type)>
277 Use the given type for opcodes.
279 =item C<--ops=(files)>
281 Use the given ops files.
283 =item C<--pmc=(files)>
285 Use the given PMC files.
289 Don't build cgoto core. This is recommended when you are short of memory.
291 =item C<--jitcapable>
295 =item C<--execcapable>
297 Use JIT to emit a native executable.
301 Determine the type of garbage collection. The value for C<type> should be one
302 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
306 International Components For Unicode (ICU) Options
310 =item C<--icu-config=/path/to/icu-config>
312 Use the specified icu-config script to determine the necessary ICU options.
314 Use --icu-config=none to disable the autodetect feature. Parrot will then be
317 B<Note:> If you specify another ICU option than --icu-config, the autodetection
318 functionality will be disabled.
320 =item C<--icushared=(linkeroption)>
322 Linker command to link against ICU library.
326 --icushared='-L /opt/openoffice/program -licudata -licuuc'
328 (The libs in openoffice are actually version 2.2 and do not work)
330 =item C<--icuheaders=(header_dir)>
332 Location of ICU header files without the /unicode suffix.
336 --icuheaders='/home/lt/icu/'
344 =item C<--maintainer>
346 Use this option if you want imcc's parser and lexer files to be generated.
347 Needs a working parser and lexer.
349 =item C<--miniparrot>
351 Build parrot assuming only pure ANSI C is available.
357 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
358 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
364 # cperl-indent-level: 4
367 # vim: expandtab shiftwidth=4: