|
|
@@ -48,8 +48,10 @@ Actions:
|
|
|
--origin <flag> output the origin of the flag to stdout:
|
|
|
value is one of vendor, system, user, env.
|
|
|
--list output a list of the flags supported by the current vendor.
|
|
|
- --export=(sh|make) output commands to be executed in shell or make that export
|
|
|
- all the compilation flags as environment variables.
|
|
|
+ --export=(sh|make|configure)
|
|
|
+ output something convenient to import the
|
|
|
+ compilation flags in a shell script, in make,
|
|
|
+ or on a ./configure command line.
|
|
|
--dump output all compilation flags with their values
|
|
|
--help show this help message.
|
|
|
--version show the version.
|
|
|
@@ -66,7 +68,7 @@ while (@ARGV) {
|
|
|
$action = $1;
|
|
|
$param = shift(@ARGV);
|
|
|
usageerr(_g("%s needs a parameter"), $_) unless defined $param;
|
|
|
- } elsif (m/^--export(?:=(sh|make))?$/) {
|
|
|
+ } elsif (m/^--export(?:=(sh|make|configure))?$/) {
|
|
|
usageerr(_g("two commands specified: --%s and --%s"), "export", $action)
|
|
|
if defined($action);
|
|
|
my $type = $1 || "sh";
|
|
|
@@ -124,6 +126,8 @@ if ($action eq "get") {
|
|
|
} elsif ($export_type eq "make") {
|
|
|
$value =~ s/\$/\$\$/g;
|
|
|
print "export $flag := $value\n";
|
|
|
+ } elsif ($export_type eq "configure") {
|
|
|
+ print "$flag=\"$value\" ";
|
|
|
}
|
|
|
}
|
|
|
exit(0);
|