ConfigPerl revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!/usr/bin/ksh
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
#
# This script was used to generate the perl configuration files used in the
# integration of perl 5.6.1 into ON. The previous 5.005_03 integration was
# done by hand-editing the files generated by Configure to make them conform to
# the ON perl directory layout. Hopefully this script will make it easier to
# recreate the same configuration for future integrations of perl into ON,
# without relying on error-prone manual edits of the files generated by
# Configure. This script should be run from within the perl source directory.
#
# Die on error
set -e
# Global settings
PFX=/usr/perl5 # Prefix for perl installation
REL=5.6.1 # Perl version
ARC=$(arch)-solaris-64int # Perl architecture
# Delete any old configuration files
[[ -f config.sh ]] && rm config.sh
[[ -f Policy.sh ]] && rm Policy.sh
# Create the config.over file to override some common settings
cat > config.over <<'EOF'
CC=`which cc | sed -e 's!/bin/cc!!'`
ccflags=`echo $ccflags | sed -e 's! *-I/usr/local/include *! !'`
ccflags="$ccflags -D_TS_ERRNO"
ccversion='Sun WorkShop'
cf_by='perl-bugs'
cf_email='perl-bugs@sun.com'
cf_time=''
cppflags=''
installusrbinperl='undef'
lddlflags='-G'
ldflags=''
libsdirs=`echo $libsdirs | sed -e "s! *${CC}[^ ]* *! !"`
libsfound=`echo $libsfound | sed -e "s! *${CC}[^ ]* *! !"`
libspath='/lib /usr/lib /usr/ccs/lib'
libpth='/lib /usr/lib /usr/ccs/lib'
loclibpth=`echo $loclibpth | sed -e "s! *${CC}[^ ]* *! !"`
mydomain='.sun.com'
myhostname='localhost'
if [ `uname -p` = "sparc" ]; then
myuname='sunos localhost 5.10 sun4u sparc sunw,ultra-1'
else
myuname='sunos localhost 5.10 i86pc i386 i86pc'
fi
osvers='2.10'
pager='/usr/bin/more'
perl5='/bin/perl'
perladmin='perl-bugs@sun.com'
EOF
# Run Configure with the correct flags to give the required config files
./Configure -dsOE \
-Dccflags='-xc99=%none' -Doptimize='-xO3 -xspace -xildoff' \
-Duseshrplib -Uusemymalloc -Ubincompat5005 \
-Duse64bitint -Ud_sigsetjmp \
-Dprefix=$PFX/$REL -Dsiteprefix=$PFX/$REL -Dvendorprefix=$PFX/$REL \
-Darchlib=$PFX/$REL/lib/$ARC -Dprivlib=$PFX/$REL/lib \
-Dsitelib=$PFX/site_perl/$REL -Dsitearch=$PFX/site_perl/$REL/$ARC \
-Dvendorlib=$PFX/vendor_perl/$REL -Dvendorarch=$PFX/vendor_perl/$REL/$ARC \
-Dman1dir=$PFX/$REL/man/man1 -Dman3dir=$PFX/$REL/man/man3
# Manually remove the record of the Configure command-line and extra whitespace
sed -e "s/^config_args=.*/config_args=''/" \
-e "s/^config_argc=.*/config_argc=0/" \
-e "/^config_arg[1-9][0-9]*=/d" \
-e "s/' */'/g" \
config.sh > config.new
mv config.new config.sh
# Expand config.sh into the generated files used during the build
./Configure -S