10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7298SMark.J.Nelson@Sun.COM# Common Development and Distribution License (the "License"). 6*7298SMark.J.Nelson@Sun.COM# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 220Sstevel@tonic-gate# Use is subject to license terms. 230Sstevel@tonic-gate# 240Sstevel@tonic-gate 250Sstevel@tonic-gateuse strict; 260Sstevel@tonic-gateuse warnings; 270Sstevel@tonic-gateuse Config; 28*7298SMark.J.Nelson@Sun.COMour $VERSION = '1.2'; 290Sstevel@tonic-gate 300Sstevel@tonic-gatemy $fh; 310Sstevel@tonic-gateopen($fh, ">$ARGV[0]") || die("Can't open perlgcc: $!\n"); 320Sstevel@tonic-gate 330Sstevel@tonic-gatemy $perlver = sprintf('%vd', $^V); 340Sstevel@tonic-gatemy $startperl = $Config{startperl}; 350Sstevel@tonic-gatemy $perlpath = $Config{perlpath}; 360Sstevel@tonic-gatemy $privlib = "$Config{installprivlib}/Sun/Solaris/PerlGcc"; 370Sstevel@tonic-gate 380Sstevel@tonic-gateprint $fh <<EOF; 390Sstevel@tonic-gate$startperl 400Sstevel@tonic-gate# 410Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 420Sstevel@tonic-gate# Use is subject to license terms. 430Sstevel@tonic-gate# 440Sstevel@tonic-gate 450Sstevel@tonic-gateuse $perlver; 460Sstevel@tonic-gateuse strict; 470Sstevel@tonic-gateuse warnings; 48*7298SMark.J.Nelson@Sun.COMour \$VERSION = '$VERSION'; 490Sstevel@tonic-gate 500Sstevel@tonic-gate\$ENV{PERL5_OVERRIDE_CONFIG} = '1'; 510Sstevel@tonic-gateif (exists(\$ENV{PERL5LIB})) { 520Sstevel@tonic-gate \$ENV{PERL5LIB} = 530Sstevel@tonic-gate "$privlib:\$ENV{PERL5LIB}"; 540Sstevel@tonic-gate} else { 550Sstevel@tonic-gate \$ENV{PERL5LIB} = 560Sstevel@tonic-gate '$privlib'; 570Sstevel@tonic-gate} 580Sstevel@tonic-gateexec('$perlpath', \@ARGV) 590Sstevel@tonic-gate || die("Can't exec $perlpath: \$!\\n"); 600Sstevel@tonic-gateEOF 610Sstevel@tonic-gateclose($fh) || die("Can't open perlgcc: $!\n"); 620Sstevel@tonic-gateexit(0); 63