# $Id: Head.U,v 3.0.1.6 1994/10/29 15:54:19 ram Exp $
#
-# Generated on Tue Jan 24 16:22:48 EST 1995 [metaconfig 3.0 PL48]
+# Generated on Mon Feb 6 10:35:10 EST 1995 [metaconfig 3.0 PL50]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
uuname=''
vi=''
zcat=''
+full_sed=''
libswanted=''
hint=''
myuname=''
d_attribut=''
d_bcmp=''
d_bcopy=''
+d_byacc=''
d_bzero=''
d_casti32=''
castflags=''
cryptlib=''
d_crypt=''
d_csh=''
+full_csh=''
d_cuserid=''
d_dbl_dig=''
d_difftime=''
d_getpgrp=''
d_getppid=''
d_getprior=''
-d_group=''
d_htonl=''
d_isascii=''
d_killpg=''
d_msgsnd=''
d_nice=''
d_open3=''
-d_passwd=''
d_fpathconf=''
d_pathconf=''
d_pause=''
i_sysndir=''
i_sysparam=''
i_sysselct=''
+i_sysstat=''
i_systimes=''
i_sgtty=''
i_termio=''
spackage=''
patchlevel=''
prefix=''
+prefixexp=''
installprivlib=''
privlib=''
privlibexp=''
libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl'
libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
libswanted="$libswanted ucb bsd BSD PW x"
-: We want to search /usr/shlib before most other libraries.
+: We probably want to search /usr/shlib before most other libraries.
: This is only used by ext/util/extliblist
glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
glibpth="/usr/shlib $glibpth"
: Do not use vfork unless overridden by a hint file.
usevfork=false
+: We might as well always be portable. It makes no difference for
+: perl5, and makes people happy.
+d_portable=define
: script used to extract .SH files with variable substitutions
cat >extract <<'EOS'
silent=''
extractsh=''
override=''
-optdef='optdef.sh'
-rm -f $optdef
+rm -f optdef.sh
: option parsing
while test $# -gt 0; do
echo "$me: ignoring -D $1" >&2
;;
*=*) echo "$1" | \
- sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> $optdef;;
- *) echo "$1='define'" >> $optdef;;
+ sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
+ *) echo "$1='define'" >> optdef.sh;;
esac
shift
;;
-U)
shift
case "$1" in
- *=) echo "$1" >> $optdef;;
+ *=) echo "$1" >> optdef.sh;;
*=*)
echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
echo "$me: ignoring -U $1" >&2
;;
- *) echo "$1='undef'" >> $optdef;;
+ *) echo "$1='undef'" >> optdef.sh;;
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.0 PL48." >&2
+ -V) echo "$me generated by metaconfig 3.0 PL50." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
esac
: run the defines and the undefines, if any, but leave the file out there...
-touch $optdef
-. ./$optdef
+touch optdef.sh
+. ./optdef.sh
case "$extractsh" in
true)
echo "Fetching answers from $config_sh..."
cd ..
. $config
- test "$override" && . ./$optdef
+ test "$override" && . ./optdef.sh
echo " "
. ./UU/extract
rm -rf UU
: set package name
package=perl5
+first=`echo $package | sed -e 's/^\(.\).*/\1/'`
+last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
+case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
+*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
+esac
: Eunice requires " " instead of "", can you believe it
echo " "
: Here we go...
echo "Beginning of configuration questions for $package."
-trap 'echo " "; rm -rf $rmlist; exit 1' 1 2 3 15
+trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
: Some greps do not return status, grrr.
echo "grimblepritz" >grimble
myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
+newmyuname="$myuname"
dflt=n
if test "$fastread" = yes; then
dflt=y
elif test -f ../config.sh; then
- oldmyuname=''
if $contains myuname= ../config.sh >/dev/null 2>&1; then
- eval "old`grep myuname= ../config.sh`"
+ eval "`grep myuname= ../config.sh`"
fi
- if test "X$myuname" = "X$oldmyuname"; then
+ if test "X$myuname" = "X$newmyuname"; then
dflt=y
fi
fi
tmp_n="$n"
tmp_c="$c"
. ./config.sh
- test "$override" && . UU/$optdef
cp config.sh UU
n="$tmp_n"
c="$tmp_c"
aix) osname=aix
tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
case "$tmp" in
- 'not found') osvers=3.2.0 ;;
+ 'not found') osvers="$4"."$3" ;;
'<3240'|'<>3240') osvers=3.2.0 ;;
'=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
'=3250'|'>3250') osvers=3.2.5 ;;
- *) osvers='' ;;
+ *) osvers=$tmp;;
esac
;;
dnix) osname=dnix
dflt=`echo $hintfile | $sed 's/\.sh$//'`
;;
esac
-
+
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
cp $config_sh config.sh 2>/dev/null
. ./config.sh
cd UU
- test "$override" && . ./$optdef
cp ../config.sh .
n="$tmp_n"
c="$tmp_c"
hint=previous
;;
esac
+test "$override" && . ./optdef.sh
+myuname="$newmyuname"
: Restore computed paths
for file in $loclist $trylist; do
binaries. If you wish to have binaries under /bin but manual pages
under /usr/local/man, that's ok: you will be prompted separately
for each of the installation directories, the prefix being only used
-to set defaults.
+to set the defaults.
EOM
fn=d~
rp='Installation prefix to use?'
. ./getfile
+oldprefix=''
+case "$prefix" in
+'') ;;
+*)
+ case "$ans" in
+ "$prefix") ;;
+ *) oldprefix="$prefix";;
+ esac
+ ;;
+esac
prefix="$ans"
+prefixexp="$ansexp"
+
+: set the prefixit variable, to compute a suitable default value
+prefixit='case "$3" in
+""|none)
+ case "$oldprefix" in
+ "") eval "$1=\"\$$2\"";;
+ *)
+ case "$3" in
+ "") eval "$1=";;
+ none)
+ eval "tp=\"\$$2\"";
+ case "$tp" in
+ ""|" ") eval "$1=\"\$$2\"";;
+ *) eval "$1=";;
+ esac;;
+ esac;;
+ esac;;
+*)
+ eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
+ case "$tp" in
+ --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
+ /*-$oldprefix/*|\~*-$oldprefix/*)
+ eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
+ *) eval "$1=\"\$$2\"";;
+ esac;;
+esac'
: determine where private executables go
-case "$privlib" in
-'')
- dflt=$prefix/lib/$package
- ;;
-*) dflt="$privlib"
- ;;
-esac
+set dflt privlib lib/$package
+eval $prefixit
$cat <<EOM
There are some auxiliary files for $package that need to be put into a
EOM
fn=d~+
-rp='Pathname where private library files will reside?'
+rp='Pathname where the private library files will reside?'
. ./getfile
+if $test "X$privlibexp" != "X$ansexp"; then
+ installprivlib=''
+fi
privlib="$ans"
privlibexp="$ansexp"
if $afs; then
installprivlib="$privlibexp"
fi
+: set the prefixup variable, to restore leading tilda escape
+prefixup='case "$prefixexp" in
+"$prefix") ;;
+*) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
+esac'
+
: determine where public architecture dependent libraries go
-case "$archname" in
-'') tpath=`echo $PATH | sed -e 's/:/ /g'`
- if xxx=`./loc arch blurfl $tpath`; test -f "$xxx"; then
- tarchname=`arch`
+if xxx=`./loc arch blurfl $pth`; test -f "$xxx"; then
+ tarchname=`arch`
+ archname="${tarchname}-$osname"
+elif xxx=`./loc uname blurfl $pth`; test -f "$xxx" ; then
+ if uname -m > tmparch 2>&1 ; then
+ tarchname=`cat tmparch`
archname="${tarchname}-$osname"
- elif xxx=`./loc uname blurfl $tpath`; test -f "$xxx" ; then
- if uname -m > tmparch 2>&1 ; then
- tarchname=`cat tmparch`
- archname="${tarchname}-$osname"
- fi
- rm -f tmparch
- else
- archname="$osname"
fi
- ;;
-esac
+ $rm -f tmparch
+else
+ archname="$osname"
+fi
+set archlib archlib
+eval $prefixit
case "$archlib" in
'')
case "$privlib" in
- '') dflt=`./loc . "." $prefix/lib /usr/local/lib /usr/lib /lib`;;
+ '')
+ dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib`
+ set dflt
+ eval $prefixup
+ ;;
*) dflt="$privlib/$archname";;
esac
;;
esac
cat <<EOM
-$package contains architecture-dependent library files. If you are
+$spackage contains architecture-dependent library files. If you are
sharing libraries in a heterogeneous environment, you might store
these files in a separate location. Otherwise, you can just include
them with the rest of the public library files.
echo " "
echo "Checking whether your compiler can handle __attribute__ ..." >&4
$cat >attrib.c <<'EOCP'
+#include <stdio.h>
void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
EOCP
if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
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
esac
set d_csh
eval $setvar
+full_csh=$csh
: see if cuserid exists
set cuserid d_cuserid
set getpriority d_getprior
eval $inlibc
-: see if group exists
-set group d_group
-eval $inlibc
-
: see if this is a netinet/in.h or sys/in.h system
set netinet/in.h i_niin sys/in.h i_sysin
eval $inhdr
eval $setvar
$rm -f open3*
-: see if passwd exists
-set passwd d_passwd
-eval $inlibc
-
: see if pause exists
set pause d_pause
eval $inlibc
: determine where public executables go
echo " "
-case "$bin" in
-'')
- dflt="$prefix/bin"
- ;;
-*)
- dflt="$bin"
- ;;
-esac
+set dflt bin bin
+eval $prefixit
fn=d~
rp='Pathname where the public executables will reside?'
. ./getfile
+if $test "X$ansexp" != "X$binexp"; then
+ installbin=''
+fi
bin="$ans"
binexp="$ansexp"
if $afs; then
. ./myread
fpostype="$ans"
+: Store the full pathname to the sed program for use in the C program
+full_sed=$sed
+
: see what type gids are declared as in the kernel
set gid_t gidtype xxx stdio.h sys/types.h
eval $typedef
lseektype="$ans"
: determine where manual pages go
+set mansrc mansrc none
+eval $prefixit
$cat <<EOM
-$package has manual pages available in source form.
+$spackage has manual pages available in source form.
EOM
case "$nroff" in
nroff)
echo "If you don't want the manual sources installed, answer 'none'."
case "$mansrc" in
'')
- lookpath="$prefix/man/man1 $prefix/man/u_man/man1 $prefix/man/l_man/man1"
- lookpath="$lookpath /usr/local/man/man1 /usr/local/man/man1 /usr/man/manl"
+ lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/l_man/man1"
+ lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl"
lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
lookpath="$lookpath /usr/man/man.L"
- mansrc=`./loc . $prefix/man/man1 $lookpath`
+ mansrc=`./loc . $prefixexp/man/man1 $lookpath`
if $test -d "$mansrc"; then
dflt="$mansrc"
else
dflt="$sysman"
fi
+ set dflt
+ eval $prefixup
;;
+' ') dflt=none;;
*) dflt="$mansrc"
;;
esac
fn=dn~
rp='Where do the manual pages (source) go?'
. ./getfile
+if test "X$mansrcexp" != "X$ansexp"; then
+ installmansrc=''
+fi
mansrc="$ans"
mansrcexp="$ansexp"
+case "$mansrc" in
+'') mansrc=' '
+ installmansrc='';;
+esac
if $afs; then
$cat <<EOM
installmansrc="$mansrcexp"
fi
-
case "$mansrc" in
-'') manext='0';;
+' ') manext='0';;
*l) manext=l;;
*n) manext=n;;
*o) manext=l;;
$rm -f foo* bar*
: determine where public executable scripts go
+set scriptdir scriptdir
+eval $prefixit
case "$scriptdir" in
'')
dflt="$bin"
$test -d /usr/share/scripts && dflt=/usr/share/scripts
$test -d /usr/share/bin && dflt=/usr/share/bin
$test -d /usr/local/script && dflt=/usr/local/script
- $test -d $prefix/script && dflt=$prefix/script
+ $test -d $prefixexp/script && dflt=$prefixexp/script
+ set dflt
+ eval $prefixup
;;
*) dflt="$scriptdir"
;;
fn=d~
rp='Where do you keep publicly executable scripts?'
. ./getfile
+if $test "X$ansexp" != "X$scriptdirexp"; then
+ installscript=''
+fi
scriptdir="$ans"
scriptdirexp="$ansexp"
if $afs; then
set sys/param.h i_sysparam
eval $inhdr
+: see if sys/stat.h is available
+set sys/stat.h i_sysstat
+eval $inhdr
+
: see if this is a unistd.h system
set unistd.h i_unistd
eval $inhdr
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'
d_getpgrp='$d_getpgrp'
d_getppid='$d_getppid'
d_getprior='$d_getprior'
-d_group='$d_group'
d_htonl='$d_htonl'
d_index='$d_index'
d_isascii='$d_isascii'
d_nice='$d_nice'
d_oldsock='$d_oldsock'
d_open3='$d_open3'
-d_passwd='$d_passwd'
d_pathconf='$d_pathconf'
d_pause='$d_pause'
d_phostname='$d_phostname'
find='$find'
flex='$flex'
fpostype='$fpostype'
+full_csh='$full_csh'
+full_sed='$full_sed'
gcc='$gcc'
gccversion='$gccversion'
gidtype='$gidtype'
i_sysparam='$i_sysparam'
i_sysselct='$i_sysselct'
i_syssockio='$i_syssockio'
+i_sysstat='$i_sysstat'
i_systime='$i_systime'
i_systimek='$i_systimek'
i_systimes='$i_systimes'
pmake='$pmake'
pr='$pr'
prefix='$prefix'
+prefixexp='$prefixexp'
privlib='$privlib'
privlibexp='$privlibexp'
prototype='$prototype'
hints/linux.sh Hints for named architecture
hints/mips.sh Hints for named architecture
hints/mpc.sh Hints for named architecture
+hints/mpeix.sh Hints for named architecture
hints/ncr_tower.sh Hints for named architecture
hints/netbsd.sh Hints for named architecture
hints/next_3_2.sh Hints for named architecture
hints/linux.sh Hints for named architecture
hints/mips.sh Hints for named architecture
hints/mpc.sh Hints for named architecture
+hints/mpeix.sh Hints for named architecture
hints/ncr_tower.sh Hints for named architecture
hints/netbsd.sh Hints for named architecture
hints/next_3_2.sh Hints for named architecture
pldlflags="";;
esac
-: Configure sets byacc=byacc if byacc is not found. We reset it to ''
-case "$byacc" in
-'byacc') byacc='';;
-esac
-
: Prepare dependency lists for Makefile.
dynamic_list=' '
for f in $dynamic_ext; do
: Only print out the rules for running byacc if the user _has_ byacc.
: Otherwise, comment them out. Users who really know what they are
: doing can uncomment them and run yacc or bison or whatever.
-case "$byacc" in
-'')
- comment1='#'
- comment2='' ;;
-*) comment1=''
+case "$d_byacc" in
+'define')
+ comment1=''
comment2='#' ;;
+*) comment1='#'
+ comment2='' ;;
esac
$spitshell >>Makefile <<!GROK!THIS!
lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
makefile: Makefile
- make depend
+ $(MAKE) depend
config.h: config.sh
/bin/sh config_h.SH
;;
esac
rm -f makefile
-
-
Installation
-1) Run Configure. This will figure out various things about your system.
- Some things Configure will figure out for itself, other things it
- will ask you about. It will then proceed to make config.h,
- config.sh, and Makefile. You may have to explicitly say
- sh Configure to ensure that Configure is run under sh.
+1) Run Configure. This will figure out various things about your
+ system. Some things Configure will figure out for itself, other
+ things it will ask you about. If the test scripts and programs
+ run ok, the defaults will usually be right. It will then proceed to
+ make config.h, config.sh, and Makefile. You may have to explicitly
+ say sh Configure to ensure that Configure is run under sh.
If you're a hotshot, run Configure -d to take all the defaults and
then edit config.sh to patch up any flaws and run Configure -S.
MIPS machines may need to undef d_volatile.
MIPS machines may need to turn off -O on some files.
Some MIPS machines may need to undefine CASTNEGFLOAT.
- Xenix 386 may need -UM_I86. See also README.xenix.
Genix may need to use libc rather than libc_s, or #undef VARARGS.
NCR Tower 32 (OS 2.01.01) may need -W2,-Sl,2000 and #undef MKDIR.
A/UX may appear to work with -O -B/usr/lib/big/ optimizer flags.
?RCS: $Id: Loc_sed.U,v $
?RCS:
?X: This is used in perl.c.
-?MAKE:Loc_sed: sed
+?MAKE:full_sed: sed
?MAKE: -pick add $@ %<
-?X: Fool metalint:
-?LINT:use sed
-?LINT:extern sed
+?S:full_sed:
+?S: This variable contains the full pathname to 'sed', whether or
+?S: not the user has specified 'portability'. This is only used
+?S: in the compiled C program, and we assume that all systems which
+?S: can share this executable will have the same full pathname to
+?S: 'sed.'
+?S:.
+?X: Yes, I know about the C symbol PORTABLE, but I think sed
+?X: is unlikely to move, and I'm too lazy to add all the
+?X: #ifdef PORTABLE sections to the perl source.
+?X:
?C:LOC_SED:
?C: This symbol holds the complete pathname to the sed program.
?C:.
-?H:#define LOC_SED "$sed" /**/
+?H:#define LOC_SED "$full_sed" /**/
?H:.
+?LINT:use sed
+?LINT:extern sed
+: Store the full pathname to the sed program for use in the C program
+full_sed=$sed
?S: search. The order is chosen to pick up the c library
?S: ahead of ucb or bsd libraries for SVR4.
?S:.
-?LINT:extern usevfork glibpth
-?LINT:change usevfork glibpth
+?LINT:extern usevfork glibpth d_portable
+?LINT:change usevfork glibpth d_portable
: List of libraries we want.
?X: Put crypt here, even though I should really fix d_crypt.U to look
?X: for it correctly, including possible shared library versions.
libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl'
libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
libswanted="$libswanted ucb bsd BSD PW x"
-: We want to search /usr/shlib before most other libraries.
+: We probably want to search /usr/shlib before most other libraries.
: This is only used by ext/util/extliblist
glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
glibpth="/usr/shlib $glibpth"
: Do not use vfork unless overridden by a hint file.
usevfork=false
+: We might as well always be portable. It makes no difference for
+: perl5, and makes people happy.
+d_portable=define
--- /dev/null
+?RCS: $Id: d_byacc.U $
+?RCS:
+?RCS: $Log: d_byacc.U,v $
+?RCS:
+?MAKE:d_byacc: byacc Setvar
+?MAKE: -pick add $@ %<
+?LINT:extern byacc
+?S:d_byacc:
+?S: This variable indicates whether byacc is available.
+?S: If the user has specified 'portability', then Makefile.SH
+?S: sees $byacc='byacc' whether or not the user actually has
+?S: byacc. This variable allows us to determine in a makefile
+?S: if we really have byacc.
+?S:.
+?X: We want byacc for perl because the perly.fixer script assumes it.
+?X: We need to patch up yacc-generated parsers to allow dynamic
+?X: allocation of the stack.
+?LINT:set d_byacc
+: Check if we really have byacc
+case "$byacc" in
+''|'byacc') val="$undef" ;;
+*) val="$define" ;;
+esac
+set d_byacc
+eval $setvar
+
--- /dev/null
+?RCS: $Id: d_csh.U,v 3.0 1993/08/18 12:05:53 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: d_csh.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:53 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_csh full_csh: csh Setvar
+?MAKE: -pick add $@ %<
+?LINT:extern csh
+?S:d_csh:
+?S: This variable conditionally defines the CSH symbol, which
+?S: indicates to the C program that the C-shell exists.
+?S:.
+?S:full_csh:
+?S: This variable contains the full pathname to 'csh', whether or
+?S: not the user has specified 'portability'. This is only used
+?S: in the compiled C program, and we assume that all systems whic
+?S: can share this executable will have the same full pathname to
+?S: 'csh.'
+?S:.
+?X: Yes, I know about the C symbol PORTABLE, but I think csh
+?X: is unlikely to move, and I'm too lazy to add all the
+?X: #ifdef PORTABLE sections to the perl source.
+?X:
+?C:CSH:
+?C: This symbol, if defined, indicates that the C-shell exists.
+?C: If defined, contains the full pathname of csh.
+?C:.
+?H:#$d_csh CSH "$full_csh" /**/
+?H:.
+?LINT:set d_csh
+: get csh whereabouts
+case "$csh" in
+'csh') val="$undef" ;;
+*) val="$define" ;;
+esac
+set d_csh
+eval $setvar
+full_csh=$csh
+
--- /dev/null
+?X: Deliberately empty file to fool metaconfig. I don't want
+?X: the standard d_group since it's useless. (I wrote it, so I know :-).
+?X:?RCS: $Id: d_group.U,v 3.0.1.1 1994/08/29 16:07:48 ram Exp $
--- /dev/null
+?X: Deliberately empty file to fool metaconfig. I don't want
+?X: the standard d_passwd since it's useless. (I wrote it, so I know :-).
+?X:?RCS: $Id: d_passwd.U,v 3.0.1.1 1994/08/29 16:09:51 ram Exp $
--- /dev/null
+This file contains two minor updates to dist3 PL50 that were used
+to generage Configure.
+ --Andy Dougherty doughera@lafcol.lafayette.edu
+
+
+Index: Oldconfig.U
+Prereq: 3.0.1.6
+*** /home2/doughera/lib/dist/U/Oldconfig.U Tue Jan 31 10:31:26 1995
+--- Oldconfig.U Thu Feb 2 14:33:32 1995
+***************
+*** 180,192 ****
+
+ case "$1" in
+ aix) osname=aix
+ tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+ case "$tmp" in
+! 'not found') osvers=3.2.0 ;;
+ '<3240'|'<>3240') osvers=3.2.0 ;;
+ '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
+ '=3250'|'>3250') osvers=3.2.5 ;;
+! *) osvers='' ;;
+ esac
+ ;;
+ dnix) osname=dnix
+--- 180,198 ----
+
+ case "$1" in
+ aix) osname=aix
++ ?X: aix 4.1 uname -a output looks like
++ ?X: AIX foo 1 4 000123456789
++ ?X: where $4 is the major release number and $3 is the (minor) version.
++ ?X: More detail on the version is available with the oslevel command.
++ ?X: in 3.2.x, it output a string (see case statements below). In 4.1,
++ ?X: it puts out something like 4.1.1.0
+ tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+ case "$tmp" in
+! 'not found') osvers="$4"."$3" ;;
+ '<3240'|'<>3240') osvers=3.2.0 ;;
+ '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
+ '=3250'|'>3250') osvers=3.2.5 ;;
+! *) osvers=$tmp;;
+ esac
+ ;;
+ dnix) osname=dnix
+Index: mansrc.U
+Prereq: 3.0.1.6
+*** /home2/doughera/lib/dist/U/mansrc.U Tue Jan 31 10:31:56 1995
+--- mansrc.U Thu Feb 2 14:34:36 1995
+***************
+*** 1,5 ****
+ ?RCS: $Id: mansrc.U,v 3.0.1.6 1995/01/30 14:39:34 ram Exp $
+- ?RCS:
+ ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+ ?RCS:
+ ?RCS: You may redistribute only under the terms of the Artistic Licence,
+--- 1,4 ----
+***************
+*** 74,80 ****
+ '')
+ lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/l_man/man1"
+! lookpath="$lookpath /usr/local/man/man1 /usr/local/man/man1 /usr/man/manl"
+ lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
+ lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+ lookpath="$lookpath /usr/man/man.L"
+--- 73,79 ----
+ '')
+ lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/l_man/man1"
+! lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl"
+ lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
+ lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+ lookpath="$lookpath /usr/man/man.L"
--- /dev/null
+?RCS: $Id: i_sysstat.U,v $
+?RCS:
+?RCS: $Log: i_sysstat.U,v $
+?RCS:
+?MAKE:i_sysstat: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysstat:
+?S: This variable conditionally defines the I_SYS_STAT symbol,
+?S: and indicates whether a C program should include <sys/stat.h>.
+?S:.
+?C:I_SYS_STAT (I_SYSSTAT):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/stat.h>.
+?C:.
+?H:#$i_sysstat I_SYS_STAT /**/
+?H:.
+?LINT:set i_sysstat
+: see if sys/stat.h is available
+set sys/stat.h i_sysstat
+eval $inhdr
+
* running Configure.
*
* Feel free to modify any of this as the need arises. Note, however,
- * that running config.h.SH again will wipe out any changes you've made.
- * For a more permanent change edit config.sh and rerun config.h.SH.
+ * that running config_h.SH again will wipe out any changes you've made.
+ * For a more permanent change edit config.sh and rerun config_h.SH.
*
- * $Id: Config_h.U,v 3.0.1.2 1993/08/24 12:13:20 ram Exp $
+ * $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
*/
-/* Configuration time: Mon Dec 19 13:04:26 EST 1994
+/* Configuration time: Sat Feb 4 14:42:43 EST 1995
* Configured by: andy
* Target system: crystal crystal 3.2 2 i386
*/
* This symbol, if defined, indicates that the chsize routine is available
* to truncate files. You might need a -lx to get this routine.
*/
-/*#define HAS_CHSIZE /**/
+#define HAS_CHSIZE /**/
/* VOID_CLOSEDIR:
* This symbol, if defined, indicates that the closedir() routine
*/
#define HAS_CRYPT /**/
-/* CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- * If defined, contains the full pathname of csh.
- */
-#define CSH "/bin/csh" /**/
-
/* HAS_CUSERID:
* This symbol, if defined, indicates that the cuserid routine is
* available to get character login names.
*/
/*#define HAS_GETPRIORITY /**/
-/* HAS_GROUP:
- * This symbol, if defined, indicates that the group routine is
- * available.
- */
-/*#define HAS_GROUP /**/
-
/* HAS_HTONL:
* This symbol, if defined, indicates that the htonl() routine (and
* friends htons() ntohl() ntohs()) are available to do network
*/
#define HAS_OPEN3 /**/
-/* HAS_PASSWD:
- * This symbol, if defined, indicates that the passwd routine is
- * available.
- */
-/*#define HAS_PASSWD /**/
-
/* HAS_PATHCONF:
* This symbol, if defined, indicates that pathconf() is available
* to determine file-system related limits and options associated
*/
/*#define HAS_VFORK /**/
-/* VOIDSIG:
- * This symbol is defined if this system declares "void (*signal(...))()" in
- * signal.h. The old way was to declare it as "int (*signal(...))()". It
- * is up to the package author to declare things correctly based on the
- * symbol.
- */
/* Signal_t:
* This symbol's value is either "void" or "int", corresponding to the
* appropriate return type of a signal handler. Thus, you can declare
* a signal handler using "Signal_t (*handler)()", and define the
* handler using "Signal_t handler(sig)".
*/
-#define VOIDSIG /**/
#define Signal_t void /* Signal handler's return type */
/* HASVOLATILE:
*/
#define LOC_SED "/bin/sed" /**/
+/* CSH:
+ * This symbol, if defined, indicates that the C-shell exists.
+ * If defined, contains the full pathname of csh.
+ */
+#define CSH "/bin/csh" /**/
+
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
* underscore to the symbol name before calling dlsym(). This only
*/
#define I_NDBM /**/
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
/* Malloc_t:
* This symbol is the type of pointer returned by malloc and realloc.
*/
* running Configure.
*
* Feel free to modify any of this as the need arises. Note, however,
- * that running config.h.SH again will wipe out any changes you've made.
- * For a more permanent change edit config.sh and rerun config.h.SH.
+ * that running config_h.SH again will wipe out any changes you've made.
+ * For a more permanent change edit config.sh and rerun config_h.SH.
*
- * \$Id: Config_h.U,v 3.0.1.2 1993/08/24 12:13:20 ram Exp $
+ * \$Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
*/
/* Configuration time: $cf_time
*/
#$d_crypt HAS_CRYPT /**/
-/* CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- * If defined, contains the full pathname of csh.
- */
-#$d_csh CSH "$csh" /**/
-
/* HAS_CUSERID:
* This symbol, if defined, indicates that the cuserid routine is
* available to get character login names.
*/
#$d_getprior HAS_GETPRIORITY /**/
-/* HAS_GROUP:
- * This symbol, if defined, indicates that the group routine is
- * available.
- */
-#$d_group HAS_GROUP /**/
-
/* HAS_HTONL:
* This symbol, if defined, indicates that the htonl() routine (and
* friends htons() ntohl() ntohs()) are available to do network
*/
#$d_open3 HAS_OPEN3 /**/
-/* HAS_PASSWD:
- * This symbol, if defined, indicates that the passwd routine is
- * available.
- */
-#$d_passwd HAS_PASSWD /**/
-
/* HAS_PATHCONF:
* This symbol, if defined, indicates that pathconf() is available
* to determine file-system related limits and options associated
*/
#$d_vfork HAS_VFORK /**/
-/* VOIDSIG:
- * This symbol is defined if this system declares "void (*signal(...))()" in
- * signal.h. The old way was to declare it as "int (*signal(...))()". It
- * is up to the package author to declare things correctly based on the
- * symbol.
- */
/* Signal_t:
* This symbol's value is either "void" or "int", corresponding to the
* appropriate return type of a signal handler. Thus, you can declare
* a signal handler using "Signal_t (*handler)()", and define the
* handler using "Signal_t handler(sig)".
*/
-#$d_voidsig VOIDSIG /**/
#define Signal_t $signal_t /* Signal handler's return type */
/* HASVOLATILE:
/* LOC_SED:
* This symbol holds the complete pathname to the sed program.
*/
-#define LOC_SED "$sed" /**/
+#define LOC_SED "$full_sed" /**/
+
+/* CSH:
+ * This symbol, if defined, indicates that the C-shell exists.
+ * If defined, contains the full pathname of csh.
+ */
+#$d_csh CSH "$full_csh" /**/
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
*/
#$i_ndbm I_NDBM /**/
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#$i_sysstat I_SYS_STAT /**/
+
/* Malloc_t:
* This symbol is the type of pointer returned by malloc and realloc.
*/
use ExtUtils::MakeMaker;
-WriteMakefile(LIBS => ["-lndbm", "-ldbm"]);
+WriteMakefile(LIBS => ["-lndbm", "-ldbm -lucb"]);
use ExtUtils::MakeMaker;
-WriteMakefile(LIBS => ["-ldbm.nfs", "-ldbm"]);
+WriteMakefile(LIBS => ["-ldbm.nfs", "-ldbm -lucb"]);
#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
-d_fchmod=undef
+# hints/aix.sh
+# AIX 3.x.x hints thanks to Wayne Scott <wscott@ichips.intel.com>
+# AIX 4.1 hints thanks to Christopher Chan-Nui <channui@austin.ibm.com>.
+# Merged on Mon Feb 6 10:22:35 EST 1995 by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+
+
+# Configure finds setrgid and setruid, but they're useless. The man
+# pages state:
+# setrgid: The EPERM error code is always returned.
+# setruid: The EPERM error code is always returned. Processes cannot
+# reset only their real user IDs.
d_setrgid='undef'
d_setruid='undef'
+
alignbytes=8
-# Changes for dynamic linking by Wayne Scott (wscott@ichips.intel.com)
+# Make setsockopt work correctly. See man page.
+# ccflags='-D_BSD=44'
+
+# uname -m output is too specific and not appropriate here
+case "$archname" in
+'') archname="$osname" ;;
+esac
+
+case "$osvers" in
+3*) d_fchmod=undef
+ ccflags='-D_ALL_SOURCE'
+ ;;
+*) # These hints at least work for 4.x, possibly other systems too.
+ d_setregid='undef'
+ d_setreuid='undef'
+ ccflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE'
+ nm_opt='-B'
+ scope_cflags='optimize=" "'
+ ;;
+esac
+
+# Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com>
#
# Tell perl which symbols to export for dynamic linking.
ccdlflags='-bE:perl.exp'
# symbol: boot_$(EXP) can it be auto-generated?
lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart -lc'
-ccflags='-D_ALL_SOURCE'
-# Make setsockopt work correctly. See man page.
-# ccflags='-D_BSD=44'
+# The '-e _nostart' might not be needed on AIX 4.1, but appears to be
+# harmless.
optimize='+O1'
;;
esac
-libswanted='ndbm m dld'
+libswanted='m dld'
# ldflags="-Wl,-E -Wl,-a,shared" # Force all shared?
ldflags="-Wl,-E"
usemymalloc='y'
alignbytes=8
selecttype='int *'
POSIX_cflags='ccflags="$ccflags -DFLT_MIN=1.17549435E-38"'
+
+case "$prefix" in
+'') prefix='/opt/perl5' ;;
+esac
+case "$archname" in
+'') archname='hpux' ;;
+esac
usevfork=false
d_charsprf=undef
ccflags="-ansiposix -signed"
+#
+# This hint due thanks Hershel Walters <walters@smd4d.wes.army.mil>
+# Date: Tue, 31 Jan 1995 16:32:53 -0600 (CST)
+# Subject: IRIX4.0.4(.5? 5.0?) problems
+# I don't know if they affect versions of perl other than 5.000 or
+# versions of IRIX other than 4.0.4.
+#
+cat <<'EOM'
+If you have problems, you might have try including
+ -DSTANDARD_C -cckr
+in ccflags.
+EOM
-# Configuration time: Mon May 16 03:41:24 EDT 1994
+# hints/linux.sh
# Original version by rsanders
# Additional dlext support by Kenneth Albanowski <kjahds@kjahds.com>
-# Target system: linux hrothgar 1.1.12 #9 sat may 14 02:03:23 edt 1994 i486
+#
+# 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.
+#
+# I don't understand several things in here. Clarifications are welcome.
+
+# Why is this needed?
bin='/usr/bin'
+
ccflags='-I/usr/include/bsd'
cppflags=' -I/usr/include/bsd'
d_dosuid='define'
-d_voidsig='define'
+
+# Why are these needed?
gidtype='gid_t'
groupstype='gid_t'
+uidtype='uid_t'
+
malloctype='void *'
+usemymalloc='n'
+
+case "$optimize" in
+'') optimize='-O2' ;;
+esac
+
+# Why is this needed?
nm_opt=''
-optimize='-O2'
+
sig_name='ZERO HUP INT QUIT ILL TRAP IOT UNUSED FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH'
signal_t='void'
-uidtype='uid_t'
-usemymalloc='n'
-yacc='bison -y'
-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'
+
+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 couple of lines you
+You should take a look at hints/linux.sh. There are a some lines you
may wish to change near the bottom.
EOM
--- /dev/null
+osname='mpeix'
+osvers='5.0'
+alignbytes='8'
+ccflags='-D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL'
+cc='c89'
+optimize='-g'
+d_safebcpy='undef'
+d_safemcpy='undef'
+intsize='8'
+usemymalloc='y'
+d_casti32='undef'
+d_castneg='undef'
+prefix='/PERL'
+privlib='/PERL/PERL/lib'
+archlib='/PERL/PERL/lib/mpeix'
+clocktype='clock_t'
+gidtype='gid_t'
+groupstype='gid_t'
+lseektype='off_t'
+modetype='mode_t'
+randbits='15'
+ssizetype='ssize_t'
+uidtype='uid_t'
+d_stdstdio='undef'
+i_pwd='undef'
+i_grp='undef'
+#d_fd_set='undef'
+#d_fds_bits='undef'
+d_chroot='undef'
+d_fchmod='undef'
+d_fchown='undef'
+d_flock='undef'
+d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+d_getpgrp2='undef'
+d_getprior='undef'
+d_killpg='undef'
+d_lstat='undef'
+d_seekdir='undef'
+d_telldir='undef'
+d_setpgrp2='undef'
+d_setprior='undef'
+d_setresgid='undef'
+d_setresuid='undef'
+d_setrgid='undef'
+d_setruid='undef'
+d_syscall='undef'
+d_truncate='undef'
+d_setregid='undef'
+d_setreuid='undef'
+d_setpgrp='undef'
+d_chsize='undef'
+d_group='undef'
+d_bcmp='undef'
+d_bcopy='undef'
+d_bzero='undef'
+d_attrib='undef'
+d_dirnamlen='define'
+d_link='undef'
+d_passwd='undef'
+d_pwcomment='undef'
+d_statblks='undef'
+libs='-lsvipc -lsocket -lm -lc'
+ranlib='/bin/true'
+d_nice='undef'
+d_cuserid='undef'
+i_termios='undef'
+d_tcgetpgrp='undef'
+d_tcsetpgrp='undef'
usevfork=false
d_suidsafe=define
-ccflags="$ccflags"
set `echo $glibpth | sed -e 's@/usr/ucblib@@'`
glibpth="$*"
set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ ucb @ @'`
# svr4 hints, System V Release 4.x
-# Last modified 1994/12/03 by Tye McQueen, tye@metronet.com
+# Last modified 1995/01/28 by Tye McQueen, tye@metronet.com
# Use Configure -Dcc=gcc to use gcc.
case "$cc" in
'') cc='/bin/cc'
test -f $cc || cc='/usr/ccs/bin/cc'
;;
esac
-test -d /usr/local/man || mansrc='none'
# We include support for using libraries in /usr/ucblib, but the setting
# of libswanted excludes some libraries found there. You may want to
# prevent "ucb" from being removed from libswanted and see if perl will
# build on your system.
ldflags='-L/usr/ccs/lib -L/usr/ucblib'
ccflags='-I/usr/include -I/usr/ucbinclude'
-libswanted=`echo $libswanted | tr ' ' '\012' | egrep -v '^(malloc|ucb)$'`
-# -lucb: Defines setreuid() and other routines Perl wants but they don't
-# add any/much functionality and often won't ld properly.
-# -lmalloc: Anyone know what problems this caused?
-d_index='undef' # Even if libucb.a used, use strchr() not index().
-d_suidsafe=define # "./Configure -d" can't figure this out easilly
+# Don't use problematic libraries:
+libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'`
+# libmalloc.a - Probably using Perl's malloc() anyway.
+# libucb.a - Remove it if you have problems ld'ing. We include it because
+# it is needed for ODBM_File and NDBM_File extensions.
+if [ -r /usr/ucblib/libucb.a ]; then # If using BSD-compat. library:
+ d_gconvert='undef' # Unusuable under UnixWare 1.1 [use gcvt() instead]
+ # Use the "native" counterparts, not the BSD emulation stuff:
+ d_bcmp='undef' d_bcopy='undef' d_bzero='undef' d_safebcpy='undef'
+ d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'
+ d_setlinebuf='undef' d_setregid='undef' d_setreuid='undef'
+fi
+d_suidsafe='define' # "./Configure -d" can't figure this out easilly
usevfork='false'
-cat <<'EOM'
+cat <<'EOM' >&4
If you wish to use dynamic linking, you must use
LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH
#!./perl
BEGIN { @INC=('./lib', '../lib') }
-use Config;
use File::Find;
$mainperldir = "/usr/bin";
warn "Can't cd to lib to install lib files: $!\n";
}
-# Install header files and libraries
+# Install header files and libraries.
makedir("$installarchlib/CORE");
foreach $file (<*.h libperl*.*>) {
cp_if_diff($file,"$installarchlib/CORE/$file");
- if ($file =~ /\.a$/ && $Config{'osname'} eq 'next') {
+ if ($file =~ /\.a$/ && $osname eq 'next') {
#on NeXTs we have to rerun ranlib after copying libraries
- &cmd("$Config{'ranlib'} $installarchlib/CORE/$file");
+ &cmd("$ranlib $installarchlib/CORE/$file");
}
}
+# AIX needs perl.exp installed as well.
+cp_if_diff("perl.exp" ,"$installarchlib/CORE/perl.exp") if ($osname eq 'aix');
+
# Offer to install perl in a "standard" location
&unlink("$installlib/$name");
&makedir("$installlib/$dir");
&cmd("cp $_ $installlib/$dir");
- if (/\.a$/ && $Config{'osname'} eq 'next') {
+ if (/\.a$/ && $osname eq 'next') {
#on NeXTs we have to rerun ranlib after copying libraries
- &cmd("$Config{'ranlib'} $installlib/$dir/$_");
+ &cmd("$ranlib $installlib/$dir/$_");
}
# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loaded libraries.
package ExtUtils::MakeMaker;
-$Version = 4.01; # Last edited 25th Jan 1995 by Tim Bunce
+$Version = 4.03; # Last edited 30th Jan 1995 by Andreas Koenig
use Config;
+check_hints();
use Carp;
use Cwd;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(&WriteMakefile &mkbootstrap $Verbose);
+@EXPORT = qw(&WriteMakefile &mkbootstrap &mksymlists $Verbose);
@EXPORT_OK = qw($Version %att %skip %Recognized_Att_Keys
@MM_Sections %MM_Sections
- &help &lsdir);
+ &help &lsdir &neatvalue);
$Is_VMS = $Config{'osname'} eq 'VMS';
require ExtUtils::MM_VMS if $Is_VMS;
=head1 SYNOPSIS
-use ExtUtils::MakeMaker;
+C<use ExtUtils::MakeMaker;>
-WriteMakefile( ATTRIBUTE => VALUE [, ...] );
+C<WriteMakefile( ATTRIBUTE => VALUE [, ...] );>
=head1 DESCRIPTION
that can be individually overridden. Each subroutine returns the text
it wishes to have written to the Makefile.
+MakeMaker.pm uses the architecture specific information from
+Config.pm. In addition the extension may contribute to the C<%Config>
+hash table of Config.pm by supplying hints files in a C<hints/>
+directory. The hints files are expected to be named like their
+counterparts in PERL_SRC/hints (eg. next_3_2.sh). They are both
+executed by the shell and parsed by MakeMaker to include the variables
+in C<%Config>. If there is no hintsfile for the actual system, but for
+some previous releases of the same operating system, the latest one of
+those is used.
+
=head2 Default Makefile Behaviour
The automatically generated Makefile enables the user of the extension
make realclean # delete all derived files (including installed files)
make distclean # produce a gzipped file ready for shipping
-The macros in the produced Makefile may be overriden on the command
-line to the make call like:
+The macros in the produced Makefile may be overridden on the command
+line to the make call as in the following example:
make INST_LIB=/some/where INST_ARCHLIB=/some/where
expansion will probably not be available and INST_ARCHLIB will not be
set automatically when INST_LIB is given as argument.
-(This section is yet to be completed ...)
+The generated Makefile does not set any permissions. The installer has
+to decide, which umask should be in effect.
=head2 Determination of Perl Library and Installation Locations
-MakeMaker needs to know, or to guess, where certain things are located.
-Especially INST_LIB, INST_ARCHLIB, PERL_LIB, PERL_ARCHLIB and PERL_SRC.
+MakeMaker needs to know, or to guess, where certain things are
+located. Especially INST_LIB and INST_ARCHLIB (where to install files
+into), PERL_LIB and PERL_ARCHLIB (where to read existing modules
+from), and PERL_INC (header files and C<libperl*.*>).
Extensions may be built either using the contents of the perl source
directory tree or from an installed copy of the perl library.
PERL_ARCHLIB = Same as above for architecture dependent files
INST_LIB = Directory where we put library files of this extension
- while building it. If we are building below PERL_SRC/ext
- we default to PERL_SRC/lib, else we default to ./blib.
+while building it. If we are building below PERL_SRC/ext
+we default to PERL_SRC/lib, else we default to ./blib.
INST_ARCHLIB = Same as above for architecture dependent files
This description is not yet documented; you can get at the description
with the command
- perl Makefile.PL help (if you already have a basic Makefile.PL)
-or perl -e 'use ExtUtils::MakeMaker qw(&help); &help;'
+ C<perl Makefile.PL help> (if you already have a basic Makefile.PL)
+or
+ C<perl -e 'use ExtUtils::MakeMaker qw(&help); &help;'>
=head2 Overriding MakeMaker Methods
v3.7 December 30th 1994 By Tim Bunce
v3.8 January 17th 1995 By Andreas Koenig and Tim Bunce
-- Introduces ./blib as the directory, where the ready-to-use module
-will live for the time of the building process if PERL_SRC/lib is not
-available. ./blib is turned into an absolute pathname and gets passed
-to subdirectories when writing the Makefile.
-
-- INST_ARCHLIB will now be set equal to INST_LIB if we cannot
-determine it with the methods near line 620 (in the intialize
-subroutine).
-
-- Introduced the install subroutine, that calls another make
-recursively with INST_LIB, and INST_ARCHLIB set according to the local
-conventions.
-
-- Since version 3.6 all *.al and *.ix files are installed into
-$installprivlib. In perl5.000 they were installed into
-$installarchlib. Version 3.8 takes precautions to delete old *.{al,ix}
-files that are left over in $installarchlib. Installperl is also
-patched to both delete old *.al and *.ix files, that were put into
-$installarchlib, and to install them properly from now on.
-
-- h2xs is patched by Dean Roehrich to reintroduce the C<-A> option and
-reconsiders the use of the AutoLoader. Also podifies h2xs.
-
-- Patches to {DB_File,Fcntl,GDBM_File,POSIX,Socket}.pm, eliminating
-AutoLoader from @ISA (by Dean Roehrich).
-
-- A patch to AutoSplit.pm makes sure, the target directory of the
-split exists.
-
-- installperl now installs all *.h files into $installarchlib/CORE.
-
-- added a simple help function
-
-- AutoSplit:
-
- Turned two constants into package variables.
- Modified the default for &autosplit to be $CheckModTime=1.
- Added warning and comment if auto dir does not exist.
- Enhanced AutoLoader check (POSIX.pm was not getting AutoSplit!)
- Improved logging if $Verbose>=2.
-
-- MakeMaker:
-
- EXPORT_OK lsdir(), it's very handy.
- Deleted much of the early revision history.
- Changed LDTARGET (bad name) to LDFROM (better, but not great :)
- INST_ARCHLIB for ./blib found via mapping from INST_LIB ./blib
- (this allows error message if INST_ARCHLIB still undefined)
- Added optional regex filter to &lsdir.
- Added cute auto handling of a ./$(BASEEXT)/*.pm directory as
- per recent messages with Nick re ext/nTk/nTk/Text.pm
- Added NOOP, RM_F, RM_RF, TOUCH, CP to %att.
- NOOP is now "" on Unix, "<tab>" caused problems (see makefile section)
- RM_F etc now expanded when Makefile written.
- Old AUTOSPLITLIB definition deleted.
- See new dynamic_lib section for new ARMAYBE handling.
- install section now uses $(INSTALLPRIVLIB) because on some
- systems INSTALLPRIVLIB != PRIVLIB (ditto for archlib)
-
v3.9 January 19th 1995 By Tim Bunce
Added ~ processing to parse_args to allow perl Makefile.PL X=~/path.
Added ability to say: "perl Makefile.PL verbose" to get debugging.
Added MakeMaker version number to generated Makefiles.
+v4.01 January 25th 1995 By Tim Bunce
+
+Changes in the section that deals with PMLIBDIRS: some pm files were
+put into INST_LIB instead of INST_LIBDIR.
+
+v4.02 January 29th 1995 By Andreas Koenig
+
+Enabled the use of the XXX_cflags variable from Config.pm for nested
+extensions: to change e.g. the $Config{"ccflags"} variable on the NeXT
+for the nTk::pTk extension, say
+ nTk__pTk_cflags='ccflags="-posix $ccflags"'
+in the hints-file.
+
+Hints may now be put in a hints/*.sh file within the the module's
+directory tree. Any *.sh file in that directory acts as if it had been
+parsed during the perl build process.
+
+Added O_FILES, which is an array like C_FILES. Done so to add a
+dependency O_FILES from H_FILES. This has the effect, that the
+extension gets rebuilt after some headerfiles have changed.
+
+Made life easier in some "I've just edited config.sh" situations and
+reduce the risk of "MakeMaker is being pedantic" complaints by letting
+the Makefile proceed with a warning if Config.pm is out of date (Tim's
+suggestion).
+
+$Verbose now passed to the findperl routine, to get debugging output
+from there, too.
+
+Make clean now also deletes the ./blib directory.
+
+Added lots of ideas of Charles Bailey that enable VMS support.
+
+v4.03 January 30th 1995 By Andreas Koenig
+
+check_hints() now also called within runsubdirpl(). More VMS code
+included. Trivial cosmetics.
+
=head1 NOTES
MakeMaker development work still to be done:
Needs more complete documentation.
-Add method to take a list of files and wrap it in a Makefile
-compatible way (<space><backslash><newline><tab>).
-
Add a html: target when there has been found a general solution to
installing html files.
=cut
+sub check_hints {
+ # We allow extension-specific hints files. If we find one we act as if Config.pm
+ # had read the contents
+
+ # First we look for the best hintsfile we have
+ my(@goodhints);
+ my($hint)="$Config{'osname'}_$Config{'osvers'}";
+ $hint =~ s/\./_/g;
+ $hint =~ s/_$//;
+ opendir DIR, "hints";
+ while (defined ($_ = readdir DIR)) {
+ next if /^\./;
+ next unless s/\.sh$//;
+ next unless /^$Config{'osname'}/;
+ # Don't trust a hintfile for a later OS version:
+ next if $_ gt $hint;
+ push @goodhints, $_;
+ if ($_ eq $hint){
+ @goodhints=$_;
+ last;
+ }
+ }
+ closedir DIR;
+ return unless @goodhints; # There was no hintsfile
+ # the last one in lexical ordering is our choice:
+ $hint=(reverse sort @goodhints)[0];
+
+ # execute the hintsfile:
+ system "/bin/sh hints/$hint.sh" unless $Is_VMS;
+ # Read the hintsfile and process it similarly as in configpm
+ open HINT, "hints/$hint.sh";
+ my(@v_others);
+ while (<HINT>) {
+ next if /^\s*$/; # empty lines
+ next if /^\s*#/; # comments
+ s/^(\w+)=(true|\d+)\s*$/$1='$2'\n/;
+ next unless (m/^(\w+)='(.*)'\s*$/);
+ push @v_others, $_;
+ }
+ close HINT;
+
+ # The lines we found take precedence over those in Config.pm:
+ $Config::config_sh = "@v_others" . $Config::config_sh;
+}
# Setup dummy package:
# MY exists for overriding methods to be defined within
LINKTYPE: =>'static' or 'dynamic' (default unless usedl=undef in config.sh)
Should only be used to force static linking (also see linkext below).
+ DL_FUNCS: Hashref of symbol names for routines to be made available as
+ universal symbols. Each key/value pair consists of the package
+ name and an array of routine names in that package. Used only
+ under AIX (export lists) and VMS (linker options) at present.
+ The routine names supplied will be expanded in the same way
+ as XSUB names are expanded by the XS() macro.
+ Defaults to { "$(NAME)" => [ "boot_$(NAME)" ] }.
+ (e.g. { "RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
+ "NetconfigPtr" => [ 'DESTROY'] } )
+
+ DL_VARS: Array of symbol names for variables to be made available as
+ universal symbols. Used only under AIX (export lists) and VMS
+ (linker options) at present. Defaults to [].
+ (e.g. [ qw( Foo_version Foo_numstreams Foo_tree ) ])
+
CONFIG: =>[qw(archname manext)] defines ARCHNAME & MANEXT from config.sh
SKIP: =>[qw(name1 name2)] skip (do not write) sections of the Makefile
@MM_Sections_spec = (
'post_initialize' => {},
- 'constants' => {},
'const_config' => {},
+ 'constants' => {},
'const_loadlibs' => {},
'const_cccmd' => {},
'tool_autosplit' => {},
'xs_o' => {},
'top_targets' => {},
'linkext' => {},
+ 'dlsyms' => {},
'dynamic' => {},
'dynamic_bs' => {},
'dynamic_lib' => {},
sub skipcheck{
my($section) = @_;
+ if ($section eq 'dynamic') {
+ warn "Warning (non-fatal): Target 'dynamic' depends on targets "
+ . "in skipped section 'dynamic_bs'\n"
+ if $skip{'dynamic_bs'} && $Verbose;
+ warn "Warning (non-fatal): Target 'dynamic' depends on targets "
+ . "in skipped section 'dynamic_lib'\n"
+ if $skip{'dynamic_lib'} && $Verbose;
+ }
+ if ($section eq 'dynamic_lib') {
+ warn "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on "
+ . "targets in skipped section 'dynamic_bs'\n"
+ if $skip{'dynamic_bs'} && $Verbose;
+ }
+ if ($section eq 'static') {
+ warn "Warning (non-fatal): Target 'static' depends on targets "
+ . "in skipped section 'static_lib'\n"
+ if $skip{'static_lib'} && $Verbose;
+ }
return 'skipped' if $skip{$section};
return '';
}
MY->mkbootstrap(@_);
}
+sub mksymlists{
+ %att = @_;
+ parse_args(\%att, @ARGV);
+ MY->mksymlists(@_);
+}
sub parse_args{
my($attr, @args) = @_;
unless($att{NAME}){ # we have to guess our name
my($name) = $pwd;
if ($Is_VMS) {
- $name =~ s:.*?([^.\]]+)\]:$1: unless ($name =~ s:.*[.\[]ext\.::);
+ $name =~ s:.*?([^.\]]+)\]:$1: unless ($name =~ s:.*[.\[]ext\.(.*)\]:$1:i);
($att{NAME}=$name) =~ s#[.\]]#::#g;
} else {
$name =~ s:.*/:: unless ($name =~ s:^.*/ext/::);
($att{FULLEXT} =$att{NAME}) =~ s#::#/#g ; #eg. BSD/Foo/Socket
($att{BASEEXT} =$att{NAME}) =~ s#.*::##; #eg. Socket
($att{ROOTEXT} =$att{FULLEXT}) =~ s#/?\Q$att{BASEEXT}\E$## ; # eg. /BSD/Foo
- $att{ROOTEXT} = "/$att{ROOTEXT}" if $att{ROOTEXT};
- $att{ROOTEXT} = "" if $Is_VMS;
+ $att{ROOTEXT} = ($Is_VMS ? '' : '/') . $att{ROOTEXT} if $att{ROOTEXT};
($att{DISTNAME}=$att{NAME}) =~ s#(::)#-#g;
$att{VERSION} = "0.1" unless $att{VERSION};
# will be working versions of perl 5. miniperl has priority over perl
# for PERL to ensure that $(PERL) is usable while building ./ext/*
$att{'PERL'} = MY->find_perl(5.0, [ qw(miniperl perl) ],
- [ $att{PERL_SRC}, split(":", $ENV{PATH}), $Config{'bin'} ], 0 )
+ [ $att{PERL_SRC}, split(":", $ENV{PATH}), $Config{'bin'} ], $Verbose )
unless ($att{'PERL'} && -x $att{'PERL'});
# Define 'FULLPERL' to be a non-miniperl (used in test: target)
unless ($att{'FULLPERL'} && -x $att{'FULLPERL'});
if ($Is_VMS) {
- ($att{'PERL'} = 'MCR ' . vmsify($att{'PERL'})) =~ s:.*/::;
- ($att{'FULLPERL'} = 'MCR ' . vmsify($att{'FULLPERL'})) =~ s:.*/::;
+ $att{'PERL'} = 'MCR ' . vmsify($att{'PERL'});
+ $att{'FULLPERL'} = 'MCR ' . vmsify($att{'FULLPERL'});
}
}
my($inst) = MY->libscan();
print "libscan($path) => '$inst'" if ($Verbose >= 2);
return unless $inst;
- $pm{$path} = "$inst";
+ $pm{$path} = $inst;
}, @{$att{PMLIBDIRS}});
}
$att{XS} = \%xs unless $att{XS};
$att{PM} = \%pm unless $att{PM};
$att{C} = [sort keys %c] unless $att{C};
+ my(@o_files) = @{$att{C}};
+ my($sufx) = $Is_VMS ? '.obj' : '.o';
+ $att{O_FILES} = [grep s/\.c$/$sufx/, @o_files] ;
$att{H} = [sort keys %h] unless $att{H};
}
$_;
}
-
sub init_others { # --- Initialize Other Attributes
for $key (keys(%Recognized_Att_Keys), keys(%Other_Att_Keys)){
push(@{$att{CONFIG}}, 'shellflags') if $Config{'shellflags'};
if ($Is_VMS) {
- # This will not make other Makefile.PLs portable. Any Makefile.PL
- # which says OBJECT => "foo.o bar.o" will fail on VMS. It might
- # be better to fix the c_o section to produce .o files.
$att{OBJECT} = '$(BASEEXT).obj' unless $att{OBJECT};
$att{OBJECT} =~ s/[^,\s]\s+/, /g;
$att{OBJECT} =~ s/\n+/, /g;
+ $att{OBJECT} =~ s#\.o,#\.obj,#;
} else {
$att{OBJECT} = '$(BASEEXT).o' unless $att{OBJECT};
$att{OBJECT} =~ s/\n+/ \\\n\t/g;
$att{BOOTDEP} = (-f "$att{BASEEXT}_BS") ? "$att{BASEEXT}_BS" : "";
$att{LD} = ($Config{'ld'} || 'ld') unless $att{LD};
$att{LDFROM} = '$(OBJECT)' unless $att{LDFROM};
- $att{LINKTYPE} = ($Config{'usedl'}) ? 'dynamic' : 'static'
- unless $att{LINKTYPE};
+ # Sanity check: don't define LINKTYPE = dynamic if we're skipping
+ # the 'dynamic' section of MM. We don't have this problem with
+ # 'static', since we either must use it (%Config says we can't
+ # use dynamic loading) or the caller asked for it explicitly.
+ if (!$att{LINKTYPE}) {
+ $att{LINKTYPE} = grep(/dynamic/,@{$att{SKIP} || []})
+ ? 'static'
+ : ($Config{'usedl'} ? 'dynamic' : 'static');
+ };
# These get overridden for VMS and maybe some other systems
$att{NOOP} = "";
+ $att{MAKEFILE} = "Makefile";
$att{RM_F} = "rm -f";
$att{RM_RF} = "rm -rf";
$att{TOUCH} = "touch";
# Handy lists of source code files:
XS_FILES= ".join(" \\\n\t", sort keys %{$att{XS}})."
C_FILES = ".join(" \\\n\t", @{$att{C}})."
+O_FILES = ".join(" \\\n\t", @{$att{O_FILES}})."
H_FILES = ".join(" \\\n\t", @{$att{H}})."
.SUFFIXES: .xs
chop($old = `cd $att{PERL_SRC}; sh $shflags ./cflags $att{BASEEXT}.c 2>/dev/null`)
if $att{PERL_SRC};
- if ($prog = $Config{"$att{BASEEXT}_cflags"}) {
+ my($name);
+ ( $name = $att{NAME} . "_cflags" ) =~ s/:/_/g ;
+ if ($prog = $Config{$name}) {
# Expand hints for this extension via the shell
- print STDERR "Processing $att{BASEEXT}_cflags hint:\n" if $Verbose;
+ print STDERR "Processing $name hint:\n" if $Verbose;
my(@o)=`cc=\"$cc\"
ccflags=\"$ccflags\"
optimize=\"$optimize\"
q{
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
# Remark: the "" around the -I switches are helpful for the VMS support
-AUTOSPLITFILE = $(PERL) $(I_PERL_LIBS) -e 'use AutoSplit;}.$asl.q{ autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1) ;'
+AUTOSPLITFILE = $(PERL) $(I_PERL_LIBS) -e 'use AutoSplit;}.$asl.q{ \
+ AutoSplit::autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1) ;'
};
}
sub c_o {
'
+$(O_FILES): $(H_FILES)
+
.c.o:
$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $(INC) $*.c
';
all :: config linkext $(INST_PM)
'.$att{NOOP}.'
-config :: Makefile
+config :: '.$att{MAKEFILE}.'
@$(MKPATH) $(INST_LIBDIR) $(INST_ARCHAUTODIR)
';
}
";
}
+sub dlsyms {
+ my($self,%attribs) = @_;
+
+ return '' if ($Config{'osname'} ne 'AIX');
+
+ my($funcs) = $attribs{DL_FUNCS} || $att{DL_FUNCS} || {};
+ my($vars) = $attribs{DL_VARS} || $att{DL_VARS} || [];
+ my(@m);
+
+ push(@m,"
+dynamic :: $att{BASEEXT}.exp
+
+") unless $skip{'dynamic'};
+
+ push(@m,"
+static :: $att{BASEEXT}.exp
+
+") unless $skip{'static'};
+
+ push(@m,"
+$att{BASEEXT}.exp: Makefile.PL
+",' $(PERL) $(I_PERL_LIBS) -e \'use ExtUtils::MakeMaker; \\
+ mksymlists(DL_FUNCS => ',neatvalue($att{DL_FUNCS}),', DL_VARS => ',neatvalue($att{DL_VARS}),')\'
+');
+
+ join('',@m);
+}
# --- Dynamic Loading Sections ---
'
# $(INST_PM) has been moved to the all: target.
# It remains here for awhile to allow for old usage: "make dynamic"
-dynamic :: Makefile $(INST_DYNAMIC) $(INST_BOOT) $(INST_PM)
+dynamic :: '.$att{MAKEFILE}.' $(INST_DYNAMIC) $(INST_BOOT) $(INST_PM)
'.$att{NOOP}.'
';
}
# As MakeMaker mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP): Makefile '.$att{BOOTDEP}.'
+$(BOOTSTRAP): '."$att{MAKEFILE} $att{BOOTDEP}".'
$(PERL) $(I_PERL_LIBS) \
-e \'use ExtUtils::MakeMaker; &mkbootstrap("$(BSLOADLIBS)");\' \
INST_LIB=$(INST_LIB) INST_ARCHLIB=$(INST_ARCHLIB) PERL_SRC=$(PERL_SRC) NAME=$(NAME)
'
# $(INST_PM) has been moved to the all: target.
# It remains here for awhile to allow for old usage: "make static"
-static :: Makefile $(INST_STATIC) $(INST_PM)
+static :: '.$att{MAKEFILE}.' $(INST_STATIC) $(INST_PM)
'.$att{NOOP}.'
';
}
sub runsubdirpl{ # Experimental! See subdir_x section
my($self,$subdir) = @_;
chdir($subdir) or die "chdir($subdir): $!";
+ ExtUtils::MakeMaker::check_hints();
require "Makefile.PL";
}
# If this does not suit your needs you'll need to write your own
# MY::subdir_x() method to override this one.
qq{
-config :: $subdir/Makefile
+config :: $subdir/$att{MAKEFILE}
cd $subdir ; \$(MAKE) config INST_LIB=\$(INST_LIB) INST_ARCHLIB=\$(INST_ARCHLIB) LINKTYPE=\$(LINKTYPE)
-$subdir/Makefile: $subdir/Makefile.PL \$(CONFIGDEP)
+$subdir/$att{MAKEFILE}: $subdir/Makefile.PL \$(CONFIGDEP)
}.' @echo "Rebuilding $@ ..."
$(PERL) $(I_PERL_LIBS) \\
-e "use ExtUtils::MakeMaker; MM->runsubdirpl(qw('.$subdir.'))" \\
clean ::
');
# clean subdirectories first
- push(@m, map("\t-cd $_ && test -f Makefile && \$(MAKE) clean\n",@{$att{DIR}}));
+ push(@m, map("\t-cd $_ && test -f $att{MAKEFILE} && \$(MAKE) clean\n",@{$att{DIR}}));
my(@otherfiles) = values %{$att{XS}}; # .c files from *.xs files
push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
+ push(@otherfiles, "./blib");
push(@m, " -$att{RM_RF} *~ t/*~ *.o *.a mon.out core so_locations "
."\$(BOOTSTRAP) \$(BASEEXT).bso @otherfiles\n");
# See realclean and ext/utils/make_ext for usage of Makefile.old
- push(@m, " -$att{MV} Makefile Makefile.old 2>/dev/null\n");
+ push(@m, " -$att{MV} $att{MAKEFILE} $att{MAKEFILE}.old 2>/dev/null\n");
push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
join("", @m);
}
# realclean subdirectories first (already cleaned)
$sub = "\t-cd %s && test -f %s && \$(MAKE) %s realclean\n";
foreach(@{$att{DIR}}){
- push(@m, sprintf($sub,$_,'Makefile.old','-f Makefile.old'));
- push(@m, sprintf($sub,$_,'Makefile',''));
+ push(@m, sprintf($sub,$_,"$att{MAKEFILE}.old","-f $att{MAKEFILE}.old"));
+ push(@m, sprintf($sub,$_,"$att{MAKEFILE}",''));
}
push(@m, " $att{RM_RF} \$(INST_AUTODIR) \$(INST_ARCHAUTODIR)\n");
push(@m, " $att{RM_F} \$(INST_DYNAMIC) \$(INST_BOOT)\n");
push(@m, " $att{RM_F} \$(INST_STATIC) \$(INST_PM)\n");
- my(@otherfiles) = qw(Makefile Makefile.old); # Makefiles last
+ my(@otherfiles) = ($att{MAKEFILE}, "$att{MAKEFILE}.old"); # Makefiles last
push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
push(@m, " $att{RM_RF} @otherfiles\n") if @otherfiles;
push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
my($compress) = $attribs{COMPRESS} || 'compress'; # eg gzip
my($preop) = $attribs{PREOP} || '@:'; # e.g., update MANIFEST
my($postop) = $attribs{POSTOP} || '@:';
- my($mkfiles) = join(' ', map("$_/Makefile", ".", @{$att{DIR}}));
+ my($mkfiles) = join(' ', map("$_/$att{MAKEFILE}", ".", @{$att{DIR}}));
"
distclean: clean
$preop
push(@m, <<'END') if -f "test.pl";
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) $(I_PERL_LIBS) test.pl
END
- push(@m, map("\tcd $_ && test -f Makefile && \$(MAKE) test LINKTYPE=\$(LINKTYPE)\n",@{$att{DIR}}));
+ 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);
}
install :: all
");
# install subdirectories first
- push(@m, map("\tcd $_ && test -f Makefile && \$(MAKE) install\n",@{$att{DIR}}));
+ push(@m, map("\tcd $_ && test -f $att{MAKEFILE} && \$(MAKE) install\n",@{$att{DIR}}));
push(@m, "\t: perl5.000 and MM pre 3.8 autosplit into INST_ARCHLIB, we delete these old files here
- $att{RM_F} \$(INSTALLARCHLIB)/auto/\$(FULLEXT)/*.al \$(INSTALLARCHLIB)/auto/\$(FULLEXT)/*.ix
- \$(MAKE) INST_LIB=\$(INSTALLPRIVLIB) INST_ARCHLIB=\$(INSTALLARCHLIB)
+ $att{RM_F} \$(INST_ARCHLIB)/auto/\$(FULLEXT)/*.al \$(INST_ARCHLIB)/auto/\$(FULLEXT)/*.ix
+ \$(MAKE) INST_LIB=\$(INST_PRIVLIB) INST_ARCHLIB=\$(INST_ARCHLIB)
");
join("",@m);
$(PERL_INC)/config.h: $(PERL_SRC)/config.sh
-@echo "Warning: $(PERL_INC)/config.h out of date with $(PERL_SRC)/config.sh"; false
-# An out of date Config.pm is fatal.
$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
- @echo "$(PERL_ARCHLIB)/Config.pm out of date with $(PERL_SRC)/config.sh"
- @false
+ @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")
# must force a manual rerun to be sure. But as it should only
# happen very rarely it is not a significant problem.
'
-$(OBJECT) : Makefile
+$(OBJECT) : '.$att{MAKEFILE}.'
# We take a very conservative approach here, but it\'s worth it.
# We move Makefile to Makefile.old here to avoid gnu make looping.
-Makefile: Makefile.PL $(CONFIGDEP)
+'.$att{MAKEFILE}.': Makefile.PL $(CONFIGDEP)
@echo "Makefile out-of-date with respect to $?"
@echo "Cleaning current config before rebuilding Makefile..."
- -@mv Makefile Makefile.old
- -$(MAKE) -f Makefile.old clean >/dev/null 2>&1 || true
+ -@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
';
if (@fullname=<${thispth}/lib${thislib}.${so}.[0-9]*>){
$fullname=$fullname[-1]; #ATTN: 10 looses against 9!
} elsif (-f ($fullname="$thispth/lib$thislib.$so")){
- } elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
- && ($thislib .= "_s") ){ # we must explicitly ask for _s version
+ } elsif (-f ($fullname="$thispth/lib${thislib}_s.a")
+ && ($thislib .= "_s") ){ # we must explicitly ask for _s version
} elsif (-f ($fullname="$thispth/lib$thislib.a")){
} elsif (-f ($fullname="$thispth/Slib$thislib.a")){
} else {
=head1 AUTHORS
Andreas Koenig <k@otto.ww.TU-Berlin.DE>, Tim Bunce
-<Tim.Bunce@ig.co.uk>, Andy Dougherty <doughera@lafcol.lafayette.edu>
+<Tim.Bunce@ig.co.uk>, Andy Dougherty <doughera@lafcol.lafayette.edu>.
+VMS support by Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>.
=cut
}
}
+sub mksymlists {
+ my($self) = shift;
+
+ # only AIX requires a symbol list at this point
+ # (so does VMS, but that's handled by the MM_VMS package)
+ return '' unless $Config{'osname'} eq 'AIX';
+
+ init_main(@ARGV) unless defined $att{'BASEEXT'};
+ if (!$att{DL_FUNCS}) {
+ (my($bootfunc) = $att{NAME}) =~ s/\W/_/g;
+ $att{DL_FUNCS} = {$att{BASEEXT} => ["boot_$bootfunc"]};
+ }
+ rename "$att{BASEEXT}.exp", "$att{BASEEXT}.exp_old";
+
+ open(EXP,">$att{BASEEXT}.exp") or die $!;
+ print EXP join("\n",@{$att{DL_VARS}}) if @{$att{DL_VARS}};
+ foreach $pkg (keys %{$att{DL_FUNC}}) {
+ (my($prefix) = $pkg) =~ s/\W/_/g;
+ foreach $func (@{$att{DL_FUNC}->{$pkg}}) {
+ $func = "XS_${prefix}_$func" unless $func =~ /^boot_/;
+ print EXP "$func\n";
+ }
+ }
+ close EXP;
+}
# --- Output postprocessing section ---
#nicetext is included to make VMS support easier
rm -f makedepend
$spitshell >makedepend <<!GROK!THIS!
$startsh
-!GROK!THIS!
-$spitshell >>makedepend <<'!NO!SUBS!'
# makedepend.SH
#
+## To use an alternate make, set \$altmake in config.sh.
+MAKE=${altmake-make}
+!GROK!THIS!
+$spitshell >>makedepend <<'!NO!SUBS!'
export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
: might be identical
$test -d UU || mkdir UU
-make clist || ($echo "Searching for .c files..."; \
+$MAKE clist || ($echo "Searching for .c files..."; \
$echo *.c | $tr ' ' '\012' | $egrep -v '\*' >.clist)
for file in `$cat .clist`; do
# for file in `cat /dev/null`; do
$sed <$mf >$mf.new -e '1,/^# AUTOMATICALLY/!d'
-make shlist || ($echo "Searching for .SH files..."; \
+$MAKE shlist || ($echo "Searching for .SH files..."; \
$echo *.SH | $tr ' ' '\012' | $egrep -v '\*' >.shlist)
if $test -s .deptmp; then
for file in `cat .shlist`; do
$sed 's|^\(.*\.o:\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \
>>$mf.new
else
- make hlist || ($echo "Searching for .h files..."; \
+ $MAKE hlist || ($echo "Searching for .h files..."; \
$echo *.h | $tr ' ' '\012' | $egrep -v '\*' >.hlist)
$echo "You don't seem to have a proper C preprocessor. Using grep instead."
$egrep '^#include ' `cat .clist` `cat .hlist` >.deptmp
for (s = SvPVX(kid->op_sv); *s; s++) {
if (*s == ':' && s[1] == ':') {
*s = '/';
- strcpy(s+1,s+2); /* known to be okay here */
+ Move(s+2, s+1, strlen(s+2)+1, char);
--SvCUR(kid->op_sv);
}
}
# include <netinet/in.h>
#endif
+#ifdef I_SYS_STAT
#include <sys/stat.h>
+#endif
/* The stat macros for Amdahl UTS, Unisoft System V/88 (and derivatives
like UTekV) are broken, sometimes giving false positives. Undefine
# endif
#endif
-#ifdef VOIDSIG
-# define VOIDRET void
-#else
-# define VOIDRET int
-#endif
-
#ifdef DOSISH
# include "dosish.h"
#else
typedef struct loop LOOP;
typedef struct Outrec Outrec;
-typedef struct lstring Lstring;
typedef struct interpreter PerlInterpreter;
typedef struct ff FF;
typedef struct sv SV;
perl_call_method
perl_call_sv
perl_requirepv
+safemalloc
+saferealloc
+safefree
END
RETURN;
#else
DIE(no_func, "Unsupported function alarm");
- break;
#endif
}
OP* newANONHASH _((OP* op));
OP* newANONSUB _((I32 floor, OP* block));
OP* newASSIGNOP _((I32 flags, OP* left, I32 optype, OP* right));
-OP* newCONDOP _((I32 flags, OP* expr, OP* true, OP* false));
+OP* newCONDOP _((I32 flags, OP* expr, OP* trueop, OP* falseop));
void newFORM _((I32 floor, OP* op, OP* block));
OP* newFOROP _((I32 flags, char* label, line_t forline, OP* scalar, OP* expr, OP*block, OP*cont));
OP* newLOGOP _((I32 optype, I32 flags, OP* left, OP* right));
-
/*
* The following symbols are defined if your operating system supports
* functions by that name. All Unixes I know of support them, thus they
*/
#define HAS_UTIME /**/
-#define HAS_KILL
-#define HAS_LINK
-#define HAS_WAIT
-/*
- * The following symbols are defined if your operating system supports
- * password and group functions in general. All Unix systems do.
+/* HAS_GROUP
+ * This symbol, if defined, indicates that the getgrnam(),
+ * getgrgid(), and getgrent() routines are available to
+ * get group entries.
*/
-#ifdef I_GRP
-#define HAS_GROUP
-#endif
-#ifdef I_PWD
-#define HAS_PASSWD
-#endif
+#define HAS_GROUP /**/
+
+/* HAS_PASSWD
+ * This symbol, if defined, indicates that the getpwnam(),
+ * getpwuid(), and getpwent() routines are available to
+ * get password entries.
+ */
+#define HAS_PASSWD /**/
+#define HAS_KILL
+#define HAS_WAIT
#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
# include <signal.h>
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define my_getenv(var) getenv(var)
+
}
else {
s = bigend - littlelen;
- if (*s == *little && bcmp((char*)s,little,littlelen)==0)
+ if (*s == *little && bcmp((char*)s,(char*)little,littlelen)==0)
return (char*)s; /* how sweet it is */
else if (bigend[-1] == '\n' && little[littlelen-1] != '\n'
&& s > big) {
s--;
- if (*s == *little && bcmp((char*)s,little,littlelen)==0)
+ if (*s == *little && bcmp((char*)s,(char*)little,littlelen)==0)
return (char*)s;
}
return Nullch;
*/
#undef HAS_GETPPID /**/
-/* HAS_GROUP:
- * This symbol, if defined, indicates that the group routine is
+/* HAS_GETGRENT:
+ * This symbol, if defined, indicates that the getgrent routine is
* available.
*/
-#undef HAS_GROUP /**/
-
+#undef HAS_GETGRENT /**/
/* HAS_HTONL:
* This symbol, if defined, indicates that the htonl() routine (and
#define HAS_NICE /**/
/* HAS_PASSWD:
- * This symbol, if defined, indicates that the passwd routine is
- * available.
+ * This symbol, if defined, indicates that the getpwnam(),
+ * getpwuid(), and getpwent() routines are available to
+ * get password entries.
*/
#undef HAS_PASSWD /**/
case "$file" in
ext/*) file=`echo $file | sed 's:ext/\(.*\)/[^/]*:\1:'`
;;
+ lib/auto/*) file=`echo $file | sed 's:lib/auto/\(.*\)/[^/]*:\1:'`
+ ;;
*/*)
file=`expr X$file : 'X.*/\(.*\)'`
;;
#define VOIDUSED 1
#include "../config.h"
+#if defined(__STDC__) || defined(vax11c) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus)
+# define STANDARD_C 1
+#endif
+
/* Use all the "standard" definitions? */
#if defined(STANDARD_C) && defined(I_STDLIB)
# include <stdlib.h>
#define strrchr rindex
#endif
+
+#ifdef I_TIME
+# include <time.h>
+#endif
+
+#ifdef I_SYS_TIME
+# ifdef I_SYS_TIME_KERNEL
+# define KERNEL
+# endif
+# include <sys/time.h>
+# ifdef I_SYS_TIME_KERNEL
+# undef KERNEL
+# endif
+#endif
+
+#ifndef MSDOS
+# if defined(HAS_TIMES) && defined(I_SYS_TIMES)
+# include <sys/times.h>
+# endif
+#endif
+
+#ifndef STANDARD_C
+/* All of these are in stdlib.h or time.h for ANSI C */
+Time_t time();
+struct tm *gmtime(), *localtime();
+char *strchr(), *strrchr();
+char *strcpy(), *strcat();
+#endif /* ! STANDARD_C */
+
#include "handy.h"
#define Nullop 0
#include "../patchlevel.h"
#endif
#include "util.h"
-char *strchr();
char *filename;
char *myname;
int numeric = FALSE;
STR *fstr;
int prec = P_MAX; /* assume no parens needed */
- char *strchr();
if (!node) {
*numericptr = 0;