summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafcol.lafayette.edu>1995-02-07 01:51:12 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1995-02-07 01:51:12 +0000
commit1aef975c78d2e948679875705c79cbbbddfe5ad7 (patch)
tree08f1f52f7701b4a436de32c984f7a024d5395423 /Configure
parent75f926282bd78abe2f394977be7dd4dc52cb21ba (diff)
downloadperl-1aef975c78d2e948679875705c79cbbbddfe5ad7.tar.gz
perl5.000 patch.0j: fix minor portability and build problems remaining even after patches 0a through 0i
Specifically, here's what's included: Configure Regenerated with metaconfig patchlevel 50. This changed a variety of things, mostly related to selecting and changing the installation prefix. Handle csh, sed, and byacc no matter what the setting of d_portable. (This was causing glob problems in patch.0i). Set d_portable to default to 'y'. It doesn't matter anyway, but gives people a warm fuzzy feeling. Remove useless d_group and d_passwd tests. Add check for <sys/stat.h>. Improve & generalize AIX version detection. Consider /opt/man/man1 as a possible place to install man pages. Be a little more robust about OS version changes when deciding if the output of uname -a has really changed. MANIFEST MANIFEST.new Added hints/mpeix.sh. README Tell users the Configure defaults are probably right. Makefile.SH Better detection of whether user has byacc. Use $(MAKE) instead of make. U/Loc_sed.U Works again with d_portable='define'. U/Myinit.U Set d_portable=define as default. U/d_byacc.U Detect whether user has byacc even if d_portable=define. U/d_csh.U Works again with d_portable='define'. U/d_group.U Empty file to avoid useless metaconfig test. U/d_passwd.U Empty file to avoid useless metaconfig test. U/dist.patch This file contains two minor updates to dist3 PL50 that were used to generage Configure. U/i_sysstat.U New test. See if sys/stat.h is available. config.H Updated. config_h.SH Updated to metaconfig patchlevel 50. ext/NDBM_File/Makefile.PL ext/ODBM_File/Makefile.PL Add -lucb for SVR4 systems. handy.h Protect agains g++-2.6.3, which predefines bool. g++ can be used to compile an extension, but not perl itself. Still, the extension will #include "perl.h", which eventually gets "handy.h", which #define's bool. If this happens to you, add -DHAS_BOOL to your ccflags in your extension, or else ensure that _G_config.h is #include'd before perl.h. (_G_config.h will define _G_HAVE_BOOL, if indeed your version of g++ has bool.) hints/aix.sh Updated. Handles AIX 3.2.x and 4.1. Comments included! hints/hpux_9.sh Updated. hints/irix_4.sh Updated. Includes comments for IRIX 4.0.4 hints/linux.sh Updated. Beginnings of ELF support added, but completely untested. hints/mpeix.sh New hint file. hints/solaris_2.sh Useless ccflags="$ccflags" line removed. hints/svr4.sh Updated. installperl Doesn't use Config anymore (it already reads config.sh directly. That's probably backwards, but, oh well. Install perl.exp for AIX. lib/ExtUtils/MakeMaker.pm Upgraded from 4.01 to 4.03. makedepend.SH Use $MAKE instead of plain make. Index: op.c Remove overlapping strcpy(). perl.h Add test for <sys/stat.h>. Delete unused VOIDSIG stuff. Delete unused typedef struct lstring Lstring; perl_exp.SH Add safexxxx calls. pp_sys.c Delete wayward break in HAS_ALARM section. proto.h Change true and false (!) in function prototypes to please g++-2.6.3, which has true and false built in. (See notes for handy.h.) Index: unixish.h Long-overdue housekeeping. HAS_GROUP and HAS_PASSWD are always defined. util.c Yet another (char*) cast for bcmp. vms/config.vms Changed comments to match unixish.h. writemain.SH Now correctly handles nested static extensions. Recent MakeMakers have moved where they get built. x2p/a2p.h More definitions that will doubtless cause trouble somewhere else. x2p/a2py.c x2p/walk.c Remove unprotected char *strchr();
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure228
1 files changed, 155 insertions, 73 deletions
diff --git a/Configure b/Configure
index a19a501fff..30fac81ca3 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $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!!!!!
@@ -180,6 +180,7 @@ uniq=''
uuname=''
vi=''
zcat=''
+full_sed=''
libswanted=''
hint=''
myuname=''
@@ -227,6 +228,7 @@ d_alarm=''
d_attribut=''
d_bcmp=''
d_bcopy=''
+d_byacc=''
d_bzero=''
d_casti32=''
castflags=''
@@ -240,6 +242,7 @@ d_const=''
cryptlib=''
d_crypt=''
d_csh=''
+full_csh=''
d_cuserid=''
d_dbl_dig=''
d_difftime=''
@@ -274,7 +277,6 @@ d_getpgrp2=''
d_getpgrp=''
d_getppid=''
d_getprior=''
-d_group=''
d_htonl=''
d_isascii=''
d_killpg=''
@@ -300,7 +302,6 @@ d_msgrcv=''
d_msgsnd=''
d_nice=''
d_open3=''
-d_passwd=''
d_fpathconf=''
d_pathconf=''
d_pause=''
@@ -438,6 +439,7 @@ i_syssockio=''
i_sysndir=''
i_sysparam=''
i_sysselct=''
+i_sysstat=''
i_systimes=''
i_sgtty=''
i_termio=''
@@ -491,6 +493,7 @@ package=''
spackage=''
patchlevel=''
prefix=''
+prefixexp=''
installprivlib=''
privlib=''
privlibexp=''
@@ -631,12 +634,15 @@ inclwanted=''
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'
@@ -745,8 +751,7 @@ error=''
silent=''
extractsh=''
override=''
-optdef='optdef.sh'
-rm -f $optdef
+rm -f optdef.sh
: option parsing
while test $# -gt 0; do
@@ -778,24 +783,24 @@ 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;;
@@ -835,8 +840,8 @@ true) exec 1>/dev/null;;
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)
@@ -849,7 +854,7 @@ true)
echo "Fetching answers from $config_sh..."
cd ..
. $config
- test "$override" && . ./$optdef
+ test "$override" && . ./optdef.sh
echo " "
. ./UU/extract
rm -rf UU
@@ -860,13 +865,19 @@ esac
: 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
@@ -1409,15 +1420,15 @@ case "$config_sh" in
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
@@ -1436,7 +1447,6 @@ if test -f config.sh; then
tmp_n="$n"
tmp_c="$c"
. ./config.sh
- test "$override" && . UU/$optdef
cp config.sh UU
n="$tmp_n"
c="$tmp_c"
@@ -1498,11 +1508,11 @@ EOM
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
@@ -1689,7 +1699,7 @@ EOM
dflt=`echo $hintfile | $sed 's/\.sh$//'`
;;
esac
-
+
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
@@ -1745,13 +1755,14 @@ cd UU
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
@@ -3428,22 +3439,54 @@ may choose /usr if you wish to install $package among your system
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
@@ -3451,8 +3494,11 @@ private library directory that is accessible by everyone.
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
@@ -3475,27 +3521,35 @@ else
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
;;
@@ -3503,7 +3557,7 @@ case "$archlib" in
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.
@@ -3552,6 +3606,7 @@ esac'
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
@@ -3623,6 +3678,14 @@ set d_bsdpgrp
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
@@ -3915,6 +3978,7 @@ case "$csh" in
esac
set d_csh
eval $setvar
+full_csh=$csh
: see if cuserid exists
set cuserid d_cuserid
@@ -4580,10 +4644,6 @@ eval $inlibc
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
@@ -4951,10 +5011,6 @@ set d_open3
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
@@ -5875,17 +5931,14 @@ $rm -f try.c try
: 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
@@ -6353,6 +6406,9 @@ rp="What is the type for file position used by fsetpos()?"
. ./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
@@ -6406,9 +6462,11 @@ rp="What type is lseek's offset on this system declared as?"
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)
@@ -6420,18 +6478,22 @@ esac
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
@@ -6439,8 +6501,15 @@ echo " "
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
@@ -6461,9 +6530,8 @@ else
installmansrc="$mansrcexp"
fi
-
case "$mansrc" in
-'') manext='0';;
+' ') manext='0';;
*l) manext=l;;
*n) manext=n;;
*o) manext=l;;
@@ -6596,6 +6664,8 @@ fi
$rm -f foo* bar*
: determine where public executable scripts go
+set scriptdir scriptdir
+eval $prefixit
case "$scriptdir" in
'')
dflt="$bin"
@@ -6603,7 +6673,9 @@ case "$scriptdir" in
$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"
;;
@@ -6619,6 +6691,9 @@ EOM
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
@@ -7430,6 +7505,10 @@ eval $setvar
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
@@ -7561,6 +7640,7 @@ d_bcmp='$d_bcmp'
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'
@@ -7604,7 +7684,6 @@ d_getpgrp2='$d_getpgrp2'
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'
@@ -7633,7 +7712,6 @@ d_mymalloc='$d_mymalloc'
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'
@@ -7734,6 +7812,8 @@ extensions='$extensions'
find='$find'
flex='$flex'
fpostype='$fpostype'
+full_csh='$full_csh'
+full_sed='$full_sed'
gcc='$gcc'
gccversion='$gccversion'
gidtype='$gidtype'
@@ -7778,6 +7858,7 @@ i_sysndir='$i_sysndir'
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'
@@ -7853,6 +7934,7 @@ plibpth='$plibpth'
pmake='$pmake'
pr='$pr'
prefix='$prefix'
+prefixexp='$prefixexp'
privlib='$privlib'
privlibexp='$privlibexp'
prototype='$prototype'