* src/pmc/bigint.pmc:
[parrot.git] / Configure.pl
blob97e678c98f208b5aa89435ea3e3265face64b604
1 #! perl
3 # Copyright (C) 2001-2006, The Perl Foundation.
4 # $Id$
6 =head1 NAME
8 Configure.pl - Parrot's Configuration Script
10 =head1 SYNOPSIS
12 % perl Configure.pl [options]
14 =head1 DESCRIPTION
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
21 General Options
23 =over
25 =item C<--help>
27 Prints out a description of the options and exits.
29 =item C<--version>
31 Prints out the version number of Configure.pl and exits.
33 =item C<--verbose>
35 Tells Configure.pl to output extra information about the configuration data it
36 is setting.
38 =item C<--verbose=2>
40 Tells Configure.pl to output information about i<every> setting added or
41 changed.
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.
51 =item C<--prefix>
53 Sets the location where parrot will be installed.
55 =item C<--step==>
57 execute a single configure step
59 =item C<--ask>
61 This turns on the user prompts.
63 =back
65 Compile Options
67 =over
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.
77 =item C<--m=32>
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.
85 =item C<--profile>
87 Turn on profiled compile (gcc only for now)
89 =item C<--cage>
91 [CAGE] compile includes many additional warnings
93 =item C<--optimize>
95 Add perl5's $Config{optimize} to the compiler flags.
97 =item C<--optimize=flags>
99 Add C<flags> to the compiler flags.
101 =item C<--inline>
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:
154 --define=inet_aton
156 =back
158 Parrot Options
160 =over
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.
182 =item C<--cgoto=0>
184 Don't build cgoto core. This is recommended when you are short of memory.
186 =item C<--jitcapable>
188 Use JIT system.
190 =item C<--execcapable>
192 Use JIT to emit a native executable.
194 =item C<--gc=(type)>
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>.
199 =back
201 International Components For Unicode (ICU) Options
203 =over
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
210 build without ICU.
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.
219 E.g.
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.
229 E.g.
231 --icuheaders='/home/lt/icu/'
233 =back
235 Other Options
237 =over
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.
248 =back
250 =head1 SEE ALSO
252 F<config/init/data.pl>, F<lib/Parrot/Configure/RunSteps.pm>,
253 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
255 =cut
257 use 5.006_001;
258 use strict;
259 use warnings;
260 use Data::Dumper;
261 $Data::Dumper::Indent = 1;
262 use lib 'lib';
264 use Parrot::BuildUtil;
265 use Parrot::Configure;
266 use Parrot::Configure::Options qw( process_options );
267 use Parrot::Configure::Messages qw(
268 print_introduction
269 print_conclusion
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( {
288 argv => [ @ARGV ],
289 script => $0,
290 parrot_version => $parrot_version,
291 svnid => '$Id$',
292 } );
293 exit unless defined $args;
295 my %args = %$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} );
313 print "\n";
315 else {
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'));
325 exit(0);
327 ################### DOCUMENTATION ###################
330 # Local Variables:
331 # mode: cperl
332 # cperl-indent-level: 4
333 # fill-column: 100
334 # End:
335 # vim: expandtab shiftwidth=4: