# 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.)
#
-# $Header: Configure,v 3.0.1.3 89/11/17 15:01:21 lwall Locked $
+# $Header: Configure,v 3.0.1.8 90/08/09 01:47:24 lwall Locked $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
d_bcmp=''
d_bcopy=''
d_bzero=''
+d_castneg=''
d_charsprf=''
+d_chsize=''
d_crypt=''
cryptlib=''
d_csh=''
d_getgrps=''
d_gethent=''
d_getpgrp=''
+d_getpgrp2=''
d_getprior=''
d_htonl=''
d_index=''
d_readdir=''
d_rename=''
d_rmdir=''
+d_select=''
d_setegid=''
d_seteuid=''
d_setpgrp=''
+d_setpgrp2=''
d_setprior=''
d_setregid=''
d_setresgid=''
d_statblks=''
d_stdstdio=''
d_strctcpy=''
+d_strerror=''
d_symlink=''
d_syscall=''
-d_tminsys=''
-i_systime=''
-i_timetoo=''
-i_systimetoo=''
+d_truncate=''
d_varargs=''
d_vfork=''
d_voidsig=''
+d_volatile=''
d_vprintf=''
d_charvspr=''
d_wait4=''
d_pwexpire=''
i_sysdir=''
i_sysioctl=''
+i_sysndir=''
+i_time=''
+i_systime=''
+d_systimekernel=''
+i_utime=''
i_varargs=''
i_vfork=''
intsize=''
c=''
package=''
randbits=''
+scriptdir=''
sig_name=''
spitshell=''
shsharp=''
uidtype=''
voidflags=''
defvoidused=''
-lib=''
+yacc=''
privlib=''
+lib=''
CONFIG=''
: set package name
package=perl
define='define'
undef='undef'
-libpth='/usr/lib /usr/local/lib /usr/lib/386 /usr/lib/large /lib /lib/386 /lib/large /usr/lib/small /lib/small'
+: change the next line if compiling for Xenix/286 on Xenix/386
+xlibpth='/usr/lib/386 /lib/386'
+libpth='/usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
smallmach='pdp11 i8086 z8000 i80286 iAPX286'
rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
-attrlist="$attrlist i186"
+attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb"
d_newshome="/usr/NeWS"
defvoidused=7
-libswanted="net nm ndir ndbm dbm sun bsd c_s"
-inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd'
+libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun bsd BSD x c_s"
+inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
: some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
echo "#!/bin/echo hi" > try
$eunicefix try
chmod +x try
- try > today
+ ./try > today
if $contains hi today >/dev/null 2>&1; then
echo "It does."
sharpbang='#!'
echo "#! /bin/echo hi" > try
$eunicefix try
chmod +x try
- try > today
+ ./try > today
if test -s today; then
echo "It does."
sharpbang='#! '
chmod +x try
$eunicefix try
-if try; then
+if ./try; then
echo "Yup, it does."
else
echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
cont=true
while $test "$cont" ; do
echo " "
- rp="Where do you want to put the public executables? [$dflt]"
+ rp="Where do you want to put the public executables? (~name ok) [$dflt]"
$echo $n "$rp $c"
. myread
bin="$ans"
- bin=`filexp $bin`
+ bin=`./filexp "$bin"`
if test -d $bin; then
cont=''
else
cont=true
while $test "$cont" ; do
echo " "
- rp="Where do the manual pages (source) go? [$dflt]"
+ rp="Where do the manual pages (source) go? (~name ok) [$dflt]"
$echo $n "$rp $c"
. myread
- mansrc=`filexp "$ans"`
+ mansrc=`./filexp "$ans"`
if $test -d "$mansrc"; then
cont=''
else
manext=l
;;
*p)
- manext=n
+ manext=p
;;
*C)
manext=C
esac
;;
esac
+if $contains 'LANGUAGE_C' /usr/include/signal.h >/dev/null 2>&1; then
+ case "$dflt" in
+ *LANGUAGE_C*);;
+ *) dflt="$dflt -DLANGUAGE_C";;
+ esac
+fi
case "$dflt" in
'') dflt=none;;
esac
echo " "
echo "Checking for optional libraries..."
-case "$libs" in
-'') dflt='';;
-*) dflt="$libs";;
-esac
+dflt=''
case "$libswanted" in
'') libswanted='c_s';;
esac
for thislib in $libswanted; do
+ case "$thislib" in
+ dbm) thatlib=ndbm;;
+ *_s) thatlib=NONE;;
+ *) thatlib="${thislib}_s";;
+ *) thatlib=NONE;;
+ esac
xxx=`loc lib$thislib.a X /usr/lib /usr/local/lib /lib`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- *-l$thislib*);;
+ *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
*) dflt="$dflt $xxx";;
esac
else
- xxx=`loc Slib$thislib.a X /usr/lib /usr/local/lib /lib`
+ xxx=`loc Slib$thislib.a X $xlibpth`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- *-l$thislib*);;
+ *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
set X $dflt
shift
dflt="$*"
+case "$libs" in
+'') dflt="$dflt";;
+*) dflt="$libs";;
+esac
case "$dflt" in
'') dflt='none';;
esac
by default. There may be other libraries needed to compile $package
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.
EOM
echo " "
} u;
if (sizeof(long) > 4)
- u.l = 0x0807060504030201;
+ u.l = (0x08070605<<32) | 0x04030201;
else
u.l = 0x04030201;
for (i=0; i < sizeof(long); i++)
printf("\n");
}
EOCP
- if $cc try.c -o try >/dev/null 2>&1 ; then
- dflt=`try`
+ if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
+ dflt=`./try`
case "$dflt" in
????|????????) echo "(The test program ran ok.)";;
*) echo "(The test program didn't run right for some reason.)";;
if test ! -f $try; then
try=`loc $thislib blurfl/dyick $libpth`
if test ! -f $try; then
- try=''
+ try=`loc Slib$thislib.a blurfl/dyick $xlibpth`
+ if test ! -f $try; then
+ try=''
+ fi
fi
fi
fi
else
ans=`loc libc.a blurfl/dyick $libpth`
if test ! -f "$ans"; then
- ans=`loc libc blurfl/dyick $libpth`
+ ans=`loc Slibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc clib blurfl/dyick $libpth`
+ ans=`loc Mlibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Slibc.a blurfl/dyick /usr/lib/386 /lib/386 $libpth`
+ ans=`loc Llibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Mlibc.a blurfl/dyick $libpth`
+ ans=`loc libc blurfl/dyick $libpth`
fi
if test ! -f "$ans"; then
- ans=`loc Llibc.a blurfl/dyick $libpth`
+ ans=`loc clib blurfl/dyick $libpth`
+ else
+ libnames="$libnames "`loc clib blurfl/dyick $libpth`
fi
if test -f "$ans"; then
echo "Your C library is in $ans, of all places."
fi
fi
echo " "
-set $libc $libnames
+set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
$echo $n "Extracting names from $* for later perusal...$c"
nm $* 2>/dev/null >libc.tmp
$sed -n -e 's/^.* [AT] *_[_.]*//p' -e 's/^.* [AT] //p' <libc.tmp >libc.list
else
$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
$contains '^printf$' libc.list >/dev/null 2>&1 || \
+ $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
+ $contains '^printf$' libc.list >/dev/null 2>&1 || \
$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
$contains '^printf$' libc.list >/dev/null 2>&1 || \
$sed -n -e 's/^_//' \
-e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
+ $contains '^printf$' libc.list >/dev/null 2>&1 || \
+ $sed -n -e 's/^.*|FUNC |GLOB .*|//p' <libc.tmp >libc.list
if $contains '^printf$' libc.list >/dev/null 2>&1; then
echo "done"
else
set bzero d_bzero
eval $inlibc
+: check for ability to cast negative floats to unsigned
+echo " "
+echo 'Checking to see if your C compiler can cast negative float to unsigned'
+$cat >try.c <<'EOCP'
+main()
+{
+ double f = -123;
+ unsigned long along;
+ unsigned int aint;
+ unsigned short ashort;
+
+ along = (unsigned long)f;
+ aint = (unsigned int)f;
+ ashort = (unsigned short)f;
+ if (along == 0L || aint == 0 || ashort == 0)
+ exit(1);
+ else
+ exit(0);
+}
+EOCP
+if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
+ d_castneg="$define"
+ echo "Yup, it does."
+else
+ d_castneg="$undef"
+ echo "Nope, it doesn't."
+fi
+$rm -f try.*
+
: see if sprintf is declared as int or pointer to char
echo " "
cat >.ucbsprf.c <<'EOF'
echo 'vprintf() found.'
d_vprintf="$define"
cat >.ucbsprf.c <<'EOF'
+#include <stdio.h>
#include <varargs.h>
main() { xxx("foo"); }
d_charvspr="$undef"
fi
+: see if chsize exists
+set chsize d_chsize
+eval $inlibc
+
: see if crypt exists
echo " "
if $contains '^crypt$' libc.list >/dev/null 2>&1; then
d_crypt="$define"
cryptlib=''
else
- cryptlib=`loc Slibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Slibcrypt.a "" $xlibpth`
if $test -z "$cryptlib"; then
- cryptlib=`loc Mlibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Mlibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
- cryptlib=`loc Llibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Llibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
EOM
rp="Do you want to do setuid/setgid emulation? [$dflt]"
-echo $n "$rp $c"
+$echo $n "$rp $c"
. myread
case "$ans" in
'') $ans="$dflt";;
set getpgrp d_getpgrp
eval $inlibc
+: see if getpgrp2 exists
+set getpgrp2 d_getpgrp2
+eval $inlibc
+
: see if getpriority exists
set getpriority d_getprior
eval $inlibc
echo "dbm.h not found."
fi
+socketlib=''
+: see whether socket exists
+echo " "
+if $contains socket libc.list >/dev/null 2>&1; then
+ echo "Looks like you have Berkeley networking support."
+ d_socket="$define"
+ : now check for advanced features
+ if $contains setsockopt libc.list >/dev/null 2>&1; then
+ d_oldsock="$undef"
+ else
+ echo "...but it uses the old 4.1c interface, rather than 4.2"
+ d_oldsock="$define"
+ fi
+else
+ : hpux, for one, puts all the socket stuff in socklib.o
+ if $contains socklib libc.list >/dev/null 2>&1; then
+ echo "Looks like you have Berkeley networking support."
+ d_socket="$define"
+ : we will have to assume that it supports the 4.2 BSD interface
+ d_oldsock="$undef"
+ else
+ echo "Hmmm...you don't have Berkeley networking in libc.a..."
+ : look for an optional networking library
+ if test -f /usr/lib/libnet.a; then
+ (ar t /usr/lib/libnet.a ||
+ nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
+ if $contains socket libc.list >/dev/null 2>&1; then
+ echo "but the Wollongong group seems to have hacked it in."
+ socketlib="-lnet"
+ d_socket="$define"
+ : now check for advanced features
+ if $contains setsockopt libc.list >/dev/null 2>&1; then
+ d_oldsock="$undef"
+ else
+ echo "...using the old 4.1c interface, rather than 4.2"
+ d_oldsock="$define"
+ fi
+ else
+ echo "or even in libnet.a, which is peculiar."
+ d_socket="$undef"
+ d_oldsock="$undef"
+ fi
+ else
+ echo "or anywhere else I see."
+ d_socket="$undef"
+ d_oldsock="$undef"
+ fi
+ fi
+fi
+if $contains socketpair libc.list >/dev/null 2>&1; then
+ d_sockpair="$define"
+else
+ d_sockpair="$undef"
+fi
+
: see if this is a pwd system
echo " "
if $test -r /usr/include/pwd.h ; then
set rmdir d_rmdir
eval $inlibc
+: see if select exists
+set select d_select
+eval $inlibc
+
: see if setegid exists
set setegid d_setegid
eval $inlibc
set setpgrp d_setpgrp
eval $inlibc
+: see if setpgrp2 exists
+set setpgrp2 d_setpgrp2
+eval $inlibc
+
: see if setpriority exists
set setpriority d_setprior
eval $inlibc
set setruid d_setruid
eval $inlibc
-socketlib=''
-: see whether socket exists
-echo " "
-if $contains socket libc.list >/dev/null 2>&1; then
- echo "Looks like you have Berkeley networking support."
- d_socket="$define"
- : now check for advanced features
- if $contains setsockopt libc.list >/dev/null 2>&1; then
- d_oldsock="$undef"
- else
- echo "...but it uses the old 4.1c interface, rather than 4.2"
- d_oldsock="$define"
- fi
-else
- : hpux, for one, puts all the socket stuff in socklib.o
- if $contains socklib libc.list >/dev/null 2>&1; then
- echo "Looks like you have Berkeley networking support."
- d_socket="$define"
- : we will have to assume that it supports the 4.2 BSD interface
- d_oldsock="$undef"
- else
- echo "Hmmm...you don't have Berkeley networking in libc.a..."
- : look for an optional networking library
- if test -f /usr/lib/libnet.a; then
- (ar t /usr/lib/libnet.a ||
- nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
- if $contains socket libc.list >/dev/null 2>&1; then
- echo "but the Wollongong group seems to have hacked it in."
- socketlib="-lnet"
- d_socket="$define"
- : now check for advanced features
- if $contains setsockopt libc.list >/dev/null 2>&1; then
- d_oldsock="$undef"
- else
- echo "...using the old 4.1c interface, rather than 4.2"
- d_oldsock="$define"
- fi
- else
- echo "or even in libnet.a, which is peculiar."
- d_socket="$undef"
- d_oldsock="$undef"
- fi
- else
- echo "or anywhere else I see."
- d_socket="$undef"
- d_oldsock="$undef"
- fi
- fi
-fi
-if $contains socketpair libc.list >/dev/null 2>&1; then
- d_sockpair="$define"
-else
- d_sockpair="$undef"
-fi
-
: see if stat knows about block sizes
echo " "
if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
: see if stdio is really std
echo " "
-if $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
+if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
echo "Your stdio is pretty std."
d_stdstdio="$define"
foo = bar;
}
EOCP
-if $cc -c try.c >/dev/null 2>&1 ; then
+if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
d_strctcpy="$define"
echo "Yup, it can."
else
fi
$rm -f try.*
+: see if strerror exists
+set strerror d_strerror
+eval $inlibc
+
: see if symlink exists
set symlink d_symlink
eval $inlibc
set syscall d_syscall
eval $inlibc
-: see if struct tm is defined in sys/time.h
-echo " "
-if $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then
- echo "You have struct tm defined in <time.h> rather than <sys/time.h>."
- d_tminsys="$undef"
- if test -f /usr/include/sys/time.h; then
- i_systime="$define"
- else
- i_systime="$undef"
- fi
-else
- echo "You have struct tm defined in <sys/time.h> rather than <time.h>."
- d_tminsys="$define"
- i_systime="$define"
-fi
-if $contains '^#.*include.*<time\.h>' /usr/include/sys/time.h >/dev/null 2>&1 ; then
- i_timetoo="$undef"
-else
- i_timetoo="$define"
-fi
-if $contains '^#.*include.*<sys/time\.h>' /usr/include/time.h >/dev/null 2>&1 ; then
- i_systimetoo="$undef"
-else
- i_systimetoo="$define"
-fi
+: see if we should include time.h, sys/time.h, or both
+cat <<'EOM'
+
+Testing to see if we should include <time.h>, <sys/time.h> or both.
+I'm now running the test program...
+EOM
+$cat >try.c <<'EOCP'
+#ifdef I_TIME
+#include <time.h>
+#endif
+#ifdef I_SYSTIME
+#ifdef SYSTIMEKERNEL
+#define KERNEL
+#endif
+#include <sys/time.h>
+#endif
+main()
+{
+ struct tm foo;
+#ifdef S_TIMEVAL
+ struct timeval bar;
+#endif
+ if (foo.tm_sec == foo.tm_sec)
+ exit(0);
+#ifdef S_TIMEVAL
+ if (bar.tv_sec == bar.tv_sec)
+ exit(0);
+#endif
+ exit(1);
+}
+EOCP
+flags=''
+for s_timeval in '-DS_TIMEVAL' ''; do
+ for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
+ for i_time in '' '-DI_TIME'; do
+ for i_systime in '-DI_SYSTIME' ''; do
+ case "$flags" in
+ '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
+ if $cc $ccflags \
+ $i_time $i_systime $d_systimekernel $s_timeval \
+ try.c -o try >/dev/null 2>&1 ; then
+ set X $i_time $i_systime $d_systimekernel $s_timeval
+ shift
+ flags="$*"
+ echo Succeeded with $flags
+ fi
+ ;;
+ esac
+ done
+ done
+ done
+done
+case "$flags" in
+*SYSTIMEKERNEL*) d_systimekernel="$define";;
+*) d_systimekernel="$undef";;
+esac
+case "$flags" in
+*I_TIME*) i_time="$define";;
+*) i_time="$undef";;
+esac
+case "$flags" in
+*I_SYSTIME*) i_systime="$define";;
+*) i_systime="$undef";;
+esac
+$rm -f try.c try
+
+: see if truncate exists
+set truncate d_truncate
+eval $inlibc
: see if this is a varargs system
echo " "
fi
rm -f $$.tmp
+: check for volatile keyword
+echo " "
+echo 'Checking to see if your C compiler knows about "volatile"...'
+$cat >try.c <<'EOCP'
+main()
+{
+ typedef unsigned short foo_t;
+ char *volatile foo;
+ volatile int bar;
+ volatile foo_t blech;
+ foo = foo;
+}
+EOCP
+if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
+ d_volatile="$define"
+ echo "Yup, it does."
+else
+ d_volatile="$undef"
+ echo "Nope, it doesn't."
+fi
+$rm -f try.*
+
: see if there is a wait4
set wait4 d_wait4
eval $inlibc
exit(0);
}
EOCP
- if $cc -S -DTRY=$defvoidused try.c >.out 2>&1 ; then
+ if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
voidflags=$defvoidused
echo "It appears to support void."
if $contains warning .out >/dev/null 2>&1; then
fi
else
echo "Hmm, your compiler has some difficulty with void. Checking further..."
- if $cc -S -DTRY=1 try.c >/dev/null 2>&1 ; then
+ if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
echo "It supports 1..."
- if $cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then
+ if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
voidflags=3
echo "And it supports 2 but not 4."
else
echo "It doesn't support 2..."
- if $cc -S -DTRY=5 try.c >/dev/null 2>&1 ; then
+ if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
voidflags=5
echo "But it supports 4."
else
echo " "
if $test -r /usr/include/sys/dir.h ; then
i_sysdir="$define"
- echo "sysdir.h found."
+ echo "sys/dir.h found."
else
i_sysdir="$undef"
- echo "No sysdir.h found."
+ echo "No sys/dir.h found."
fi
: see if ioctl defs are in sgtty/termio or sys/ioctl
echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
fi
+: see if this is a sys/ndir.h system
+echo " "
+xxx=`loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
+if test -f $xxx; then
+ i_sysndir="$define"
+ echo "sys/ndir.h found."
+else
+ i_sysndir="$undef"
+ echo "No sys/ndir.h found."
+fi
+
+: see if we should include utime.h
+echo " "
+if $test -r /usr/include/utime.h ; then
+ i_utime="$define"
+ echo "utime.h found."
+else
+ i_utime="$undef"
+ echo "No utime.h found, but that's ok."
+fi
+
: see if this is a varargs system
echo " "
if $test -r /usr/include/varargs.h ; then
printf("%d\n", sizeof(int));
}
EOCP
- if $cc try.c -o try >/dev/null 2>&1 ; then
- dflt=`try`
+ if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
+ dflt=`./try`
else
dflt='4'
echo "(I can't seem to compile the test program. Guessing...)"
The $package package has some auxiliary files that should be put in a library
that is accessible by everyone. Where do you want to put these "private"
EOM
-$echo $n "but accessible files? [$dflt] $c"
+$echo $n "but accessible files? (~name ok) [$dflt] $c"
rp="Put private files where? [$dflt]"
. myread
-privlib="$ans"
+privlib=`./filexp "$ans"`
: check for size of random number generator
echo " "
printf("%d\n",i);
}
EOCP
- if $cc try.c -o try >/dev/null 2>&1 ; then
- dflt=`try`
+ if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
+ dflt=`./try`
else
dflt='?'
echo "(I can't seem to compile the test program...)"
: see what type of char stdio uses.
echo " "
-if $contains 'unsigned.*char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
+if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
echo "Your stdio uses unsigned chars."
stdchar="unsigned char"
else
*) mallocsrc=''; mallocobj='';;
esac
+: determine where public executables go
+case "$scriptdir" in
+'')
+ dflt="$bin"
+ : guess some guesses
+ test -d /usr/share/scripts && dflt=/usr/share/scripts
+ test -d /usr/share/bin && dflt=/usr/share/bin
+ ;;
+*) dflt="$scriptdir"
+ ;;
+esac
+cont=true
+$cat <<EOM
+
+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.
+
+EOM
+while $test "$cont" ; do
+ rp="Where do you keep publicly executable scripts? (~name ok) [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+ scriptdir="$ans"
+ scriptdir=`./filexp "$scriptdir"`
+ if test -d $scriptdir; then
+ cont=''
+ else
+ case "$fastread" in
+ yes) dflt=y;;
+ *) dflt=n;;
+ esac
+ rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+ dflt=''
+ case "$ans" in
+ y*) cont='';;
+ esac
+ fi
+done
+
+: determine compiler compiler
+case "$yacc" in
+'') dflt=yacc;;
+*) dflt="$yacc";;
+esac
+cont=true
+ echo " "
+rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
+$echo $n "$rp $c"
+. myread
+case "$ans" in
+'') ans="$dflt";;
+esac
+yacc="$ans"
+
echo " "
echo "End of configuration questions."
echo " "
d_bcmp='$d_bcmp'
d_bcopy='$d_bcopy'
d_bzero='$d_bzero'
+d_castneg='$d_castneg'
d_charsprf='$d_charsprf'
+d_chsize='$d_chsize'
d_crypt='$d_crypt'
cryptlib='$cryptlib'
d_csh='$d_csh'
d_getgrps='$d_getgrps'
d_gethent='$d_gethent'
d_getpgrp='$d_getpgrp'
+d_getpgrp2='$d_getpgrp2'
d_getprior='$d_getprior'
d_htonl='$d_htonl'
d_index='$d_index'
d_readdir='$d_readdir'
d_rename='$d_rename'
d_rmdir='$d_rmdir'
+d_select='$d_select'
d_setegid='$d_setegid'
d_seteuid='$d_seteuid'
d_setpgrp='$d_setpgrp'
+d_setpgrp2='$d_setpgrp2'
d_setprior='$d_setprior'
d_setregid='$d_setregid'
d_setresgid='$d_setresgid'
d_statblks='$d_statblks'
d_stdstdio='$d_stdstdio'
d_strctcpy='$d_strctcpy'
+d_strerror='$d_strerror'
d_symlink='$d_symlink'
d_syscall='$d_syscall'
-d_tminsys='$d_tminsys'
-i_systime='$i_systime'
-i_timetoo='$i_timetoo'
-i_systimetoo='$i_systimetoo'
+d_truncate='$d_truncate'
d_varargs='$d_varargs'
d_vfork='$d_vfork'
d_voidsig='$d_voidsig'
+d_volatile='$d_volatile'
d_vprintf='$d_vprintf'
d_charvspr='$d_charvspr'
d_wait4='$d_wait4'
d_pwexpire='$d_pwexpire'
i_sysdir='$i_sysdir'
i_sysioctl='$i_sysioctl'
+i_sysndir='$i_sysndir'
+i_time='$i_time'
+i_systime='$i_systime'
+d_systimekernel='$d_systimekernel'
+i_utime='$i_utime'
i_varargs='$i_varargs'
i_vfork='$i_vfork'
intsize='$intsize'
c='$c'
package='$package'
randbits='$randbits'
+scriptdir='$scriptdir'
sig_name='$sig_name'
spitshell='$spitshell'
shsharp='$shsharp'
uidtype='$uidtype'
voidflags='$voidflags'
defvoidused='$defvoidused'
-lib='$lib'
+yacc='$yacc'
privlib='$privlib'
+lib='$lib'
CONFIG=true
EOT
*) : in case they cannot read
eval $ans;;
esac
+: if this fails, just run all the .SH files by hand
. ./config.sh
echo " "