#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
require 5.8.4;
use strict;
use warnings;
#
# Compare OS versions.
#
sub cmp_os_ver
{
our ($a, $b);
my @v1 = split(/\./, $a);
my @v2 = split(/\./, $b);
my $diff = 0;
}
return ($diff);
}
# Check we are on a supported OS version.
my $pver = sprintf('%vd', $^V);
# perl version minus the subversion number when version >= 5.12
if ($^V ge v5.12) {
}
# Figure out the appropriate Config.pm. Use an older version if necessary.
if (! -f $configpm) {
my $p = "config/$pver";
my $dh;
opendir($dh, $p) || die("Can't read directory $_: $!\n");
my $old_rel = (sort(cmp_os_ver
closedir($dh);
if (defined($old_rel)) {
print(STDERR "Warning: No config file for OS version $rel, " .
"using $old_rel file\n");
} else {
die("Unsupported version of Perl/OS/Architecture " .
"$pver/$rel/$arch\n");
}
} else {
while(<CONFIGPM>) {
if (/'cc/) {
s/=>\s*'cc/=> 'gcc/;
s/=\s*'cc/='gcc/;
}
print CONFIGPM_OUT $_;
}
close CONFIGPM;
close CONFIGPM_OUT;
}
our %man1pods;
# Only install the pods for onn-ON builds.
}
NAME => 'Sun::Solaris::PerlGcc',
VERSION_FROM => 'perlgcc.PL',
EXE_FILES => [ 'perlgcc' ],
MAN3PODS => { }, # Stop autopodification.
);