summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <gatech!skeeve!arnold>1988-01-26 01:16:41 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1988-01-26 01:16:41 +0000
commita1cc2bdc08f9aa1504f32e5b0b782c2b3cffd124 (patch)
treed9d46a7185678967f79150cfc67ac08d924ec179
parentf9ad74367ccb11e91fbda2bb7702039bcde360ce (diff)
downloadperl-a1cc2bdc08f9aa1504f32e5b0b782c2b3cffd124.tar.gz
perl 1.0 patch 7: use of included malloc.c should be optional
The version of malloc.c that comes with perl was not really intended to be used everywhere--it was included mostly for debugging purposes. It's a nice little package, however, so I'm making it optional (via Configure) as to whether you want it or not.
-rwxr-xr-xConfigure33
-rw-r--r--Makefile.SH11
-rw-r--r--patchlevel.h2
-rw-r--r--x2p/Makefile.SH15
4 files changed, 53 insertions, 8 deletions
diff --git a/Configure b/Configure
index 7327e1ce7e..d32c305247 100755
--- a/Configure
+++ b/Configure
@@ -8,7 +8,7 @@
# and edit it to reflect your system. Some packages may include samples
# of config.h for certain machines, so you might look for one of those.)
#
-# $Header: Configure,v 1.0.1.2 88/01/24 03:51:55 root Exp $
+# $Header: Configure,v 1.0.1.3 88/01/26 14:14:14 root Exp $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
@@ -79,6 +79,9 @@ d_vfork=''
d_voidsig=''
libc=''
libnm=''
+mallocsrc=''
+mallocobj=''
+usemymalloc=''
mansrc=''
manext=''
models=''
@@ -1249,6 +1252,31 @@ else
esac
fi
+: determine which malloc to compile in
+echo " "
+case "$usemymalloc" in
+'')
+ if bsd || v7; then
+ dflt='y'
+ else
+ dflt='n'
+ fi
+ ;;
+*) dflt="$usemymalloc"
+ ;;
+esac
+rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
+$echo $n "$rp $c"
+. myread
+case "$ans" in
+'') ans=$dflt;;
+esac
+usemymalloc="$ans"
+case "$ans" in
+y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
+*) mallocsrc=''; mallocobj='';;
+esac
+
echo " "
echo "End of configuration questions."
echo " "
@@ -1309,6 +1337,9 @@ d_vfork='$d_vfork'
d_voidsig='$d_voidsig'
libc='$libc'
libnm='$libnm'
+mallocsrc='$mallocsrc'
+mallocobj='$mallocobj'
+usemymalloc='$usemymalloc'
mansrc='$mansrc'
manext='$manext'
models='$models'
diff --git a/Makefile.SH b/Makefile.SH
index 798d9a36b5..fc05ca2b6a 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -14,9 +14,12 @@ case "$0" in
esac
echo "Extracting Makefile (with variable substitutions)"
cat >Makefile <<!GROK!THIS!
-# $Header: Makefile.SH,v 1.0.1.2 88/01/26 08:46:04 root Exp $
+# $Header: Makefile.SH,v 1.0.1.3 88/01/26 14:14:52 root Exp $
#
# $Log: Makefile.SH,v $
+# Revision 1.0.1.3 88/01/26 14:14:52 root
+# Added mallocsrc stuff.
+#
# Revision 1.0.1.2 88/01/26 08:46:04 root
# patch 4: make depend didn't work right if . wasn't in PATH.
#
@@ -36,6 +39,8 @@ CFLAGS = $ccflags -O
LDFLAGS = $ldflags
SMALL = $small
LARGE = $large $split
+mallocsrc = $mallocsrc
+mallocobj = $mallocobj
libs = $libnm -lm
!GROK!THIS!
@@ -57,12 +62,12 @@ h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
h = $(h1) $(h2)
-c1 = arg.c array.c cmd.c dump.c form.c hash.c malloc.c
+c1 = arg.c array.c cmd.c dump.c form.c hash.c $(mallocsrc)
c2 = search.c stab.c str.c util.c version.c
c = $(c1) $(c2)
-obj1 = arg.o array.o cmd.o dump.o form.o hash.o malloc.o
+obj1 = arg.o array.o cmd.o dump.o form.o hash.o $(mallocobj)
obj2 = search.o stab.o str.o util.o version.o
obj = $(obj1) $(obj2)
diff --git a/patchlevel.h b/patchlevel.h
index fb8ed65ede..e19cd94440 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1 +1 @@
-#define PATCHLEVEL 6
+#define PATCHLEVEL 7
diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH
index d965160cc3..17447db1f6 100644
--- a/x2p/Makefile.SH
+++ b/x2p/Makefile.SH
@@ -12,11 +12,18 @@ esac
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
+case "$mallocsrc" in
+'') ;;
+*) mallocsrc="../$mallocsrc";;
+esac
echo "Extracting x2p/Makefile (with variable substitutions)"
cat >Makefile <<!GROK!THIS!
-# $Header: Makefile.SH,v 1.0 87/12/18 17:50:17 root Exp $
+# $Header: Makefile.SH,v 1.0.1.1 88/01/26 14:15:24 root Exp $
#
# $Log: Makefile.SH,v $
+# Revision 1.0.1.1 88/01/26 14:15:24 root
+# Added mallocsrc stuff.
+#
# Revision 1.0 87/12/18 17:50:17 root
# Initial revision
#
@@ -31,6 +38,8 @@ CFLAGS = $ccflags -O
LDFLAGS = $ldflags
SMALL = $small
LARGE = $large $split
+mallocsrc = $mallocsrc
+mallocobj = $mallocobj
libs = $libnm -lm
!GROK!THIS!
@@ -49,9 +58,9 @@ sh = Makefile.SH makedepend.SH
h = EXTERN.h INTERN.h config.h handy.h hash.h a2p.h str.h util.h
-c = hash.c ../malloc.c str.c util.c walk.c
+c = hash.c $(mallocsrc) str.c util.c walk.c
-obj = hash.o malloc.o str.o util.o walk.o
+obj = hash.o $(mallocobj) str.o util.o walk.o
lintflags = -phbvxac