--- /dev/null
+
+
+
+
+ The "Artistic License"
+
+ Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
+
+Definitions:
+
+ "Package" refers to the collection of files distributed by the
+ Copyright Holder, and derivatives of that collection of files
+ created through textual modification.
+
+ "Standard Version" refers to such a Package if it has not been
+ modified, or has been modified in accordance with the wishes
+ of the Copyright Holder.
+
+ "Copyright Holder" is whoever is named in the copyright or
+ copyrights for the package.
+
+ "You" is you, if you're thinking about copying or distributing
+ this Package.
+
+ "Reasonable copying fee" is whatever you can justify on the
+ basis of media cost, duplication charges, time of people involved,
+ and so on. (You will not be required to justify it to the
+ Copyright Holder, but only to the computing community at large
+ as a market that must bear the fee.)
+
+ "Freely Available" means that no fee is charged for the item
+ itself, though there may be fees involved in handling the item.
+ It also means that recipients of the item may redistribute it
+ under the same conditions they received it.
+
+1. You may make and give away verbatim copies of the source form of the
+Standard Version of this Package without restriction, provided that you
+duplicate all of the original copyright notices and associated disclaimers.
+
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder. A Package
+modified in such a way shall still be considered the Standard Version.
+
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
+
+ a) place your modifications in the Public Domain or otherwise make them
+ Freely Available, such as by posting said modifications to Usenet or
+ an equivalent medium, or placing the modifications on a major archive
+ site such as uunet.uu.net, or by allowing the Copyright Holder to include
+ your modifications in the Standard Version of the Package.
+
+ b) use the modified Package only within your corporation or organization.
+
+ c) rename any non-standard executables so the names do not conflict
+ with standard executables, which must also be provided, and provide
+ a separate manual page for each non-standard executable that clearly
+ documents how it differs from the Standard Version.
+
+ d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
+
+ a) distribute a Standard Version of the executables and library files,
+ together with instructions (in the manual page or equivalent) on where
+ to get the Standard Version.
+
+ b) accompany the distribution with the machine-readable source of
+ the Package with your modifications.
+
+ c) accompany any non-standard executables with their corresponding
+ Standard Version executables, giving the non-standard executables
+ non-standard names, and clearly documenting the differences in manual
+ pages (or equivalent), together with instructions on where to get
+ the Standard Version.
+
+ d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+Package. You may charge any fee you choose for support of this Package.
+You may not charge a fee for this Package itself. However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whomever generated
+them, and may be sold commercially, and may be aggregated with this
+Package.
+
+7. C subroutines supplied by you and linked into this Package in order
+to emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. The name of the Copyright Holder may not be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ The End
# 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.)
#
-# $RCSfile: Configure,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:26:42 $
+# $RCSfile: Configure,v $$Revision: 4.0.1.2 $$Date: 91/06/07 10:09:34 $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
d_setruid=''
d_shm=''
d_shmat=''
+d_voidshmat=''
d_shmctl=''
d_shmdt=''
d_shmget=''
cppflags=''
ldflags=''
cc=''
+nativegcc=''
libs=''
n=''
c=''
package=''
randbits=''
scriptdir=''
+installscr=''
sig_name=''
spitshell=''
shsharp=''
d_ndir=ndir
voidwant=1
voidwant=7
-libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm malloc sun m bsd BSD x c_s posix"
-inclwanted='/usr/include /usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
+libswanted="c_s net_s net nsl_s nsl socket nm ndir ndbm dbm malloc sun m bsd BSD x posix ucb"
+inclwanted='/usr/include /usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan /usr/ucbinclude'
: Now test for existence of everything in MANIFEST
hint=default
if test -f ../config.sh; then
echo " "
- eval `grep lastuname ../config.sh`
- uname=`(uname -a || hostname) 2>&1`
- if test "X$uname" = "X$lastuname"; then
+ eval "`grep lastuname ../config.sh`"
+ tmp=`(uname -a) 2>&1`
+ if test "X$tmp" = "X$lastuname"; then
dflt=y
else
dflt=n
fi
- lastuname="$uname"
+ lastuname="$tmp"
rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
echo $n "$rp $c"
. myread
test -f /dynix && dflt="$dflt dynix"
test -f /dnix && dflt="$dflt dnix"
test -f /bin/mips && /bin/mips && dflt="$dflt mips"
+ test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next"
if test -f /bin/uname || test -f /usr/bin/uname; then
set `uname -a | tr '[A-Z]' '[a-z]'`
case "$dflt" in
'') dflt=none;;
esac
- echo '(You may give one or more space-separated answers, or "none" if appropriate.)'
+ echo '(You may give one or more space-separated answers, or "none" if appropriate.'
+ echo 'If your OS version has no hints, do not give a wrong version--say "none".)'
rp="Which of these apply, if any? [$dflt]"
echo $n "$rp $c"
. myread
for file in $ans; do
if test -f ../hints/$file.sh; then
. ../hints/$file.sh
+ cat ../hints/$file.sh >>../config.sh
hint=recommended
fi
done
cc="$ans"
fi
case "$cc" in
-gcc*) cpp=`./loc gcc-cpp $cpp $pth`;;
+gcc*) cpp=`./loc gcc-cpp $cpp $pth`
+ case "$nativegcc" in
+ '') case "$ccflags" in
+ *-fpcc-struct-return*) dflt=n;;
+ *) dflt=y;;
+ esac
+ ;;
+ undef) dflt=n;;
+ *) dflt=y;;
+ esac
+ echo " "
+ rp="Are your system (especially dbm) libraries compiled with gcc? [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+ case "$ans" in
+ n*) nativegcc="$undef"; gccflags='-fpcc-struct-return';;
+ *) nativegcc="$define"; gccflags='';;
+ esac
+ ;;
esac
: determine optimize, if desired, or use for debug flag also
case "$ccflags" in
'') case "$cc" in
- *gcc*) dflt='-fpcc-struct-return';;
+ *gcc*) dflt="$gccflags";;
*) dflt='';;
esac
;;
-*) dflt="$ccflags";;
+*-fpcc-struct-return*) dflt="$ccflags";;
+*) case "$cc" in
+ *gcc*) dflt="$ccflags $gccflags";;
+ *) dflt="$ccflags";;
+ esac
+ ;;
esac
for thisincl in $inclwanted; do
if test -d $thisincl; then
cppflags=''
for flag do
case $flag in
- -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
+ -D*|-U*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
esac
done
case "$cppflags" in
case "$installbin" in
'')
dflt=`echo $bin | sed 's#^/afs/#/afs/.#'`
+ test -d $dflt || dflt="$bin"
;;
*) dflt="$installbin"
;;
$cat >try.c <<'EOCP'
#include <signal.h>
+blech() { exit(3); }
+
main()
{
double f = -123;
unsigned short ashort;
int result = 0;
- signal(SIGFPE, SIG_IGN);
+ signal(SIGFPE, blech);
along = (unsigned long)f;
aint = (unsigned int)f;
ashort = (unsigned short)f;
#define XYZ xyz
ABC.XYZ
EOT
-echo 'Maybe "'"$cc"' -E" will work...'
-$cc -E <testcpp.c >testcpp.out 2>&1
-: try to force gcc preprocessor if that is the compiler they are using
-case $? in
-0) cppstdin="$cc -E";;
-*) case "$cc" in
- *gcc*)
- cd ..
- echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
- echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
- chmod 755 cppstdin
- cppstdin=`pwd`/cppstdin
- cppminus='';
- cd UU
- $cppstdin <testcpp.c >testcpp.out 2>&1
- ;;
- esac
- ;;
-esac
-if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+
+cd ..
+echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+chmod 755 cppstdin
+wrapper=`pwd`/cppstdin
+cd UU
+
+if test "X$cppstdin" != "X" && \
+ $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "You used to use $cppstdin $cppminus so we'll use that again."
+elif test "$cc" = gcc && \
+ (echo "Using gcc, eh? We'll try to force gcc -E using a wrapper..."; \
+ $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1) ; then
+ echo "Yup, we can."
+ cppstdin="$wrapper"
+ cppminus='';
+elif echo 'Maybe "'"$cc"' -E" will work...'; \
+ $cc -E <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yup, it does."
+ cppstdin="$cc -E"
+ cppminus='';
+elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
+ $cc -E - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
echo "Yup, it does."
cppstdin="$cc -E"
+ cppminus='-';
+elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
+ $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ cppstdin="$wrapper"
+ cppminus=''
+ echo "Eureka!."
+elif echo 'No such luck, maybe "'$cpp'" will work...'; \
+ $cpp <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "It works!"
+ cppstdin="$cpp"
+ cppminus='';
+elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
+ $cpp - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Hooray, it works! I was beginning to wonder."
+ cppstdin="$cpp"
+ cppminus='-';
+elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
+ $cc -P <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yipee, that works!"
+ cppstdin="$cc -P"
cppminus='';
+elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
+ $cc -P - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "At long last!"
+ cppstdin="$cc -P"
+ cppminus='-';
else
- echo 'Nope...maybe "'"$cc"' -E -" will work...'
- $cc -E - <testcpp.c >testcpp.out 2>&1
+ dflt=blurfl
+ $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
+ rp='Name a C preprocessor:'
+ . myread
+ cppstdin="$ans"
+ $cppstdin <testcpp.c >testcpp.out 2>&1
if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- cppstdin="$cc -E"
- cppminus='-';
+ echo "OK, that will do."
else
- echo 'No such luck, maybe "'$cpp'" will work...'
- $cpp <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "It works!"
- cppstdin="$cpp"
- cppminus='';
- else
- echo 'Nixed again...maybe "'$cpp' -" will work...'
- $cpp - <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Hooray, it works! I was beginning to wonder."
- cppstdin="$cpp"
- cppminus='-';
- else
- echo 'Nope...maybe "'"$cc"' -P" will work...'
- $cc -P <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, that does."
- cppstdin="$cc -P"
- cppminus='';
- else
- echo 'Nope...maybe "'"$cc"' -P -" will work...'
- $cc -P - <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, that does."
- cppstdin="$cc -P"
- cppminus='-';
- else
- echo 'Hmm...perhaps you already told me...'
- case "$cppstdin" in
- '') ;;
- *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
- esac
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Hooray, you did! I was beginning to wonder."
- else
- echo 'Uh-uh. Time to get fancy...'
- cd ..
- echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
- echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
- chmod 755 cppstdin
- cppstdin=`pwd`/cppstdin
- cppminus='';
- cd UU
- $cppstdin <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Eureka!."
- else
- dflt=blurfl
- $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
- rp='Name a C preprocessor:'
- . myread
- cppstdin="$ans"
- $cppstdin <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "OK, that will do."
- else
- echo "Sorry, I can't get that to work. Go find one."
- exit 1
- fi
- fi
- fi
- fi
- fi
- fi
- fi
+ echo "Sorry, I can't get that to work. Go find one and rerun Configure."
+ exit 1
fi
fi
test -f $1 || set /lib/libsys_s.a
eval set \$$#
if test -f "$1"; then
- echo "Your shared C library is in $1."
+ echo "Your (shared) C library seems to be in $1."
libc="$1"
elif test -f "$libc"; then
- echo "Your C library is in $libc."
+ echo "Your C library seems to be in $libc."
elif test -f /lib/libc.a; then
- echo "Your C library is in /lib/libc.a. You're normal."
+ echo "Your C library seems to be in /lib/libc.a. You're normal."
libc=/lib/libc.a
else
if ans=`./loc libc.a blurfl/dyick $libpth`; test -f "$ans"; then
:
fi
if test -f "$ans"; then
- echo "Your C library is in $ans, of all places."
+ echo "Your C library seems to be in $ans, of all places."
libc=$ans
else
cat <<EOM
if test $libc = "/lib/libc"; then
libc="$libc /lib/clib"
fi
-set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
-$echo $n "Extracting names from $* for later perusal...$c"
+cat <<END
+
+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.
+END
+dflt="$libc";
+rp="Your C library is where? [$dflt]"
+$echo $n "$rp $c"
+. myread
+libc="$ans"
+echo " "
+echo $libc $libnames | tr ' ' '\012' | sort | uniq >libnames
+$echo "Extracting names from the following files for later perusal:"
+sed 's/^/ /' libnames
+echo $n "This may take a while...$c"
+set X `cat libnames`
+shift
nm $nm_opts $* 2>/dev/null >libc.tmp
$sed -n -e 's/^.* [ATDS] *[_.]*//p' -e 's/^.* [ATDS] //p' <libc.tmp >libc.list
if $contains '^printf$' libc.list >/dev/null 2>&1; then
<libc.tmp >libc.list; \
$contains '^printf$' libc.list >/dev/null 2>&1; then
echo done
-elif $grep '|' <libc.tmp | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
+elif $grep '|' <libc.tmp | $sed -n -e '/|COMMON/d' -e '/|DATA/d' -e '/ file/d' \
-e 's/^\([^ ]*\).*/\1/p' >libc.list
$contains '^printf$' libc.list >/dev/null 2>&1; then
echo done
fi
fi
fi
-
-: old version
-
-inlibc='echo " ";
-if $contains "^$1\$" libc.list >/dev/null 2>&1;
-then echo "$1() found"; eval "$2=$define";
-else echo "$1() not found"; eval "$2=$undef"; fi'
-
-: new version
+if test -f /lib/syscalls.exp; then
+ echo "Also extracting names from /lib/syscalls.exp for good ole AIX..."
+ sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
+fi
inlibc='echo " "; td=$define; tu=$undef;
if $contains "^$1\$" libc.list >/dev/null 2>&1;
set shmat d_shmat
eval $inlibc
+d_voidshmat="$undef"
+case "$d_shmat" in
+define)
+ $cppstdin $cppflags $cppminus < $usrinclude/sys/shm.h >voidshmat.txt 2>/dev/null
+ if $contains "void.*shmat" voidshmat.txt >/dev/null 2>&1; then
+ echo "and shmat returns (void*)"
+ d_voidshmat="$define"
+ else
+ echo "and shmat returns (char*)"
+ fi
+ ;;
+esac
+
: see if shmdt exists
set shmdt d_shmdt
eval $inlibc
: see if signal is declared as pointer to function returning int or void
echo " "
$cppstdin $cppflags $cppminus < $usrinclude/signal.h >d_voidsig.txt
-if $contains 'int.*signal' d_voidsig.txt >/dev/null 2>&1 ; then
+if $contains 'int[^A-Za-z]*signal' d_voidsig.txt >/dev/null 2>&1 ; then
echo "You have int (*signal())() instead of void."
val="$undef"
- d_tosignal=int
else
echo "You have void (*signal())() instead of int."
val="$define"
- d_tosignal=void
fi
set d_voidsig
eval $setvar
+case $voidsig in
+define) d_tosignal=void;;
+*) d_tosignal=int;;
+esac
: see if truncate exists
set truncate d_truncate
. myread
gidtype="$ans"
+: see what type gids are returned by getgroups
+echo " "
+case "$groupstype" in
+'')
+ if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
+ dflt='short'
+ elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
+ dflt='int'
+ elif $contains 'getgroups.*short' /usr/include/libc.h >/dev/null 2>&1; then
+ dflt='short'
+ elif $contains 'getgroups.*int' /usr/include/libc.h >/dev/null 2>&1; then
+ dflt='int'
+ elif $contains 'getgroups.*short' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
+ dflt='short'
+ elif $contains 'getgroups.*int' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
+ dflt='int'
+ elif $contains 'int.*gidset' /usr/man/man2/getgroups.2 >/dev/null 2>&1; then
+ dflt='int'
+ elif $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
+ dflt='gid_t'
+ else
+ set `grep 'groups\[NGROUPS\];' $usrinclude/sys/user.h 2>/dev/null` unsigned short
+ case $1 in
+ unsigned) dflt="$1 $2" ;;
+ *) dflt="$1" ;;
+ esac
+ fi
+ ;;
+*) dflt="$groupstype"
+ ;;
+esac
+cont=true
+echo "(The following only matters if you have getgroups().)"
+rp="What type are the group ids returned by getgroups()? [$dflt]"
+$echo $n "$rp $c"
+. myread
+groupstype="$ans"
+
: check for length of integer
echo " "
case "$intsize" in
case "$mallocptrtype" in
'')
cat >usemymalloc.c <<'END'
+#ifdef __STDC__
+#include <stdlib.h>
+#else
#include <malloc.h>
+#endif
void *malloc();
END
if $cc $ccflags -c usemymalloc.c >/dev/null 2>&1; then
case "$installprivlib" in
'')
dflt=`echo $privlib | sed 's#^/afs/#/afs/.#'`
+ test -d $dflt || dflt="$privlib"
;;
*) dflt="$installprivlib"
;;
. myread
randbits="$ans"
-: determine where public executables go
+: determine where publicly executable scripts go
case "$scriptdir" in
'')
dflt="$bin"
EOM
while $test "$cont" ; do
- rp="Where do you keep publicly executable scripts (~name ok)? [$dflt]"
+ rp="Where will publicly executable scripts reside (~name ok)? [$dflt]"
$echo $n "$rp $c"
. myread
scriptdir="$ans"
fi
done
+case "$installscr" in
+'')
+ dflt=`echo $scriptdir | sed 's#^/afs/#/afs/.#'`
+ test -d $dflt || dflt="$scriptdir"
+ ;;
+*) dflt="$scriptdir"
+ ;;
+esac
+cont=true
+$cat <<EOM
+
+Some installations must install scripts in a different directory than where
+they will eventually reside. On most systems they're the same directory.
+EOM
+while $test "$cont" ; do
+ rp="Where do you install publicly executable scripts (~name ok)? [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+ installscr="$ans"
+ installscr=`./filexp "$installscr"`
+ if test -d $installscr; then
+ cont=''
+ else
+ case "$fastread" in
+ yes) dflt=y;;
+ *) dflt=n;;
+ esac
+ rp="Directory $installscr doesn't exist. Use that name anyway? [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+ dflt=''
+ case "$ans" in
+ y*) cont='';;
+ esac
+ fi
+done
+
: generate list of signal names
echo " "
case "$sig_name" in
: see what type of char stdio uses.
echo " "
-if $contains 'unsigned.*char.*_ptr;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
+if $contains 'unsigned.*char.*\*.*_ptr.*;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
echo "Your stdio uses unsigned chars."
stdchar="unsigned char"
else
exit(0);
}
EOCP
- if $cc -S -DTRY=$voidwant void.c >void.out 2>&1 ; then
+ if $cc -c -DTRY=$voidwant void.c >void.out 2>&1 ; then
voidhave=$voidwant
echo "It appears to support void to the level $package wants ($voidwant)."
if $contains warning void.out >/dev/null 2>&1; then
fi
else
echo "Hmm, your compiler has some difficulty with void. Checking further..."
- if $cc -S -DTRY=1 void.c >/dev/null 2>&1 ; then
+ if $cc -c -DTRY=1 void.c >/dev/null 2>&1 ; then
echo "It supports 1..."
- if $cc -S -DTRY=3 void.c >/dev/null 2>&1 ; then
+ if $cc -c -DTRY=3 void.c >/dev/null 2>&1 ; then
voidhave=3
echo "And it supports 2 but not 4."
else
echo "It doesn't support 2..."
- if $cc -S -DTRY=5 void.c >/dev/null 2>&1 ; then
+ if $cc -c -DTRY=5 void.c >/dev/null 2>&1 ; then
voidhave=5
echo "But it supports 4."
else
esac
yacc="$ans"
-: see what type gids are returned by getgroups
-echo " "
-case "$groupstype" in
-'')
- if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
- dflt='short'
- elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
- dflt='int'
- elif $contains 'getgroups.*short' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
- dflt='short'
- elif $contains 'getgroups.*int' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
- dflt='int'
- elif $contains 'int gidset' /usr/man/man2/getgroups.2 >/dev/null 2>&1 ; then
- dflt='int'
- elif $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
- dflt='gid_t'
- else
- set `grep 'groups\[NGROUPS\];' $usrinclude/sys/user.h 2>/dev/null` unsigned short
- case $1 in
- unsigned) dflt="$1 $2" ;;
- *) dflt="$1" ;;
- esac
- fi
- ;;
-*) dflt="$groupstype"
- ;;
-esac
-cont=true
-echo "(The following only matters if you have getgroups().)"
-rp="What type are the group ids returned by getgroups()? [$dflt]"
-$echo $n "$rp $c"
-. myread
-groupstype="$ans"
-
: see if we can include fcntl.h
echo " "
if $h_fcntl; then
cd ..
fi
echo "Creating config.sh..."
+test -f config.sh && cp config.sh UU/oldconfig.sh
$spitshell <<EOT >config.sh
$startsh
# config.sh
# This file was produced by running the Configure script.
-
d_eunice='$d_eunice'
define='$define'
eunicefix='$eunicefix'
d_setruid='$d_setruid'
d_shm='$d_shm'
d_shmat='$d_shmat'
+d_voidshmat='$d_voidshmat'
d_shmctl='$d_shmctl'
d_shmdt='$d_shmdt'
d_shmget='$d_shmget'
cppflags='$cppflags'
ldflags='$ldflags'
cc='$cc'
+nativegcc='$nativegcc'
libs='$libs'
n='$n'
c='$c'
package='$package'
randbits='$randbits'
scriptdir='$scriptdir'
+installscr='$installscr'
sig_name='$sig_name'
spitshell='$spitshell'
shsharp='$shsharp'
lib='$lib'
privlib='$privlib'
installprivlib='$installprivlib'
-CONFIG=true
EOT
+test -f patchlevel.h && awk '{printf "%s=%s\n",$2,$3}' patchlevel.h >>config.sh
+echo "CONFIG=true" >>config.sh
+
+if test -f UU/oldconfig.sh; then
+ sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
+ sort | uniq -u >UU/oldsyms
+ set X `cat UU/oldsyms`
+ shift
+ case $# in
+ 0) ;;
+ *) echo "Hmm...You had some extra variables I don't know about...I'll try to keep 'em..."
+ for sym in `cat UU/oldsyms`; do
+ echo " Propagating $hint variable "'$'"$sym..."
+ eval 'tmp="$'"${sym}"'"'
+ echo "$tmp" | \
+ sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
+ done
+ ;;
+ esac
+fi
+
: Finish up
CONFIG=true
echo " "
-test -f patchlevel.h && awk '{printf "%s=%s\n",$2,$3}' patchlevel.h >>config.sh
dflt=''
fastread=''
echo "If you didn't make any mistakes, then just type a carriage return here."
*) : in case they cannot read
eval $ans;;
esac
-: if this fails, just run all the .SH files by hand
-. ./config.sh
-
-echo " "
-echo "Doing variable substitutions on .SH files..."
-set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
-shift
-case $# in
-0) set x *.SH; shift;;
-esac
-if test ! -f $1; then
- shift
-fi
-for file in $*; do
- set X
- shift
- chmod +x $file
- 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
+chmod +x doSH
+./doSH
if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
dflt=n
fi
$rm -f kit*isdone
-cd .. && $rm -rf UU
+$rm -rf UU
: end of Configure
echo "Extracting Makefile (with variable substitutions)"
cat >Makefile <<!GROK!THIS!
-# $RCSfile: Makefile.SH,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:30:39 $
+# $RCSfile: Makefile.SH,v $$Revision: 4.0.1.2 $$Date: 91/06/07 10:14:43 $
#
# $Log: Makefile.SH,v $
+# Revision 4.0.1.2 91/06/07 10:14:43 lwall
+# patch4: cflags now emits entire cc command except for the filename
+# patch4: alternate make programs are now semi-supported
+# patch4: uperl.o no longer tries to link in libraries prematurely
+# patch4: installperl now installs x2p stuff too
+#
# Revision 4.0.1.1 91/04/11 17:30:39 lwall
# patch1: C flags are now settable on a per-file basis
#
public = perl taintperl $suidperl
+# To use an alternate make, set $altmake in config.sh.
+MAKE = ${altmake-make}
+
!GROK!THIS!
cat >>Makefile <<'!NO!SUBS!'
-CFLAGS = `sh cflags.SH $@`
+CCCMD = `sh cflags $@`
private =
scripts = h2ph
-MAKE = make
-
manpages = perl.man h2ph.man
util =
SHELL = /bin/sh
.c.o:
- $(CC) -c $(CFLAGS) $*.c
+ $(CCCMD) $*.c
all: $(public) $(private) $(util) uperl.o $(scripts)
cd x2p; $(MAKE) all
$(CC) $(LARGE) $(CLDFLAGS) $(obj) perly.o usersub.o $(libs) -o perl
uperl.o: $& perly.o $(obj)
- -ld $(LARGE) $(LDFLAGS) -r $(obj) perly.o $(libs) -o uperl.o
+ -ld $(LARGE) $(LDFLAGS) -r $(obj) perly.o -o uperl.o
saber: perly.c
# load $(c) perly.c
tperly.o: perly.c perly.h $(h)
/bin/rm -f tperly.c
$(SLN) perly.c tperly.c
- $(CC) -c -DTAINT $(CFLAGS) tperly.c
+ $(CCCMD) -DTAINT tperly.c
/bin/rm -f tperly.c
tperl.o: perl.c perly.h patchlevel.h perl.h $(h)
/bin/rm -f tperl.c
$(SLN) perl.c tperl.c
- $(CC) -c -DTAINT $(CFLAGS) tperl.c
+ $(CCCMD) -DTAINT tperl.c
/bin/rm -f tperl.c
sperl.o: perl.c perly.h patchlevel.h $(h)
/bin/rm -f sperl.c
$(SLN) perl.c sperl.c
- $(CC) -c -DTAINT -DIAMSUID $(CFLAGS) sperl.c
+ $(CCCMD) -DTAINT -DIAMSUID sperl.c
/bin/rm -f sperl.c
tarray.o: array.c $(h)
/bin/rm -f tarray.c
$(SLN) array.c tarray.c
- $(CC) -c -DTAINT $(CFLAGS) tarray.c
+ $(CCCMD) -DTAINT tarray.c
/bin/rm -f tarray.c
tcmd.o: cmd.c $(h)
/bin/rm -f tcmd.c
$(SLN) cmd.c tcmd.c
- $(CC) -c -DTAINT $(CFLAGS) tcmd.c
+ $(CCCMD) -DTAINT tcmd.c
/bin/rm -f tcmd.c
tcons.o: cons.c $(h) perly.h
/bin/rm -f tcons.c
$(SLN) cons.c tcons.c
- $(CC) -c -DTAINT $(CFLAGS) tcons.c
+ $(CCCMD) -DTAINT tcons.c
/bin/rm -f tcons.c
tconsarg.o: consarg.c $(h)
/bin/rm -f tconsarg.c
$(SLN) consarg.c tconsarg.c
- $(CC) -c -DTAINT $(CFLAGS) tconsarg.c
+ $(CCCMD) -DTAINT tconsarg.c
/bin/rm -f tconsarg.c
tdoarg.o: doarg.c $(h)
/bin/rm -f tdoarg.c
$(SLN) doarg.c tdoarg.c
- $(CC) -c -DTAINT $(CFLAGS) tdoarg.c
+ $(CCCMD) -DTAINT tdoarg.c
/bin/rm -f tdoarg.c
tdoio.o: doio.c $(h)
/bin/rm -f tdoio.c
$(SLN) doio.c tdoio.c
- $(CC) -c -DTAINT $(CFLAGS) tdoio.c
+ $(CCCMD) -DTAINT tdoio.c
/bin/rm -f tdoio.c
tdolist.o: dolist.c $(h)
/bin/rm -f tdolist.c
$(SLN) dolist.c tdolist.c
- $(CC) -c -DTAINT $(CFLAGS) tdolist.c
+ $(CCCMD) -DTAINT tdolist.c
/bin/rm -f tdolist.c
tdump.o: dump.c $(h)
/bin/rm -f tdump.c
$(SLN) dump.c tdump.c
- $(CC) -c -DTAINT $(CFLAGS) tdump.c
+ $(CCCMD) -DTAINT tdump.c
/bin/rm -f tdump.c
teval.o: eval.c $(h)
/bin/rm -f teval.c
$(SLN) eval.c teval.c
- $(CC) -c -DTAINT $(CFLAGS) teval.c
+ $(CCCMD) -DTAINT teval.c
/bin/rm -f teval.c
tform.o: form.c $(h)
/bin/rm -f tform.c
$(SLN) form.c tform.c
- $(CC) -c -DTAINT $(CFLAGS) tform.c
+ $(CCCMD) -DTAINT tform.c
/bin/rm -f tform.c
thash.o: hash.c $(h)
/bin/rm -f thash.c
$(SLN) hash.c thash.c
- $(CC) -c -DTAINT $(CFLAGS) thash.c
+ $(CCCMD) -DTAINT thash.c
/bin/rm -f thash.c
tregcomp.o: regcomp.c $(h)
/bin/rm -f tregcomp.c
$(SLN) regcomp.c tregcomp.c
- $(CC) -c -DTAINT $(CFLAGS) tregcomp.c
+ $(CCCMD) -DTAINT tregcomp.c
/bin/rm -f tregcomp.c
tregexec.o: regexec.c $(h)
/bin/rm -f tregexec.c
$(SLN) regexec.c tregexec.c
- $(CC) -c -DTAINT $(CFLAGS) tregexec.c
+ $(CCCMD) -DTAINT tregexec.c
/bin/rm -f tregexec.c
tstab.o: stab.c $(h)
/bin/rm -f tstab.c
$(SLN) stab.c tstab.c
- $(CC) -c -DTAINT $(CFLAGS) tstab.c
+ $(CCCMD) -DTAINT tstab.c
/bin/rm -f tstab.c
tstr.o: str.c $(h) perly.h
/bin/rm -f tstr.c
$(SLN) str.c tstr.c
- $(CC) -c -DTAINT $(CFLAGS) tstr.c
+ $(CCCMD) -DTAINT tstr.c
/bin/rm -f tstr.c
ttoke.o: toke.c $(h) perly.h
/bin/rm -f ttoke.c
$(SLN) toke.c ttoke.c
- $(CC) -c -DTAINT $(CFLAGS) ttoke.c
+ $(CCCMD) -DTAINT ttoke.c
/bin/rm -f ttoke.c
tutil.o: util.c $(h)
/bin/rm -f tutil.c
$(SLN) util.c tutil.c
- $(CC) -c -DTAINT $(CFLAGS) tutil.c
+ $(CCCMD) -DTAINT tutil.c
/bin/rm -f tutil.c
perly.h: perly.c
@ echo Dummy dependency for dumb parallel make
touch perly.h
-perly.c: perly.y
+perly.c: perly.y perly.fixer
@ echo 'Expect either' 29 shift/reduce and 59 reduce/reduce conflicts...
@ echo ' or' 27 shift/reduce and 61 reduce/reduce conflicts...
$(YACC) -d perly.y
- sh perly.fixer y.tab.c perly.c
+ sh ./perly.fixer y.tab.c perly.c
mv y.tab.h perly.h
echo 'extern YYSTYPE yylval;' >>perly.h
perly.o: perly.c perly.h $(h)
- $(CC) -c $(CFLAGS) perly.c
+ $(CCCMD) perly.c
install: all
./perl installperl
- cd x2p; $(MAKE) install
clean:
rm -f *.o all perl taintperl suidperl
cd x2p; $(MAKE) realclean
rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man
rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir
- rm -f x2p/Makefile
+ rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags
# The following lint has practically everything turned on. Unfortunately,
# you have to wade through a lot of mumbo jumbo that can't be suppressed.