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 This turns on the user prompts.
65 =item C<--debugging=0>
67 Debugging is turned on by default. Use this to disable it.
69 =item C<--parrot_is_shared>
71 Link parrot dynamically.
75 Create a 32-bit executable on 64-architectures like x86_64. This
76 option appends -m32 to compiler and linker programs and does
77 s/lib64/lib/g on link flags.
79 This option is experimental. See F<config/init/defaults.pm> for more.
83 Turn on profiled compile (gcc only for now)
87 Add perl5's $Config{optimize} to the compiler flags.
89 =item C<--optimize=flags>
91 Add C<flags> to the compiler flags.
95 Tell Configure that the compiler supports C<inline>.
97 =item C<--cc=(compiler)>
99 Specify which compiler to use.
101 =item C<--ccflags=(flags)>
103 Use the given compiler flags.
105 =item C<--ccwarn=(flags)>
107 Use the given compiler warning flags.
109 =item C<--cxx=(compiler)>
111 Specify which C++ compiler to use (for ICU).
113 =item C<--libs=(libs)>
115 Use the given libraries.
117 =item C<--link=(linker)>
119 Specify which linker to use.
121 =item C<--linkflags=(flags)>
123 Use the given linker flags
125 =item C<--ld=(linker)>
127 Specify which loader to use for shared libraries.
129 =item C<--ldflags=(flags)>
131 Use the given loader flags for shared libraries
133 =item C<--lex=(lexer)>
135 Specify which lexer to use.
137 =item C<--flex_required=X.Y.Z>
139 Override the minimum acceptable flex version.
141 =item C<--yacc=(parser)>
143 Specify which parser to use.
145 =item C<--bison_required=X.Y>
147 Override the minimum acceptable bison version.
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>.
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>
262 use English
qw( -no_match_vars );
263 use Parrot
::BuildUtil
;
264 use Parrot
::Configure
;
266 # These globals are accessed in config/init/defaults.pm
267 our $parrot_version = Parrot
::BuildUtil
::parrot_version
();
268 our @parrot_version = Parrot
::BuildUtil
::parrot_version
();
270 $OUTPUT_AUTOFLUSH = 1;
272 # Install Option text was taken from:
274 # autoconf (GNU Autoconf) 2.59
275 # Written by David J. MacKenzie and Akim Demaille.
277 # Copyright (C) 2003 Free Software Foundation, Inc.
278 # This is free software; see the source for copying conditions. There is NO
279 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
280 # Installation directories:
286 my($key, $value) = m/--([-\w]+)(?:=(.*))?/;
287 $key = 'help' unless defined $key;
288 $value = 1 unless defined $value;
294 Parrot Version $parrot_version Configure 2.0
302 $0 - Parrot Configure 2.0
306 --help Show this text
307 --version Show version information
308 --verbose Output extra information
309 --verbose=2 Output every setting change
310 --verbose-step=N Set verbose for step N only
311 --verbose-step=regex Set verbose for step matching description
312 --nomanicheck Don't check the MANIFEST
314 --ask Have Configure ask for commonly-changed info
318 --debugging=0 Disable debugging, default = 1
319 --inline Compiler supports inline
320 --optimize Optimized compile
321 --optimize=flags Add given optimizer flags
322 --parrot_is_shared Link parrot dynamically
323 --m=32 Build 32bit executable on 64-bit architecture.
324 --profile Turn on profiled compile (gcc only for now)
326 --cc=(compiler) Use the given compiler
327 --ccflags=(flags) Use the given compiler flags
328 --ccwarn=(flags) Use the given compiler warning flags
329 --cxx=(compiler) Use the given C++ compiler
330 --libs=(libs) Use the given libraries
331 --link=(linker) Use the given linker
332 --linkflags=(flags) Use the given linker flags
333 --ld=(linker) Use the given loader for shared libraries
334 --ldflags=(flags) Use the given loader flags for shared libraries
335 --lex=(lexer) Use the given lexical analyzer generator
336 --yacc=(parser) Use the given parser generator
338 --define=inet_aton Quick hack to use inet_aton instead of inet_pton
342 --intval=(type) Use the given type for INTVAL
343 --floatval=(type) Use the given type for FLOATVAL
344 --opcode=(type) Use the given type for opcodes
345 --ops=(files) Use the given ops files
346 --pmc=(files) Use the given PMC files
348 --cgoto=0 Don't build cgoto core - recommended when short of mem
350 --execcapable Use JIT to emit a native executable
351 --gc=(type) Determine the type of garbage collection
352 type=(gc|libc|malloc|malloc-trace) default is gc
356 For using a system ICU, these options can be used:
358 --icu-config=/path/to/icu-config
359 Location of the script used for ICU autodetection.
360 You just need to specify this option if icu-config
363 --icu-config=none can be used to disable the autodetection feature.
364 It will also be disabled if you specify any other
365 of the following ICU options.
367 If you do not have a full ICU installation:
369 --without-icu Build parrot without ICU support
370 --icuheaders=(path) Location of ICU headers without /unicode
371 --icushared=(flags) Full linker command to create shared libraries
372 --icudatadir=(path) Directory to locate ICU's data file(s)
374 Other Options (may not be implemented):
376 --maintainer Create imcc's parser and lexer files. Needs a working
378 --miniparrot Build parrot assuming only pure ANSI C is available
382 --prefix=PREFIX install architecture-independent files in PREFIX
384 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
387 By default, `make install' will install all the files in
388 `/usr/local/bin', `/usr/local/lib' etc. You can specify
389 an installation prefix other than `/usr/local' using `--prefix',
390 for instance `--prefix=\$HOME'.
392 For better control, use the options below.
394 Fine tuning of the installation directories:
395 --bindir=DIR user executables [EPREFIX/bin]
396 --sbindir=DIR system admin executables [EPREFIX/sbin]
397 --libexecdir=DIR program executables [EPREFIX/libexec]
398 --datadir=DIR read-only architecture-independent data [PREFIX/share]
399 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
400 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
401 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
402 --libdir=DIR object code libraries [EPREFIX/lib]
403 --includedir=DIR C header files [PREFIX/include]
404 --oldincludedir=DIR C header files for non-gcc [/usr/include]
405 --infodir=DIR info documentation [PREFIX/info]
406 --mandir=DIR man documentation [PREFIX/man]
411 $args{$key} = $value;
415 $args{debugging
} = 1 unless ((exists $args{debugging
}) && !$args{debugging
});
416 $args{maintainer
} = 1 if defined $args{lex
} or defined $args{yacc
};
419 Parrot Version $parrot_version Configure 2.0
420 Copyright (C) 2001-2006, The Perl Foundation.
422 Hello, I'm Configure. My job is to poke and prod your system to figure out
423 how to build Parrot. The process is completely automated, unless you passed in
424 the `--ask' flag on the command line, in which case it'll prompt you for a few
427 Since you're running this program, you obviously have Perl 5--I'll be pulling
428 some defaults from its configuration.
431 # EDIT HERE TO ADD NEW TESTS
492 my $conf = Parrot
::Configure
->new;
494 # XXX $Parrot::Configure::Step::conf is a temporty hack
495 no warnings
qw(once);
496 $Parrot::Configure
::Step
::conf
= $conf;
498 $conf->add_steps(@steps);
499 $conf->options->set(%args);
500 # Run the actual steps
501 $conf->runsteps or exit(1);
503 # tell users what to do next
504 my $make = $conf->data->get('make');
510 You can now use `$make' to build your Parrot.
511 (NOTE: do not use `$make -j <n>'!)
512 After that, you can use `$make test' to run the test suite.
523 # cperl-indent-level: 4
526 # vim: expandtab shiftwidth=4: