Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
373 lines (219 sloc) 7.59 KB
#! perl
# Copyright (C) 2001-2008, The Perl Foundation.
# $Id$
use 5.008;
use strict;
use warnings;
use lib 'lib';
use Parrot::Configure;
use Parrot::Configure::Options qw( process_options );
use Parrot::Configure::Options::Test;
use Parrot::Configure::Options::Test::Prepare qw(
use Parrot::Configure::Messages qw(
use Parrot::Configure::Step::List qw( get_steps_list );
$| = 1; # $OUTPUT_AUTOFLUSH = 1;
# Install Option text was taken from:
# autoconf (GNU Autoconf) 2.59
# Written by David J. MacKenzie and Akim Demaille.
# Copyright (C) 2003 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# from Parrot::Configure::Options
my $args = process_options(
mode => 'configure',
argv => [@ARGV],
exit(1) unless defined $args;
my $opttest = Parrot::Configure::Options::Test->new($args);
# configuration tests will only be run if you requested them
# as command-line option
$opttest->run_configure_tests( get_preconfiguration_tests() );
my $parrot_version = $Parrot::Configure::Options::Conf::parrot_version;
# from Parrot::Configure::Messages
my $conf = Parrot::Configure->new();
# from Parrot::Configure::Step::List
$conf->add_steps( get_steps_list() );
# from Parrot::Configure::Data
$conf->options->set( %{$args} );
# Run the actual steps
# from Parrot::Configure
$conf->{active_configuration} = 1;
$conf->runsteps or exit(1);
# build tests will only be run if you requested them
# as command-line option
$opttest->run_build_tests( get_postconfiguration_tests() );
my $make = $conf->data->get('make');
# from Parrot::Configure::Messages
( print_conclusion( $conf, $make ) ) ? exit 0 : exit 1;
################### DOCUMENTATION ###################
=head1 NAME - Parrot's Configuration Script
% perl [options]
This is Parrot's configuration program. It should be run to create
the necessary system-specific files before building Parrot.
=head2 Command-line Options
General Options
=item C<--help>
Prints out a description of the options and exits.
=item C<--version>
Prints out the version number of and exits.
=item C<--verbose>
Tells to output extra information about the configuration data it
is setting.
=item C<--verbose=2>
Tells to output information about i<every> setting added or
=item C<--verbose-step={N|regex}>
Run C<--verbose=2> for step number C<N> or matching description.
=item C<--fatal>
Tells to halt completely if any configuration step fails.
=item C<--fatal-step={init::alpha,inter::beta,auto::gamma}>
Tells to halt completely if any configuration step in
comma-delimited string individually fails.
=item C<--nomanicheck>
Tells not to run the MANIFEST check.
=item C<--prefix>
Sets the location where parrot will be installed.
=item C<--languages="list of languages">
Specify a list of languages to process (space separated.)
Used in combination with C<--step=gen::languages> to regenerate makefiles.
=item C<--ask>
This turns on the user prompts.
=item C<--test>
Run certain tests along with F<>:
=over 4
=item C<--test=configure>
Run tests found in F<t/configure/> I<before> beginning configuration. These
tests demonstrate that Parrot's configuration tools will work properly once
configuration has begun.
=item C<--test=build>
Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
F<t/tools/ops2cutils/> and F<t/tools/ops2pmutils/> I<after> configuration has
completed. These tests demonstrate (a) that certain of Parrot's configuration
tools are working properly post-configuration; and (b) that certain of
Parrot's build tools will work properly once you call F<make>.
=item C<--test>
Run the tests described in C<--test=configure>, conduct configuration, then
run the tests described in C<--test=build>.
Compile Options
=item C<--debugging=0>
Debugging is turned on by default. Use this to disable it.
=item C<--parrot_is_shared>
Link parrot dynamically.
=item C<--m=32>
Create a 32-bit executable on 64-architectures like x86_64. This
option appends -m32 to compiler and linker programs and does
s/lib64/lib/g on link flags.
This option is experimental. See F<config/init/> for more.
=item C<--profile>
Turn on profiled compile (gcc only for now)
=item C<--cage>
[CAGE] compile includes many additional warnings
=item C<--optimize>
Add perl5's $Config{optimize} to the compiler flags.
=item C<--optimize=flags>
Add C<flags> to the compiler flags.
=item C<--inline>
Tell Configure that the compiler supports C<inline>.
=item C<--cc=(compiler)>
Specify which compiler to use.
=item C<--ccflags=(flags)>
Use the given compiler flags.
=item C<--ccwarn=(flags)>
Use the given compiler warning flags.
=item C<--cxx=(compiler)>
Specify which C++ compiler to use (for ICU).
=item C<--libs=(libs)>
Use the given libraries.
=item C<--link=(linker)>
Specify which linker to use.
=item C<--linkflags=(flags)>
Use the given linker flags
=item C<--ld=(linker)>
Specify which loader to use for shared libraries.
=item C<--ldflags=(flags)>
Use the given loader flags for shared libraries
=item C<--lex=(lexer)>
Specify which lexer to use.
=item C<--yacc=(parser)>
Specify which parser to use.
=item C<--define=val1[,val2]>
Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
needed to use inet_aton for systems that lack inet_pton:
Parrot Options
=item C<--intval=(type)>
Use the given type for C<INTVAL>.
=item C<--floatval=(type)>
Use the given type for C<FLOATVAL>.
=item C<--opcode=(type)>
Use the given type for opcodes.
=item C<--ops=(files)>
Use the given ops files.
=item C<--pmc=(files)>
Use the given PMC files.
=item C<--cgoto=0>
Don't build cgoto core. This is recommended when you are short of memory.
=item C<--jitcapable>
Use JIT system.
=item C<--execcapable>
Use JIT to emit a native executable.
=item C<--gc=(type)>
Determine the type of garbage collection. The value for C<type> should be one
of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is C<gc>.
International Components For Unicode (ICU) Options
=item C<--icu-config=/path/to/icu-config>
Use the specified icu-config script to determine the necessary ICU options.
Use --icu-config=none to disable the autodetect feature. Parrot will then be
build without ICU.
B<Note:> If you specify another ICU option than --icu-config, the autodetection
functionality will be disabled.
=item C<--icushared=(linkeroption)>
Linker command to link against ICU library.
--icushared='-L /opt/openoffice/program -licudata -licuuc'
(The libs in openoffice are actually version 2.2 and do not work)
=item C<--icuheaders=(header_dir)>
Location of ICU header files without the /unicode suffix.
Other Options
=item C<--maintainer>
Use this option if you want imcc's parser and lexer files to be generated.
Needs a working parser and lexer.
=item C<--miniparrot>
Build parrot assuming only pure ANSI C is available.
=head1 SEE ALSO
F<config/init/>, F<lib/Parrot/Configure/>,
F<lib/Parrot/Configure/>, F<docs/configuration.pod>
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
Jump to Line
Something went wrong with that request. Please try again.