Closed p5pRT closed 20 years ago
I not speak English but I will try to explain a problem with Perl's compilation.
I tried to compile the 5.004 perl version\, and I have followed the steps that I read in the INSTALL file and I had a problem with the step 3.
The steps that I did\, were: step 1. rm -f config.sh step 2. sh Configure -D prefix = /usr/local/perl step 3. make
In the step 3\, I had an error\, the error was:
doio.c: In function `Perl_do_ipcctl4: doio.c: 1337: storage size of `unsemds4 insn't know doio.c: 1337: storage size of `semun4 insn't know make: ** [doio.c] Error 1
If you need more information\, please send me a e-mail.
Thank you.
Files attached: makefile\, Configure\, myconfig
Juan Gallego Molero jgallego@eudoramail.com
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
#! /bin/sh # # If these # comments don't work\, trim them. Don't worry about any other # shell scripts\, Configure will trim # comments from them for you. # # (If you are trying to port this package to a machine without sh\, # I would suggest you have a look at the prototypical config_h.SH file # 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.) # # Yes\, you may rip this off to use in other distribution packages. This # script belongs to the public domain and cannot be copyrighted. # # (Note: this Configure script was generated automatically. Rather than # working with this copy of Configure\, you may wish to get metaconfig. # The dist-3.0 package (which contains metaconfig) was posted in # comp.sources.misc so you may fetch it yourself from your nearest # archive site. Check with Archie if you don't know where that can be.) #
# $Id: Head.U\,v 3.0.1.8 1995/07/25 13:40:02 ram Exp $ # # Generated on Sat Feb 1 00:26:40 EST 1997 [metaconfig 3.0 PL60]
cat >/tmp/c1$$ \<\<EOF ARGGGHHHH!!!!!
SCO csh still thinks true is false. Write to SCO today and tell them that next year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
(Actually\, Configure ought to just patch csh in place. Hmm. Hmmmmm. All we'd have to do is go in and swap the && and || tokens\, wherever they are.)
[End of diatribe. We now return you to your regularly scheduled programming...] EOF cat >/tmp/c2$$ \<\<EOF
OOPS! You naughty creature! You didn't run Configure with sh! I will attempt to remedy the situation by running sh for you... EOF
true || cat /tmp/c1$$ /tmp/c2$$ true || exec sh $0 $argv:q
(exit $?0) || cat /tmp/c2$$ (exit $?0) || exec sh $0 $argv:q rm -f /tmp/c1$$ /tmp/c2$$
: compute my invocation name me=$0 case "$0" in */*) me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null` test "$me" || me=$0 ;; esac
: Proper PATH separator p_=: : On OS/2 this directory should exist if this is not floppy only system :-] if test -d c:/. -a -n "$OS2_SHELL"; then p_=\; PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` fi
: Proper PATH setting paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin" paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" paths="$paths /sbin /usr/sbin /usr/libexec"
for p in $paths do case "$p_$PATH$p_" in *$p_$p$p_*) ;; *) test -d $p && PATH=$PATH$p_$p ;; esac done
PATH=.$p_$PATH export PATH
: This should not matter in scripts\, but apparently it does\, sometimes case "$CDPATH" in '') ;; *) CDPATH='' ;; esac
: Sanity checks if test ! -t 0; then echo "Say 'sh $me'\, not 'sh \<$me'" exit 1 fi
: Test and see if we are running under ksh\, either blatantly or in disguise. if (PATH=.; alias -x) >/dev/null 2>&1; then : running under ksh. Is this a good thing? if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname ; then if test X`/usr/bin/uname -v` = X4 ; then : on AIX 4\, /bin/sh is really ksh\, and it causes us problems. : Avoid it cat \<\<'EOM' (Feeding myself to /usr/bin/bsh to avoid AIX 4's /bin/sh.) EOM unset ENV exec /usr/bin/bsh $0 "$@" fi else if test ! -f /hp-ux ; then : Warn them if they use ksh on other systems cat \<\<EOM (I see you are using the Korn shell. Some ksh's blow up on $me\, especially on older exotic systems. If yours does\, try the Bourne shell instead.) EOM unset ENV fi fi else : Not running under ksh. Maybe we should be? : On HP-UX\, large Configure scripts may exercise a bug in /bin/sh if test -f /hp-ux -a -f /bin/ksh; then cat \<\<'EOM' (Feeding myself to ksh to avoid nasty sh bug in "here document" expansion.) EOM unset ENV exec /bin/ksh $0 "$@" fi fi
: Configure runs within the UU subdirectory test -d UU || mkdir UU cd UU && rm -f ./*
dynamic_ext='' extensions='' known_extensions='' static_ext='' useopcode='' useposix='' d_bsd='' d_eunice='' d_xenix='' eunicefix='' Mcc='' awk='' bash='' bison='' byacc='' cat='' chgrp='' chmod='' chown='' comm='' compress='' cp='' cpio='' cpp='' csh='' date='' echo='' egrep='' emacs='' expr='' find='' flex='' gcc='' grep='' gzip='' inews='' ksh='' less='' line='' lint='' ln='' lp='' lpr='' ls='' mail='' mailx='' mkdir='' more='' mv='' nroff='' perl='' pg='' pmake='' pr='' rm='' rmail='' sed='' sendmail='' shar='' sleep='' smail='' sort='' submit='' tail='' tar='' tbl='' test='' touch='' tr='' troff='' uname='' uniq='' uuname='' vi='' zcat='' zip='' full_sed='' libswanted='' hint='' myuname='' osname='' osvers='' Author='' Date='' Header='' Id='' Locker='' Log='' RCSfile='' Revision='' Source='' State='' ar='' archobjs='' exe_ext='' firstmakefile='' lib_ext='' obj_ext='' path_sep='' afs='' alignbytes='' archlib='' archlibexp='' d_archlib='' installarchlib='' archname='' myarchname='' baserev='' bin='' binexp='' installbin='' bincompat3='' d_bincompat3='' byteorder='' cc='' gccversion='' ccflags='' cppflags='' ldflags='' lkflags='' locincpth='' optimize='' cf_email='' cf_by='' cf_time='' contains='' cpp_stuff='' cpplast='' cppminus='' cpprun='' cppstdin='' d_access='' d_alarm='' d_attribut='' d_bcmp='' d_bcopy='' d_bzero='' d_casti32='' castflags='' d_castneg='' d_chown='' d_chroot='' d_chsize='' d_closedir='' d_void_closedir='' d_const='' cryptlib='' d_crypt='' d_csh='' full_csh='' d_cuserid='' d_dbl_dig='' d_difftime='' d_dlerror='' d_dlopen='' d_dlsymun='' d_dosuid='' d_suidsafe='' d_dup2='' d_fchmod='' d_fchown='' d_fcntl='' d_fd_macros='' d_fd_set='' d_fds_bits='' d_fgetpos='' d_flexfnam='' d_flock='' d_fork='' d_fsetpos='' d_ftime='' d_gettimeod='' d_Gconvert='' d_getgrps='' d_setgrps='' d_gethent='' aphostname='' d_gethname='' d_phostname='' d_uname='' d_getlogin='' d_getpgid='' d_getpgrp2='' d_bsdgetpgrp='' d_getpgrp='' d_getppid='' d_getprior='' d_gnulibc='' d_htonl='' d_inetaton='' d_isascii='' d_killpg='' d_link='' d_locconv='' d_lockf='' d_lstat='' d_mblen='' d_mbstowcs='' d_mbtowc='' d_memcmp='' d_memcpy='' d_memmove='' d_memset='' d_mkdir='' d_mkfifo='' d_mktime='' d_msg='' d_msgctl='' d_msgget='' d_msgrcv='' d_msgsnd='' d_nice='' d_open3='' d_fpathconf='' d_pathconf='' d_pause='' d_pipe='' d_poll='' d_portable='' d_readdir='' d_rewinddir='' d_seekdir='' d_telldir='' d_readlink='' d_rename='' d_rmdir='' d_safebcpy='' d_safemcpy='' d_sanemcmp='' d_select='' d_sem='' d_semctl='' d_semget='' d_semop='' d_setegid='' d_seteuid='' d_setlinebuf='' d_setlocale='' d_setpgid='' d_setpgrp2='' d_bsdpgrp='' d_bsdsetpgrp='' d_setpgrp='' d_setprior='' d_setregid='' d_setresgid='' d_setresuid='' d_setreuid='' d_setrgid='' d_setruid='' d_setsid='' d_sfio='' usesfio='' d_shm='' d_shmat='' d_shmatprototype='' shmattype='' d_shmctl='' d_shmdt='' d_shmget='' d_sigaction='' d_sigsetjmp='' d_oldsock='' d_socket='' d_sockpair='' sockethdr='' socketlib='' d_statblks='' d_stdio_cnt_lval='' d_stdio_ptr_lval='' d_stdiobase='' d_stdstdio='' stdio_base='' stdio_bufsiz='' stdio_cnt='' stdio_ptr='' d_index='' d_strchr='' d_strcoll='' d_strctcpy='' d_strerrm='' d_strerror='' d_sysernlst='' d_syserrlst='' d_strtod='' d_strtol='' d_strtoul='' d_strxfrm='' d_symlink='' d_syscall='' d_sysconf='' d_system='' d_tcgetpgrp='' d_tcsetpgrp='' d_time='' timetype='' clocktype='' d_times='' d_truncate='' d_tzname='' d_umask='' d_vfork='' usevfork='' d_voidsig='' signal_t='' d_volatile='' d_charvspr='' d_vprintf='' d_wait4='' d_waitpid='' d_wcstombs='' d_wctomb='' dlext='' cccdlflags='' ccdlflags='' dlsrc='' ld='' lddlflags='' usedl='' fpostype='' gidtype='' groupstype='' h_fcntl='' h_sysfile='' db_hashtype='' db_prefixtype='' i_db='' i_dbm='' i_rpcsvcdbm='' d_dirnamlen='' direntrytype='' i_dirent='' i_dld='' i_dlfcn='' i_fcntl='' i_float='' i_gdbm='' i_grp='' i_limits='' i_locale='' i_malloc='' i_math='' i_memory='' i_ndbm='' i_neterrno='' i_niin='' i_sysin='' d_pwage='' d_pwchange='' d_pwclass='' d_pwcomment='' d_pwexpire='' d_pwquota='' i_pwd='' i_sfio='' i_stddef='' i_stdlib='' i_string='' strings='' i_sysdir='' i_sysfile='' d_voidtty='' i_bsdioctl='' i_sysfilio='' i_sysioctl='' i_syssockio='' i_sysndir='' i_sysparam='' i_sysresrc='' i_sysselct='' i_sysstat='' i_systimes='' i_systypes='' i_sysun='' i_syswait='' i_sgtty='' i_termio='' i_termios='' i_systime='' i_systimek='' i_time='' timeincl='' i_unistd='' i_utime='' i_values='' i_stdarg='' i_varargs='' i_varhdr='' i_vfork='' intsize='' longsize='' shortsize='' libc='' libperl='' shrpenv='' useshrplib='' glibpth='' libpth='' loclibpth='' plibpth='' xlibpth='' libs='' lns='' lseektype='' make='' make_set_make='' d_mymalloc='' freetype='' mallocobj='' mallocsrc='' malloctype='' usemymalloc='' installman1dir='' man1dir='' man1direxp='' man1ext='' installman3dir='' man3dir='' man3direxp='' man3ext='' huge='' large='' medium='' models='' small='' split='' modetype='' mydomain='' myhostname='' phostname='' c='' n='' d_eofnblk='' eagain='' o_nonblock='' rd_nodata='' groupcat='' hostcat='' passcat='' d_oldarchlib='' oldarchlib='' oldarchlibexp='' orderlib='' ranlib='' package='' spackage='' pager='' patchlevel='' subversion='' perladmin='' perlpath='' prefix='' prefixexp='' installprivlib='' privlib='' privlibexp='' prototype='' randbits='' installscript='' scriptdir='' scriptdirexp='' selecttype='' sh='' sig_name='' sig_num='' installsitearch='' sitearch='' sitearchexp='' installsitelib='' sitelib='' sitelibexp='' sizetype='' so='' sharpbang='' shsharp='' spitshell='' ssizetype='' startperl='' startsh='' stdchar='' sysman='' uidtype='' nm_opt='' nm_so_opt='' runnm='' usenm='' useperlio='' incpath='' mips='' mips_type='' usrinc='' defvoidused='' voidflags='' CONFIG=''
define='define' undef='undef' smallmach='pdp11 i8086 z8000 i80286 iAPX286' rmlist=''
: We must find out about Eunice early eunicefix=':' if test -f /etc/unixtovms; then eunicefix=/etc/unixtovms fi if test -f /etc/unixtovms.exe; then eunicefix=/etc/unixtovms.exe fi
: list of known cpp symbols\, sorted alphabetically al="AMIX BIT_MSF BSD BSD4_3 BSD_NET2 CMU CRAY DGUX DOLPHIN DPX2" al="$al GO32 GOULD_PN HP700 I386 I80960 I960 Lynx M68000 M68K MACH" al="$al MIPSEB MIPSEL MSDOS MTXINU MULTIMAX MVS" al="$al M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM" al="$al M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX" al="$al NeXT OCS88 OSF1 PARISC PC532 PORTAR POSIX" al="$al PWB R3000 RES RISC6000 RT Sun386i SVR3 SVR4" al="$al SYSTYPE_BSD SYSTYPE_SVR4 SYSTYPE_SYSV Tek4132 Tek4300" al="$al UMAXV USGr4 USGr4_2 UTEK UTS UTek UnicomPBB UnicomPBD Utek" al="$al VMS Xenix286" al="$al _AIX _AIX32 _AIX370 _AM29000 _COFF _CRAY _CX_UX _EPI" al="$al _IBMESA _IBMR2 _M88K _M88KBCS_TARGET" al="$al _MIPSEB _MIPSEL _M_COFF _M_I86 _M_I86SM _M_SYS3" al="$al _M_SYS5 _M_SYSIII _M_SYSV _M_UNIX _M_XENIX _NLS _PGC_ _R3000" al="$al _SYSTYPE_BSD _SYSTYPE_BSD43 _SYSTYPE_SVR4" al="$al _SYSTYPE_SYSV _SYSV3 _U370 _UNICOS" al="$al __386BSD__ __BIG_ENDIAN __BIG_ENDIAN__ __BSD_4_4__" al="$al __DGUX__ __DPX2__ __H3050R __H3050RX" al="$al __LITTLE_ENDIAN __LITTLE_ENDIAN__ __MACH__" al="$al __MIPSEB __MIPSEB__ __MIPSEL __MIPSEL__" al="$al __Next__ __OSF1__ __PARAGON__ __PGC__ __PWB __STDC__" al="$al __SVR4_2__ __UMAXV__" al="$al ____386BSD____ __alpha __alpha__ __amiga" al="$al __bsd4_2 __bsd4_2__ __bsdi__ __convex__" al="$al __host_mips__" al="$al __hp9000s200 __hp9000s300 __hp9000s400 __hp9000s500" al="$al __hp9000s500 __hp9000s700 __hp9000s800" al="$al __hppa __hpux __hp_osf __i286 __i286__ __i386 __i386__" al="$al __i486 __i486__ __i860 __i860__ __ibmesa __ksr1__ __linux__" al="$al __m68k __m68k__ __m88100__ __m88k __m88k__" al="$al __mc68000 __mc68000__ __mc68020 __mc68020__" al="$al __mc68030 __mc68030__ __mc68040 __mc68040__" al="$al __mc88100 __mc88100__ __mips __mips__" al="$al __motorola__ __osf__ __pa_risc __sparc__ __stdc__" al="$al __sun __sun__ __svr3__ __svr4__ __ultrix __ultrix__" al="$al __unix __unix__ __uxpm__ __uxps__ __vax __vax__" al="$al _host_mips _mips _unix" al="$al a29k aegis aix aixpc alliant alpha am29000 amiga ansi ardent" al="$al apollo ardent att386 att3b" al="$al bsd bsd43 bsd4_2 bsd4_3 bsd4_4 bsdi bull" al="$al cadmus clipper concurrent convex cray ctix" al="$al dmert encore gcos gcx gimpel gould" al="$al hbullx20 hcx host_mips hp200 hp300 hp700 hp800" al="$al hp9000 hp9000s300 hp9000s400 hp9000s500" al="$al hp9000s700 hp9000s800 hp9k8 hppa hpux" al="$al i186 i286 i386 i486 i8086" al="$al i80960 i860 iAPX286 ibm ibm032 ibmrt interdata is68k" al="$al ksr1 linux luna luna88k m68k m88100 m88k" al="$al mc300 mc500 mc68000 mc68010 mc68020 mc68030" al="$al mc68040 mc68060 mc68k mc68k32 mc700" al="$al mc88000 mc88100 merlin mert mips mvs n16" al="$al ncl_el ncl_mr" al="$al news1500 news1700 news1800 news1900 news3700" al="$al news700 news800 news900 ns16000 ns32000" al="$al ns32016 ns32332 ns32k nsc32000 os osf" al="$al parisc pc532 pdp11 plexus posix pyr" al="$al riscix riscos scs sequent sgi sinix sony sony_news" al="$al sonyrisc sparc sparclite spectrum stardent stratos" al="$al sun sun3 sun386 svr4 sysV68 sysV88" al="$al titan tower tower32 tower32_200 tower32_600 tower32_700" al="$al tower32_800 tower32_850 tss u370 u3b u3b2 u3b20 u3b200" al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms" al="$al xenix z8000"
groupstype='' i_whoami='' : default library list libswanted='' : set useposix=false in your hint file to disable the POSIX extension. useposix=true : set useopcode=false in your hint file to disable the Opcode extension. useopcode=true : Define several unixisms. These can be used in hint files. exe_ext='' : Extra object files\, if any\, needed on this platform. archobjs='' : Possible local include directories to search. : Set locincpth to "" in a hint file to defeat local include searches. locincpth="/usr/local/include /opt/local/include /usr/gnu/include" locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" : : no include file wanted by default inclwanted=''
: change the next line if compiling for Xenix/286 on Xenix/386 xlibpth='/usr/lib/386 /lib/386'
: Possible local library directories to search. loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries glibpth="/shlib /usr/shlib /usr/lib/pa1.1 /usr/lib/large" glibpth="$glibpth /lib /usr/lib $xlibpth" glibpth="$glibpth /lib/large /usr/lib/small /lib/small" glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
: Private path used by Configure to find libraries. Its value : is prepended to libpth. This variable takes care of special : machines\, like the mips. Usually\, it should be empty. plibpth=''
: full support for void wanted by default defvoidused=15
: List of libraries we want. libswanted='sfio 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 probably want to search /usr/shlib before most other libraries. : This is only used by the lib/ExtUtils/MakeMaker.pm routine 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
: Find the basic shell for Bourne shell scripts case "$sh" in '') : SYSTYPE is for some older MIPS systems. : I do not know if it is still needed. case "$SYSTYPE" in *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";; *) xxx='/bin/sh';; esac if test -f "$xxx"; then sh="$xxx" else : Build up a list and do a single loop so we can 'break' out. pth=`echo $PATH | sed -e "s/$p_/ /g"` for xxx in sh bash ksh pdksh ash; do for p in $pth; do try="$try ${p}/${xxx}" done done for xxx in $try; do if test -f "$xxx"; then sh="$xxx"; echo "Your Bourne shell appears to be in $sh." break elif test -f "$xxx.exe"; then sh="$xxx"; echo "Hmm. Your Bourne shell appears to be in $sh." break fi done fi ;; esac
case "$sh" in
'') cat \<\
Usually it's in /bin/sh. How did you even get this far?
Please contact me (Chip Salzenberg) at chip@perl.com and
we'll try to straigten this all out.
EOM
exit 1
;;
esac
: see if sh knows # comments if `$sh -c '#' >/dev/null 2>&1`; then shsharp=true spitshell=cat echo " " xcat=/bin/cat test -f $xcat || xcat=/usr/bin/cat echo "#!$xcat" >try $eunicefix try chmod +x try ./try > today if test -s today; then sharpbang='#!' else echo "#! $xcat" > try $eunicefix try chmod +x try ./try > today if test -s today; then sharpbang='#! ' else echo "Okay\, let's see if #! works on this system..." echo "It's just a comment." sharpbang=': use ' fi fi else echo "Your $sh doesn't grok # comments--I will strip them later on." shsharp=false cd .. echo "exec grep -v '^[ ]*#'" >spitshell chmod +x spitshell $eunicefix spitshell spitshell=`pwd`/spitshell cd UU echo "I presume that if # doesn't work\, #! won't work either!" sharpbang=': use ' fi rm -f try today
: figure out how to guarantee sh startup case "$startsh" in '') startsh=${sharpbang}${sh} ;; *) esac cat >try \<\<EOSS $startsh set abc test "$?abc" != 1 EOSS
chmod +x try $eunicefix try if ./try; then : echo "Yup\, it does." else echo "Hmm. '$startsh' didn't work." echo "You may have to fix up the shell scripts to make sure sh runs them." fi rm -f try
: script used to extract .SH files with variable substitutions cat >extract \<\<EOS $startsh EOS cat >>extract \<\<'EOS' CONFIG=true echo "Doing variable substitutions on .SH files..." if test -f MANIFEST; then shlist=`awk '{print $1}' \<MANIFEST | grep '\.SH'` : Pick up possible extension manifests. for dir in ext/* ; do if test -f $dir/MANIFEST; then xxx=`awk '{print $1}' \< $dir/MANIFEST | sed -n "/\.SH$/ s@^@$dir/@p"` shlist="$shlist $xxx" fi done set x $shlist else echo "(Looking for .SH files under the current directory.)" set x `find . -name "*.SH" -print` fi shift case $# in 0) set x *.SH; shift;; esac if test ! -f $1; then shift fi for file in $*; do case "$file" in */*) dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` (cd $dir && . ./$file) ;; *) . ./$file ;; esac done if test -f config_h.SH; then if test ! -f config.h; then : oops\, they left it out of MANIFEST\, probably\, so do it anyway. . ./config_h.SH fi fi EOS
: produce awk script to parse command line options cat >options.awk \<\<'EOF' BEGIN { optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
len = length(optstr); for (i = 1; i \<= len; i++) { c = substr(optstr\, i\, 1); if (i \< len) a = substr(optstr\, i + 1\, 1); else a = ""; if (a == ":") { arg[c] = 1; i++; } opt[c] = 1; } } { expect = 0; str = $0; if (substr(str\, 1\, 1) != "-") { printf("'%s'\n"\, str); next; } len = length($0); for (i = 2; i \<= len; i++) { c = substr(str\, i\, 1); if (!opt[c]) { printf("-%s\n"\, substr(str\, i)); next; } printf("-%s\n"\, c); if (arg[c]) { if (i \< len) printf("'%s'\n"\, substr(str\, i + 1)); else expect = 1; next; } } } END { if (expect) print "?"; } EOF
: process the command line options set X `for arg in "$@"; do echo "X$arg"; done | sed -e s/X// | awk -f options.awk` eval "set $*" shift rm -f options.awk
: set up default values fastread='' reuseval=false config_sh='' alldone='' error='' silent='' extractsh='' override='' knowitall=''
rm -f optdef.sh cat >optdef.sh \<\<EOS $startsh EOS
: option parsing while test $# -gt 0; do case "$1" in -d) shift; fastread=yes;; -e) shift; alldone=cont;; -f) shift cd .. if test -r "$1"; then config_sh="$1" else echo "$me: cannot read config file $1." >&2 error=true fi cd UU shift;; -h) shift; error=true;; -r) shift; reuseval=true;; -s) shift; silent=true;; -E) shift; alldone=exit;; -K) shift; knowitall=true;; -O) shift; override=true;; -S) shift; extractsh=true;; -D) shift case "$1" in *=) echo "$me: use '-U symbol='\, not '-D symbol='." >&2 echo "$me: ignoring -D $1" >&2 ;; *=*) echo "$1" | \ sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; *) echo "$1='define'" >> optdef.sh;; esac shift ;; -U) shift case "$1" in *=) 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.sh;; esac shift ;; -V) echo "$me generated by metaconfig 3.0 PL60." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; *) break;; esac done
case "$error" in true) cat >&2 \<\<EOM Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value] [-U symbol] [-U symbol=] -d : use defaults for all answers. -e : go on without questioning past the production of config.sh. -f : specify an alternate default configuration file. -h : print this help message and exit (with an error status). -r : reuse C symbols value if possible (skips costly nm extraction). -s : silent mode\, only echoes questions and essential information. -D : define symbol to have some value: -D symbol symbol gets the value 'define' -D symbol=value symbol gets the value 'value' -E : stop at the end of questions\, after having produced config.sh. -K : do not use unless you know what you are doing. -O : let -D and -U override definitions from loaded configuration file. -S : perform variable substitutions on all .SH files (can mix with -f) -U : undefine symbol: -U symbol symbol gets the value 'undef' -U symbol= symbol gets completely empty -V : print version number and exit (with a zero status). EOM exit 1 ;; esac
exec 4>&1 case "$silent" in true) exec 1>/dev/null;; esac
: run the defines and the undefines\, if any\, but leave the file out there... touch optdef.sh . ./optdef.sh
case "$extractsh" in true) case "$config_sh" in '') config_sh='config.sh'; config='./config.sh';; /*) config="$config_sh";; *) config="./$config_sh";; esac echo " " echo "Fetching answers from $config_sh..." cd .. . $config test "$override" && . ./optdef.sh echo " " . ./UU/extract rm -rf UU echo "Done." exit 0 ;; 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 " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
: Some greps do not return status\, grrr. echo "grimblepritz" >grimble if grep blurfldyick grimble >/dev/null 2>&1 ; then contains=contains elif grep grimblepritz grimble >/dev/null 2>&1 ; then contains=grep else contains=contains fi rm -f grimble : the following should work in any shell case "$contains" in contains*) echo " " echo "AGH! Grep doesn't return a status. Attempting remedial action." cat >contains \<\<'EOSS' grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp EOSS chmod +x contains esac
: first determine how to suppress newline on echo command echo " " echo "Checking echo to see how to suppress newlines..." (echo "hi there\c" ; echo " ") >.echotmp if $contains c .echotmp >/dev/null 2>&1 ; then echo "...using -n." n='-n' c='' else cat \<\<'EOM' ...using \c EOM n='' c='\c' fi echo $n "The star should be here-->$c" echo '*' rm -f .echotmp
: Now test for existence of everything in MANIFEST echo " " if test -f ../MANIFEST; then echo "First let's make sure your kit is complete. Checking..." >&4 awk '$1 !~ /PACK[A-Z]+/ {print $1}' ../MANIFEST | split -50 rm -f missing for filelist in x??; do (cd ..; ls `cat UU/$filelist` >/dev/null 2>>UU/missing) done if test -s missing; then cat missing >&4 cat >&4 \<\<'EOM'
THIS PACKAGE SEEMS TO BE INCOMPLETE.
You have the option of continuing the configuration process\, despite the distinct possibility that your kit is damaged\, by typing 'y'es. If you do\, don't blame me if something goes wrong. I advise you to type 'n'o and contact the author (chip@perl.com).
EOM echo $n "Continue? [n] $c" >&4 read ans case "$ans" in y*) echo "Continuing..." >&4 rm -f missing ;; *) echo "ABORTING..." >&4 kill $$ ;; esac else echo "Looks good..." >&4 fi else echo "There is no MANIFEST file. I hope your kit is complete !" fi rm -f missing x??
: compute the number of columns on the terminal for proper question formatting case "$COLUMNS" in '') COLUMNS='80';; esac
: set up the echo used in my read myecho="case \"\$xxxm\" in '') echo $n \"\$rp $c\" >&4;; *) case \"\$rp\" in '') echo $n \"[\$xxxm] $c\";; *) if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then echo \"\$rp\" >&4 echo $n \"[\$xxxm] $c\" >&4 else echo $n \"\$rp [\$xxxm] $c\" >&4 fi ;; esac;; esac"
: now set up to do reads with possible shell escape and default assignment
cat \<\
: create .config dir to save info across Configure sessions test -d ../.config || mkdir ../.config cat >../.config/README \<\<EOF This directory created by Configure to save information that should persist across sessions.
You may safely delete it if you wish. EOF
: general instructions needman=true firsttime=true user=`(logname) 2>/dev/null` case "$user" in "") user=`whoami 2>&1` ;; esac if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then firsttime=false echo " " rp='Would you like to see the instructions?' dflt=n . ./myread case "$ans" in [yY]*) ;; *) needman=false;; esac fi if $needman; then cat \<\<EOH
This installation shell script will examine your system and ask you questions to determine how the perl5 package should be installed. If you get stuck on a question\, you may use a ! shell escape to start a subshell or execute a command. Many of the questions will have default answers in square brackets; typing carriage return will give you the default.
On some of the questions which ask for file or directory names you are allowed to use the ~name construct to specify the login directory belonging to "name"\, even if you don't have a shell which knows about that. Questions where this is allowed will be marked "(~name ok)".
EOH rp='' dflt='Type carriage return to continue' . ./myread cat \<\<'EOH'
The prompter used in this script allows you to use shell variables and backticks in your answers. You may use $1\, $2\, etc... to refer to the words in the default answer\, as if the default line was a set of arguments given to a script shell. This means you may also use $* to repeat the whole default line\, so you do not have to re-type everything to add something to the default.
Everytime there is a substitution\, you will have to confirm. If there is an error (e.g. an unmatched backtick)\, the default answer will remain unchanged and you will be prompted again.
If you are in a hurry\, you may run 'Configure -d'. This will bypass nearly all the questions and use the computed defaults (or the previous answers if there was already a config.sh file). Type 'Configure -h' for a list of options. You may also start interactively and then answer '& -d' at any prompt to turn on the non-interactive behavior for the remainder of the execution.
EOH . ./myread cat \<\<EOH
Much effort has been expended to ensure that this shell script will run on any Unix system. If despite that it blows up on yours\, your best bet is to edit Configure and run it again. If you can't run Configure for some reason\, you'll have to generate a config.sh file by hand. Whatever problems you have\, let me (chip@perl.com) know how I blew it.
This installation script affects things in two ways:
1) it may do direct variable substitutions on some of the files included in this kit. 2) it builds a config.h file for inclusion in C programs. You may edit any of these files as the need arises after running this script.
If you make a mistake on a question\, there is no easy way to back up to it currently. The easiest thing to do is to edit config.sh and rerun all the SH files. Configure will offer to let you do this before it runs the SH files.
EOH dflt='Type carriage return to continue' . ./myread case "$firsttime" in true) echo $user >>../.config/instruct;; esac fi
: find out where common programs are
echo " "
echo "Locating common programs..." >&4
cat \<\
FOO $echo $n "The star should be here-->$c" $echo "*" fi $rm -f foo1 foo2 ;; esac
: determine whether symbolic links are supported echo " " $touch blurfl if $ln -s blurfl sym > /dev/null 2>&1 ; then echo "Symbolic links are supported." >&4 lns="$ln -s" else echo "Symbolic links are NOT supported." >&4 lns="$ln" fi $rm -f blurfl sym
: see whether [:lower:] and [:upper:] are supported character classes echo " " up='[A-Z]' low='[a-z]' case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in ABYZ) echo "Good\, your tr supports [:lower:] and [:upper:] to convert case." >&4 up='[:upper:]' low='[:lower:]' ;; *) echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4 ;; esac : set up the translation script tr\, must be called with ./tr of course cat >tr \<\<EOSC $startsh case "\$1\$2" in '[A-Z][a-z]') exec $tr '$up' '$low';; '[a-z][A-Z]') exec $tr '$low' '$up';; esac exec $tr "\$@" EOSC chmod +x tr $eunicefix tr
: Try to determine whether config.sh was made on this system 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 case "$knowitall" in '') if test -f ../config.sh; then if $contains myuname= ../config.sh >/dev/null 2>&1; then eval "`grep myuname= ../config.sh`" fi if test "X$myuname" = "X$newmyuname"; then dflt=y fi fi ;; *) dflt=y;; esac
: Get old answers from old config file if Configure was run on the : same system\, otherwise use the hints. hint=default cd .. if test -f config.sh; then echo " " rp="I see a config.sh file. Shall I use it to set the defaults?" . UU/myread case "$ans" in n*|N*) echo "OK\, I'll ignore it."; mv config.sh config.sh.old;; *) echo "Fetching default answers from your old config.sh file..." >&4 tmp_n="$n" tmp_c="$c" tmp_sh="$sh" . ./config.sh cp config.sh UU n="$tmp_n" c="$tmp_c" : Older versions did not always set $sh. Catch re-use of such : an old config.sh. case "$sh" in '') sh="$tmp_sh" ;; esac hint=previous ;; esac fi if test ! -f config.sh; then $cat \<\<EOM
First time through\, eh? I have some defaults handy for the following systems:
EOM cd hints; ls -C *.sh | $sed 's/\.sh/ /g' >&4 dflt='' : Half the following guesses are probably wrong... If you have better : tests or hints\, please send them to chip@perl.com : The metaconfig authors would also appreciate a copy... $test -f /irix && osname=irix $test -f /xenix && osname=sco_xenix $test -f /dynix && osname=dynix $test -f /dnix && osname=dnix $test -f /lynx.os && osname=lynxos $test -f /unicos && osname=unicos && osvers=`$uname -r` $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` $test -f /bin/mips && /bin/mips && osname=mips $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 $test -d /usr/apollo/bin && osname=apollo $test -f /etc/saf/_sactab && osname=svr4 $test -d /usr/include/minix && osname=minix if $test -d /MachTen; then osname=machten if $test -x /sbin/version; then osvers=`/sbin/version | $awk '{print $2}' | $sed -e 's/[A-Za-z]$//'` elif $test -x /usr/etc/version; then osvers=`/usr/etc/version | $awk '{print $2}' | $sed -e 's/[A-Za-z]$//'` else osvers="$2.$3" fi fi if $test -f $uname; then set X $myuname shift
case "$5" in fps*) osname=fps ;; mips*) case "$4" in umips) osname=umips ;; *) osname=mips ;; esac;; [23]100) osname=mips ;; next*) osname=next ;; i386*) if $test -f /etc/kconfig; then osname=isc if test "$lns" = "ln -s"; then osvers=4 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then osvers=3 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then osvers=2 fi fi ;; esac
case "$1" in
aix) osname=aix
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
;;
*dc.osx) osname=dcosx
osvers="$3"
;;
dnix) osname=dnix
osvers="$3"
;;
domainos) osname=apollo
osvers="$3"
;;
dgux) osname=dgux
osvers="$3"
;;
dynixptx*) osname=dynixptx
osvers="$3"
;;
freebsd) osname=freebsd
osvers="$3" ;;
genix) osname=genix ;;
hp*) osname=hpux
case "$3" in
*.08.*) osvers=9 ;;
*.09.*) osvers=9 ;;
*.10.*) osvers=10 ;;
*) osvers="$3" ;;
esac
;;
irix*) osname=irix
case "$3" in
4*) osvers=4 ;;
5*) osvers=5 ;;
*) osvers="$3" ;;
esac
;;
linux) osname=linux
case "$3" in
*) osvers="$3" ;;
esac
;;
netbsd*) osname=netbsd
osvers="$3"
;;
news-os) osvers="$3"
case "$3" in
4*) osname=newsos4 ;;
*) osname=newsos ;;
esac
;;
bsd386) osname=bsd386
osvers=`$uname -r`
;;
powerux | power_ux | powermax_os | powermaxos | \
powerunix | power_unix) osname=powerux
osvers="$3"
;;
next*) osname=next ;;
solaris) osname=solaris
case "$3" in
5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
*) osvers="$3" ;;
esac
;;
sunos) osname=sunos
case "$3" in
5*) osname=solaris
osvers=`echo $3 | $sed 's/^5/2/g'` ;;
*) osvers="$3" ;;
esac
;;
titanos) osname=titanos
case "$3" in
1*) osvers=1 ;;
2*) osvers=2 ;;
3*) osvers=3 ;;
4*) osvers=4 ;;
*) osvers="$3" ;;
esac
;;
ultrix) osname=ultrix
osvers="$3"
;;
osf1|mls+) case "$5" in
alpha)
osname=dec_osf
osvers=`echo "$3" | sed 's/^[vt]//'`
;;
hp*) osname=hp_osf1 ;;
mips) osname=mips_osf1 ;;
esac
;;
uts) osname=uts
osvers="$3"
;;
qnx) osname=qnx
osvers="$4"
;;
$2) case "$osname" in
*isc*) ;;
*freebsd*) ;;
svr*)
: svr4.x or possibly later
case "svr$3" in
${osname}*)
osname=svr$3
osvers=$4
;;
esac
case "$osname" in
svr4.0)
: Check for ESIX
if test -f /stand/boot ; then
eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
if test -n "$INITPROG" -a -f "$INITPROG"; then
isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
if test -n "$isesix"; then
osname=esix4
fi
fi
fi
;;
esac
;;
*) if test -f /etc/systemid; then
osname=sco
set `echo $3 | $sed 's/\./ /g'` $4
if $test -f sco_$1_$2_$3.sh; then
osvers=$1.$2.$3
elif $test -f sco_$1_$2.sh; then
osvers=$1.$2
elif $test -f sco_$1.sh; then
osvers=$1
fi
else
case "$osname" in
'') : Still unknown. Probably a generic Sys V.
osname="sysv"
osvers="$3"
;;
esac
fi
;;
esac
;;
*) case "$osname" in
'') : Still unknown. Probably a generic BSD.
osname="$1"
osvers="$3"
;;
esac
;;
esac
else
if test -f /vmunix -a -f newsos4.sh; then
(what /vmunix | ../UU/tr '[A-Z]' '[a-z]') > ../UU/kernel.what 2>&1
if $contains news-os ../UU/kernel.what >/dev/null 2>&1; then
osname=newsos4
fi
$rm -f ../UU/kernel.what
elif test -d c:/.; then
set X $myuname
osname=os2
osvers="$5"
fi
fi
: Now look for a hint file osname_osvers\, unless one has been
: specified already.
case "$hintfile" in
''|' ')
file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
: Also try without trailing minor version numbers.
xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
case "$file" in
'') dflt=none ;;
*) case "$osvers" in
'') dflt=$file
;;
*) if $test -f $file.sh ; then
dflt=$file
elif $test -f $xfile.sh ; then
dflt=$xfile
elif $test -f $xxfile.sh ; then
dflt=$xxfile
elif $test -f $xxxfile.sh ; then
dflt=$xxxfile
elif $test -f $xxxxfile.sh ; then
dflt=$xxxxfile
elif $test -f "${osname}.sh" ; then
dflt="${osname}"
else
dflt=none
fi
;;
esac
;;
esac
;;
*)
dflt=`echo $hintfile | $sed 's/\.sh$//'`
;;
esac
$cat \<\<EOM
You may give one or more space-separated answers\, or "none" if appropriate. If your OS version has no hints\, DO NOT give a wrong version -- say "none".
EOM rp="Which of these apply\, if any?" . ../UU/myread tans=$ans for file in $tans; do if $test -f $file.sh; then . ./$file.sh $cat $file.sh >> ../UU/config.sh elif $test X$tans = X -o X$tans = Xnone ; then : nothing else : Give one chance to correct a possible typo. echo "$file.sh does not exist" dflt=$file rp="hint to use instead?" . ../UU/myread for file in $ans; do if $test -f "$file.sh"; then . ./$file.sh $cat $file.sh >> ../UU/config.sh elif $test X$ans = X -o X$ans = Xnone ; then : nothing else echo "$file.sh does not exist -- ignored." fi done fi done
hint=recommended : Remember our hint file for later. if $test -f "$file.sh" ; then hintfile="$file" else hintfile='' fi
cd .. fi cd UU ;; *) echo " " echo "Fetching default answers from $config_sh..." >&4 tmp_n="$n" tmp_c="$c" cd .. cp $config_sh config.sh 2>/dev/null chmod +w config.sh . ./config.sh cd UU 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 eval $file="\$_$file" done
cat \<\< EOM
Configure uses the operating system name and version to set some defaults. The default value is probably right if the name rings a bell. Otherwise\, since spelling matters for me\, either accept the default or answer "none" to leave it blank.
EOM case "$osname" in ''|' ') case "$hintfile" in ''|' '|none) dflt=none ;; *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;; esac ;; *) dflt="$osname" ;; esac rp="Operating system name?" . ./myread case "$ans" in none) osname='' ;; *) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;; esac echo " " case "$osvers" in ''|' ') case "$hintfile" in ''|' '|none) dflt=none ;; *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'` dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'` case "$dflt" in ''|' ') dflt=none ;; esac ;; esac ;; *) dflt="$osvers" ;; esac rp="Operating system version?" . ./myread case "$ans" in none) osvers='' ;; *) osvers="$ans" ;; esac
: who configured the system cf_time=`LC_ALL=C; export LC_ALL; $date 2>&1` cf_by=`(logname) 2>/dev/null` case "$cf_by" in "") cf_by=`(whoami) 2>/dev/null` case "$cf_by" in "") cf_by=unknown ;; esac ;; esac
: determine the architecture name echo " " if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then tarch=`arch`"-$osname" elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then if uname -m > tmparch 2>&1 ; then tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \ -e 's/$/'"-$osname/" tmparch` else tarch="$osname" fi $rm -f tmparch else tarch="$osname" fi case "$myarchname" in ''|"$tarch") ;; *) echo "(Your architecture name used to be $myarchname.)" archname='' ;; esac case "$archname" in '') dflt="$tarch";; *) dflt="$archname";; esac rp='What is your architecture name' . ./myread archname="$ans" myarchname="$tarch"
: is AFS running? echo " " case "$afs" in $define|true) afs=true ;; $undef|false) afs=false ;; *) if test -d /afs; then afs=true else afs=false fi ;; esac if $afs; then echo "AFS may be running... I'll be extra cautious then..." >&4 else echo "AFS does not seem to be running..." >&4 fi
: decide how portable to be. Allow command line overrides. case "$d_portable" in "$undef") ;; *) d_portable="$define" ;; esac
: set up shell script to do ~ expansion cat >filexp \<\<EOSS $startsh : expand filename case "\$1" in ~/*|~) echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|" ;; ~*) if $test -f /bin/csh; then /bin/csh -f -c "glob \$1" failed=\$? echo "" exit \$failed else name=\`$expr x\$1 : '..\([^/]*\)'\` dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' \</etc/passwd\` if $test ! -d "\$dir"; then me=\`basename \$0\` echo "\$me: can't locate home directory for: \$name" >&2 exit 1 fi case "\$1" in */*) echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` ;; *) echo \$dir ;; esac fi ;; *) echo \$1 ;; esac EOSS chmod +x filexp $eunicefix filexp
: now set up to get a file name
cat \<\
case "$fn" in *\(*) expr $fn : '.*(\(.*\)).*' | tr '\,' '\012' >getfile.ok fn=`echo $fn | sed 's/(.*)//'` ;; esac
case "$fn" in *:*) loc_file=`expr $fn : '.*:\(.*\)'` fn=`expr $fn : '\(.*\):.*'` ;; esac
case "$fn" in *~*) tilde=true;; esac case "$fn" in */*) fullpath=true;; esac case "$fn" in *+*) skip=true;; esac case "$fn" in *n*) none_ok=true;; esac case "$fn" in *e*) exp_file=true;; esac case "$fn" in *p*) nopath_ok=true;; esac
case "$fn" in *f*) type='File';; *d*) type='Directory';; *l*) type='Locate';; esac
what="$type" case "$what" in Locate) what='File';; esac
case "$exp_file" in '') case "$d_portable" in "$define") ;; *) exp_file=true;; esac ;; esac
cd .. while test "$type"; do redo='' rp="$orig_rp" dflt="$orig_dflt" case "$tilde" in true) rp="$rp (~name ok)";; esac . UU/myread if test -f UU/getfile.ok && \ $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1 then value="$ans" ansexp="$ans" break fi case "$ans" in none) value='' ansexp='' case "$none_ok" in true) type='';; esac ;; *) case "$tilde" in '') value="$ans" ansexp="$ans";; *) value=`UU/filexp $ans` case $? in 0) if test "$ans" != "$value"; then echo "(That expands to $value on this system.)" fi ;; *) value="$ans";; esac ansexp="$value" case "$exp_file" in '') value="$ans";; esac ;; esac case "$fullpath" in true) case "$ansexp" in /*) value="$ansexp" ;; *) redo=true case "$already" in true) echo "I shall only accept a full path name\, as in /bin/ls." >&4 echo "Use a ! shell escape if you wish to check pathnames." >&4 ;; *) echo "Please give a full path name\, starting with slash." >&4 case "$tilde" in true) echo "Note that using ~name is ok provided it expands well." >&4 already=true ;; esac esac ;; esac ;; esac case "$redo" in '') case "$type" in File) if test -f "$ansexp"; then type='' elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1 then echo "($value is not a plain file\, but that's ok.)" type='' fi ;; Directory) if test -d "$ansexp"; then type='' fi ;; Locate) if test -d "$ansexp"; then echo "(Looking for $loc_file in directory $value.)" value="$value/$loc_file" ansexp="$ansexp/$loc_file" fi if test -f "$ansexp"; then type='' fi case "$nopath_ok" in true) case "$value" in */*) ;; *) echo "Assuming $value will be in people's path." type='' ;; esac ;; esac ;; esac
case "$skip" in true) type=''; esac
case "$type" in '') ;; *) if test "$fastread" = yes; then dflt=y else dflt=n fi rp="$what $value doesn't exist. Use that name anyway?" . UU/myread dflt='' case "$ans" in y*) type='';; *) echo " ";; esac ;; esac ;; esac ;; esac done cd UU ans="$value" rp="$orig_rp" dflt="$orig_dflt" rm -f getfile.ok EOSC
: determine root of directory hierarchy where package will be installed. case "$prefix" in '') dflt=`./loc . /usr/local /usr/local /local /opt /usr` ;; *) dflt="$prefix" ;; esac $cat \<\<EOM
By default\, $package will be installed in $dflt/bin\, manual pages under $dflt/man\, etc...\, i.e. with $dflt as prefix for all installation directories. Typically set to /usr/local\, but you 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 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 library files go : Usual default is /usr/local/lib/perl5. Also allow things like : /opt/perl/lib\, since /opt/perl/lib/perl5 would be redundant. case "$prefix" in *perl*) set dflt privlib lib ;; *) set dflt privlib lib/$package ;; esac eval $prefixit $cat \<\<EOM
There are some auxiliary files for $package that need to be put into a private library directory that is accessible by everyone.
EOM fn=d~+ 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 $cat \<\<EOM
Since you are running AFS\, I need to distinguish the directory in which private files reside from the directory in which they are installed (and from which they are presumably copied to the former directory by occult means).
EOM case "$installprivlib" in '') dflt=`echo $privlibexp | sed 's#^/afs/#/afs/.#'`;; *) dflt="$installprivlib";; esac fn=de~ rp='Where will private files be installed?' . ./getfile installprivlib="$ans" else installprivlib="$privlibexp" fi
: set the base revision baserev=5.0
: get the patchlevel echo " " echo "Getting the current patchlevel..." >&4 if $test -r ../patchlevel.h;then patchlevel=`awk '/PATCHLEVEL/ {print $3}' ../patchlevel.h` subversion=`awk '/SUBVERSION/ {print $3}' ../patchlevel.h` else patchlevel=0 subversion=0 fi $echo $n "(You have $package" $c case "$package" in "*$baserev") ;; *) $echo $n " $baserev" $c ;; esac $echo $n " patchlevel $patchlevel" $c test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c echo ".)"
: 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 set archlib archlib eval $prefixit case "$archlib" in '') case "$privlib" in '') dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib` set dflt eval $prefixup ;; *) if test 0 -eq "$subversion"; then version=`LC_ALL=C; export LC_ALL; \ echo $baserev $patchlevel | \ $awk '{ printf "%.3f\n"\, $1 + $2/1000.0 }'` else version=`LC_ALL=C; export LC_ALL; \ echo $baserev $patchlevel $subversion | \ $awk '{ printf "%.5f\n"\, $1 + $2/1000.0 + $3/100000.0 }'` fi dflt="$privlib/$archname/$version" ;; esac ;; *) dflt="$archlib" ;; esac cat \<\<EOM
$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.
EOM fn=d+~ rp='Where do you want to put the public architecture-dependent libraries?' . ./getfile archlib="$ans" archlibexp="$ansexp"
if $afs; then $cat \<\<EOM
Since you are running AFS\, I need to distinguish the directory in which architecture-dependent library files reside from the directory in which they are installed (and from which they are presumably copied to the former directory by occult means).
EOM case "$installarchlib" in '') dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;; *) dflt="$installarchlib";; esac fn=de~ rp='Where will architecture-dependent library files be installed?' . ./getfile installarchlib="$ans" else installarchlib="$archlibexp" fi if $test X"$archlib" = X"$privlib"; then d_archlib="$undef" else d_archlib="$define" fi
: set up the script used to warn in case of inconsistency
cat \<\
: function used to set $1 to $val setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef; case "$val$was" in $define$undef) . ./whoa; eval "$var=\$td";; $undef$define) . ./whoa; eval "$var=\$tu";; *) eval "$var=$val";; esac'
$cat \<\<EOM
Perl 5.004 can be compiled for binary compatibility with 5.003. If you decide to do so\, you will be able to continue using any extensions that were compiled for Perl 5.003. However\, binary compatibility forces Perl to expose some of its internal symbols in the same way that 5.003 did. So you may have symbol conflicts if you embed a binary-compatible Perl in other programs.
EOM case "$d_bincompat3" in "$undef") dflt=n ;; *) dflt=y ;; esac rp='Binary compatibility with Perl 5.003?' . ./myread case "$ans" in y*) val="$define" ;; *) val="$undef" ;; esac set d_bincompat3 eval $setvar case "$d_bincompat3" in "$define") bincompat3=y ;; *) bincompat3=n ;; esac
: make some quick guesses about what we are up against echo " " $echo $n "Hmm... $c" echo exit 1 >bsd echo exit 1 >usg echo exit 1 >v7 echo exit 1 >osf1 echo exit 1 >eunice echo exit 1 >xenix echo exit 1 >venix echo exit 1 >os2 d_bsd="$undef" $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 then echo "Looks kind of like an OSF/1 system\, but we'll see..." echo exit 0 >osf1 elif test `echo abc | tr a-z A-Z` = Abc ; then xxx=`./loc addbib blurfl $pth` if $test -f $xxx; then echo "Looks kind of like a USG system with BSD features\, but we'll see..." echo exit 0 >bsd echo exit 0 >usg else if $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like an extended USG system\, but we'll see..." else echo "Looks kind of like a USG system\, but we'll see..." fi echo exit 0 >usg fi elif $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like a BSD system\, but we'll see..." d_bsd="$define" echo exit 0 >bsd else echo "Looks kind of like a Version 7 system\, but we'll see..." echo exit 0 >v7 fi case "$eunicefix" in *unixtovms*) $cat \<\<'EOI' There is\, however\, a strange\, musty smell in the air that reminds me of something...hmm...yes...I've got it...there's a VMS nearby\, or I'm a Blit. EOI echo exit 0 >eunice d_eunice="$define" : it so happens the Eunice I know will not run shell scripts in Unix format ;; *) echo " " echo "Congratulations. You aren't running Eunice." d_eunice="$undef" ;; esac : Detect OS2. The p_ variable is set above in the Head.U unit. case "$p_" in :) ;; *) $cat \<\<'EOI' I have the feeling something is not exactly right\, however...don't tell me... lemme think...does HAL ring a bell?...no\, of course\, you're only running OS/2! EOI echo exit 0 >os2 ;; esac if test -f /xenix; then echo "Actually\, this looks more like a XENIX system..." echo exit 0 >xenix d_xenix="$define" else echo " " echo "It's not Xenix..." d_xenix="$undef" fi chmod +x xenix $eunicefix xenix if test -f /venix; then echo "Actually\, this looks more like a VENIX system..." echo exit 0 >venix else echo " " if ./xenix; then : null else echo "Nor is it Venix..." fi fi chmod +x bsd usg v7 osf1 eunice xenix venix os2 $eunicefix bsd usg v7 osf1 eunice xenix venix os2 $rm -f foo
: see if setuid scripts can be secure $cat \<\<EOM
Some kernels have a bug that prevents setuid #! scripts from being secure. Some sites have disabled setuid #! scripts because of this.
First let's decide if your kernel supports secure setuid #! scripts. (If setuid #! scripts would be secure but have been disabled anyway\, don't say that they are secure if asked.)
EOM
val="$undef" if $test -d /dev/fd; then echo "#!$ls" >reflect chmod +x\,u+s reflect ./reflect >flect 2>&1 if $contains "/dev/fd" flect >/dev/null; then echo "Congratulations\, your kernel has secure setuid scripts!" >&4 val="$define" else $cat \<\<EOM If you are not sure if they are secure\, I can check but I'll need a username and password different from the one you are using right now. If you don't have such a username or don't want me to test\, simply enter 'none'.
EOM rp='Other username to test security of setuid scripts with?' dflt='none' . ./myread case "$ans" in n|none) case "$d_suidsafe" in '') echo "I'll assume setuid scripts are *not* secure." >&4 dflt=n;; "$undef") echo "Well\, the $hint value is *not* secure." >&4 dflt=n;; *) echo "Well\, the $hint value *is* secure." >&4 dflt=y;; esac ;; *) $rm -f reflect flect echo "#!$ls" >reflect chmod +x\,u+s reflect echo >flect chmod a+w flect echo '"su" will (probably) prompt you for '"$ans's password." su $ans -c './reflect >flect' if $contains "/dev/fd" flect >/dev/null; then echo "Okay\, it looks like setuid scripts are secure." >&4 dflt=y else echo "I don't think setuid scripts are secure." >&4 dflt=n fi ;; esac rp='Does your kernel have *secure* setuid scripts?' . ./myread case "$ans" in [yY]*) val="$define";; *) val="$undef";; esac fi else echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4 echo "(That's for file descriptors\, not floppy disks.)" val="$undef" fi set d_suidsafe eval $setvar
$rm -f reflect flect
: now see if they want to do setuid emulation echo " " val="$undef" case "$d_suidsafe" in "$define") val="$undef" echo "No need to emulate SUID scripts since they are secure here." >& 4 ;; *) $cat \<\<EOM Some systems have disabled setuid scripts\, especially systems where setuid scripts cannot be secure. On systems where setuid scripts have been disabled\, the setuid/setgid bits on scripts are currently useless. It is possible for $package to detect those bits and emulate setuid/setgid in a secure fashion. This emulation will only work if setuid scripts have been disabled in your kernel.
EOM case "$d_dosuid" in "$define") dflt=y ;; *) dflt=n ;; esac rp="Do you want to do setuid/setgid emulation?" . ./myread case "$ans" in [yY]*) val="$define";; *) val="$undef";; esac ;; esac set d_dosuid eval $setvar
: determine where site specific libraries go. set sitelib sitelib eval $prefixit case "$sitelib" in '') dflt="$privlib/site_perl" ;; *) dflt="$sitelib" ;; esac $cat \<\<EOM
The installation process will also create a directory for site-specific extensions and modules. Some users find it convenient to place all local files in this directory rather than in the main distribution directory.
EOM fn=d~+ rp='Pathname for the site-specific library files?' . ./getfile if $test "X$sitelibexp" != "X$ansexp"; then installsitelib='' fi sitelib="$ans" sitelibexp="$ansexp" if $afs; then $cat \<\<EOM
Since you are running AFS\, I need to distinguish the directory in which site-specific files reside from the directory in which they are installed (and from which they are presumably copied to the former directory by occult means).
EOM case "$installsitelib" in '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;; *) dflt="$installsitelib";; esac fn=de~ rp='Where will site-specific files be installed?' . ./getfile installsitelib="$ans" else installsitelib="$sitelibexp" fi
: determine where site specific architecture-dependent libraries go. xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'` : xxx is usuually lib/site_perl/archname. set sitearch sitearch none eval $prefixit case "$sitearch" in '') dflt="$sitelib/$archname" ;; *) dflt="$sitearch" ;; esac $cat \<\<EOM
The installation process will also create a directory for architecture-dependent site-specific extensions and modules.
EOM fn=nd~+ rp='Pathname for the site-specific architecture-dependent library files?' . ./getfile if $test "X$sitearchexp" != "X$ansexp"; then installsitearch='' fi sitearch="$ans" sitearchexp="$ansexp" if $afs; then $cat \<\<EOM
Since you are running AFS\, I need to distinguish the directory in which site-specific architecture-dependent library files reside from the directory in which they are installed (and from which they are presumably copied to the former directory by occult means).
EOM case "$installsitearch" in '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;; *) dflt="$installsitearch";; esac fn=de~ rp='Where will site-specific architecture-dependent files be installed?' . ./getfile installsitearch="$ans" else installsitearch="$sitearchexp" fi
: determine where old public architecture dependent libraries might be case "$oldarchlib" in '') case "$privlib" in '') ;; *) dflt="$privlib/$archname" ;; esac ;; *) dflt="$oldarchlib" ;; esac if $test ! -d "$dflt/auto"; then dflt=none fi cat \<\<EOM
In 5.001\, Perl stored architecture-dependent library files in a directory with a name such as $privlib/$archname\, and this directory contained files from the standard extensions and files from any additional extensions you might have added. Starting with version 5.002\, all the architecture-dependent standard extensions will go into a version-specific directory such as $archlib\, while locally-added extensions will go into $sitearch.
If you wish Perl to continue to search the old architecture-dependent library for your local extensions\, give the path to that directory. If you do not wish to use your old architecture-dependent library files\, answer 'none'.
EOM fn=dn~ rp='Directory for your old 5.001 architecture-dependent libraries?' . ./getfile oldarchlib="$ans" oldarchlibexp="$ansexp" case "$oldarchlib" in ''|' ') val="$undef" ;; *) val="$define" ;; esac set d_oldarchlib eval $setvar
: determine where public executables go echo " " 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 $cat \<\<EOM
Since you are running AFS\, I need to distinguish the directory in which executables reside from the directory in which they are installed (and from which they are presumably copied to the former directory by occult means).
EOM case "$installbin" in '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;; *) dflt="$installbin";; esac fn=de~ rp='Where will public executables be installed?' . ./getfile installbin="$ans" else installbin="$binexp" fi
: determine where manual pages are on this system echo " " case "$sysman" in '') syspath='/us
I not speak English but I will try to explain a problem with Perl's compilation. I tried to compile the 5.004 perl version\, and I have followed the steps that I read in the INSTALL file and I had a problem with the step 3.
Sugiero que lo intentes con una version más nueva que ésa\, dado que estamos a 5.6 y no 5.004.
--tom
Migrated from rt.perl.org#3070 (status was 'resolved')
Searchable as RT3070$