-
Notifications
You must be signed in to change notification settings - Fork 138
/
Conf.pm
255 lines (219 loc) · 7.53 KB
/
Conf.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# Copyright (C) 2001-2006, The Perl Foundation.
# $Id$
package Parrot::Configure::Options::Conf;
use strict;
use warnings;
use base qw( Exporter );
our @EXPORT_OK = qw(
@valid_options
$script
%options_components
$parrot_version
$svnid
);
use lib qw( lib );
use Parrot::BuildUtil;
our @valid_options = qw{
ask
bindir
cage
cc
ccflags
ccwarn
cgoto
configure_trace
cxx
datadir
debugging
define
exec-prefix
execcapable
fatal
fatal-step
floatval
gc
help
icu-config
icudatadir
icuheaders
icushared
includedir
infodir
inline
intval
jitcapable
languages
ld
ldflags
lex
libdir
libexecdir
libs
link
linkflags
localstatedir
m
make
maintainer
mandir
miniparrot
nomanicheck
oldincludedir
opcode
ops
optimize
parrot_is_shared
pmc
prefix
profile
sbindir
sharedstatedir
sysconfdir
test
verbose
verbose-step
version
without-gdbm
without-gmp
without-icu
yacc
};
our $script = q{Configure.pl};
our $parrot_version = Parrot::BuildUtil::parrot_version();
our $svnid = '$Id$',
my %short_circuits = (
help => \&print_help,
version => \&print_version,
);
our %options_components = (
'valid_options' => \@valid_options,
'script' => $script,
'short_circuits' => \%short_circuits,
'conditionals' => \&conditional_assignments,
);
sub conditional_assignments {
my $argsref = shift;
$argsref->{debugging} = 1
unless ( ( exists $argsref->{debugging} ) && !$argsref->{debugging} );
$argsref->{maintainer} = 1
if defined $argsref->{lex}
or defined $argsref->{yacc};
return $argsref;
}
sub print_version {
print "Parrot Version $parrot_version Configure 2.0\n";
print "$svnid\n";
return 1;
}
sub print_help {
print <<"EOT";
$script - Parrot Configure 2.0
General Options:
--help Show this text
--version Show version information
--verbose Output extra information
--verbose=2 Output every setting change
--verbose-step=N Set verbose for step N only
--verbose-step=regex Set verbose for step matching description
--fatal Failure of any configuration step will cause
Configure.pl to halt
--fatal-step Comma-delimited string of configuration steps
which upon failure cause Configure.pl to halt
--nomanicheck Don't check the MANIFEST
--step=(gen::languages)
Execute a single configure step
--languages="list of languages"
Specify a list of languages to process
--ask Have Configure ask for commonly-changed info
--test=configure Run tests of configuration tools before configuring
--test=build Run tests of build tools after configuring but before
calling 'make'
--test Run configuration tools tests, configure, then run
build tools tests
Compile Options:
--debugging=0 Disable debugging, default = 1
--inline Compiler supports inline
--optimize Optimized compile
--optimize=flags Add given optimizer flags
--parrot_is_shared Link parrot dynamically
--m=32 Build 32bit executable on 64-bit architecture.
--profile Turn on profiled compile (gcc only for now)
--cage [CAGE] compile includes many additional warnings
--cc=(compiler) Use the given compiler
--ccflags=(flags) Use the given compiler flags
--ccwarn=(flags) Use the given compiler warning flags
--cxx=(compiler) Use the given C++ compiler
--libs=(libs) Use the given libraries
--link=(linker) Use the given linker
--linkflags=(flags) Use the given linker flags
--ld=(linker) Use the given loader for shared libraries
--ldflags=(flags) Use the given loader flags for shared libraries
--lex=(lexer) Use the given lexical analyzer generator
--make=(make tool) Use the given make utility
--yacc=(parser) Use the given parser generator
--define=inet_aton Quick hack to use inet_aton instead of inet_pton
Parrot Options:
--intval=(type) Use the given type for INTVAL
--floatval=(type) Use the given type for FLOATVAL
--opcode=(type) Use the given type for opcodes
--ops=(files) Use the given ops files
--pmc=(files) Use the given PMC files
--cgoto=0 Don't build cgoto core - recommended when short of mem
--jitcapable Use JIT
--execcapable Use JIT to emit a native executable
--gc=(type) Determine the type of garbage collection
type=(gc|libc|malloc|malloc-trace) default is gc
External Library Options:
--without-gmp Build parrot without GMP support
--without-gdbm Build parrot without GDBM support
ICU Options:
For using a system ICU, these options can be used:
--icu-config=/path/to/icu-config
Location of the script used for ICU autodetection.
You just need to specify this option if icu-config
is not in your PATH.
--icu-config=none Can be used to disable the autodetection feature.
It will also be disabled if you specify any other
of the following ICU options.
If you do not have a full ICU installation:
--without-icu Build parrot without ICU support
--icuheaders=(path) Location of ICU headers without /unicode
--icushared=(flags) Full linker command to create shared libraries
--icudatadir=(path) Directory to locate ICU's data file(s)
Other Options (may not be implemented):
--maintainer Create imcc's parser and lexer files. Needs a working
parser and lexer.
--miniparrot Build parrot assuming only pure ANSI C is available
Install Options:
--prefix=PREFIX Install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX Install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
EOT
return 1;
}
1;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4: