ConfigPerl revision 7c478bd95313f5f23a4c958a745db2134aa03244
04428429c4e689333e3ef8d19a2debeb20d4d15dMark Andrews# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews# Use is subject to license terms.
2a40fdc2d34adb8a5c72a748449699666032d461Mark Andrews#ident "%Z%%M% %I% %E% SMI"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# This script was used to generate the perl configuration files used in the
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# integration of perl 5.6.1 into ON. The previous 5.005_03 integration was
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# done by hand-editing the files generated by Configure to make them conform to
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# the ON perl directory layout. Hopefully this script will make it easier to
d56e188030368b835122d759ebbf8d9613c166f4Mark Andrews# recreate the same configuration for future integrations of perl into ON,
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# without relying on error-prone manual edits of the files generated by
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# Configure. This script should be run from within the perl source directory.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Die on error
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# Global settings
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Delete any old configuration files
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Create the config.over file to override some common settings
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrewsccflags=`echo $ccflags | sed -e 's! *-I/usr/local/include *! !'`
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrewslibsdirs=`echo $libsdirs | sed -e "s! *${CC}[^ ]* *! !"`
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewslibsfound=`echo $libsfound | sed -e "s! *${CC}[^ ]* *! !"`
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsloclibpth=`echo $loclibpth | sed -e "s! *${CC}[^ ]* *! !"`
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews myuname='sunos localhost 5.10 sun4u sparc sunw,ultra-1'
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews myuname='sunos localhost 5.10 i86pc i386 i86pc'
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Run Configure with the correct flags to give the required config files
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews -Dccflags='-xc99=%none' -Doptimize='-xO3 -xspace -xildoff' \
62ee2c9f460d2e2e45dcf1abc8b4b4a4a43f5618Mark Andrews -Dprefix=$PFX/$REL -Dsiteprefix=$PFX/$REL -Dvendorprefix=$PFX/$REL \
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews -Darchlib=$PFX/$REL/lib/$ARC -Dprivlib=$PFX/$REL/lib \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews -Dsitelib=$PFX/site_perl/$REL -Dsitearch=$PFX/site_perl/$REL/$ARC \
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews -Dvendorlib=$PFX/vendor_perl/$REL -Dvendorarch=$PFX/vendor_perl/$REL/$ARC \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews -Dman1dir=$PFX/$REL/man/man1 -Dman3dir=$PFX/$REL/man/man3
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# Manually remove the record of the Configure command-line and extra whitespace
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson -e "s/^config_argc=.*/config_argc=0/" \
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews -e "/^config_arg[1-9][0-9]*=/d" \
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews -e "s/' */'/g" \
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Expand config.sh into the generated files used during the build