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->runsteps or exit(1);
63 # build tests will only be run if you requested them
64 # as command-line option
65 $opttest->run_build_tests();
67 my $make = $conf->data->get('make');
68 # from Parrot::Configure::Messages
69 ( print_conclusion
( $conf, $make ) ) ?
exit 0 : exit 1;
71 ################### DOCUMENTATION ###################
75 Configure.pl - Parrot's Configuration Script
79 % perl Configure.pl [options]
83 This is Parrot's configuration program. It should be run to create
84 the necessary system-specific files before building Parrot.
86 =head2 Command-line Options
94 Prints out a description of the options and exits.
98 Prints out the version number of Configure.pl and exits.
102 Tells Configure.pl to output extra information about the configuration data it
107 Tells Configure.pl to output information about i<every> setting added or
110 =item C<--verbose-step={N|regex}>
112 Run C<--verbose=2> for step number C<N> or matching description.
116 Tells Configure.pl to halt completely if any configuration step fails.
118 =item C<--fatal-step={init::alpha,inter::beta,auto::gamma}>
120 Tells Configure.pl to halt completely if any configuration step in
121 comma-delimited string individually fails.
123 =item C<--nomanicheck>
125 Tells Configure.pl not to run the MANIFEST check.
129 Sets the location where parrot will be installed.
131 =item C<--languages="list of languages">
133 Specify a list of languages to process (space separated.)
134 Used in combination with C<--step=gen::languages> to regenerate makefiles.
138 This turns on the user prompts.
142 Run certain tests along with F<Configure.pl>:
146 =item C<--test=configure>
148 Run tests found in F<t/configure/> I<before> beginning configuration. These
149 tests demonstrate that Parrot's configuration tools will work properly once
150 configuration has begun.
152 =item C<--test=build>
154 Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
155 F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
156 completed. These tests demonstrate (a) that certain of Parrot's configuration
157 tools are working properly post-configuration; and (b) that certain of
158 Parrot's build tools will work properly once you call F<make>.
162 Run the tests described in C<--test=configure>, conduct configuration, then
163 run the tests described in C<--test=build>.
173 =item C<--debugging=0>
175 Debugging is turned on by default. Use this to disable it.
177 =item C<--parrot_is_shared>
179 Link parrot dynamically.
183 Create a 32-bit executable on 64-architectures like x86_64. This
184 option appends -m32 to compiler and linker programs and does
185 s/lib64/lib/g on link flags.
187 This option is experimental. See F<config/init/defaults.pm> for more.
191 Turn on profiled compile (gcc only for now)
195 [CAGE] compile includes many additional warnings
199 Add perl5's $Config{optimize} to the compiler flags.
201 =item C<--optimize=flags>
203 Add C<flags> to the compiler flags.
207 Tell Configure that the compiler supports C<inline>.
209 =item C<--cc=(compiler)>
211 Specify which compiler to use.
213 =item C<--ccflags=(flags)>
215 Use the given compiler flags.
217 =item C<--ccwarn=(flags)>
219 Use the given compiler warning flags.
221 =item C<--cxx=(compiler)>
223 Specify which C++ compiler to use (for ICU).
225 =item C<--libs=(libs)>
227 Use the given libraries.
229 =item C<--link=(linker)>
231 Specify which linker to use.
233 =item C<--linkflags=(flags)>
235 Use the given linker flags
237 =item C<--ld=(linker)>
239 Specify which loader to use for shared libraries.
241 =item C<--ldflags=(flags)>
243 Use the given loader flags for shared libraries
245 =item C<--lex=(lexer)>
247 Specify which lexer to use.
249 =item C<--yacc=(parser)>
251 Specify which parser to use.
253 =item C<--define=val1[,val2]>
255 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
256 needed to use inet_aton for systems that lack inet_pton:
266 =item C<--intval=(type)>
268 Use the given type for C<INTVAL>.
270 =item C<--floatval=(type)>
272 Use the given type for C<FLOATVAL>.
274 =item C<--opcode=(type)>
276 Use the given type for opcodes.
278 =item C<--ops=(files)>
280 Use the given ops files.
282 =item C<--pmc=(files)>
284 Use the given PMC files.
288 Don't build cgoto core. This is recommended when you are short of memory.
290 =item C<--jitcapable>
294 =item C<--execcapable>
296 Use JIT to emit a native executable.
300 Determine the type of garbage collection. The value for C<type> should be one
301 of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
305 International Components For Unicode (ICU) Options
309 =item C<--icu-config=/path/to/icu-config>
311 Use the specified icu-config script to determine the necessary ICU options.
313 Use --icu-config=none to disable the autodetect feature. Parrot will then be
316 B<Note:> If you specify another ICU option than --icu-config, the autodetection
317 functionality will be disabled.
319 =item C<--icushared=(linkeroption)>
321 Linker command to link against ICU library.
325 --icushared='-L /opt/openoffice/program -licudata -licuuc'
327 (The libs in openoffice are actually version 2.2 and do not work)
329 =item C<--icuheaders=(header_dir)>
331 Location of ICU header files without the /unicode suffix.
335 --icuheaders='/home/lt/icu/'
343 =item C<--maintainer>
345 Use this option if you want imcc's parser and lexer files to be generated.
346 Needs a working parser and lexer.
348 =item C<--miniparrot>
350 Build parrot assuming only pure ANSI C is available.
356 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
357 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
363 # cperl-indent-level: 4
366 # vim: expandtab shiftwidth=4: