home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
perl501m.zip
/
patches
/
patch.1c
< prev
next >
Wrap
Text File
|
1995-04-20
|
75KB
|
2,678 lines
# This is my patch patch.1c for perl5.001. See description below.
# Andy Dougherty doughera@lafcol.lafayette.edu
exit 0 # Just in case
This is my patch patch.1c for perl5.001.
To apply, change to your perl directory,
and apply with
patch -N -p1 < thispatch.
Patch and enjoy,
Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College, Easton PA
Configure
Updated to dist PL53.
Fix overlapping memcpy test.
Add check for ld. Use $cc instead, if on an ELF system.
With -d, don't reuse config.sh unless $myuname matches.
Warn more explicitly about changing compilers before reloading
old config.sh.
Detect Linux ELF format in nm scan.
Better detection of d_castneg. (ISC 4.1 was passing the test,
but couldn't cast in an argument list.)
Suggest -fpic for dynamic loading if you're using GNU CC under any
name.
No longer test for byacc, fmod, or drem, since they are not used.
Makefile.SH
Use $ld, not ld (only matters for SVR4)
Silence some byacc-related harmless error messages.
README
Suggest using -Dcc=gcc (or whatever).
Warn about reusing old config.sh. (The warning was already there
in 5.001; I've just expanded it a little.)
Warn against using GNU as and GNU ld on SunOS & Solaris.
config.H
config_h.SH
Updated to match Configure.
doio.c
Add socket includes.
ext/Fcntl/Fcntl.xs
Fix typo: s/SETFL/F_SETFL/;
handy.h
Check _G_HAVE_BOOL, not just if it's defined.
hints/dynix.sh
hints/hpux_9.sh
hints/linux.sh
hints/netbsd.sh
hints/titanos.sh
Updated. ELF on linux should probably work.
installperl
Install pod2html, pod2latex, and pod2man.
lib/ExtUtils/MakeMaker.pm
Updated to 4.091. (4.09 + a small writedoc() patch.)
myconfig
Now includes 'ld' command.
perl.c
Revised an #elif clause since Pyramid's cpp doesn't understand
#elif.
perl.h
Fix U_L, I_V, and I_32 cast macros to ensure that
the cast_ulong(), cast_iv(), and cast_i32() functions (if used)
are passed a double. In particular, the FIXSTATUS macros were
handing int's to U_L().
Remove unnecessary HAS_FMOD testing (See util.c).
proto.h
Remove my_fmod() prototype. (See util.c)
sv.h
Fix GV/CV typo.
util.c
Simplified cast_i32() and cast_iv() to mimic what *actually*
happens on a SPARC running SunOS 4.1.3. (Previously, they did
some complicated fmod() calculation. I've since discovered that's
not what happens on the SPARC.)
With this change, fmod() is no longer necessary. Hence my_fmod
is removed. This also means the HAS_FMOD and HAS_DREM tests are
no longer needed in Configure, so they are gone too.
vms/config.vms
Remove unnecessary HAS_FMOD and HAS_DREM defines.
x2p/Makefile.SH
Silence byacc-related things.
Index: Configure
Prereq: 3.0.1.6
*** perl5.001b/Configure Sun Mar 12 02:35:24 1995
--- perl5.001c/Configure Thu Apr 6 11:16:18 1995
***************
*** 18,26 ****
# archive site. Check with Archie if you don't know where that can be.)
#
! # $Id: Head.U,v 3.0.1.6 1994/10/29 15:54:19 ram Exp $
#
! # Generated on Fri Mar 10 09:48:55 EST 1995 [metaconfig 3.0 PL51]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
--- 18,26 ----
# archive site. Check with Archie if you don't know where that can be.)
#
! # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
#
! # Generated on Thu Apr 6 11:09:32 EDT 1995 [metaconfig 3.0 PL53]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
***************
*** 58,68 ****
: Proper PATH setting
paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
! paths=$paths:'/usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin'
! paths=$paths:'/sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb'
! paths=$paths:'/bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin'
! paths=$paths:'/etc /usr/lib /usr/ucblib /lib /usr/ccs/lib'
! paths=$paths:'/sbin /usr/sbin /usr/libexec'
for p in $paths
do
--- 58,68 ----
: Proper PATH setting
paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
! paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
! paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
! paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
! paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
! paths="$paths /sbin /usr/sbin /usr/libexec"
for p in $paths
do
***************
*** 229,235 ****
d_attribut=''
d_bcmp=''
d_bcopy=''
- d_byacc=''
d_bzero=''
d_casti32=''
castflags=''
--- 229,234 ----
***************
*** 252,258 ****
d_dlsymun=''
d_dosuid=''
d_suidsafe=''
- d_drem=''
d_dup2=''
d_fchmod=''
d_fchown=''
--- 251,256 ----
***************
*** 263,269 ****
d_fgetpos=''
d_flexfnam=''
d_flock=''
- d_fmod=''
d_fork=''
d_fsetpos=''
d_Gconvert=''
--- 261,266 ----
***************
*** 390,395 ****
--- 387,393 ----
ccdlflags=''
d_shrplib=''
dlsrc=''
+ ld=''
lddlflags=''
shrpdir=''
usedl=''
***************
*** 607,613 ****
al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms"
al="$al xenix z8000"
- gccversion=''
groupstype=''
i_whoami=''
: change the next line if compiling for Xenix/286 on Xenix/386
--- 605,610 ----
***************
*** 803,809 ****
esac
shift
;;
! -V) echo "$me generated by metaconfig 3.0 PL51." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
--- 800,806 ----
esac
shift
;;
! -V) echo "$me generated by metaconfig 3.0 PL53." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
***************
*** 1425,1433 ****
./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
newmyuname="$myuname"
dflt=n
! if test "$fastread" = yes; then
! dflt=y
! elif test -f ../config.sh; then
if $contains myuname= ../config.sh >/dev/null 2>&1; then
eval "`grep myuname= ../config.sh`"
fi
--- 1422,1428 ----
./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
newmyuname="$myuname"
dflt=n
! if test -f ../config.sh; then
if $contains myuname= ../config.sh >/dev/null 2>&1; then
eval "`grep myuname= ../config.sh`"
fi
***************
*** 1441,1448 ****
hint=default
cd ..
if test -f config.sh; then
! echo " "
! rp="I see a config.sh file. Shall I use it to set the defaults?"
. UU/myread
case "$ans" in
n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
--- 1436,1446 ----
hint=default
cd ..
if test -f config.sh; then
! $cat <<EOM
!
! I see a config.sh file. Was it built on THIS system with THIS compiler?
! EOM
! rp="Shall I use config.sh to set the defaults?"
. UU/myread
case "$ans" in
n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
***************
*** 3087,3093 ****
$grep fprintf libc.tmp > libc.ptf
xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
! if com="$sed -n -e 's/__IO//' -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\
eval $xscan;\
$contains '^fprintf$' libc.list >/dev/null 2>&1; then
eval $xrun
--- 3085,3091 ----
$grep fprintf libc.tmp > libc.ptf
xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
! if com="$sed -n -e 's/__IO//' -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
eval $xscan;\
$contains '^fprintf$' libc.list >/dev/null 2>&1; then
eval $xrun
***************
*** 3130,3136 ****
eval $xrun
else
nm -p $* 2>/dev/null >libc.tmp
! com="$sed -n -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\
eval "<libc.tmp $com >libc.list"
if $contains '^fprintf$' libc.list >/dev/null 2>&1; then
nm_opt='-p'
--- 3128,3134 ----
eval $xrun
else
nm -p $* 2>/dev/null >libc.tmp
! com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
eval "<libc.tmp $com >libc.list"
if $contains '^fprintf$' libc.list >/dev/null 2>&1; then
nm_opt='-p'
***************
*** 3701,3714 ****
eval $setvar
$rm -f set set.c
- : Check if we really have byacc
- case "$byacc" in
- ''|'byacc') val="$undef" ;;
- *) val="$define" ;;
- esac
- set d_byacc
- eval $setvar
-
: see if bzero exists
set bzero d_bzero
eval $inlibc
--- 3699,3704 ----
***************
*** 3832,3841 ****
$cat >try.c <<EOCP
#include <sys/types.h>
#include <signal.h>
! $signal_t blech() { exit(3); }
main()
{
! double f = -123;
unsigned long along;
unsigned int aint;
unsigned short ashort;
--- 3822,3835 ----
$cat >try.c <<EOCP
#include <sys/types.h>
#include <signal.h>
! $signal_t blech() { exit(7); }
! $signal_t blech_in_list() { exit(4); }
! unsigned long dummy_long(p) unsigned long p; { return p; }
! unsigned int dummy_int(p) unsigned int p; { return p; }
! unsigned short dummy_short(p) unsigned short p; { return p; }
main()
{
! double f = -123.;
unsigned long along;
unsigned int aint;
unsigned short ashort;
***************
*** 3867,3872 ****
--- 3861,3879 ----
along = (unsigned long)f;
if (along != 0x80000001)
result |= 2;
+ if (result)
+ exit(result);
+ signal(SIGFPE, blech_in_list);
+ f = 123.;
+ along = dummy_long((unsigned long)f);
+ aint = dummy_int((unsigned int)f);
+ ashort = dummy_short((unsigned short)f);
+ if (along != (unsigned long)123)
+ result |= 4;
+ if (aint != (unsigned int)123)
+ result |= 4;
+ if (ashort != (unsigned short)123)
+ result |= 4;
exit(result);
}
***************
*** 3876,3882 ****
castflags=$?
else
echo "(I can't seem to compile the test program--assuming it can't)"
! castflags=3
fi
case "$castflags" in
0) val="$define"
--- 3883,3889 ----
castflags=$?
else
echo "(I can't seem to compile the test program--assuming it can't)"
! castflags=7
fi
case "$castflags" in
0) val="$define"
***************
*** 4209,4214 ****
--- 4216,4222 ----
usedl="$define"
: emulate basename
dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
+
$cat << EOM
Some systems may require passing special flags to $cc -c to
***************
*** 4217,4225 ****
EOM
case "$cccdlflags" in
! ''|' ') case "$cc" in
! *gcc*) dflt='-fpic' ;;
! *) case "$osname" in
hpux) dflt='+z' ;;
next) dflt='none' ;;
solaris) dflt='-K pic' ;;
--- 4225,4232 ----
EOM
case "$cccdlflags" in
! '') case "$gccversion" in
! '') case "$osname" in
hpux) dflt='+z' ;;
next) dflt='none' ;;
solaris) dflt='-K pic' ;;
***************
*** 4227,4234 ****
svr4*|esix*) dflt='-Kpic' ;;
*) dflt='none' ;;
esac ;;
esac ;;
! *) dflt="$cccdlflags" ;;
esac
rp="Any special flags to pass to $cc -c to compile shared library modules?"
. ./myread
--- 4234,4242 ----
svr4*|esix*) dflt='-Kpic' ;;
*) dflt='none' ;;
esac ;;
+ *) dflt='-fpic' ;;
esac ;;
! *) dflt="$cccdlflags" ;;
esac
rp="Any special flags to pass to $cc -c to compile shared library modules?"
. ./myread
***************
*** 4237,4245 ****
*) cccdlflags="$ans" ;;
esac
! cat << 'EOM'
! Some systems may require passing special flags to ld to create a
library that can be dynamically loaded. If your ld flags include
-L/other/path options to locate libraries outside your loader's normal
search path, you may need to specify those -L options here as well. To
--- 4245,4294 ----
*) cccdlflags="$ans" ;;
esac
! cat << EOM
!
! Some systems use ld to create libraries that can be dynamically loaded,
! while other systems (such as those using ELF) use $cc.
!
! EOM
! case "$ld" in
! '') $cat >try.c <<'EOM'
! /* Test for whether ELF binaries are produced */
! #include <fcntl.h>
! #include <stdlib.h>
! main() {
! char b[4];
! int i = open("a.out",O_RDONLY);
! if(i == -1)
! exit(1); /* fail */
! if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
! exit(0); /* succeed (yes, it's ELF) */
! else
! exit(1); /* fail */
! }
! EOM
! if $cc $ccflags try.c >/dev/null 2>&1 && ./a.out; then
! cat <<EOM
! You appear to have ELF support. I'll use $cc to build dynamic libraries.
! EOM
! dflt="$cc"
! else
! echo "I'll use ld to build dynamic libraries."
! dflt='ld'
! fi
! rm -f try.c a.out
! ;;
! *) dflt=ld
! ;;
! esac
!
! rp="What comnmand should be used to create dynamic libraries?"
! . ./myread
! ld="$ans"
!
! cat << EOM
! Some systems may require passing special flags to $ld to create a
library that can be dynamically loaded. If your ld flags include
-L/other/path options to locate libraries outside your loader's normal
search path, you may need to specify those -L options here as well. To
***************
*** 4249,4254 ****
--- 4298,4304 ----
case "$lddlflags" in
''|' ') case "$osname" in
hpux) dflt='-b' ;;
+ linux) dflt='-shared' ;;
next) dflt='none' ;;
solaris) dflt='-G' ;;
sunos) dflt='-assert nodefinitions' ;;
***************
*** 4258,4264 ****
;;
*) dflt="$lddlflags" ;;
esac
! rp="Any special flags to pass to ld to create a dynamically loaded library?"
. ./myread
case "$ans" in
none) lddlflags='' ;;
--- 4308,4314 ----
;;
*) dflt="$lddlflags" ;;
esac
! rp="Any special flags to pass to $ld to create a dynamically loaded library?"
. ./myread
case "$ans" in
none) lddlflags='' ;;
***************
*** 4274,4280 ****
EOM
case "$ccdlflags" in
''|' ') case "$osname" in
! hpux) dflt='none' ;;
next) dflt='none' ;;
sunos) dflt='none' ;;
*) dflt='none' ;;
--- 4324,4331 ----
EOM
case "$ccdlflags" in
''|' ') case "$osname" in
! hpux) dflt='-Wl,-E' ;;
! linux) dflt='-rdynamic' ;;
next) dflt='none' ;;
sunos) dflt='none' ;;
*) dflt='none' ;;
***************
*** 4289,4294 ****
--- 4340,4346 ----
esac
;;
*) usedl="$undef"
+ ld='ld'
dlsrc='dl_none.xs'
lddlflags=''
ccdlflags=''
***************
*** 4420,4426 ****
}
EOM
if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
! ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 &&
$cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
xxx=`./fred`
case $xxx in
--- 4472,4478 ----
}
EOM
if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
! $ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 &&
$cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
xxx=`./fred`
case $xxx in
***************
*** 4552,4561 ****
set d_dosuid
eval $setvar
- : see if drem exists
- set drem d_drem
- eval $inlibc
-
: see if dup2 exists
set dup2 d_dup2
eval $inlibc
--- 4604,4609 ----
***************
*** 4623,4632 ****
set flock d_flock
eval $inlibc
- : see if fmod exists
- set fmod d_fmod
- eval $inlibc
-
: see if fork exists
set fork d_fork
eval $inlibc
--- 4671,4676 ----
***************
*** 5204,5213 ****
for (align = 7; align >= 0; align--) {
for (len = 36; len; len--) {
b = buf+align;
! memcpy(abc, b, len);
for (off = 1; off <= len; off++) {
- memcpy(b, b+off, len);
memcpy(b+off, b, len);
if (memcmp(b, abc, len))
exit(1);
}
--- 5248,5257 ----
for (align = 7; align >= 0; align--) {
for (len = 36; len; len--) {
b = buf+align;
! memcpy(b, abc, len);
for (off = 1; off <= len; off++) {
memcpy(b+off, b, len);
+ memcpy(b, b+off, len);
if (memcmp(b, abc, len))
exit(1);
}
***************
*** 5626,5632 ****
. ./myread
case "$ans" in
y*) hostcat='nidump hosts .';;
! *) ;;
esac
fi
case "$hostcat" in
--- 5670,5679 ----
. ./myread
case "$ans" in
y*) hostcat='nidump hosts .';;
! *) case "$hostcat" in
! nidump*) hostcat='';;
! esac
! ;;
esac
fi
case "$hostcat" in
***************
*** 6097,6103 ****
define)
: Check the return type needed for hash
echo "Checking return type needed for hash for Berkeley DB ..." >&4
! cat >try.c <<'EOCP'
#include <sys/types.h>
#include <db.h>
u_int32_t
--- 6144,6150 ----
define)
: Check the return type needed for hash
echo "Checking return type needed for hash for Berkeley DB ..." >&4
! $cat >try.c <<'EOCP'
#include <sys/types.h>
#include <db.h>
u_int32_t
***************
*** 6122,6128 ****
echo "I can't seem to compile the test program." >&4
db_hashtype=int
fi
! $rm -f try.[co]
echo "Your version of Berkeley DB uses $db_hashtype for hash."
;;
*) db_hashtype=int
--- 6169,6175 ----
echo "I can't seem to compile the test program." >&4
db_hashtype=int
fi
! $rm -f try.*
echo "Your version of Berkeley DB uses $db_hashtype for hash."
;;
*) db_hashtype=int
***************
*** 6158,6164 ****
echo "I can't seem to compile the test program." >&4
db_prefixtype='int'
fi
! $rm -f try.[co]
echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
;;
*) db_prefixtype='int'
--- 6205,6211 ----
echo "I can't seem to compile the test program." >&4
db_prefixtype='int'
fi
! $rm -f try.*
echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
;;
*) db_prefixtype='int'
***************
*** 7702,7708 ****
d_bcopy='$d_bcopy'
d_bsd='$d_bsd'
d_bsdpgrp='$d_bsdpgrp'
- d_byacc='$d_byacc'
d_bzero='$d_bzero'
d_casti32='$d_casti32'
d_castneg='$d_castneg'
--- 7749,7754 ----
***************
*** 7722,7728 ****
d_dlopen='$d_dlopen'
d_dlsymun='$d_dlsymun'
d_dosuid='$d_dosuid'
- d_drem='$d_drem'
d_dup2='$d_dup2'
d_eunice='$d_eunice'
d_fchmod='$d_fchmod'
--- 7768,7773 ----
***************
*** 7734,7740 ****
d_fgetpos='$d_fgetpos'
d_flexfnam='$d_flexfnam'
d_flock='$d_flock'
- d_fmod='$d_fmod'
d_fork='$d_fork'
d_fpathconf='$d_fpathconf'
d_fsetpos='$d_fsetpos'
--- 7779,7784 ----
***************
*** 7945,7950 ****
--- 7989,7995 ----
known_extensions='$known_extensions'
ksh='$ksh'
large='$large'
+ ld='$ld'
lddlflags='$lddlflags'
ldflags='$ldflags'
less='$less'
Index: Makefile.SH
*** perl5.001b/Makefile.SH Fri Apr 7 07:58:29 1995
--- perl5.001c/Makefile.SH Thu Apr 6 13:59:46 1995
***************
*** 77,82 ****
--- 77,83 ----
# I now supply perly.c with the kits, so don't remake perly.c without byacc
BYACC = $byacc
CC = $cc
+ LD = $ld
bin = $installbin
scriptdir = $scriptdir
privlib = $installprivlib
***************
*** 221,227 ****
case "$d_shrplib" in
*define*)
$spitshell >>Makefile <<'!NO!SUBS!'
! ld $(LDDLFLAGS) -o $@ perl.o $(obj)
!NO!SUBS!
;;
*)
--- 222,228 ----
case "$d_shrplib" in
*define*)
$spitshell >>Makefile <<'!NO!SUBS!'
! $(LD) $(LDDLFLAGS) -o $@ perl.o $(obj)
!NO!SUBS!
;;
*)
***************
*** 281,287 ****
# to run with precisely the same version of byacc as I use. You
# normally shouldn't remake perly.[ch].
! run_byacc:
@ echo 'Expect' 109 shift/reduce and 1 reduce/reduce conflict
$(BYACC) -d perly.y
sh $(shellflags) ./perly.fixer y.tab.c perly.c
--- 282,288 ----
# to run with precisely the same version of byacc as I use. You
# normally shouldn't remake perly.[ch].
! run_byacc: FORCE
@ echo 'Expect' 109 shift/reduce and 1 reduce/reduce conflict
$(BYACC) -d perly.y
sh $(shellflags) ./perly.fixer y.tab.c perly.c
***************
*** 292,301 ****
# appear out-of-date after a patch is applied or a new distribution is
# made.
perly.c: perly.y
! - touch perly.c
perly.h: perly.y
! - touch perly.h
# Extensions:
# Names added to $(dynamic_ext) or $(static_ext) will automatically
--- 293,302 ----
# appear out-of-date after a patch is applied or a new distribution is
# made.
perly.c: perly.y
! -@touch perly.c
perly.h: perly.y
! -@touch perly.h
# Extensions:
# Names added to $(dynamic_ext) or $(static_ext) will automatically
***************
*** 337,342 ****
--- 338,344 ----
rm -f config.h makefile makefile.old
rm -f $(private)
rm -rf lib/auto
+ rm -f lib/.exists
rm -f h2ph h2ph.man c2ph pstruct h2xs makeaperl
rm -rf .config
@echo "Note that make realclean does not delete config.sh"
Index: README
*** perl5.001b/README Tue Feb 28 19:40:58 1995
--- perl5.001c/README Thu Apr 6 14:08:57 1995
***************
*** 73,81 ****
Configure supports a number of useful options. Run Configure -h
to get a listing. To compile with gcc, for example, you can run
! Configure -Dcc=gcc, or answer 'gcc' at the cc prompt. If you
! change compilers or make other significant changes, you should
! probably _not_ re-use your old config.sh.
By default, perl will be installed in /usr/local/{bin, lib, man}.
You can specify a different prefix for the default installation
--- 73,85 ----
Configure supports a number of useful options. Run Configure -h
to get a listing. To compile with gcc, for example, you can run
! Configure -Dcc=gcc, or answer 'gcc' at the cc prompt. This is the
! preferred way to invoke an alternate compiler, since the hints
! files can then set appropriate defaults.
!
! If you change compilers or make other significant changes, you should
! probably _not_ re-use your old config.sh. Simply remove it or
! rename it, e.g. mv config.sh config.sh.old.
By default, perl will be installed in /usr/local/{bin, lib, man}.
You can specify a different prefix for the default installation
***************
*** 152,157 ****
--- 156,165 ----
If you get varags problems with gcc, be sure that gcc is installed
correctly. When using gcc, you should probably have i_stdarg='define'
and i_varags='undef' in config.sh.
+ If you wish to use dynamic loading on SunOS or Solaris, and you
+ have GNU as and GNU ld installed, you may need to add -B/bin/ to
+ your $ccflags and $ldflags so that the system's versions of as
+ and ld are used.
5) make test
***************
*** 184,189 ****
--- 192,200 ----
s2p sed-to-perl translator
find2perl find-to-perl translator
h2xs Converts C .h header files to Perl extensions.
+ pod2html, Converters from perl's pod documentation format
+ pod2latex, and to other useful formats.
+ pod2man
library files in $privlib and $archlib specified to
Configure, usually under /usr/local/lib/perl5/.
Index: config.H
Prereq: 3.0.1.3
*** perl5.001b/config.H Tue Feb 28 19:41:30 1995
--- perl5.001c/config.H Thu Apr 6 14:10:48 1995
***************
*** 14,20 ****
* $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
*/
! /* Configuration time: Mon Feb 27 17:21:15 EST 1995
* Configured by: andy
* Target system: crystal crystal 3.2 2 i386
*/
--- 14,20 ----
* $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
*/
! /* Configuration time: Wed Apr 5 14:50:33 EDT 1995
* Configured by: andy
* Target system: crystal crystal 3.2 2 i386
*/
***************
*** 140,148 ****
* 0 = ok
* 1 = couldn't cast < 0
* 2 = couldn't cast >= 0x80000000
*/
/*#define CASTNEGFLOAT /**/
! #define CASTFLAGS 3 /**/
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
--- 140,149 ----
* 0 = ok
* 1 = couldn't cast < 0
* 2 = couldn't cast >= 0x80000000
+ * 4 = couldn't cast in argument expression list
*/
/*#define CASTNEGFLOAT /**/
! #define CASTFLAGS 7 /**/
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
***************
*** 232,245 ****
/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
/*#define DOSUID /**/
- /* HAS_DREM:
- * This symbol, if defined, indicates that the drem routine is
- * available. This routine is roughly the same as fmod, i.e. it
- * computes the remainder r=x-n*y, where n=rint(x/y), whereas fmod
- * uses n=trunc(x/y).
- */
- /*#define HAS_DREM /**/
-
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
--- 233,238 ----
***************
*** 282,293 ****
*/
/*#define HAS_FLOCK /**/
- /* HAS_FMOD:
- * This symbol, if defined, indicates that the fmod routine is
- * available to compute the remainder r=x-n*y where n=trunc(x/y).
- */
- #define HAS_FMOD /**/
-
/* HAS_FORK:
* This symbol, if defined, indicates that the fork routine is
* available.
--- 275,280 ----
***************
*** 597,603 ****
* probably use memmove() or memcpy(). If neither is defined, roll your
* own version.
*/
! #define HAS_SAFE_MEMCPY /**/
/* HAS_SELECT:
* This symbol, if defined, indicates that the select routine is
--- 584,590 ----
* probably use memmove() or memcpy(). If neither is defined, roll your
* own version.
*/
! /*#define HAS_SAFE_MEMCPY /**/
/* HAS_SELECT:
* This symbol, if defined, indicates that the select routine is
***************
*** 959,964 ****
--- 946,964 ----
#define Groups_t gid_t /* Type for 2nd arg to getgroups() */
#endif
+ /* DB_Prefix_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is u_int32_t.
+ */
+ /* DB_Hash_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is size_t.
+ */
+ #define DB_Hash_t int /**/
+ #define DB_Prefix_t int /**/
+
/* I_DIRENT:
* This symbol, if defined, indicates to the C program that it should
* include <dirent.h>. Using this symbol also triggers the definition
***************
*** 1022,1027 ****
--- 1022,1033 ----
*/
/*#define I_MEMORY /**/
+ /* I_NDBM:
+ * This symbol, if defined, indicates that ndbm.h exists and should
+ * be included.
+ */
+ #define I_NDBM /**/
+
/* I_NET_ERRNO:
* This symbol, if defined, indicates that <net/errno.h> exists and
* should be included.
***************
*** 1372,1396 ****
* some sort is available.
*/
/*#define USE_DYNAMIC_LOADING /**/
-
- /* DB_Prefix_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is u_int32_t.
- */
- /* DB_Hash_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is size_t.
- */
- #define DB_Hash_t int /**/
- #define DB_Prefix_t int /**/
-
- /* I_NDBM:
- * This symbol, if defined, indicates that ndbm.h exists and should
- * be included.
- */
- #define I_NDBM /**/
/* I_SYS_STAT:
* This symbol, if defined, indicates to the C program that it should
--- 1378,1383 ----
Index: config_h.SH
Prereq: 3.0.1.3
*** perl5.001b/config_h.SH Tue Feb 28 19:42:13 1995
--- perl5.001c/config_h.SH Thu Apr 6 11:16:18 1995
***************
*** 154,159 ****
--- 154,160 ----
* 0 = ok
* 1 = couldn't cast < 0
* 2 = couldn't cast >= 0x80000000
+ * 4 = couldn't cast in argument expression list
*/
#$d_castneg CASTNEGFLOAT /**/
#define CASTFLAGS $castflags /**/
***************
*** 246,259 ****
#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
#$d_dosuid DOSUID /**/
- /* HAS_DREM:
- * This symbol, if defined, indicates that the drem routine is
- * available. This routine is roughly the same as fmod, i.e. it
- * computes the remainder r=x-n*y, where n=rint(x/y), whereas fmod
- * uses n=trunc(x/y).
- */
- #$d_drem HAS_DREM /**/
-
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
--- 247,252 ----
***************
*** 296,307 ****
*/
#$d_flock HAS_FLOCK /**/
- /* HAS_FMOD:
- * This symbol, if defined, indicates that the fmod routine is
- * available to compute the remainder r=x-n*y where n=trunc(x/y).
- */
- #$d_fmod HAS_FMOD /**/
-
/* HAS_FORK:
* This symbol, if defined, indicates that the fork routine is
* available.
--- 289,294 ----
***************
*** 973,978 ****
--- 960,978 ----
#define Groups_t $groupstype /* Type for 2nd arg to getgroups() */
#endif
+ /* DB_Prefix_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is u_int32_t.
+ */
+ /* DB_Hash_t:
+ * This symbol contains the type of the prefix structure element
+ * in the <db.h> header file. In older versions of DB, it was
+ * int, while in newer ones it is size_t.
+ */
+ #define DB_Hash_t $db_hashtype /**/
+ #define DB_Prefix_t $db_prefixtype /**/
+
/* I_DIRENT:
* This symbol, if defined, indicates to the C program that it should
* include <dirent.h>. Using this symbol also triggers the definition
***************
*** 1036,1041 ****
--- 1036,1047 ----
*/
#$i_memory I_MEMORY /**/
+ /* I_NDBM:
+ * This symbol, if defined, indicates that ndbm.h exists and should
+ * be included.
+ */
+ #$i_ndbm I_NDBM /**/
+
/* I_NET_ERRNO:
* This symbol, if defined, indicates that <net/errno.h> exists and
* should be included.
***************
*** 1386,1410 ****
* some sort is available.
*/
#$usedl USE_DYNAMIC_LOADING /**/
-
- /* DB_Prefix_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is u_int32_t.
- */
- /* DB_Hash_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is size_t.
- */
- #define DB_Hash_t $db_hashtype /**/
- #define DB_Prefix_t $db_prefixtype /**/
-
- /* I_NDBM:
- * This symbol, if defined, indicates that ndbm.h exists and should
- * be included.
- */
- #$i_ndbm I_NDBM /**/
/* I_SYS_STAT:
* This symbol, if defined, indicates to the C program that it should
--- 1392,1397 ----
Index: doio.c
*** perl5.001b/doio.c Thu Mar 9 23:44:15 1995
--- perl5.001c/doio.c Fri Mar 31 15:44:07 1995
***************
*** 43,48 ****
--- 43,58 ----
#include <sys/file.h>
#endif
+ #if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */
+ # include <sys/socket.h>
+ # include <netdb.h>
+ # ifndef ENOTSOCK
+ # ifdef I_NET_ERRNO
+ # include <net/errno.h>
+ # endif
+ # endif
+ #endif
+
bool
do_open(gv,name,len,supplied_fp)
GV *gv;
Index: ext/Fcntl/Fcntl.xs
*** perl5.001b/ext/Fcntl/Fcntl.xs Tue Oct 18 12:28:38 1994
--- perl5.001c/ext/Fcntl/Fcntl.xs Fri Mar 31 15:32:00 1995
***************
*** 51,59 ****
#else
goto not_there;
#endif
! if (strEQ(name, "SETFL"))
! #ifdef SETFL
! return SETFL;
#else
goto not_there;
#endif
--- 51,59 ----
#else
goto not_there;
#endif
! if (strEQ(name, "F_SETFL"))
! #ifdef F_SETFL
! return F_SETFL;
#else
goto not_there;
#endif
Index: handy.h
*** perl5.001b/handy.h Wed Feb 8 19:43:10 1995
--- perl5.001c/handy.h Sun Apr 2 16:13:10 1995
***************
*** 23,36 ****
#define Nullfp Null(FILE*)
#define Nullsv Null(SV*)
! /* bool is built-in for g++-2.6.3, which might be used for an extension. */
! #if !defined(HAS_BOOL) && !defined(_G_HAVE_BOOL)
#ifdef UTS
#define bool int
#else
#define bool char
#endif
! #endif /* !defined(HAS_BOOL) && !defined(_G_HAVE_BOOL) */
#ifdef TRUE
#undef TRUE
--- 23,38 ----
#define Nullfp Null(FILE*)
#define Nullsv Null(SV*)
! /* bool is built-in for g++-2.6.3, which might be used for an extension.
! gcc-2.6.2 under Linux defines _G_HAVE_BOOL to 0, and does not
! define bool. */
! #if !defined(HAS_BOOL) && !(_G_HAVE_BOOL)
#ifdef UTS
#define bool int
#else
#define bool char
#endif
! #endif /* !defined(HAS_BOOL) && !(_G_HAVE_BOOL) */
#ifdef TRUE
#undef TRUE
Index: hints/dynix.sh
*** perl5.001b/hints/dynix.sh Tue Oct 18 12:32:46 1994
--- perl5.001c/hints/dynix.sh Mon Apr 3 17:07:44 1995
***************
*** 1,2 ****
--- 1,3 ----
+ # If this doesn't work, try specifying 'none' for hints.
d_castneg=undef
libswanted=`echo $libswanted | sed -e 's/socket /socket seq /'`
Index: hints/hpux_9.sh
*** perl5.001b/hints/hpux_9.sh Wed Feb 8 19:43:15 1995
--- perl5.001c/hints/hpux_9.sh Tue Mar 28 16:26:21 1995
***************
*** 14,21 ****
;;
esac
libswanted='m dld'
! # ldflags="-Wl,-E -Wl,-a,shared" # Force all shared?
! ldflags="-Wl,-E"
usemymalloc='y'
alignbytes=8
selecttype='int *'
--- 14,21 ----
;;
esac
libswanted='m dld'
! # ccdlflags="-Wl,-E -Wl,-a,shared $ccdlflags" # Force all shared?
! ccdlflags="-Wl,-E $ccdlflags"
usemymalloc='y'
alignbytes=8
selecttype='int *'
Index: hints/linux.sh
*** perl5.001b/hints/linux.sh Sun Mar 12 02:36:00 1995
--- perl5.001c/hints/linux.sh Fri Apr 7 09:20:47 1995
***************
*** 2,21 ****
# Original version by rsanders
# Additional support by Kenneth Albanowski <kjahds@kjahds.com>
#
! # First pass at ELF support by Andy Dougherty <doughera@lafcol.lafayette.edu>
! # Fri Feb 3 14:05:00 EST 1995
! # Use sh Configure -Dcc=gcc-elf to try using gcc-elf. It might work.
#
! # Last updated Mon Mar 6 10:18:10 EST 1995
#
! # Why is this needed?
! bin='/usr/bin'
! # Apparently some versions of gcc 2.6.2 are picking up _G_HAVE_BOOL
! # from somewhere (_G_config.h maybe?) but not actually defining bool.
! # Anyone really know what's going on?
! ccflags='-Dbool=char -DHAS_BOOL'
d_dosuid='define'
--- 2,39 ----
# Original version by rsanders
# Additional support by Kenneth Albanowski <kjahds@kjahds.com>
#
! # ELF support by H.J. Lu <hjl@nynexst.com>
! # Additional info from Nigel Head <nhead@ESOC.bitnet>
! # and Kenneth Albanowski <kjahds@kjahds.com>
#
! # Consolidated by Andy Dougherty <doughera@lafcol.lafayette.edu>
#
+ # Last updated Thu Apr 6 12:22:03 EDT 1995
+ #
+
+ # perl goes into the /usr tree. See the Filesystem Standard
+ # available via anonymous FTP at tsx-11.mit.edu in
+ # /pub/linux/docs/linux-standards/fsstnd.
+ # This used to be
+ # bin='/usr/bin'
+ # but it doesn't seem sensible to put the binary in /usr and all the
+ # rest of the support stuff (lib, man pages) into /usr/local.
+ # However, allow a command line override, e.g. Configure -Dprefix=/foo/bar
+ case "$prefix" in
+ '') prefix='/usr' ;;
+ esac
! # Perl expects BSD style signal handling.
! ccflags="-D__USE_BSD_SIGNAL $ccflags"
! # The following functions are gcc built-ins, but the Configure test
! # may fail because it doesn't supply a proper prototype.
! d_memcmp=define
! d_memcpy=define
!
! # Configure may fail to find lstat() since it's a static/inline
! # function in <sys/stat.h>.
! d_lstat=define
d_dosuid='define'
***************
*** 26,51 ****
'') optimize='-O2' ;;
esac
! case "$cc" in
! *cc-elf*)
so='so'
dlext='so'
! # Configure might not understand nm output for ELF.
! usenm=false
! ;;
! *)
! lddlflags='-r'
so='sa'
dlext='o'
## If you are using DLD 3.2.4 which does not support shared libs,
## uncomment the next two lines:
#ldflags="-static"
#so='none'
! ;;
! esac
! cat <<EOM
You should take a look at hints/linux.sh. There are a some lines you
! may wish to change near the bottom.
EOM
--- 44,103 ----
'') optimize='-O2' ;;
esac
! # Are we using ELF? Thanks to Kenneth Albanowski <kjahds@kjahds.com>
! # for this test.
! cat >try.c <<'EOM'
! /* Test for whether ELF binaries are produced */
! #include <fcntl.h>
! #include <stdlib.h>
! main() {
! char buffer[4];
! int i=open("a.out",O_RDONLY);
! if(i==-1)
! exit(1); /* fail */
! if(read(i,&buffer[0],4)<4)
! exit(1); /* fail */
! if(buffer[0] != 127 || buffer[1] != 'E' ||
! buffer[2] != 'L' || buffer[3] != 'F')
! exit(1); /* fail */
! exit(0); /* succeed (yes, it's ELF) */
! }
! EOM
! if gcc try.c >/dev/null 2>&1 && ./a.out; then
! cat <<'EOM'
!
! You appear to have ELF support. I'll try to use it for dynamic loading.
! EOM
! # Be careful not to overwrite lddlflags, since the user might
! # have specified some -L/path options on the Configure command line.
! lddlflags="-shared $lddlflags"
! ccdlflags='-rdynamic'
so='so'
dlext='so'
! ld=gcc
! else
! echo "You don't have an ELF gcc, using dld if available."
! # We might possibly have a version of DLD around.
! lddlflags="-r $lddlflags"
so='sa'
dlext='o'
## If you are using DLD 3.2.4 which does not support shared libs,
## uncomment the next two lines:
#ldflags="-static"
#so='none'
! fi
! rm -rf try.c a.out
! cat <<'EOM'
You should take a look at hints/linux.sh. There are a some lines you
! may wish to change.
EOM
+
+ # And -- reported by one user:
+ # We need to get -lc away from the link lines.
+ # If we leave it there we get SEGV from miniperl during the build.
+ # This may have to do with bugs in the pre-release version of libc for ELF.
+ # Uncomment the next two lines to remove -lc from the link line.
+ # set `echo " $libswanted " | sed -e 's@ c @ @'`
+ # libswanted="$*"
Index: hints/netbsd.sh
*** perl5.001b/hints/netbsd.sh Tue Oct 18 12:33:27 1994
--- perl5.001c/hints/netbsd.sh Fri Mar 31 15:29:47 1995
***************
*** 1,10 ****
# hints/netbsd.sh
case "$osvers" in
! 0.9|0.8)
usedl="$undef"
;;
! *) d_dlopen="$define"
! cccdlflags='-DPIC -fpic'
! lddlflags='-Bforcearchive -Bshareable'
;;
esac
--- 1,17 ----
# hints/netbsd.sh
+ # netbsd keeps dynamic loading dl*() functions in /lib/crt0.o,
+ # so Configure doesn't find them (unless you abandon the nm scan).
case "$osvers" in
! 0.9*|0.8*)
usedl="$undef"
;;
! *) d_dlopen=$define
! d_dlerror=$define
! cccdlflags="-DPIC -fpic $cccdlflags"
! lddlflags="-Bforcearchive -Bshareable $lddlflags"
;;
esac
+
+ # Avoid telldir prototype conflict in pp_sys.c (NetBSD uses const DIR *)
+ # Configure should test for this. Volunteers?
+ pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
Index: hints/titanos.sh
*** perl5.001b/hints/titanos.sh Tue Oct 18 12:34:08 1994
--- perl5.001c/hints/titanos.sh Fri Mar 31 14:55:53 1995
***************
*** 2,7 ****
--- 2,8 ----
# Created by: JT McDuffie (jt@kpc.com) 26 DEC 1991
# p5ed by: Jarkko Hietaniemi <jhi@hut.fi> Aug 27 1994
# NOTE: You should run Configure with tcsh (yes, tcsh).
+ # Comments by Andy Dougherty <doughera@lafcol.lafayette.edu> 28 Mar 1995
alignbytes="8"
byteorder="4321"
castflags='0'
***************
*** 14,22 ****
models='none'
ccflags="$ccflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C"
cppflags="$cppflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C"
- libs='-lnsl -ldbm -lPW -lmalloc -lm'
stdchar='unsigned char'
! static_ext='DynaLoader NDBM_File Socket'
uidtype='ushort'
voidflags='7'
inclwanted='/usr/include /usr/include/net'
--- 15,38 ----
models='none'
ccflags="$ccflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C"
cppflags="$cppflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C"
stdchar='unsigned char'
! #
! # Apparently there are some harmful libs in Configure's $libswanted.
! # Perl5.000 had: libs='-lnsl -ldbm -lPW -lmalloc -lm'
! # Unfortunately, this line prevents users from including things like
! # -lgdbm and -ldb, which they may or may not have or want.
! # We should probably fiddle with libswanted instead of libs.
! # And even there, we should only bother to delete harmful libraries.
! # However, I don't know what they are or why they should be deleted,
! # so this will have to do for now. --AD 28 Mar 1995
! libswanted='nsl dbm gdbm db PW malloc m'
! #
! # Extensions: This system can not compile POSIX. We'll let Configure
! # figure out the others. Certainly Fcntl, Socket, and at least one *DB*
! # extension should be included.
! # perl5.000 had: static_ext='DynaLoader NDBM_File Socket'
! useposix='n'
! #
uidtype='ushort'
voidflags='7'
inclwanted='/usr/include /usr/include/net'
Index: installperl
*** perl5.001b/installperl Wed Feb 22 14:37:10 1995
--- perl5.001c/installperl Tue Apr 4 11:55:03 1995
***************
*** 12,18 ****
umask 022;
! @scripts = ('cppstdin', 'c2ph', 'h2xs', 'pstruct', 'x2p/s2p', 'x2p/find2perl');
@manpages = (<pod/*.man>, 'x2p/a2p.man', 'x2p/s2p.man');
# Read in the config file.
--- 12,19 ----
umask 022;
! @scripts = ('cppstdin', 'c2ph', 'h2xs', 'pstruct', 'x2p/s2p', 'x2p/find2perl',
! 'pod/pod2man', 'pod/pod2html', 'pod/pod2latex' );
@manpages = (<pod/*.man>, 'x2p/a2p.man', 'x2p/s2p.man');
# Read in the config file.
Index: lib/ExtUtils/MakeMaker.pm
*** perl5.001b/lib/ExtUtils/MakeMaker.pm Sun Mar 12 03:13:57 1995
--- perl5.001c/lib/ExtUtils/MakeMaker.pm Mon Apr 3 15:52:47 1995
***************
*** 1,6 ****
package ExtUtils::MakeMaker;
! $Version = 4.086; # Last edited 9 Mar 1995 by Andy Dougherty
use Config;
check_hints();
--- 1,6 ----
package ExtUtils::MakeMaker;
! $Version = 4.091; # Last edited 31 Mar 1995 by Andreas Koenig
use Config;
check_hints();
***************
*** 9,18 ****
require Exporter;
@ISA = qw(Exporter);
! @EXPORT = qw(&WriteMakefile &mkbootstrap &mksymlists $Verbose);
@EXPORT_OK = qw($Version %att %skip %Recognized_Att_Keys
@MM_Sections %MM_Sections
! &help &lsdir &neatvalue);
$Is_VMS = $Config{'osname'} eq 'VMS';
require ExtUtils::MM_VMS if $Is_VMS;
--- 9,18 ----
require Exporter;
@ISA = qw(Exporter);
! @EXPORT = qw(&WriteMakefile $Verbose);
@EXPORT_OK = qw($Version %att %skip %Recognized_Att_Keys
@MM_Sections %MM_Sections
! &help &lsdir &neatvalue &mkbootstrap &mksymlists);
$Is_VMS = $Config{'osname'} eq 'VMS';
require ExtUtils::MM_VMS if $Is_VMS;
***************
*** 23,29 ****
$Verbose = 0;
$^W=1;
-
=head1 NAME
ExtUtils::MakeMaker - create an extension Makefile
--- 23,28 ----
***************
*** 73,79 ****
perl Makefile.PL INST_LIB=~/myperllib INST_EXE=~/bin
Note, that in this example MakeMaker does the tilde expansion for you
! and INST_ARCHLIB is set to either C<INST_LIB/$Config{"osname"}> if
that directory exists and otherwise to INST_LIB.
Other interesting targets in the generated Makefile are
--- 72,78 ----
perl Makefile.PL INST_LIB=~/myperllib INST_EXE=~/bin
Note, that in this example MakeMaker does the tilde expansion for you
! and INST_ARCHLIB is set to either C<INST_LIB/$Config{"archname"}> if
that directory exists and otherwise to INST_LIB.
Other interesting targets in the generated Makefile are
***************
*** 392,397 ****
--- 391,402 ----
H: Ref to array of *.h file names. Similar to C: above.
+ PL_FILES: Ref to hash of files to be processed as perl programs. MakeMaker
+ will default to any found C<*.PL> file (except C<Makefile.PL>) being
+ keys and the basename of the file being the value. E.g.
+ C<{ 'foobar.PL' => 'foobar' }>. The C<*.PL> files are expected to
+ produce output to the target files themselves.
+
EXE_FILES: Ref to array of executable files. The files will be copied to
the INST_EXE directory. The installed files will be deleted
by a make realclean.
***************
*** 455,460 ****
--- 460,466 ----
'tool_xsubpp' => {},
'tools_other' => {},
'post_constants' => {},
+ 'pasthru' => {},
'c_o' => {},
'xs_c' => {},
'xs_o' => {},
***************
*** 467,472 ****
--- 473,479 ----
'static' => {},
'static_lib' => {},
'installpm' => {},
+ 'processPL' => {},
'installbin' => {},
'subdirs' => {},
'clean' => {},
***************
*** 527,532 ****
--- 534,540 ----
parse_args(\%att, @ARGV);
my(%initial_att) = %att; # record initial attributes
+ my($key);
MY->init_main();
***************
*** 553,558 ****
--- 561,567 ----
# build hash for SKIP to make testing easy
%skip = map( ($_,1), @{$att{'SKIP'} || []});
+ my $section;
foreach $section ( @MM_Sections ){
print "Processing Makefile '$section' section" if ($Verbose >= 2);
my($skipit) = skipcheck($section);
***************
*** 658,664 ****
return "{ ".join(', ',@m)." }";
}
-
# ------ Define the MakeMaker default methods in package MM_Unix ------
package MM_Unix;
--- 667,672 ----
***************
*** 687,694 ****
# --- Initialize PERL_LIB, INST_LIB, PERL_SRC
# *Real* information: where did we get these two from? ...
! $inc_config_dir = dirname($INC{'Config.pm'});
! $inc_carp_dir = dirname($INC{'Carp.pm'});
# Typically PERL_* and INST_* will be identical but that need
# not be the case (e.g., installing into project libraries etc).
--- 695,702 ----
# --- Initialize PERL_LIB, INST_LIB, PERL_SRC
# *Real* information: where did we get these two from? ...
! my $inc_config_dir = dirname($INC{'Config.pm'});
! my $inc_carp_dir = dirname($INC{'Carp.pm'});
# Typically PERL_* and INST_* will be identical but that need
# not be the case (e.g., installing into project libraries etc).
***************
*** 704,710 ****
unless ($att{PERL_SRC}){
foreach(qw(../.. ../../.. ../../../..)){
! ($att{PERL_SRC}=$_, last) if -f "$_/config.sh";
}
}
unless ($att{PERL_SRC}){
--- 712,721 ----
unless ($att{PERL_SRC}){
foreach(qw(../.. ../../.. ../../../..)){
! if ( -f "$_/config.sh" && -f "$_/perl.h" && -f "$_/lib/Exporter.pm") {
! $att{PERL_SRC}=$_ ;
! last;
! }
}
}
unless ($att{PERL_SRC}){
***************
*** 719,724 ****
--- 730,748 ----
$att{PERL_LIB} = "$att{PERL_SRC}/lib" unless $att{PERL_LIB};
$att{PERL_ARCHLIB} = $att{PERL_LIB};
$att{PERL_INC} = $att{PERL_SRC};
+ # catch an situation that has occurred a few times in the past:
+ warn <<EOM unless -s "$att{PERL_SRC}/cflags";
+ You cannot build extensions below the perl source tree after executing
+ a 'make clean' in the perl source tree.
+
+ To rebuild extensions distributed with the perl source you should
+ simply Configure (to include those extensions) and then build perl as
+ normal. After installing perl the source tree can be deleted. It is not
+ needed for building extensions.
+
+ It is recommended that you unpack and build additional extensions away
+ from the perl source tree.
+ EOM
}
# INST_LIB typically pre-set if building an extension after
***************
*** 728,740 ****
if (defined $att{PERL_SRC}) {
$att{INST_LIB} = $att{PERL_LIB};
} else {
! $att{INST_LIB} = "$pwd/blib";
}
}
# Try to work out what INST_ARCHLIB should be if not set:
unless ($att{INST_ARCHLIB}){
my(%archmap) = (
! "$pwd/blib" => "$pwd/blib", # our private build lib
$att{PERL_LIB} => $att{PERL_ARCHLIB},
$Config{'privlib'} => $Config{'archlib'},
$Config{'installprivlib'} => $Config{'installarchlib'},
--- 752,764 ----
if (defined $att{PERL_SRC}) {
$att{INST_LIB} = $att{PERL_LIB};
} else {
! $att{INST_LIB} = "./blib";
}
}
# Try to work out what INST_ARCHLIB should be if not set:
unless ($att{INST_ARCHLIB}){
my(%archmap) = (
! "./blib" => "./blib", # our private build lib
$att{PERL_LIB} => $att{PERL_ARCHLIB},
$Config{'privlib'} => $Config{'archlib'},
$Config{'installprivlib'} => $Config{'installarchlib'},
***************
*** 810,816 ****
sub init_dirscan { # --- File and Directory Lists (.xs .pm etc)
! my($name, %dir, %xs, %c, %h, %ignore);
local(%pm); #the sub in find() has to see this hash
$ignore{'test.pl'} = 1;
$ignore{'makefile.pl'} = 1 if $Is_VMS;
--- 834,840 ----
sub init_dirscan { # --- File and Directory Lists (.xs .pm etc)
! my($name, %dir, %xs, %c, %h, %ignore, %pl_files);
local(%pm); #the sub in find() has to see this hash
$ignore{'test.pl'} = 1;
$ignore{'makefile.pl'} = 1 if $Is_VMS;
***************
*** 828,833 ****
--- 852,859 ----
$h{$name} = 1;
} elsif ($name =~ /\.p[ml]$/){
$pm{$name} = "\$(INST_LIBDIR)/$name";
+ } elsif ($name =~ /\.PL$/ && $name ne "Makefile.PL") {
+ ($pl_files{$name} = $name) =~ s/\.PL$// ;
}
}
***************
*** 890,895 ****
--- 916,922 ----
my($sufx) = $Is_VMS ? '.obj' : '.o';
$att{O_FILES} = [grep s/\.c$/$sufx/, @o_files] ;
$att{H} = [sort keys %h] unless $att{H};
+ $att{PL_FILES} = \%pl_files unless $att{PL_FILES};
}
***************
*** 899,905 ****
}
sub init_others { # --- Initialize Other Attributes
!
for $key (keys(%Recognized_Att_Keys), keys(%Other_Att_Keys)){
# avoid warnings for uninitialized vars
next if exists $att{$key};
--- 926,932 ----
}
sub init_others { # --- Initialize Other Attributes
! my($key);
for $key (keys(%Recognized_Att_Keys), keys(%Other_Att_Keys)){
# avoid warnings for uninitialized vars
next if exists $att{$key};
***************
*** 1107,1112 ****
--- 1134,1140 ----
join('',@m);
}
+ $Const_cccmd=0; # package global
sub const_cccmd{
my($self,$libperl)=@_;
***************
*** 1115,1125 ****
# e.g., do both and compare results during the transition period.
my($cc,$ccflags,$optimize,$large,$split, $shflags)
= @Config{qw(cc ccflags optimize large split shellflags)};
$shflags = '' unless $shflags;
my($prog, $old, $uc, $perltype);
! chop($old = `cd $att{PERL_SRC}; sh $shflags ./cflags $libperl $att{BASEEXT}.c 2>/dev/null`)
! if $att{PERL_SRC};
my(%map) = (
D => '-DDEBUGGING',
--- 1143,1158 ----
# e.g., do both and compare results during the transition period.
my($cc,$ccflags,$optimize,$large,$split, $shflags)
= @Config{qw(cc ccflags optimize large split shellflags)};
+ my($optdebug)="";
+
$shflags = '' unless $shflags;
my($prog, $old, $uc, $perltype);
! unless ($Const_cccmd++){
! chop($old = `cd $att{PERL_SRC}; sh $shflags ./cflags $libperl $att{BASEEXT}.c`)
! if $att{PERL_SRC};
! $Const_cccmd++; # shut up typo warning
! }
my(%map) = (
D => '-DDEBUGGING',
***************
*** 1162,1168 ****
echo large=\$large
echo split=\$split
`;
! my(%cflags);
foreach $line (@o){
chomp $line;
if ($line =~ /(.*?)=\s*(.*)\s*$/){
--- 1195,1201 ----
echo large=\$large
echo split=\$split
`;
! my(%cflags,$line);
foreach $line (@o){
chomp $line;
if ($line =~ /(.*?)=\s*(.*)\s*$/){
***************
*** 1298,1303 ****
--- 1331,1349 ----
"";
}
+ sub pasthru {
+ my(@m,@pasthru,$key);
+ # It has to be considered carefully, which variables are apt to be passed through, e.g. PERL_SRC
+ # is not suited for subdirectories, as it might be relativ to the parent directory.
+ # Probably we need a PASTHRU2 variable. PASTHRU1 is a conservative approach, that hardly changes
+ # MakeMaker between version 4.086 and 4.09.
+ push @m, "\nPASTHRU1 = ";
+ foreach $key (qw(INST_ARCHLIB INST_EXE INST_LIB LIBPERL_A LINKTYPE)){
+ push @pasthru, "$key=\"\$($key)\"";
+ }
+ push @m, join "\\\n\t", @pasthru;
+ join "", @m;
+ }
# --- Translation Sections ---
***************
*** 1334,1343 ****
all :: config linkext $(INST_PM)
'.$att{NOOP}.'
! config :: '.$att{MAKEFILE}.'
! @ $(MKPATH) $(INST_LIBDIR) $(INST_ARCHAUTODIR)
';
push @m, '
$(O_FILES): $(H_FILES)
' if @{$att{O_FILES} || []} && @{$att{H} || []};
--- 1380,1390 ----
all :: config linkext $(INST_PM)
'.$att{NOOP}.'
! config :: '.$att{MAKEFILE}.' $(INST_LIBDIR)/.exists $(INST_ARCHAUTODIR)/.exists
';
+ push @m, MM->dir_target('$(INST_LIBDIR)', '$(INST_ARCHAUTODIR)');
+
push @m, '
$(O_FILES): $(H_FILES)
' if @{$att{O_FILES} || []} && @{$att{H} || []};
***************
*** 1375,1382 ****
push(@m,"
$att{BASEEXT}.exp: Makefile.PL
! ",' $(PERL) $(I_PERL_LIBS) -e \'use ExtUtils::MakeMaker; \\
! mksymlists(DL_FUNCS => ',
%$funcs ? neatvalue($funcs) : '""',', DL_VARS => ',
@$vars ? neatvalue($vars) : '""', ", NAME => \"$att{NAME}\")'
");
--- 1422,1429 ----
push(@m,"
$att{BASEEXT}.exp: Makefile.PL
! ",' $(PERL) $(I_PERL_LIBS) -e \'use ExtUtils::MakeMaker qw(&mksymlists); \\
! &mksymlists(DL_FUNCS => ',
%$funcs ? neatvalue($funcs) : '""',', DL_VARS => ',
@$vars ? neatvalue($vars) : '""', ", NAME => \"$att{NAME}\")'
");
***************
*** 1406,1412 ****
$(BOOTSTRAP): '."$att{MAKEFILE} $att{BOOTDEP}".'
@ echo "Running mkbootstrap for $(NAME) ($(BSLOADLIBS))"
@ $(PERL) $(I_PERL_LIBS) \
! -e \'use ExtUtils::MakeMaker; &mkbootstrap("$(BSLOADLIBS)");\' \
INST_LIB=$(INST_LIB) INST_ARCHLIB=$(INST_ARCHLIB) PERL_SRC=$(PERL_SRC) NAME=$(NAME)
@ $(TOUCH) $(BOOTSTRAP)
--- 1453,1459 ----
$(BOOTSTRAP): '."$att{MAKEFILE} $att{BOOTDEP}".'
@ echo "Running mkbootstrap for $(NAME) ($(BSLOADLIBS))"
@ $(PERL) $(I_PERL_LIBS) \
! -e \'use ExtUtils::MakeMaker qw(&mkbootstrap); &mkbootstrap("$(BSLOADLIBS)");\' \
INST_LIB=$(INST_LIB) INST_ARCHLIB=$(INST_ARCHLIB) PERL_SRC=$(PERL_SRC) NAME=$(NAME)
@ $(TOUCH) $(BOOTSTRAP)
***************
*** 1431,1438 ****
ARMAYBE = '.$armaybe.'
OTHERLDFLAGS = '.$otherldflags.'
! $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP)
! @ $(MKPATH) $(INST_ARCHAUTODIR)
');
if ($armaybe ne ':'){
$ldfrom = "tmp.a";
--- 1478,1484 ----
ARMAYBE = '.$armaybe.'
OTHERLDFLAGS = '.$otherldflags.'
! $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists
');
if ($armaybe ne ':'){
$ldfrom = "tmp.a";
***************
*** 1442,1447 ****
--- 1488,1495 ----
$ldfrom = "-all $ldfrom -none" if ($osname eq 'dec_osf');
push(@m,' $(LD) -o $@ $(LDDLFLAGS) '.$ldfrom.
' $(OTHERLDFLAGS) $(MYEXTLIB) $(LDLOADLIBS)'."\n");
+
+ push @m, MM->dir_target('$(INST_ARCHAUTODIR)');
join('',@m);
}
***************
*** 1460,1467 ****
sub static_lib{
my(@m);
push(@m, <<'END');
! $(INST_STATIC): $(OBJECT) $(MYEXTLIB)
! @ $(MKPATH) $(INST_ARCHAUTODIR)
END
# If this extension has it's own library (eg SDBM_File)
# then copy that to $(INST_STATIC) and add $(OBJECT) into it.
--- 1508,1514 ----
sub static_lib{
my(@m);
push(@m, <<'END');
! $(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)/.exists
END
# If this extension has it's own library (eg SDBM_File)
# then copy that to $(INST_STATIC) and add $(OBJECT) into it.
***************
*** 1477,1482 ****
--- 1524,1530 ----
push(@m, <<'END') if $att{PERL_SRC};
@ echo "$(EXTRALIBS)" >> $(PERL_SRC)/ext.libs
END
+ push @m, MM->dir_target('$(INST_ARCHAUTODIR)');
join('', "\n",@m);
}
***************
*** 1506,1521 ****
my($instdir) = $inst =~ m|(.*)/|;
my(@m);
push(@m,"
! $inst: $dist Makefile
".' @ '.$att{RM_F}.' $@
- @ $(MKPATH) '.$instdir.'
'."$att{CP} $dist".' $@
');
push(@m, "\t\@\$(AUTOSPLITFILE) \$@ $splitlib/auto\n")
if ($splitlib and $inst =~ m/\.pm$/);
join('', @m);
}
sub installbin {
return "" unless $att{EXE_FILES} && ref $att{EXE_FILES} eq "ARRAY";
my(@m, $from, $to, %fromto, @to);
--- 1554,1584 ----
my($instdir) = $inst =~ m|(.*)/|;
my(@m);
push(@m,"
! $inst: $dist Makefile $instdir/.exists
".' @ '.$att{RM_F}.' $@
'."$att{CP} $dist".' $@
');
push(@m, "\t\@\$(AUTOSPLITFILE) \$@ $splitlib/auto\n")
if ($splitlib and $inst =~ m/\.pm$/);
+
+ push @m, MM->dir_target($instdir);
join('', @m);
}
+ sub processPL {
+ return "" unless $att{PL_FILES};
+ my(@m, $plfile);
+ foreach $plfile (sort keys %{$att{PL_FILES}}) {
+ push @m, "
+ all :: $att{PL_FILES}->{$plfile}
+
+ $att{PL_FILES}->{$plfile} :: $plfile
+ \$(PERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) $plfile
+ ";
+ }
+ join "", @m;
+ }
+
sub installbin {
return "" unless $att{EXE_FILES} && ref $att{EXE_FILES} eq "ARRAY";
my(@m, $from, $to, %fromto, @to);
***************
*** 1589,1608 ****
# MY::subdir_x() method to override this one.
qq{
config :: $subdir/$att{MAKEFILE}
! cd $subdir ; \$(MAKE) config INST_LIB=\$(INST_LIB) INST_ARCHLIB=\$(INST_ARCHLIB) \\
! INST_EXE=\$(INST_EXE) LINKTYPE=\$(LINKTYPE) LIBPERL_A=\$(LIBPERL_A) \$(SUBDIR_MAKEFILE_PL_ARGS)
$subdir/$att{MAKEFILE}: $subdir/Makefile.PL \$(CONFIGDEP)
}.' @echo "Rebuilding $@ ..."
$(PERL) $(I_PERL_LIBS) \\
-e "use ExtUtils::MakeMaker; MM->runsubdirpl(qw('.$subdir.'))" \\
! INST_LIB=$(INST_LIB) INST_ARCHLIB=$(INST_ARCHLIB) \\
! INST_EXE=$(INST_EXE) LINKTYPE=\$(LINKTYPE) LIBPERL_A=$(LIBPERL_A) $(SUBDIR_MAKEFILE_PL_ARGS)
@echo "Rebuild of $@ complete."
'.qq{
subdirs ::
! cd $subdir ; \$(MAKE) all LINKTYPE=\$(LINKTYPE)
};
}
--- 1652,1669 ----
# MY::subdir_x() method to override this one.
qq{
config :: $subdir/$att{MAKEFILE}
! cd $subdir && \$(MAKE) config \$(PASTHRU1) \$(SUBDIR_MAKEFILE_PL_ARGS)
$subdir/$att{MAKEFILE}: $subdir/Makefile.PL \$(CONFIGDEP)
}.' @echo "Rebuilding $@ ..."
$(PERL) $(I_PERL_LIBS) \\
-e "use ExtUtils::MakeMaker; MM->runsubdirpl(qw('.$subdir.'))" \\
! $(PASTHRU1) $(SUBDIR_MAKEFILE_PL_ARGS)
@echo "Rebuild of $@ complete."
'.qq{
subdirs ::
! cd $subdir && \$(MAKE) all \$(PASTHRU1)
};
}
***************
*** 1640,1646 ****
realclean purge :: clean
');
# realclean subdirectories first (already cleaned)
! $sub = "\t-cd %s && test -f %s && \$(MAKE) %s realclean\n";
foreach(@{$att{DIR}}){
push(@m, sprintf($sub,$_,"$att{MAKEFILE}.old","-f $att{MAKEFILE}.old"));
push(@m, sprintf($sub,$_,"$att{MAKEFILE}",''));
--- 1701,1707 ----
realclean purge :: clean
');
# realclean subdirectories first (already cleaned)
! my $sub = "\t-cd %s && test -f %s && \$(MAKE) %s realclean\n";
foreach(@{$att{DIR}}){
push(@m, sprintf($sub,$_,"$att{MAKEFILE}.old","-f $att{MAKEFILE}.old"));
push(@m, sprintf($sub,$_,"$att{MAKEFILE}",''));
***************
*** 1670,1677 ****
distclean: clean
$preop
$att{RM_F} $mkfiles
! cd ..; tar $tarflags $tarname.tar \$(BASEEXT)
! cd ..; $compress $tarname.tar
$postop
";
}
--- 1731,1738 ----
distclean: clean
$preop
$att{RM_F} $mkfiles
! cd .. && tar $tarflags $tarname.tar \$(BASEEXT)
! cd .. && $compress $tarname.tar
$postop
";
}
***************
*** 1694,1700 ****
push(@m, <<'END') if -f "test.pl";
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) test.pl
END
! push(@m, map("\tcd $_ && test -f $att{MAKEFILE} && \$(MAKE) test LINKTYPE=\$(LINKTYPE)\n",
@{$att{DIR}}));
push(@m, "\t\@echo 'No tests defined for \$(NAME) extension.'\n") unless @m > 1;
join("", @m);
--- 1755,1761 ----
push(@m, <<'END') if -f "test.pl";
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) test.pl
END
! push(@m, map("\tcd $_ && test -f $att{MAKEFILE} && \$(MAKE) test \$(PASTHRU)\n",
@{$att{DIR}}));
push(@m, "\t\@echo 'No tests defined for \$(NAME) extension.'\n") unless @m > 1;
join("", @m);
***************
*** 1707,1714 ****
push @m, q{
doc_install ::
@ $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \\
! -e 'use ExtUtils::MakeMaker; MM->writedoc("Module", "$(NAME)", \\
! "LINKTYPE=$(LINKTYPE)", "VERSION=$(VERSION)", "EXE_FILES=$(EXE_FILES)")'
};
push(@m, "
--- 1768,1775 ----
push @m, q{
doc_install ::
@ $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \\
! -e "use ExtUtils::MakeMaker; MM->writedoc('Module', '$(NAME)', \\
! 'LINKTYPE=$(LINKTYPE)', 'VERSION=$(VERSION)', 'EXE_FILES=$(EXE_FILES)')"
};
push(@m, "
***************
*** 1761,1767 ****
$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
@echo "Warning: $(PERL_ARCHLIB)/Config.pm may be out of date with $(PERL_SRC)/config.sh"
! cd $(PERL_SRC); $(MAKE) lib/Config.pm
') if $att{PERL_SRC};
push(@m, join(" ", values %{$att{XS}})." : \$(XSUBPPDEPS)\n")
--- 1822,1828 ----
$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
@echo "Warning: $(PERL_ARCHLIB)/Config.pm may be out of date with $(PERL_SRC)/config.sh"
! cd $(PERL_SRC) && $(MAKE) lib/Config.pm
') if $att{PERL_SRC};
push(@m, join(" ", values %{$att{XS}})." : \$(XSUBPPDEPS)\n")
***************
*** 1784,1799 ****
@echo "Cleaning current config before rebuilding Makefile..."
-@mv '."$att{MAKEFILE} $att{MAKEFILE}.old".'
-$(MAKE) -f '.$att{MAKEFILE}.'.old clean >/dev/null 2>&1 || true
! $(PERL) $(I_PERL_LIBS) Makefile.PL
@echo "Now you must rerun make."; false
';
}
-
sub postamble{
"";
}
# --- Make-A-Perl section ---
sub staticmake {
--- 1845,1883 ----
@echo "Cleaning current config before rebuilding Makefile..."
-@mv '."$att{MAKEFILE} $att{MAKEFILE}.old".'
-$(MAKE) -f '.$att{MAKEFILE}.'.old clean >/dev/null 2>&1 || true
! $(PERL) $(I_PERL_LIBS) Makefile.PL '."@ARGV".'
@echo "Now you must rerun make."; false
';
}
sub postamble{
"";
}
+ # --- Make-Directories section (internal method) ---
+ # dir_target(@array) returns a Makefile entry for the file .exists in each
+ # named directory. Returns nothing, if the entry has already been processed.
+ # We're helpless though, if the same directory comes as $(FOO) _and_ as "bar".
+ # Both of them get an entry, that's why we use "::". I chose '$(PERL)' as the
+ # prerequisite, because there has to be one, something that doesn't change
+ # too often :)
+ %Dir_Target = (); # package global
+
+ sub dir_target {
+ my($self,@dirs)=@_;
+ my(@m,$dir);
+ foreach $dir (@dirs) {
+ next if $Dir_Target{$dir};
+ push @m, "
+ $dir/.exists :: \$(PERL)
+ \@ \$(MKPATH) $dir
+ \@ \$(TOUCH) $dir/.exists
+ ";
+ $Dir_Target{$dir}++;
+ }
+ join "", @m;
+ }
+
# --- Make-A-Perl section ---
sub staticmake {
***************
*** 1838,1843 ****
--- 1922,1929 ----
File::Find::find(sub {
return unless m/\.a$/;
return if m/^libperl/;
+ # don't include the installed version of this extension
+ return if $File::Find::name =~ m:auto/$att{FULLEXT}/$att{BASEEXT}.a$:;
$static{fastcwd() . "/" . $_}++;
}, grep( -d $_, @{$searchdirs || []}) );
***************
*** 1868,1886 ****
MAP_EXTRA = @{$extra}
MAP_PRELIBS = $Config{'libs'} $Config{'cryptlib'}
";
! if ($libperl) {
! unless (-f $libperl || -f ($libperl = "$Config{'installarchlib'}/CORE/$libperl")){
! print STDOUT "Warning: $libperl not found";
! undef $libperl;
! }
! }
! unless ($libperl) {
! if (defined $att{PERL_SRC}) {
! $libperl = "$att{PERL_SRC}/libperl.a";
! } elsif ( -f ( $libperl = "$Config{'installarchlib'}/CORE/libperl.a" )) {
! } else {
! print STDOUT "Warning: $libperl not found";
! }
}
push @m, "
--- 1954,1967 ----
MAP_EXTRA = @{$extra}
MAP_PRELIBS = $Config{'libs'} $Config{'cryptlib'}
";
!
! unless ($libperl && -f $libperl) {
! my $dir = (defined $att{PERL_SRC}) ? $att{PERL_SRC}
! : "$Config{'installarchlib'}/CORE";
! $libperl = "libperl.a" unless $libperl;
! $libperl = "$dir/$libperl";
! print STDOUT "Warning: $libperl not found"
! unless (-f $libperl || defined($att{PERL_SRC}));
}
push @m, "
***************
*** 1910,1918 ****
# We write MAP_EXTRA outside the perl program to have it eval'd by the shell
push @m, q{
doc_inst_perl:
! @ $(FULLPERL) -e 'use ExtUtils::MakeMaker; MM->writedoc("Perl binary", \\
! "$(MAP_TARGET)", "MAP_STATIC=$(MAP_STATIC)", \\
! "MAP_EXTRA=@ARGV", "MAP_LIBPERL=$(MAP_LIBPERL)")' -- $(MAP_EXTRA)
};
push @m, qq{
--- 1991,1999 ----
# We write MAP_EXTRA outside the perl program to have it eval'd by the shell
push @m, q{
doc_inst_perl:
! @ $(FULLPERL) -e 'use ExtUtils::MakeMaker; MM->writedoc("Perl binary",' \\
! -e '"$(MAP_TARGET)", "MAP_STATIC=$(MAP_STATIC)",' \\
! -e '"MAP_EXTRA=@ARGV", "MAP_LIBPERL=$(MAP_LIBPERL)")' -- $(MAP_EXTRA)
};
push @m, qq{
***************
*** 2140,2145 ****
--- 2221,2227 ----
sub mksymlists {
my($self) = shift;
+ my($pkg);
# only AIX requires a symbol list at this point
# (so does VMS, but that's handled by the MM_VMS package)
***************
*** 2157,2162 ****
--- 2239,2245 ----
print EXP join("\n",@{$att{DL_VARS}}) if $att{DL_VARS};
foreach $pkg (keys %{$att{DL_FUNCS}}) {
(my($prefix) = $pkg) =~ s/\W/_/g;
+ my $func;
foreach $func (@{$att{DL_FUNCS}->{$pkg}}) {
$func = "XS_${prefix}_$func" unless $func =~ /^boot_/;
print EXP "$func\n";
***************
*** 2199,2204 ****
--- 2282,2288 ----
close POD;
}
+
=head1 AUTHORS
Andy Dougherty F<E<lt>doughera@lafcol.lafayette.eduE<gt>>, Andreas
***************
*** 2229,2241 ****
v4.04 Februeary 5th 1995 By Andreas Koenig
v4.05 February 8th 1995 By Andreas Koenig
v4.06 February 10th 1995 By Andreas Koenig
-
- Cleaning up the new interface. Suggestion to freeze now until 5.001.
-
v4.061 February 12th 1995 By Andreas Koenig
-
- Fixes of some my() declarations and of @extra computing in makeaperl().
-
v4.08 - 4.085 February 14th-21st 1995 by Andreas Koenig
Introduces EXE_FILES and INST_EXE for installing executable scripts
--- 2313,2319 ----
***************
*** 2272,2277 ****
--- 2350,2397 ----
v4.086 March 9 1995 by Andy Dougherty
Fixed some AIX buglets. Fixed DLD support for Linux with gcc 2.6.2.
+
+ v4.09 March 31 1995 by Andreas Koenig
+
+ Patches from Tim (/usr/local/lib/perl5/hpux/CORE/libperl.a not found
+ message eliminated, and a small makeaperl patch).
+
+ blib now is a relative directory (./blib).
+
+ Documentation bug fixed.
+
+ Chdir in the Makefile always followed by "&&", not by ";".
+
+ The output of cflags is no longer directed to /dev/null, but the shell
+ version of cflags is now only called once.
+
+ The result of MakeMaker's cflags takes precedence over
+ shell-cflags.
+
+ Introduced a $(PASTHRU) variable, that doesn't have much effect yet,
+ but now it's easier to add variables that have to be passed to
+ recursive makes.
+
+ 'make config' will now always reapply the original arguments to the
+ 'perl Makefile.PL'.
+
+ MKPATH will be called only once for any directory (should speed up Tk
+ building and installation considerably).
+
+ "Subroutine mkbootstrap redefined" message eliminated. It was
+ necessary to move &mkbootstrap and &mksymlists from @EXPORT to
+ @EXPORT_OK.
+
+ C<*.PL> files will be processed by C<$(PERL)>.
+
+ Turned some globals into my() variables, where it was obvious to be an
+ oversight.
+
+ Changed some continuation lines so that they work on Solaris and Unicos.
+
+ v4.091 April 3 1995 by Andy Dougherty
+
+ Another attempt to fix writedoc() from Dean Roehrich.
=head1 NOTES
Index: myconfig
*** perl5.001b/myconfig Tue Oct 18 12:21:05 1994
--- perl5.001c/myconfig Tue Apr 4 12:13:21 1995
***************
*** 22,28 ****
uname='$myuname'
hint=$hint
Compiler:
! cc='$cc', optimize='$optimize'
cppflags='$cppflags'
ccflags ='$ccflags'
ldflags ='$ldflags'
--- 22,28 ----
uname='$myuname'
hint=$hint
Compiler:
! cc='$cc', optimize='$optimize', ld='$ld'
cppflags='$cppflags'
ccflags ='$ccflags'
ldflags ='$ldflags'
Index: perl.c
*** perl5.001b/perl.c Sun Mar 12 03:14:11 1995
--- perl5.001c/perl.c Fri Apr 7 07:55:27 1995
***************
*** 833,842 ****
#if defined(DOSISH)
# define PERLLIB_SEP ';'
- #elif defined(VMS)
- # define PERLLIB_SEP '|'
#else
# define PERLLIB_SEP ':'
#endif
static void
--- 833,844 ----
#if defined(DOSISH)
# define PERLLIB_SEP ';'
#else
+ # if defined(VMS)
+ # define PERLLIB_SEP '|'
+ # else
# define PERLLIB_SEP ':'
+ # endif
#endif
static void
Index: perl.h
*** perl5.001b/perl.h Sun Mar 12 03:14:13 1995
--- perl5.001c/perl.h Wed Apr 5 16:43:59 1995
***************
*** 639,647 ****
#define U_L(what) ((U32)(what))
#else
U32 cast_ulong _((double));
! #define U_S(what) ((U16)cast_ulong(what))
! #define U_I(what) ((unsigned int)cast_ulong(what))
! #define U_L(what) (cast_ulong(what))
#endif
#ifdef CASTI32
--- 639,647 ----
#define U_L(what) ((U32)(what))
#else
U32 cast_ulong _((double));
! #define U_S(what) ((U16)cast_ulong((double)(what)))
! #define U_I(what) ((unsigned int)cast_ulong((double)(what)))
! #define U_L(what) (cast_ulong((double)(what)))
#endif
#ifdef CASTI32
***************
*** 649,657 ****
#define I_V(what) ((IV)(what))
#else
I32 cast_i32 _((double));
! #define I_32(what) (cast_i32(what))
IV cast_iv _((double));
! #define I_V(what) (cast_iv(what))
#endif
struct Outrec {
--- 649,657 ----
#define I_V(what) ((IV)(what))
#else
I32 cast_i32 _((double));
! #define I_32(what) (cast_i32((double)(what)))
IV cast_iv _((double));
! #define I_V(what) (cast_iv((double)(what)))
#endif
struct Outrec {
***************
*** 758,764 ****
extern "C" {
# endif
double exp _((double));
- double fmod _((double,double));
double log _((double));
double sqrt _((double));
double modf _((double,double*));
--- 758,763 ----
***************
*** 768,782 ****
double pow _((double,double));
# ifdef __cplusplus
};
- # endif
- #endif
-
- #ifndef HAS_FMOD
- # ifdef HAS_DREM
- # define fmod(x,y) drem((x),(y))
- # else
- # define USE_MY_FMOD
- # define fmod(x,y) my_fmod(x,y)
# endif
#endif
--- 767,772 ----
Index: proto.h
*** perl5.001b/proto.h Mon Feb 13 21:49:25 1995
--- perl5.001c/proto.h Wed Apr 5 14:50:41 1995
***************
*** 211,219 ****
char* my_bzero _((char* loc, I32 len));
#endif
void my_exit _((U32 status)) __attribute__((noreturn));
- #ifdef USE_MY_FMOD
- double my_fmod _((double x, double y));
- #endif
I32 my_lstat _((void));
#ifndef HAS_MEMCMP
I32 my_memcmp _((unsigned char* s1, unsigned char* s2, I32 len));
--- 211,216 ----
Index: sv.h
*** perl5.001b/sv.h Wed Feb 15 19:06:11 1995
--- perl5.001c/sv.h Tue Apr 4 12:14:06 1995
***************
*** 45,51 ****
};
struct cv {
! XPVGV* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
};
--- 45,51 ----
};
struct cv {
! XPVCV* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
};
Index: util.c
*** perl5.001b/util.c Sun Mar 12 02:36:14 1995
--- perl5.001c/util.c Wed Apr 5 15:52:50 1995
***************
*** 1579,1590 ****
cast_i32(f)
double f;
{
! # define BIGDOUBLE 2147483648.0 /* Assume 32 bit int's ! */
# define BIGNEGDOUBLE (-2147483648.0)
if (f >= BIGDOUBLE)
! return (I32)fmod(f, BIGDOUBLE);
if (f <= BIGNEGDOUBLE)
! return (I32)fmod(f, BIGNEGDOUBLE);
return (I32) f;
}
# undef BIGDOUBLE
--- 1579,1590 ----
cast_i32(f)
double f;
{
! # define BIGDOUBLE 2147483647.0 /* Assume 32 bit int's ! */
# define BIGNEGDOUBLE (-2147483648.0)
if (f >= BIGDOUBLE)
! return (I32) BIGDOUBLE;
if (f <= BIGNEGDOUBLE)
! return (I32) BIGNEGDOUBLE;
return (I32) f;
}
# undef BIGDOUBLE
***************
*** 1595,1606 ****
double f;
{
/* XXX This should be fixed. It assumes 32 bit IV's. */
! # define BIGDOUBLE 2147483648.0 /* Assume 32 bit IV's ! */
# define BIGNEGDOUBLE (-2147483648.0)
if (f >= BIGDOUBLE)
! return (IV)fmod(f, BIGDOUBLE);
if (f <= BIGNEGDOUBLE)
! return (IV)fmod(f, BIGNEGDOUBLE);
return (IV) f;
}
# undef BIGDOUBLE
--- 1595,1606 ----
double f;
{
/* XXX This should be fixed. It assumes 32 bit IV's. */
! # define BIGDOUBLE 2147483647.0 /* Assume 32 bit IV's ! */
# define BIGNEGDOUBLE (-2147483648.0)
if (f >= BIGDOUBLE)
! return (IV) BIGDOUBLE;
if (f <= BIGNEGDOUBLE)
! return (IV) BIGNEGDOUBLE;
return (IV) f;
}
# undef BIGDOUBLE
***************
*** 1687,1714 ****
*retlen = s - start;
return retval;
}
-
- /* Amazingly enough, some systems (e.g. Dynix 3) don't have fmod.
- This is a slow, stupid, but working emulation. (AD)
- */
- #ifdef USE_MY_FMOD
- double
- my_fmod(x, y)
- double x, y;
- {
- double i = 0.0; /* Can't use int because it can overflow */
- if ((x == 0) || (y == 0))
- return 0;
- /* The sign of fmod is the same as the sign of x. */
- if ( (x < 0 && y > 0) || (x > 0 && y < 0) )
- y = -y;
- if (x > 0) {
- while (x - i*y > y)
- i++;
- } else {
- while (x - i*y < y)
- i++;
- }
- return x - i * y;
- }
- #endif
--- 1687,1689 ----
Index: vms/config.vms
*** perl5.001b/vms/config.vms Sun Mar 12 03:14:20 1995
--- perl5.001c/vms/config.vms Thu Apr 6 11:08:53 1995
***************
*** 1311,1329 ****
#undef SETUID_SCRIPTS_ARE_SECURE_NOW /**/
#undef DOSUID /**/
- /* HAS_DREM:
- * This symbol, if defined, indicates that the drem routine is
- * available. This is a Pyramid routine that is the same as
- * fmod.
- */
- #undef HAS_DREM /**/
-
- /* HAS_FMOD:
- * This symbol, if defined, indicates that the fmod routine is
- * available.
- */
- #define HAS_FMOD /**/
-
/* Gconvert:
* This preprocessor macro is defined to convert a floating point
* number to a string without a trailing decimal point. This
--- 1311,1316 ----
Index: x2p/Makefile.SH
*** perl5.001b/x2p/Makefile.SH Fri Apr 7 07:58:29 1995
--- perl5.001c/x2p/Makefile.SH Wed Mar 15 14:28:39 1995
***************
*** 76,82 ****
# used only if you force byacc to run by saying
# make run_byacc
! run_byacc:
@ echo Expect many shift/reduce and reduce/reduce conflicts
$(BYACC) a2p.y
mv y.tab.c a2p.c
--- 76,82 ----
# used only if you force byacc to run by saying
# make run_byacc
! run_byacc: FORCE
@ echo Expect many shift/reduce and reduce/reduce conflicts
$(BYACC) a2p.y
mv y.tab.c a2p.c
***************
*** 84,90 ****
# We don't want to regenerate a2p.c, but it might appear out-of-date
# after a patch is applied or a new distribution is made.
a2p.c: a2p.y
! - touch a2p.c
a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
$(CCCMD) $(LARGE) a2p.c
--- 84,90 ----
# We don't want to regenerate a2p.c, but it might appear out-of-date
# after a patch is applied or a new distribution is made.
a2p.c: a2p.y
! -@touch a2p.c
a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
$(CCCMD) $(LARGE) a2p.c
End of patch.