NEWS-OS Release 4.2.1R + gcc version でperl5.001をコンパ イルした時の記録です。
特にNEWSOSでコンパイルする時はConfigureのなかで注意するとことが 3箇所あります。

# Configure
# make
# make install

# Configure
Beginning of configuration questions for perl5.
Checking echo to see how to suppress newlines...
...using -n.
The star should be here-->*
First let's make sure your kit is complete.  Checking...
Looks good...
Would you like to see the instructions? [n]  
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)".

[Type carriage return to continue] 
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 behaviour for the remaining of the execution.

[Type carriage return to continue] 
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 (lwall@netlabs.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.

[Type carriage return to continue]  
Checking your sh to see if it knows about # comments...
Your sh handles # comments correctly.
Okay, let's see if #! works on this system...
It does.
Checking out how to guarantee sh startup...
Let's see if '#!/bin/sh' works...
Yup, it does.
Locating common programs...
awk is in /usr/local/bin/awk.
cat is in /bin/cat.
comm is in /bin/comm.
cp is in /bin/cp.
echo is in /bin/echo.
expr is in /bin/expr.
find is in /bin/find.
grep is in /usr/local/bin/grep.
ln is in /bin/ln.
ls is in /bin/ls.
mkdir is in /bin/mkdir.
rm is in /bin/rm.
sed is in /usr/local/bin/sed.
sort is in /bin/sort.
touch is in /bin/touch.
tr is in /bin/tr.
uniq is in /bin/uniq.
Don't worry if any of the following aren't found...
I don't see Mcc out there, offhand.
I don't see byacc out there, either.
cpp is in /usr/lib/cpp.
csh is in /bin/csh.
date is in /bin/date.
egrep is in /usr/local/bin/egrep.
I don't see line out there, either.
nroff is in /bin/nroff.
perl is in /usr/local/bin/perl.
test is in /bin/test.
I don't see uname out there, either.
Using the test built into your sh.
Checking compatibility between /bin/echo and builtin echo (if any)...
They are compatible.  In fact, they may be identical.
Symbolic links are supported.
Your tr only supports [a-z] and [A-Z] to convert case.
I see a config.sh file.  Shall I use it to set the defaults? [y] n
OK, I'll ignore it.

First time through, eh?  I have some defaults handy for the following systems:

3b1   		dynix   	isc   		opus   		sunos_4_1   
aix   		esix4   	isc_2   	powerunix   	svr4   
altos486   	fps   		linux   	sco_2_3_0   	ti1500   
apollo   	freebsd   	machten   	sco_2_3_1   	titanos   
aux   		genix   	mips   		sco_2_3_2   	ultrix_4   
bsd386   	greenhills   	mpc   		sco_2_3_3   	unicos   
convexos   	hpux_9   	mpeix   	sco_2_3_4   	unisysdynix   
cxux   		i386   		ncr_tower   	sco_3   	utekv   
dec_osf   	irix_4   	netbsd   	solaris_2   	uts   
dgux   		irix_5   	next_3_0   	stellar   
dnix   		irix_6   	next_3_2   	sunos_4_0   

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".

Which of these apply, if any? [none] 
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.

Operating system name? [none]  
System manual is in /usr/local/man/man1.
Some systems have different model sizes.  On most systems they are called
small, medium, large, and huge.  On the PDP11 they are called unsplit and
split.  If your system doesn't support different memory models, say "none".
If you wish to force everything to one memory model, say "none" here and
put the appropriate flags later when it asks you for other cc and ld flags.
Venix systems may wish to put "none" and let the compiler figure things out.
(In the following question multiple model names should be space separated.)

Which memory models are supported? [none]  
Hmm...  Looks kind of like a BSD system, but we'll see...
Congratulations.  You aren't running Eunice.
It's not Xenix...
Nor is it Venix...
Use which C compiler? [cc] gcc 
Checking for GNU cc in disguise and/or its version number...
You are using GNU cc
I can set things up so that your shell scripts and binaries are more portable,
at what may be a noticable cost in performance.  In particular, if you
ask to be portable, the following happens:

     1) Shell scripts will rely on the PATH variable rather than using
	the paths derived above.
     2) ~username interpretations will be done at run time rather than
	by Configure.

Do you expect to run these scripts and binaries on multiple machines? [y]  
Hmm...  Doesn't look like a MIPS system.
Where are the include files you want to use? [/usr/include]  /usr/local/lib/gcc-lib/mips-sony-bsd/
Now, how can we feed standard input to your C preprocessor...
Maybe "gcc -E" will work...
Nope...maybe "gcc -E -" will work...
Yup, it does.

Some C compilers have problems with their optimizers, by default, perl5
compiles with the -O flag to use the optimizer.  Alternately, you might want
to use the symbolic debugger, which uses the -g flag (on traditional Unix
systems).  Either flag can be specified here.  To use neither flag, specify
the word "none".

What optimizer/debugger flag should be used? [-O] 
Your C compiler may want other flags.  For this question you should include
-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
but you should NOT include libraries or ld flags like -lwhatever.  If you
want perl5 to honor its debug switch, you should include -DDEBUGGING here.
Your C compiler might also need additional flags, such as -D_POSIX_SOURCE,

To use no flags, specify the word "none".

Any additional cc flags? [-DLANGUAGE_C]  
Let me guess what the preprocessor flags are...
They appear to be: -DLANGUAGE_C
Any additional ld flags (NOT including libraries)? [none] 
Some systems have incompatible or broken versions of libraries.  Among
the directories listed in the question below, please remove any you
know not to be holding relevant libraries, and add any that are needed.
Say "none" for none.

Directories to use for library searches? [/lib /usr/lib /usr/local/lib] 
On some systems, shared libraries may be available.  Answer 'none' if
you want to suppress searching of shared libraries for the remaining
of this configuration.

What is the file extension used for shared libraries? [so] none 
Checking for optional libraries...
No -lnet.
No -lsocket.
No -linet.
No -lnsl.
No -lnm.
No -lndbm.
No -lgdbm.
Found -ldbm.
No -ldb.
No -lmalloc.
No -ldl.
No -ldld.
No -lld.
No -lsun.
No -lm.
Found -lc.
No -lcposix.
No -lposix.
No -lndir.
No -ldir.
No -lcrypt.
No -lucb.
No -lbsd.
No -lBSD.
No -lPW.
No -lx.
Some versions of Unix support shared libraries, which make executables smaller
but make load time slightly longer.

On some systems, mostly newer Unix System V's, the shared library is included
by putting the option "-lc_s" as the last thing on the cc command line when
linking.  Other systems use shared libraries by default.  There may be other
libraries needed to compile perl5 on your machine as well.  If your system
needs the "-lc_s" option, include it here.  Include any other special libraries
here as well.  Say "none" for none.
Any additional libraries? [-ldbm -lc] -ldbm -lc -lm 
I can use 'nm' to extract the symbols from your C libraries. This is a time
consuming task which may generate huge output on the disk (up to 3 megabytes)
but that should make the symbols extraction faster. The alternative is to skip
the 'nm' extraction part and to compile a small test program instead to
determine whether each symbol is present. If you have a fast C compiler and/or
if your 'nm' output cannot be parsed, this may be the best solution.

Shall I use nm to extract C symbols from the libraries? [y]  
Your C library seems to be in /usr/lib/libc.a.  That's fine.

If the guess above is wrong (which it might be if you're using a strange
compiler, or your machine supports multiple models), you can override it here.

Where is your C library? [/usr/lib/libc.a]  
Extracting names from the following files for later perusal:
This may take a while.....done
gconvert() NOT found.
gcvt() found.
Good, your gcvt() drops a trailing decimal point.
We'll use it to convert floats into a string.
Computing filename position in cpp output for #include directives...
Your cpp writes the filename in the third field of the line.
access() found.
<sys/file.h> defines the *_OK access constants.
alarm() found.
What is your architecture name [newsos]  
AFS does not seem to be running...

By default, perl5 will be installed in /usr/local/bin, manual
pages under /usr/local/man, etc..., i.e. with /usr/local as prefix for
all installation directories. Typically set to /usr/local, but you
may choose /usr if you wish to install perl5 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.

Installation prefix to use? (~name ok) [/usr/local] 
There are some auxiliary files for perl5 that need to be put into a
private library directory that is accessible by everyone.

Pathname where the private library files will reside? (~name ok)
Perl5 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.

Where do you want to put the public architecture-dependent libraries? (~name ok)
[/usr/local/lib/perl5/newsos] /usr/local/lib/perl5 
Checking whether your compiler can handle __attribute__ ...
Your C compiler supports __attribute__.
bcmp() found.
bcopy() found.
setpgrp() found.
(I see you are running Configure as super-user...)
You have to use setpgrp(pid, pgrp) instead of setpgrp().
bzero() found.
Checking to see how big your integers are...
What is the size of an integer (in bytes)? [4]  
You have int (*signal())() instead of void.
Checking whether your C compiler can cast large floats to int32.
Yup, it can.
Checking whether your C compiler can cast negative float to unsigned.
Yup, it can.
vprintf() found.
Your vsprintf() returns (int).
chown() found.
chroot() found.
chsize() NOT found.
Checking to see if your C compiler knows about "const"...
Yup, it does.
crypt() found.
cuserid() NOT found.
<limits.h> found.
<float.h> found.
DBL_DIG found.
difftime() NOT found.
<dirent.h> found.
Your directory entries are struct dirent.
Good, your directory entry keeps length information in d_namlen.
dlerror() NOT found.
<dld.h> NOT found.
dlopen() NOT found.
Do you wish to use dynamic loading? [n]  
<dlfcn.h> NOT found.

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.)

I don't think setuid scripts are secure (no /dev/fd directory).
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 perl5 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.

Do you want to do setuid/setgid emulation? [n]  
drem() NOT found.
dup2() found.
fchmod() found.
fchown() found.
fcntl() found.
fgetpos() NOT found.
You can have filenames longer than 14 characters.
flock() found.
fmod() NOT found.
fork() found.
pathconf() NOT found.
fpathconf() NOT found.
fsetpos() NOT found.
gethostent() found.
getlogin() found.
getpgrp() found.
getpgrp2() NOT found.
getppid() found.
getpriority() found.
<netinet/in.h> found.
htonl() found.
Using <string.h> instead of <strings.h>.
index() found.
isascii() found.
killpg() found.
link() found.
Your stdio is pretty std.
localeconv() NOT found.
lockf() found.
lstat() found.
mblen() found.
mbstowcs() found.
mbtowc() found.
memcmp() found.
memcpy() found.
memmove() found.
memset() found.
mkdir() found.
mkfifo() NOT found.
mktime() NOT found.
msgctl() found.
msgget() found.
msgsnd() found.
msgrcv() found.
You have the full msg*(2) library.
<malloc.h> NOT found.
<stdlib.h> found.
Do you wish to attempt to use the malloc that comes with perl5? [y]  
Your system wants malloc to return 'void *', it would seem.
Your system uses void free(), it would seem.
nice() found.
<sys/file.h> defines the O_* constants...
and you have the 3 argument form of open().
pause() found.
pipe() found.
<pwd.h> found.
readdir() found.
seekdir() found.
telldir() found.
rewinddir() NOT found.
readlink() found.
rename() found.
rmdir() found.
Checking to see if your bcopy() can do overlapping copies...
Yes, it can.
Checking to see if your memcpy() can do overlapping copies...
Yes, it can.
select() found.
semctl() found.
semget() found.
semop() found.
You have the full sem*(2) library.
setegid() found.
seteuid() found.
setlinebuf() found.
setlocale() found.
setpgid() NOT found.
setpgrp2() NOT found.
setpriority() found.
setregid() found.
setresgid() NOT found.
setreuid() found.
setresuid() NOT found.
setrgid() found.
setruid() found.
setsid() NOT found.
shmctl() found.
shmget() found.
shmat() found.
and it returns (char *).
shmdt() found.
You have the full shm*(2) library.
Hmm... Looks like you have Berkeley networking support.
socketpair() found.
Your stat() knows about block sizes.
strcoll() NOT found.
Checking to see if your C compiler can copy structs...
Yup, it can.
strerror() found.
(You also have sys_errlist[], so we could roll our own strerror.)
strxfrm() NOT found.
symlink() found.
syscall() found.
sysconf() NOT found.
system() found.
tcgetpgrp() found.
tcsetpgrp() found.
<sys/times.h> found.
times() found.
What type is returned by times() on this sytem? [long]  
truncate() found.
tzname[] found.
umask() found.
Are you getting the hosts file via yellow pages? [n]  
Figuring out host name...
Maybe "hostname" will work...
Your host name appears to be "ajisai". Right? [y]  
vfork() found.
Some systems have problems with vfork().  Do you want to use it? [n] 
Ok, we won't use vfork().
<sys/dir.h> found.
<sys/ndir.h> NOT found.
closedir() found.
Checking whether closedir() returns a status...
(I can't seem to compile the test program--assuming it doesn't)
Checking to see if your C compiler knows about "volatile"...
Yup, it does.
wait4() found.
waitpid() NOT found.
wcstombs() found.
wctomb() found.
Checking alignment constraints...
Doubles must be aligned on a how-many-byte boundary? [8]  
Pathname where the public executables will reside? (~name ok)
In the following, larger digits indicate more significance.  A big-endian
machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
machines may have weird orders like 3412.  A Cray will report 87654321. If
the test program works the default is probably right.
I'm now running the test program...
(The test program ran ok.)
What is the order of bytes in a long? [4321]  
Checking to see how your cpp does stuff like catenate tokens...
Oh!  Smells like ANSI's been here.
We can catify or stringify, separately or together!
<db.h> NOT found.
Checking to see how well your C compiler groks the void type...
  Support flag bits are:
    1: basic void declarations.
    2: arrays of pointers to functions returning void.
    4: operations between pointers to and addresses of void functions.
    8: generic void pointers.
It appears to support void to the level perl5 wants (15).
Your void support flags add up to what? [15]  
<dbm.h> found.
dbmclose() found.
<ndbm.h> found.
dbm_open() found.
<gdbm.h> NOT found.
Looking for extensions...
A number of extensions are supplied with perl5.  Answer "none" 
to include no extensions. 

What extensions do you wish to include?
[Fcntl NDBM_File ODBM_File POSIX SDBM_File Socket]  
What is the type for file position used by fsetpos()? [long]  
What is the type for group ids returned by getgid()? [gid_t]  
getgroups() found.
What is the type of the second argument to getgroups()?  Usually this
is the same as group ids, gid_t, but not always.

What type is the second argument to getgroups()? [gid_t]  
What type is lseek's offset on this system declared as? [off_t] 
Perl5 has manual pages available in source form.
If you don't want the manual sources installed, answer 'none'.
Where do the manual pages (source) go? (~name ok) [/usr/local/man/man1]  
What type is used for file modes? [int]  
Getting the current patchlevel...
(You have perl5 5.0 PL1.)
Checking out function prototypes...
Your C compiler appears to support function prototypes.
Checking to see how many bits your rand function produces...
How many bits does your rand() function produce? [31]  
Checking how to generate random libraries on your machine...
a table of contents needs to be added with 'ar ts'.
Some installations have a separate directory just for executable scripts so
that they can mount it across multiple architectures but keep the scripts in
one spot.  You might, for example, have a subdirectory of /usr/share for this.
Or you might just lump your scripts in with all your other executables.
Where do you keep publicly executable scripts? (~name ok) [/usr/local/bin]  
<sys/select.h> NOT found.
Testing to see if we should include <time.h>, <sys/time.h> or both.
I'm now running the test program.... 
Succeeded with -DI_SYSTIME -DS_TIMEVAL 
We'll include <sys/time.h>.

Checking to see how well your C compiler handles fd_set and friends ...
Well, your system knows about the normal fd_set typedef...
and you have the normal fd_set macros (just as I'd expect).

Checking to see what type of arguments are expected by select().
Your system uses fd_set * for the arguments to select.
Generating a list of signal names...
The following signals are available:
What type is used for the length parameter for string functions? [size_t]  
I'll be using int for functions returning a byte count.
Your stdio uses signed chars.
time() found.
What type is returned by time() on this sytem? [time_t]  
What is the type for user ids returned by getuid()? [uid_t]  
<sys/file.h> found.
We'll be including <sys/file.h>.
<fcntl.h> found.
We don't need to include <fcntl.h> if we include <sys/file.h>.
<grp.h> found.
<math.h> found.
<memory.h> found.
We won't be including <memory.h>.
<net/errno.h> NOT found.
Hmm... Your C compiler and pre-processor define these symbols:
Your C pre-processor also defines the following ones:
Your C compiler further defines the following cpp variables:
tcsetattr() found.
You have POSIX termios.h... good!
<stdarg.h> found.
<varargs.h> found.
We'll include <stdarg.h> to get va_dcl definition.
<stddef.h> found.
<sys/filio.h> NOT found.
<sys/ioctl.h> found.
<sys/param.h> found.
<sys/stat.h> found.
<sys/types.h> found.
<unistd.h> found.
<utime.h> NOT found.
End of configuration questions.
Stripping down executable paths...
Creating config.sh...

If you'd like to make any changes to the config.sh file before I begin
to configure things, do it as a shell escape now (e.g. !vi config.sh).

Press return or use a shell escape to edit config.sh:  
Doing variable substitutions on .SH files...
Extracting Makefile (with variable substitutions)
Extracting c2ph (with variable substitutions)
Extracting cflags (with variable substitutions)
Extracting config.h (with variable substitutions)
Extracting h2ph (with variable substitutions)
Extracting h2xs (with variable substitutions)
Extracting makeaperl (with variable substitutions)
Extracting makedepend (with variable substitutions)
Extracting makedir (with variable substitutions)
Extracting perl.exp
Extracting writemain (with variable substitutions)
Extracting x2p/Makefile (with variable substitutions)
Extracting x2p/cflags (with variable substitutions)
Extracting x2p/find2perl (with variable substitutions)
Extracting x2p/s2p (with variable substitutions)

Now you need to generate make dependencies by running "make depend".
You might prefer to run it in background: "make depend > makedepend.out &"
It can take a while, so you might not want to run it right now.

Run make depend now? [y] test -f perly.h || cp /dev/null perly.h
make[1]: Entering directory `/mnt1/local/src/perl5.001'
sh writemain lib/auto/DynaLoader/DynaLoader.a lib/auto/Fcntl/Fcntl.a lib/auto/NDBM_File/NDBM_File.a lib/auto/ODBM_File/ODBM_File.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Socket/Socket.a > tmp
sh mv-if-diff tmp perlmain.c
File perlmain.c not changed.
echo malloc.c av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c gv.c sv.c taint.c toke.c util.c deb.c run.c globals.c miniperlmain.c perlmain.c | tr ' ' '\012' >.clist
make[1]: Leaving directory `/mnt1/local/src/perl5.001'
Finding dependencies for malloc.o.
Finding dependencies for av.o.
Finding dependencies for scope.o.
Finding dependencies for op.o.
Finding dependencies for doop.o.
Finding dependencies for doio.o.
Finding dependencies for dump.o.
Finding dependencies for hv.o.
Finding dependencies for mg.o.
Finding dependencies for perl.o.
Finding dependencies for perly.o.
Finding dependencies for pp.o.
Finding dependencies for pp_hot.o.
Finding dependencies for pp_ctl.o.
Finding dependencies for pp_sys.o.
Finding dependencies for regcomp.o.
Finding dependencies for regexec.o.
Finding dependencies for gv.o.
Finding dependencies for sv.o.
Finding dependencies for taint.o.
Finding dependencies for toke.o.
Finding dependencies for util.o.
Finding dependencies for deb.o.
Finding dependencies for run.o.
Finding dependencies for globals.o.
Finding dependencies for miniperlmain.o.
Finding dependencies for perlmain.o.
make[1]: Entering directory `/mnt1/local/src/perl5.001'
echo Makefile.SH cflags.SH makedepend.SH makedir.SH writemain.SH | tr ' ' '\012' >.shlist
make[1]: Leaving directory `/mnt1/local/src/perl5.001'
Updating makefile...
test -s perly.h || /bin/rm -f perly.h
test -s perlmain.c && touch perlmain.c
cd x2p; make depend
make[1]: Entering directory `/mnt1/local/src/perl5.001/x2p'
make[2]: Entering directory `/mnt1/local/src/perl5.001/x2p'
echo hash.c malloc.c str.c util.c walk.c | tr ' ' '\012' >.clist
make[2]: Leaving directory `/mnt1/local/src/perl5.001/x2p'
Finding dependencies for hash.o.
Finding dependencies for malloc.o.
Finding dependencies for str.o.
Finding dependencies for util.o.
Finding dependencies for walk.o.
make[2]: Entering directory `/mnt1/local/src/perl5.001/x2p'
echo Makefile.SH cflags.SH find2perl.SH s2p.SH | tr ' ' '\012' >.shlist
make[2]: Leaving directory `/mnt1/local/src/perl5.001/x2p'
Updating makefile...
make[1]: Leaving directory `/mnt1/local/src/perl5.001/x2p'
Now you must run a make.