ConfigPerl revision 7c478bd95313f5f23a4c958a745db2134aa03244
17545N/A#!/usr/bin/ksh
17545N/A#
17590N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
17311N/A# Use is subject to license terms.
17311N/A#
17311N/A#ident "%Z%%M% %I% %E% SMI"
17311N/A#
17311N/A
17311N/A#
17311N/A# This script was used to generate the perl configuration files used in the
17311N/A# integration of perl 5.6.1 into ON. The previous 5.005_03 integration was
17311N/A# done by hand-editing the files generated by Configure to make them conform to
17311N/A# the ON perl directory layout. Hopefully this script will make it easier to
17311N/A# recreate the same configuration for future integrations of perl into ON,
17311N/A# without relying on error-prone manual edits of the files generated by
17545N/A# Configure. This script should be run from within the perl source directory.
17545N/A#
17590N/A
17311N/A# Die on error
17311N/Aset -e
17311N/A
17311N/A# Global settings
17311N/APFX=/usr/perl5 # Prefix for perl installation
17311N/AREL=5.6.1 # Perl version
17311N/AARC=$(arch)-solaris-64int # Perl architecture
17311N/A
17311N/A# Delete any old configuration files
17311N/A[[ -f config.sh ]] && rm config.sh
17311N/A[[ -f Policy.sh ]] && rm Policy.sh
17545N/A
17545N/A# Create the config.over file to override some common settings
17590N/Acat > config.over <<'EOF'
17311N/ACC=`which cc | sed -e 's!/bin/cc!!'`
17311N/Accflags=`echo $ccflags | sed -e 's! *-I/usr/local/include *! !'`
17311N/Accflags="$ccflags -D_TS_ERRNO"
17311N/Accversion='Sun WorkShop'
17311N/Acf_by='perl-bugs'
17311N/Acf_email='perl-bugs@sun.com'
17311N/Acf_time=''
17311N/Acppflags=''
17311N/Ainstallusrbinperl='undef'
17311N/Alddlflags='-G'
17311N/Aldflags=''
20249N/Alibsdirs=`echo $libsdirs | sed -e "s! *${CC}[^ ]* *! !"`
20249N/Alibsfound=`echo $libsfound | sed -e "s! *${CC}[^ ]* *! !"`
20249N/Alibspath='/lib /usr/lib /usr/ccs/lib'
20249N/Alibpth='/lib /usr/lib /usr/ccs/lib'
20249N/Aloclibpth=`echo $loclibpth | sed -e "s! *${CC}[^ ]* *! !"`
20249N/Amydomain='.sun.com'
20249N/Amyhostname='localhost'
20249N/Aif [ `uname -p` = "sparc" ]; then
20249N/A myuname='sunos localhost 5.10 sun4u sparc sunw,ultra-1'
17311N/Aelse
17311N/A myuname='sunos localhost 5.10 i86pc i386 i86pc'
17311N/Afi
17590N/Aosvers='2.10'
17590N/Apager='/usr/bin/more'
17590N/Aperl5='/bin/perl'
17590N/Aperladmin='perl-bugs@sun.com'
17590N/AEOF
17590N/A
17590N/A# Run Configure with the correct flags to give the required config files
17590N/A./Configure -dsOE \
17590N/A -Dccflags='-xc99=%none' -Doptimize='-xO3 -xspace -xildoff' \
17590N/A -Duseshrplib -Uusemymalloc -Ubincompat5005 \
17590N/A -Duse64bitint -Ud_sigsetjmp \
17590N/A -Dprefix=$PFX/$REL -Dsiteprefix=$PFX/$REL -Dvendorprefix=$PFX/$REL \
17590N/A -Darchlib=$PFX/$REL/lib/$ARC -Dprivlib=$PFX/$REL/lib \
17545N/A -Dsitelib=$PFX/site_perl/$REL -Dsitearch=$PFX/site_perl/$REL/$ARC \
17545N/A -Dvendorlib=$PFX/vendor_perl/$REL -Dvendorarch=$PFX/vendor_perl/$REL/$ARC \
17590N/A -Dman1dir=$PFX/$REL/man/man1 -Dman3dir=$PFX/$REL/man/man3
17311N/A
17311N/A# Manually remove the record of the Configure command-line and extra whitespace
17311N/Ased -e "s/^config_args=.*/config_args=''/" \
17311N/A -e "s/^config_argc=.*/config_argc=0/" \
17311N/A -e "/^config_arg[1-9][0-9]*=/d" \
17311N/A -e "s/' */'/g" \
17311N/A config.sh > config.new
17311N/Amv config.new config.sh
17311N/A
17311N/A# Expand config.sh into the generated files used during the build
17311N/A./Configure -S
17311N/A