# archive site. Check with Archie if you don't know where that can be.)
#
-# $Id: Head.U,v 3.0.1.6 1994/10/29 15:54:19 ram Exp $
+# $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
#
-# Generated on Fri Mar 10 09:48:55 EST 1995 [metaconfig 3.0 PL51]
+# Generated on Wed May 31 09:14:05 EDT 1995 [metaconfig 3.0 PL55]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
: Proper PATH setting
paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
-paths=$paths:'/usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/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'
+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
d_attribut=''
d_bcmp=''
d_bcopy=''
-d_byacc=''
d_bzero=''
d_casti32=''
castflags=''
d_dlsymun=''
d_dosuid=''
d_suidsafe=''
-d_drem=''
d_dup2=''
d_fchmod=''
d_fchown=''
d_fgetpos=''
d_flexfnam=''
d_flock=''
-d_fmod=''
d_fork=''
d_fsetpos=''
d_Gconvert=''
d_isascii=''
d_killpg=''
d_link=''
-d_linuxstd=''
d_locconv=''
d_lockf=''
d_lstat=''
sockethdr=''
socketlib=''
d_statblks=''
+d_stdiobase=''
d_stdstdio=''
+stdio_base=''
+stdio_bufsiz=''
+stdio_cnt=''
+stdio_ptr=''
d_index=''
d_strchr=''
d_strcoll=''
ccdlflags=''
d_shrplib=''
dlsrc=''
+ld=''
lddlflags=''
shrpdir=''
usedl=''
mallocsrc=''
malloctype=''
usemymalloc=''
-installmansrc=''
-manext=''
-mansrc=''
-mansrcexp=''
+installman1dir=''
+man1dir=''
+man1direxp=''
+man1ext=''
+installman3dir=''
+man3dir=''
+man3direxp=''
+man3ext=''
huge=''
large=''
medium=''
scriptdirexp=''
selecttype=''
sig_name=''
+d_sitelib=''
+installsitelib=''
+sitelib=''
+sitelibexp=''
sizetype=''
so=''
sharpbang=''
al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms"
al="$al xenix z8000"
-gccversion=''
groupstype=''
i_whoami=''
: change the next line if compiling for Xenix/286 on Xenix/386
: produce awk script to parse command line options
cat >options.awk <<'EOF'
BEGIN {
- optstr = "dD:eEf:hOrsSU:V"; # getopt-style specification
+ optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
len = length(optstr);
for (i = 1; i <= len; i++) {
silent=''
extractsh=''
override=''
+knowitall=''
rm -f optdef.sh
: option parsing
-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)
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.0 PL51." >&2
+ -V) echo "$me generated by metaconfig 3.0 PL55." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
case "$error" in
true)
cat >&2 <<EOM
-Usage: $me [-dehrEOSV] [-f config.sh] [-D symbol] [-D symbol=value]
+Usage: $me [-dehrEKOSV] [-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.
-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:
./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
newmyuname="$myuname"
dflt=n
-if test "$fastread" = yes; then
- dflt=y
-elif 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
+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
-fi
+ ;;
+*) dflt=y;;
+esac
: Get old answers from old config file if Configure was run on the
: same system, otherwise use the hints.
*) echo "You are using GNU cc $gccversion." ;;
esac
else
- echo "I can't compile the test program -- Assuming it isn't GNU cc."
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+ case "$knowitall" in
+ '')
+ echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
+ ;;
+ esac
fi
$rm -f gccvers*
case "$gccversion" in
esac
rmlist="$rmlist pdp11"
+: coherency check
+echo " "
+echo "Checking your choice of C compiler and flags for coherency..." >&4
+set X $cc $optimize $ccflags try.c -o try $ldflags
+shift
+$cat >try.msg <<EOM
+I've tried to compile and run a simple program with:
+
+ $*
+ ./try
+
+and I got the following output:
+
+EOM
+$cat > try.c <<'EOF'
+#include <stdio.h>
+main() { exit(0); }
+EOF
+dflt=y
+if sh -c "$cc $optimize $ccflags try.c -o try $ldflags" >>try.msg 2>&1; then
+ if sh -c './try' >>try.msg 2>&1; then
+ dflt=n
+ else
+ echo "The program compiled OK, but exited with status $?." >>try.msg
+ rp="You have a problem. Shall I abort Configure"
+ dflt=y
+ fi
+else
+ echo "I can't compile the test program." >>try.msg
+ rp="You have a BIG problem. Shall I abort Configure"
+ dflt=y
+fi
+case "$dflt" in
+y)
+ $cat try.msg
+ case "$knowitall" in
+ '')
+ echo "(The supplied flags might be incorrect with this C compiler.)"
+ ;;
+ *) dflt=n;;
+ esac
+ echo " "
+ . ./myread
+ case "$ans" in
+ n*|N*) ;;
+ *) echo "Ok. Stopping Configure." >&4
+ exit 1
+ ;;
+ esac
+ ;;
+n) echo "OK, that should do.";;
+esac
+$rm -f try try.* core
+
: Set private lib path
case "$plibpth" in
'') if ./mips; then
set /usr/ccs/lib/libc.$so
$test -r $1 || set /usr/lib/libc.$so
$test -r $1 || set /usr/shlib/libc.$so
- $test -r $1 || set /usr/lib/libc.$so.[0-9]*
+ $test -r $1 || \
+ set `echo blurfl; echo /usr/lib/libc.$so.[0-9]* | \
+ tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e '
+ h
+ s/[0-9][0-9]*/0000&/g
+ s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
+ G
+ s/\n/ /' | \
+ sort | $sed -e 's/^.* //'`
+ eval set \$$#
$test -r $1 || set /lib/libc.$so
$test -r $1 || set /lib/libsys_s.a
- eval set \$$#
;;
*)
set blurfl
$grep fprintf libc.tmp > libc.ptf
xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
-if com="$sed -n -e 's/__IO//' -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\
+xxx='[ADTSIW]'
+if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx //p'";\
eval $xscan;\
$contains '^fprintf$' libc.list >/dev/null 2>&1; then
eval $xrun
eval $xrun
else
nm -p $* 2>/dev/null >libc.tmp
- com="$sed -n -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\
- eval "<libc.tmp $com >libc.list"
- if $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ $grep fprintf libc.tmp > libc.ptf
+ if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
+ eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
+ then
nm_opt='-p'
- echo "done" >&4
+ eval $xrun
else
echo " "
echo "nm didn't seem to work right. Trying ar instead..." >&4
else
echo "ar didn't seem to work right." >&4
echo "Maybe this is a Cray...trying bld instead..." >&4
- if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
+ if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
+ then
for thisname in $libnames; do
bld t $libnames | \
$sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
else tval=false;
fi;;
*)
- echo "main() { extern int $1$tdc; printf(\"%d\", $1$tc); }" > t.c;
+ echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
if $cc $ccflags -o t t.c $ldflags $libs >/dev/null 2>&1;
then tval=true;
else tval=false;
esac'
: see if gconvert exists
+: On some SVR4 systems, gconvert is present but can not be used
+: because it requires some other unavailable functions.
+: Therefore, do not use the nm extraction, but use a real compile
+: and link test instead.
+xxx_runnm="$runnm"
+runnm=false
set gconvert d_gconvert
eval $inlibc
+runnm="$xxx_runnm"
case "$d_gconvert" in
$define)
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
$cat >try.c <<EOCP
#include <sys/types.h>
#include <signal.h>
-$signal_t blech() { exit(3); }
+$signal_t blech() { exit(7); }
+$signal_t blech_in_list() { exit(4); }
+unsigned long dummy_long(p) unsigned long p; { return p; }
+unsigned int dummy_int(p) unsigned int p; { return p; }
+unsigned short dummy_short(p) unsigned short p; { return p; }
main()
{
- double f = -123;
+ double f = -123.;
unsigned long along;
unsigned int aint;
unsigned short ashort;
along = (unsigned long)f;
if (along != 0x80000001)
result |= 2;
+ if (result)
+ exit(result);
+ signal(SIGFPE, blech_in_list);
+ f = 123.;
+ along = dummy_long((unsigned long)f);
+ aint = dummy_int((unsigned int)f);
+ ashort = dummy_short((unsigned short)f);
+ if (along != (unsigned long)123)
+ result |= 4;
+ if (aint != (unsigned int)123)
+ result |= 4;
+ if (ashort != (unsigned short)123)
+ result |= 4;
exit(result);
}
castflags=$?
else
echo "(I can't seem to compile the test program--assuming it can't)"
- castflags=3
+ castflags=7
fi
case "$castflags" in
0) val="$define"
$rm -f try.c
: see if dlerror exists
+: On NetBSD and FreeBSD, dlerror might be available, but it is in
+: /usr/lib/crt0.o, not in any of the libraries. Therefore, do not
+: use the nm extraction, but use a real compile and link test instead.
+xxx_runnm="$runnm"
+runnm=false
set dlerror d_dlerror
eval $inlibc
+runnm="$xxx_runnm"
: see if dld is available
set dld.h i_dld
eval $inhdr
: see if dlopen exists
+: On NetBSD and FreeBSD, dlopen is available, but it is in
+: /usr/lib/crt0.o, not in any of the libraries. Therefore, do not
+: use the nm extraction, but use a real compile and link test instead.
+xxx_runnm="$runnm"
+runnm=false
set dlopen d_dlopen
eval $inlibc
+runnm="$xxx_runnm"
: determine which dynamic loading, if any, to compile in
echo " "
usedl="$define"
: emulate basename
dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
+
$cat << EOM
Some systems may require passing special flags to $cc -c to
EOM
case "$cccdlflags" in
- ''|' ') case "$cc" in
- *gcc*) dflt='-fpic' ;;
- *) case "$osname" in
+ '') case "$gccversion" in
+ '') case "$osname" in
hpux) dflt='+z' ;;
next) dflt='none' ;;
- solaris) dflt='-K pic' ;;
+ solaris|svr4*|esix*) dflt='-Kpic' ;;
sunos) dflt='-pic' ;;
- svr4*|esix*) dflt='-Kpic' ;;
*) dflt='none' ;;
esac ;;
+ *) dflt='-fpic' ;;
esac ;;
- *) dflt="$cccdlflags" ;;
+ *) dflt="$cccdlflags" ;;
esac
rp="Any special flags to pass to $cc -c to compile shared library modules?"
. ./myread
case "$ans" in
- none) cccdlflags='' ;;
+ none) cccdlflags=' ' ;;
*) cccdlflags="$ans" ;;
esac
- cat << 'EOM'
+ cat << EOM
+
+Some systems use ld to create libraries that can be dynamically loaded,
+while other systems (such as those using ELF) use $cc.
-Some systems may require passing special flags to ld to create a
+EOM
+ case "$ld" in
+ '') $cat >try.c <<'EOM'
+/* Test for whether ELF binaries are produced */
+#include <fcntl.h>
+#include <stdlib.h>
+main() {
+ char b[4];
+ int i = open("a.out",O_RDONLY);
+ if(i == -1)
+ exit(1); /* fail */
+ if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
+ exit(0); /* succeed (yes, it's ELF) */
+ else
+ exit(1); /* fail */
+}
+EOM
+ if $cc $ccflags try.c >/dev/null 2>&1 && ./a.out; then
+ cat <<EOM
+You appear to have ELF support. I'll use $cc to build dynamic libraries.
+EOM
+ dflt="$cc"
+ else
+ echo "I'll use ld to build dynamic libraries."
+ dflt='ld'
+ fi
+ rm -f try.c a.out
+ ;;
+ *) dflt="$ld"
+ ;;
+ esac
+
+ rp="What command should be used to create dynamic libraries?"
+ . ./myread
+ ld="$ans"
+
+ cat << EOM
+
+Some systems may require passing special flags to $ld to create a
library that can be dynamically loaded. If your ld flags include
-L/other/path options to locate libraries outside your loader's normal
search path, you may need to specify those -L options here as well. To
EOM
case "$lddlflags" in
- ''|' ') case "$osname" in
+ '') case "$osname" in
hpux) dflt='-b' ;;
+ linux) dflt='-shared' ;;
next) dflt='none' ;;
solaris) dflt='-G' ;;
sunos) dflt='-assert nodefinitions' ;;
;;
*) dflt="$lddlflags" ;;
esac
- rp="Any special flags to pass to ld to create a dynamically loaded library?"
+ rp="Any special flags to pass to $ld to create a dynamically loaded library?"
. ./myread
case "$ans" in
- none) lddlflags='' ;;
+ none) lddlflags=' ' ;;
*) lddlflags="$ans" ;;
esac
EOM
case "$ccdlflags" in
- ''|' ') case "$osname" in
- hpux) dflt='none' ;;
+ '') case "$osname" in
+ hpux) dflt='-Wl,-E' ;;
+ linux) dflt='-rdynamic' ;;
next) dflt='none' ;;
sunos) dflt='none' ;;
*) dflt='none' ;;
rp="Any special flags to pass to $cc to use dynamic loading?"
. ./myread
case "$ans" in
- none) ccdlflags='' ;;
+ none) ccdlflags=' ' ;;
*) ccdlflags="$ans" ;;
esac
;;
*) usedl="$undef"
+ ld='ld'
dlsrc='dl_none.xs'
lddlflags=''
ccdlflags=''
}
EOM
if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
- ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 &&
+ $ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 &&
$cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
xxx=`./fred`
case $xxx in
set d_dosuid
eval $setvar
-: see if drem exists
-set drem d_drem
-eval $inlibc
-
: see if dup2 exists
set dup2 d_dup2
eval $inlibc
set flock d_flock
eval $inlibc
-: see if fmod exists
-set fmod d_fmod
-eval $inlibc
-
: see if fork exists
set fork d_fork
eval $inlibc
set link d_link
eval $inlibc
-: see if stdio is really std
-echo " "
-xxx=`./findhdr stdio.h`
-if $contains 'char.*_ptr;' "$xxx" >/dev/null 2>&1 ; then
- if $contains '_cnt;' "$xxx" >/dev/null 2>&1 ; then
- echo "Your stdio is pretty std." >&4
- val="$define"
- else
- echo "Your stdio isn't very std." >&4
- val="$undef"
- fi
-else
- echo "Your stdio isn't very std." >&4
- val="$undef"
-fi
-set d_stdstdio
-eval $setvar
-
-: see if stdio is like that in linux
-case "$d_stdstdio" in
-"$undef")
- echo " "
- xxx=`./findhdr stdio.h`
- $cppstdin $cppflags $cppminus < "$xxx" > stdio.E
- if $contains 'char.*_IO_read_base' stdio.E >/dev/null 2>&1 && \
- $contains '_IO_read_ptr' stdio.E >/dev/null 2>&1 && \
- $contains '_IO_read_end' stdio.E >/dev/null 2>&1 ; then
- echo "Your stdio looks like linux." >&4
- val="$define"
- else
- echo "You don't have linux stdio, either." >&4
- val="$undef"
- fi
- $rm -f stdio.E
- ;;
-*) val="$undef" ;;
-esac
-
-set d_linuxstd
-eval $setvar
-
: see if localeconv exists
set localeconv d_locconv
eval $inlibc
for (align = 7; align >= 0; align--) {
for (len = 36; len; len--) {
b = buf+align;
- memcpy(abc, b, len);
+ memcpy(b, abc, len);
for (off = 1; off <= len; off++) {
- memcpy(b, b+off, len);
memcpy(b+off, b, len);
+ memcpy(b, b+off, len);
if (memcmp(b, abc, len))
exit(1);
}
set d_shm
eval $setvar
+: determine whether the user wants to include a site-specific library
+: in addition to privlib.
+$cat <<EOM
+
+Some sites may wish to specify a local directory for $package
+to search by default in addition to $privlib.
+If you don't want to use such an additional directory, answer 'none'.
+
+EOM
+dflt=none
+fn=d~+n
+rp='Local directory for additional 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
+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 "$installsitelib" in
+ '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitelib";;
+ esac
+ fn=de~
+ rp='Where will additional local files be installed?'
+ . ./getfile
+ installsitelib="$ans"
+else
+ installsitelib="$sitelibexp"
+fi
+
+case "$sitelibexp" in
+''|' ') d_sitelib=undef ;;
+*) d_sitelib=define ;;
+esac
+
socketlib=''
sockethdr=''
: see whether socket exists
set d_statblks
eval $setvar
+: see if _ptr and _cnt from stdio act std
+echo " "
+if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
+ echo "(Looks like you have stdio.h from Linux.)"
+ case "$stdio_ptr" in
+ '') stdio_ptr='((fp)->_IO_read_ptr)';;
+ esac
+ case "$stdio_cnt" in
+ '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)';;
+ esac
+ case "$stdio_base" in
+ '') stdio_base='((fp)->_IO_read_base)';;
+ esac
+ case "$stdio_bufsiz" in
+ '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base))';;
+ esac
+else
+ case "$stdio_ptr" in
+ '') stdio_ptr='((fp)->_ptr)';;
+ esac
+ case "$stdio_cnt" in
+ '') stdio_cnt='((fp)->_cnt)';;
+ esac
+ case "$stdio_base" in
+ '') stdio_base='((fp)->_base)';;
+ esac
+ case "$stdio_bufsiz" in
+ '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
+ esac
+fi
+: test whether _ptr and _cnt really work
+echo "Checking how std your stdio is..." >&4
+$cat >try.c <<EOP
+#include <stdio.h>
+#define FILE_ptr(fp) $stdio_ptr
+#define FILE_cnt(fp) $stdio_cnt
+main() {
+ FILE *fp = fopen("try.c", "r");
+ char c = getc(fp);
+ if (
+ 18 <= FILE_cnt(fp) &&
+ strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
+ )
+ exit(0);
+ exit(1);
+}
+EOP
+val="$undef"
+if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1; then
+ if ./try; then
+ echo "Your stdio acts pretty std."
+ val="$define"
+ else
+ echo "Your stdio isn't very std."
+ fi
+else
+ echo "Your stdio doesn't appear very std."
+fi
+$rm -f try.c try
+set d_stdstdio
+eval $setvar
+
+: see if _base is also standard
+val="$undef"
+case "$d_stdstdio" in
+$define)
+ $cat >try.c <<EOP
+#include <stdio.h>
+#define FILE_base(fp) $stdio_base
+#define FILE_bufsiz(fp) $stdio_bufsiz
+main() {
+ FILE *fp = fopen("try.c", "r");
+ char c = getc(fp);
+ if (
+ 19 <= FILE_bufsiz(fp) &&
+ strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
+ )
+ exit(0);
+ exit(1);
+}
+EOP
+ if $cc $ccflags $ldflags -o try try.c $libs > /dev/null 2>&1; then
+ if ./try; then
+ echo "Even its _base field acts std."
+ val="$define"
+ else
+ echo "But its _base field isn't std."
+ fi
+ else
+ echo "However, it seems to be lacking the _base field."
+ fi
+ $rm -f try.c try
+ ;;
+esac
+set d_stdiobase
+eval $setvar
+
: see if strcoll exists
set strcoll d_strcoll
eval $inlibc
. ./myread
case "$ans" in
y*) hostcat='nidump hosts .';;
- *) ;;
+ *) case "$hostcat" in
+ nidump*) hostcat='';;
+ esac
+ ;;
esac
fi
case "$hostcat" in
case "$i_db" in
define)
: Check the return type needed for hash
+ echo " "
echo "Checking return type needed for hash for Berkeley DB ..." >&4
- cat >try.c <<'EOCP'
+ $cat >try.c <<'EOCP'
#include <sys/types.h>
#include <db.h>
-u_int32_t
-hash_cb (ptr, size)
-const void * ptr ;
-size_t size ;
+u_int32_t hash_cb (ptr, size)
+void *ptr;
+size_t size;
{
}
-HASHINFO info ;
+HASHINFO info;
main()
{
- info.hash = hash_cb ;
+ info.hash = hash_cb;
}
EOCP
if $cc $ccflags -c try.c >try.out 2>&1 ; then
echo "I can't seem to compile the test program." >&4
db_hashtype=int
fi
- $rm -f try.[co]
+ $rm -f try.*
echo "Your version of Berkeley DB uses $db_hashtype for hash."
;;
*) db_hashtype=int
case "$i_db" in
define)
: Check the return type needed for prefix
+ echo " "
echo "Checking return type needed for prefix for Berkeley DB ..." >&4
cat >try.c <<'EOCP'
#include <sys/types.h>
#include <db.h>
-size_t
-prefix_cb (key1, key2)
-const DBT * key1 ;
-const DBT * key2 ;
+size_t prefix_cb (key1, key2)
+DBT *key1;
+DBT *key2;
{
}
-BTREEINFO info ;
+BTREEINFO info;
main()
{
- info.prefix = prefix_cb ;
+ info.prefix = prefix_cb;
}
EOCP
if $cc $ccflags -c try.c >try.out 2>&1 ; then
echo "I can't seem to compile the test program." >&4
db_prefixtype='int'
fi
- $rm -f try.[co]
+ $rm -f try.*
echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
;;
*) db_prefixtype='int'
EOM
case "$dynamic_ext" in
- ''|' ') dflt="$avail_ext" ;;
+ '') dflt="$avail_ext" ;;
*) dflt="$dynamic_ext" ;;
esac
case "$dflt" in
rp="What extensions do you wish to load dynamically?"
. ./myread
case "$ans" in
- none) dynamic_ext='' ;;
+ none) dynamic_ext=' ' ;;
*) dynamic_ext="$ans" ;;
esac
case "$static_ext" in
- ''|' ')
+ '')
: Exclude those already listed in dynamic linking
dflt=''
for xxx in $avail_ext; do
rp="What extensions do you wish to load statically?"
. ./myread
case "$ans" in
- none) static_ext='' ;;
+ none) static_ext=' ' ;;
*) static_ext="$ans" ;;
esac
;;
EOM
case "$static_ext" in
- ''|' ') dflt="$avail_ext" ;;
+ '') dflt="$avail_ext" ;;
*) dflt="$static_ext" ;;
esac
rp="What extensions do you wish to include?"
. ./myread
case "$ans" in
- none) static_ext='' ;;
+ none) static_ext=' ' ;;
*) static_ext="$ans" ;;
esac
;;
lseektype="$ans"
: determine where manual pages go
-set mansrc mansrc none
+set man1dir man1dir none
eval $prefixit
$cat <<EOM
case "$nroff" in
nroff)
echo "However, you don't have nroff, so they're probably useless to you."
- case "$mansrc" in
- '') mansrc="none";;
+ case "$man1dir" in
+ '') man1dir="none";;
esac;;
esac
echo "If you don't want the manual sources installed, answer 'none'."
-case "$mansrc" in
+case "$man1dir" in
'')
lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
lookpath="$lookpath $prefixexp/man/l_man/man1"
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 . $prefixexp/man/man1 $lookpath`
- if $test -d "$mansrc"; then
- dflt="$mansrc"
+ man1dir=`./loc . $prefixexp/man/man1 $lookpath`
+ if $test -d "$man1dir"; then
+ dflt="$man1dir"
else
dflt="$sysman"
fi
eval $prefixup
;;
' ') dflt=none;;
-*) dflt="$mansrc"
+*) dflt="$man1dir"
;;
esac
echo " "
fn=dn~
-rp='Where do the manual pages (source) go?'
+rp="Where do the main $spackage manual pages (source) go?"
. ./getfile
-if test "X$mansrcexp" != "X$ansexp"; then
- installmansrc=''
+if test "X$man1direxp" != "X$ansexp"; then
+ installman1dir=''
fi
-mansrc="$ans"
-mansrcexp="$ansexp"
-case "$mansrc" in
-'') mansrc=' '
- installmansrc='';;
+man1dir="$ans"
+man1direxp="$ansexp"
+case "$man1dir" in
+'') man1dir=' '
+ installman1dir='';;
esac
if $afs; then
$cat <<EOM
which they are presumably copied to the former directory by occult means).
EOM
- case "$installmansrc" in
- '') dflt=`echo $mansrcexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installmansrc";;
+ case "$installman1dir" in
+ '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman1dir";;
esac
fn=de~
rp='Where will man pages be installed?'
. ./getfile
- installmansrc="$ans"
+ installman1dir="$ans"
else
- installmansrc="$mansrcexp"
+ installman1dir="$man1direxp"
fi
-case "$mansrc" in
-' ') manext='0';;
-*l) manext=l;;
-*n) manext=n;;
-*o) manext=l;;
-*p) manext=n;;
-*C) manext=C;;
-*L) manext=L;;
-*L1) manext=L1;;
-*) manext=1;;
+case "$man1dir" in
+' ') man1ext='0';;
+*l) man1ext=l;;
+*n) man1ext=n;;
+*o) man1ext=l;;
+*p) man1ext=n;;
+*C) man1ext=C;;
+*L) man1ext=L;;
+*L1) man1ext=L1;;
+*) man1ext=1;;
+esac
+
+: determine where library module manual pages go
+set man3dir man3dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages for many of the library modules.
+EOM
+
+case "$nroff" in
+nroff)
+ $cat <<'EOM'
+However, you don't have nroff, so they're probably useless to you.
+You can use the supplied perldoc script instead.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+case "$d_flexfnam" in
+undef)
+ $cat <<'EOM'
+However, your system can't handle the long file names like File::Basename.3.
+You can use the supplied perldoc script instead.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+echo "If you don't want the manual sources installed, answer 'none'."
+case "$man3dir" in
+'') dflt="$privlib/man/man3" ;;
+' ') dflt=none;;
+*) dflt="$man3dir" ;;
+esac
+echo " "
+
+fn=dn~
+rp="Where do the $spackage library man pages (source) go?"
+. ./getfile
+if test "X$man3direxp" != "X$ansexp"; then
+ installman3dir=''
+fi
+
+man3dir="$ans"
+man3direxp="$ansexp"
+case "$man3dir" in
+'') man3dir=' '
+ installman3dir='';;
+esac
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages 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 "$installman3dir" in
+ '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman3dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman3dir="$ans"
+else
+ installman3dir="$man3direxp"
+fi
+
+case "$man3dir" in
+' ') man3ext='0';;
+*l) man3ext=l;;
+*n) man3ext=n;;
+*o) man3ext=l;;
+*p) man3ext=n;;
+*C) man3ext=C;;
+*L) man3ext=L;;
+*L3) man3ext=L3;;
+*) man3ext=3;;
esac
: see what type is used for mode_t
case "$sig_name" in
'')
echo "Generating a list of signal names..." >&4
- xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`" "`./findhdr linux/signal.h`
+ xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`
+ xxx="$xxx "`./findhdr linux/signal.h`
set X `cat $xxx 2>&1 | $awk '
$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
sig[$3] = substr($2,4,20)
chmod +x ccsym
$eunicefix ccsym
./ccsym | $sort | $uniq >ccsym.raw
-$awk '/\=/ { print $0; next } { print $0"=1" }' ccsym.raw >ccsym.list
+$awk '/\=/ { print $0; next }
+ { print $0"=1" }' ccsym.raw >ccsym.list
$awk '{ print $0"=1" }' Cppsym.true >ccsym.true
$comm -13 ccsym.true ccsym.list >ccsym.own
$comm -12 ccsym.true ccsym.list >ccsym.com
;;
esac
+: Remove build directory name from cppstdin so it can be used from
+: either the present location or the final installed location.
+echo " "
+: Get out of the UU directory to get correct path name.
+cd ..
+case "$cppstdin" in
+`pwd`/cppstdin)
+ echo "Stripping down cppstdin path name"
+ cppstdin=cppstdin
+ ;;
+esac
+cd UU
+
: end of configuration questions
echo " "
echo "End of configuration questions."
d_bcopy='$d_bcopy'
d_bsd='$d_bsd'
d_bsdpgrp='$d_bsdpgrp'
-d_byacc='$d_byacc'
d_bzero='$d_bzero'
d_casti32='$d_casti32'
d_castneg='$d_castneg'
d_dlopen='$d_dlopen'
d_dlsymun='$d_dlsymun'
d_dosuid='$d_dosuid'
-d_drem='$d_drem'
d_dup2='$d_dup2'
d_eunice='$d_eunice'
d_fchmod='$d_fchmod'
d_fgetpos='$d_fgetpos'
d_flexfnam='$d_flexfnam'
d_flock='$d_flock'
-d_fmod='$d_fmod'
d_fork='$d_fork'
d_fpathconf='$d_fpathconf'
d_fsetpos='$d_fsetpos'
d_isascii='$d_isascii'
d_killpg='$d_killpg'
d_link='$d_link'
-d_linuxstd='$d_linuxstd'
d_locconv='$d_locconv'
d_lockf='$d_lockf'
d_lstat='$d_lstat'
d_shmdt='$d_shmdt'
d_shmget='$d_shmget'
d_shrplib='$d_shrplib'
+d_sitelib='$d_sitelib'
d_socket='$d_socket'
d_sockpair='$d_sockpair'
d_statblks='$d_statblks'
+d_stdiobase='$d_stdiobase'
d_stdstdio='$d_stdstdio'
d_strchr='$d_strchr'
d_strcoll='$d_strcoll'
inews='$inews'
installarchlib='$installarchlib'
installbin='$installbin'
-installmansrc='$installmansrc'
+installman1dir='$installman1dir'
+installman3dir='$installman3dir'
installprivlib='$installprivlib'
installscript='$installscript'
+installsitelib='$installsitelib'
intsize='$intsize'
known_extensions='$known_extensions'
ksh='$ksh'
large='$large'
+ld='$ld'
lddlflags='$lddlflags'
ldflags='$ldflags'
less='$less'
mallocobj='$mallocobj'
mallocsrc='$mallocsrc'
malloctype='$malloctype'
-manext='$manext'
-mansrc='$mansrc'
-mansrcexp='$mansrcexp'
+man1dir='$man1dir'
+man1direxp='$man1direxp'
+man1ext='$man1ext'
+man3dir='$man3dir'
+man3direxp='$man3direxp'
+man3ext='$man3ext'
medium='$medium'
mips='$mips'
mips_type='$mips_type'
shsharp='$shsharp'
sig_name='$sig_name'
signal_t='$signal_t'
+sitelib='$sitelib'
+sitelibexp='$sitelibexp'
sizetype='$sizetype'
sleep='$sleep'
smail='$smail'
startsh='$startsh'
static_ext='$static_ext'
stdchar='$stdchar'
+stdio_base='$stdio_base'
+stdio_bufsiz='$stdio_bufsiz'
+stdio_cnt='$stdio_cnt'
+stdio_ptr='$stdio_ptr'
strings='$strings'
submit='$submit'
sysman='$sysman'