README.SQL
README.SSL
UPGRADING
-config_h.SH
confmagic.h
options.h.dist
hdrs/access.h
win32/pennmush.dsp
win32/pennmush.dsw
Configure Portability tool
+config_h.SH Produces config.h
#
$make_set_make
CC=$cc
-CCFLAGS=$optimize -I.. -I../hdrs $ccflags $warnings -Wall -Wno-comment -Wno-parentheses -Wno-switch -Wno-unused-but-set-variable -Werror
+CCFLAGS=$optimize -I.. -I../hdrs $ccflags $warnings -Wall -Wno-comment -Wno-parentheses -Wno-switch -Wno-unused-but-set-variable -Wno-shadow -Werror
LDFLAGS=$ldflags
-CLIBS=$libs $cryptlib $libssl $libcrypto $libmysqlclient
+CLIBS=$libs $cryptlib $libssl $libcrypto $libmysqlclient -lm
INSTALL=$install
INSTALLDIR=$installdir
CP=$cp
+++ /dev/null
-?RCS: $Id: Chk_MANI.U,v 3.0.1.2 1997/02/28 14:57:25 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Chk_MANI.U,v $
-?RCS: Revision 3.0.1.2 1997/02/28 14:57:25 ram
-?RCS: patch61: added support for src.U
-?RCS:
-?RCS: Revision 3.0.1.1 1994/10/31 09:33:14 ram
-?RCS: patch44: now lists Begin instead of Myinit in its dependencies
-?RCS: patch44: leading comment now explains how this unit is included
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:04:45 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit checks the package by making sure every file listed in MANIFEST
-?X: is present. It is systematically "included" via the Finish unit (which
-?X: is always present in every Configure script), although it may result in
-?X: an empty inclusion when no MANIFEST is present.
-?X:
-?MAKE:Chk_MANI: Begin c n rsrc
-?MAKE: -pick wipe $@ %<
-?T:filelist ans tmppwd
-?X: This check happens at metaconfig-time, so it's ok to hard-code the path.
-@if {test -f ../MANIFEST}
-: Now test for existence of everything in MANIFEST
-echo " "
-if test -f $rsrc/MANIFEST; then
- echo "First let's make sure your kit is complete. Checking..." >&4
-?X:
-?X: Files spelled uppercased and beginning with PACK are produced by the
-?X: shell archive builder and may be removed by the user. Usually, they are
-?X: not listed in the MANIFEST file, but you never know...
-?X:
- awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -l 50
- rm -f missing
- tmppwd=`pwd`
- for filelist in x??; do
- (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
- done
- if test -s missing; then
- cat missing >&4
- cat >&4 <<'EOM'
-
-THIS PACKAGE SEEMS TO BE INCOMPLETE.
-
-You have the option of continuing the configuration process, despite the
-distinct possibility that your kit is damaged, by typing 'y'es. If you
-do, don't blame me if something goes wrong. I advise you to type 'n'o
-and contact the author (<MAINTLOC>).
-
-EOM
-?X: Can't use $echo at this early stage
- echo $n "Continue? [n] $c" >&4
- read ans
- case "$ans" in
- y*)
- echo "Continuing..." >&4
- rm -f missing
- ;;
- *)
-?X:
-?X: Use kill and not exit, so that the trap gets executed to clean up
-?X:
- echo "ABORTING..." >&4
- kill $$
- ;;
- esac
- else
- echo "Looks good..."
- fi
-else
- echo "There is no MANIFEST file. I hope your kit is complete !"
-fi
-rm -f missing x??
-
-@end
+++ /dev/null
-?RCS: $Id: End.U 1.2 Tue, 30 Sep 2003 18:01:23 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: End.U,v $
-?RCS: Revision 3.0 1993/08/18 12:04:51 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit serves as the goal which forces make to choose all the units that
-?X: ask questions. The $W on the ?MAKE: line is the list of all symbols wanted.
-?X: To force any unit to be included, copy this unit to your private U directory
-?X: and add the name of the unit desired to the ?MAKE: dependency line.
-?X:
-?MAKE:End: $W d_tcl MailList
-?MAKE: -pick add $@ %<
-?LINT:use $W d_tcl MailList
-: end of configuration questions
-echo " "
-echo "End of configuration questions."
-echo " "
-
+++ /dev/null
-?RCS: $Id: Findhdr.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Thomas Neumann <tom@smart.bo.open.de>
-?RCS:
-?RCS: $Log: Findhdr.U,v $
-?RCS: Revision 1.2 1997/11/25 18:41:56 popiel
-?RCS: From dist
-?RCS:
-?RCS: Revision 3.0.1.2 1994/10/29 15:53:08 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS:
-?RCS: Revision 3.0.1.1 1994/05/06 14:03:56 ram
-?RCS: patch23: cppminus must be after other cppflags, not before
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:04:54 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit produces a findhdr script which is used to locate the header
-?X: files in $usrinc or other stranger places using cpp capabilities. The
-?X: script is given an include file base name, like 'stdio.h' or 'sys/file.h'
-?X: and it returns the full path of the include file and a zero status or an
-?X: empty string with an error status if the file could not be located.
-?X:
-?MAKE:Findhdr: grep test tr rm +usrinc awk cat startsh \
- cppstdin cppminus +cppflags
-?MAKE: -pick add $@ %<
-?LINT:define fieldn
-?S:fieldn:
-?S: This variable is used internally by Configure. It contains the position
-?S: of the included file name in cpp output. That is to say, when cpp
-?S: pre-processes a #include <file> line, it replaces it by a # line which
-?S: contains the original position in the input file and the full name of
-?S: included file, between "quotes".
-?S:.
-?V:fieldn
-?F:./findhdr !fieldn
-?T:cline pos wanted name awkprg
-: determine filename position in cpp output
-echo " "
-echo "Computing filename position in cpp output for #include directives..." >&4
-echo '#include <stdio.h>' > foo.c
-$cat >fieldn <<EOF
-$startsh
-$cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
-$grep '^[ ]*#.*stdio\.h' | \
-while read cline; do
- pos=1
-?X: We have to go through this nightmare of sed and eval because some
-?X: folks like putting spaces in their directory names, which then get
-?X: echoed into the paths to standard headers. Thanks, Microsoft!
-?X:
-?X: What we're doing here is escaping every single shell meta-character
-?X: except for quotation marks, then evaluating that as an argument list.
- qline=\`echo "\$cline" | $sed -e 's/\\([][{}#$<>;&()|^*?\\\\]\\)/\\\\\\\\\\1/g'\`
- eval set \$qline
- while $test "x\$1" \!= x; do
- if $test -r "\$1"; then
- echo "\$pos"
- exit 0
- fi
- shift
- pos=\`expr \$pos + 1\`
- done
-done
-EOF
-chmod +x fieldn
-fieldn=`./fieldn`
-$rm -f foo.c fieldn
-case $fieldn in
-'') pos='???';;
-1) pos=first;;
-2) pos=second;;
-3) pos=third;;
-*) pos="${fieldn}th";;
-esac
-echo "Your cpp writes the filename in the $pos field of the line."
-
-?X: To locate a header file, we cannot simply check for $usrinc/file.h, since
-?X: some machine have the headers in weird places and our only hope is that
-?X: the C pre-processor will know how to find those headers. Thank you NexT!
-: locate header file
-$cat >findhdr <<EOF
-$startsh
-wanted=\$1
-name=''
-if test -f $usrinc/\$wanted; then
- echo "$usrinc/\$wanted"
- exit 0
-fi
-echo "#include <\$wanted>" > foo\$\$.c
-$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
-$grep "^[ ]*#.*\$wanted" | \
-while read cline; do
- pos=1
- qline=\`echo "\$cline" | $sed -e 's/\\([][{}#$<>;&()|^'"'"'*?\\\\]\\)/\\\\\\\\\\1/g'\`
- eval set \$qline
- while $test $fieldn -gt \$pos; do
- shift
- pos=\`expr \$pos + 1\`
- done
- name=\$1
- case "\$name" in
- */\$wanted) echo "\$name"; exit 0;;
-?X: Of course, Microsoft likes backslashes, too. @whee.
- *\\\\\$wanted) echo "\$name"; exit 0;;
- *) name='';;
- esac;
-done;
-$rm -f foo\$\$.c;
-case "\$name" in
-'') exit 1;;
-esac
-EOF
-chmod +x findhdr
-
+++ /dev/null
-?RCS: $Id: Guess.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Guess.U,v $
-?RCS: Revision 3.0.1.4 1994/10/29 15:53:55 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS: patch36: call ./xenix explicitely instead of relying on PATH
-?RCS:
-?RCS: Revision 3.0.1.3 1993/12/15 08:14:35 ram
-?RCS: patch15: variable d_bsd was not always set properly
-?RCS:
-?RCS: Revision 3.0.1.2 1993/08/30 08:57:14 ram
-?RCS: patch8: fixed comment which wrongly attributed the usrinc symbol
-?RCS: patch8: no more ugly messages when no /usr/include/ctype.h
-?RCS:
-?RCS: Revision 3.0.1.1 1993/08/27 14:37:37 ram
-?RCS: patch7: added support for OSF/1 machines
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:04:57 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit hazards some guesses as to what the general nature of the system
-?X: is. The information it collects here is used primarily to establish default
-?X: answers to other questions.
-?X:
-?MAKE:Guess d_eunice d_xenix d_bsd: cat test echo n c contains rm Loc eunicefix
-?MAKE: -pick add $@ %<
-?S:d_eunice:
-?S: This variable conditionally defines the symbols EUNICE and VAX, which
-?S: alerts the C program that it must deal with ideosyncracies of VMS.
-?S:.
-?S:d_xenix:
-?S: This variable conditionally defines the symbol XENIX, which alerts
-?S: the C program that it runs under Xenix.
-?S:.
-?S:d_bsd:
-?S: This symbol conditionally defines the symbol BSD when running on a
-?S: BSD system.
-?S:.
-?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix
-?T:xxx
-: make some quick guesses about what we are up against
-echo " "
-$echo $n "Hmm... $c"
-echo exit 1 >bsd
-echo exit 1 >usg
-echo exit 1 >v7
-echo exit 1 >osf1
-echo exit 1 >eunice
-echo exit 1 >xenix
-echo exit 1 >venix
-d_bsd="$undef"
-?X:
-?X: Do not use 'usrinc', or we get a circular dependency. because
-?X: usrinc is defined in usrinc.U, which relies on us...
-?X:
-$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
-if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
-then
- echo "Looks kind of like an OSF/1 system, but we'll see..."
- echo exit 0 >osf1
-elif test `echo abc | tr a-z A-Z` = Abc ; then
- xxx=`./loc addbib blurfl $pth`
- if $test -f $xxx; then
- echo "Looks kind of like a USG system with BSD features, but we'll see..."
- echo exit 0 >bsd
- echo exit 0 >usg
- else
- if $contains SIGTSTP foo >/dev/null 2>&1 ; then
- echo "Looks kind of like an extended USG system, but we'll see..."
- else
- echo "Looks kind of like a USG system, but we'll see..."
- fi
- echo exit 0 >usg
- fi
-elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
- echo "Looks kind of like a BSD system, but we'll see..."
- d_bsd="$define"
- echo exit 0 >bsd
-else
- echo "Looks kind of like a Version 7 system, but we'll see..."
- echo exit 0 >v7
-fi
-case "$eunicefix" in
-*unixtovms*)
- $cat <<'EOI'
-There is, however, a strange, musty smell in the air that reminds me of
-something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
-EOI
- echo exit 0 >eunice
- d_eunice="$define"
-: it so happens the Eunice I know will not run shell scripts in Unix format
- ;;
-*)
- echo " "
- echo "Congratulations. You aren't running Eunice."
- d_eunice="$undef"
- ;;
-esac
-if test -f /xenix; then
- echo "Actually, this looks more like a XENIX system..."
- echo exit 0 >xenix
- d_xenix="$define"
-else
- echo " "
- echo "It's not Xenix..."
- d_xenix="$undef"
-fi
-chmod +x xenix
-$eunicefix xenix
-if test -f /venix; then
- echo "Actually, this looks more like a VENIX system..."
- echo exit 0 >venix
-else
- echo " "
- if ./xenix; then
- : null
- else
- echo "Nor is it Venix..."
- fi
-fi
-chmod +x bsd usg v7 osf1 eunice xenix venix
-$eunicefix bsd usg v7 osf1 eunice xenix venix
-$rm -f foo
-
+++ /dev/null
-?RCS: $Id: Head.U 1.3 Mon, 10 Nov 2003 14:51:32 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Head.U,v $
-?RCS: Revision 1.2 1997/11/25 18:08:08 popiel
-?RCS: From dist.
-?RCS:
-?RCS: Revision 3.0.1.9 1997/02/28 15:02:09 ram
-?RCS: patch61: make sure we unset CDPATH for shells that support this
-?RCS: patch61: improved Korn shell detection and handling
-?RCS:
-?RCS: Revision 3.0.1.8 1995/07/25 13:40:02 ram
-?RCS: patch56: added SVR4-ish /opt directories to path list (ADO)
-?RCS: patch56: OS/2 platforms are using another path separator
-?RCS:
-?RCS: Revision 3.0.1.7 1995/03/21 08:46:15 ram
-?RCS: patch52: definition of paths wrongly added spurious ':' chars
-?RCS:
-?RCS: Revision 3.0.1.6 1994/10/29 15:54:19 ram
-?RCS: patch36: make sure ENV is unset before calling /bin/ksh
-?RCS:
-?RCS: Revision 3.0.1.5 1994/08/29 16:03:44 ram
-?RCS: patch32: now sets PATH only using existing directories
-?RCS:
-?RCS: Revision 3.0.1.4 1994/06/20 06:54:28 ram
-?RCS: patch30: now computes its invocation name into 'me'
-?RCS: patch30: symbol me is made visible to all units read-only
-?RCS:
-?RCS: Revision 3.0.1.3 1993/12/15 08:15:07 ram
-?RCS: patch15: added /sbin:/usr/sbin:/usr/libexec in PATH for BSD/386
-?RCS:
-?RCS: Revision 3.0.1.2 1993/11/10 17:32:35 ram
-?RCS: patch14: ensure PATH is reset to '.' before testing for alias
-?RCS:
-?RCS: Revision 3.0.1.1 1993/08/27 14:38:07 ram
-?RCS: patch7: not all 'test' programs support the -x option
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:04:58 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This is the very first unit in the Configure script. It is mostly just
-?X: things to keep people from getting into a tizzy right off the bat.
-?X:
-?MAKE:Head:
-?MAKE: -pick wipe $@ %<
-?V:PATH p_ me
-?T:argv Id p paths OS2_SHELL
-?T:inksh needksh avoidksh newsh changesh reason
-#! /bin/sh
-#
-# If these # comments don't work, trim them. Don't worry about any other
-# shell scripts, Configure will trim # comments from them for you.
-#
-# (If you are trying to port this package to a machine without sh,
-# I would suggest you have a look at the prototypical config_h.SH file
-# and edit it to reflect your system. Some packages may include samples
-# of config.h for certain machines, so you might look for one of those.)
-#
-?X:
-?X: NOTE THAT A CONFIGURE SCRIPT IS IN THE PUBLIC DOMAIN (whether or not
-?X: the software which uses it is in the public domain).
-?X:
-# Yes, you may rip this off to use in other distribution packages. This
-# script belongs to the public domain and cannot be copyrighted.
-#
-?X:
-?X: WE ASK YOU NOT TO REMOVE OR ALTER THE FOLLOWING PARAGRAPH, PLEASE:
-?X:
-# (Note: this Configure script was generated automatically. Rather than
-# working with this copy of Configure, you may wish to get metaconfig.
-# The dist-3.0 package (which contains metaconfig) was posted in
-# comp.sources.misc and is available on CPAN under authors/id/RAM so
-# you may fetch it yourself from your nearest archive site.)
-#
-?X:
-?X: NOTA BENE:
-?X: If you develop you own version of metaconfig based on this work,
-?X: you have to add some comments telling that the script was generated
-?X: by your version, not mine: It credits your work.
-?X:
-
-# $Id: Head.U 1.3 Mon, 10 Nov 2003 14:51:32 -0600 dunemush $
-#
-# Generated on <DATE> [metaconfig <VERSION>]
-
-cat >/tmp/c1$$ <<EOF
-ARGGGHHHH!!!!!
-
-SCO csh still thinks true is false. Write to SCO today and tell them that next
-year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
-
-(Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
-we'd have to do is go in and swap the && and || tokens, wherever they are.)
-
-[End of diatribe. We now return you to your regularly scheduled programming...]
-EOF
-cat >/tmp/c2$$ <<EOF
-
-OOPS! You naughty creature! You didn't run Configure with sh!
-I will attempt to remedy the situation by running sh for you...
-EOF
-
-true || cat /tmp/c1$$ /tmp/c2$$
-true || exec sh $0 $argv:q
-
-(exit $?0) || cat /tmp/c2$$
-(exit $?0) || exec sh $0 $argv:q
-rm -f /tmp/c1$$ /tmp/c2$$
-
-: compute my invocation name
-me=$0
-case "$0" in
-*/*)
- me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
- test "$me" || me=$0
- ;;
-esac
-
-?X:
-?X: To be able to run under OS/2, we must detect that early enough to use
-?X: the proper path separator, stored in $p_. It is : on UNIX and \ on OS/2.
-?X: However, we have to be careful not to confuse with win32 running the
-?X: cygwin32 unix emulation tools.
-?X:
-: Proper PATH separator
-p_=:
-: On OS/2 this directory should exist if this is not floppy only system :-]
-if test -d c:/.; then
- : Check for cygwin32 emulation
- case "x$OSTYPE$OS" in
- x*msys*Windows*)
- echo 'Running on Windows? Using the MinGW MSys tools...'
- ;;
- x*win32*)
- echo 'Running on Windows? Assuming cygwin32 emulation tools...'
- ;;
- x*windows*)
- echo 'Running on Windows? Assuming cygwin32 emulation tools...'
- ;;
- x*cygwin*)
- echo 'Looks like cygwin32...'
- ;;
- x*)
- p_=\;
- PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
-?X: That's a bug in ksh5.22
- OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
- ;;
- esac
-fi
-
-?X:
-?X: There are two schools of thoughts here. Some people correctly argue that
-?X: the user has a better chance than we do of setting a reasonable PATH and
-?X: others argue that Configure is the best place there is to set up a suitable
-?X: PATH. Well, here we try to compromize by keeping the user's PATH and
-?X: appending some directories which are known to work on some machine or the
-?X: other. The rationale behind this being that a novice user might not have a
-?X: proper environment variable set, and some directories like /etc (where
-?X: chown is located on some BSD systems) may be missing--RAM.
-?X:
-?X: SVR4 adds an /opt directory for optional packages. Some sites use
-?X: various permutations on /opt as opposed to /usr or /usr/local.-- ADO
-?X:
-?X: cygwin32 strongly suggests /gnuwin32/b18/H-i386-cygwin32/bin. Talk
-?X: about ugly.
-?X:
-?X: We only add directories that are not already in the PATH of the
-?X: user and the directories must exist also.
-?X:
-: Proper PATH setting
-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
-paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
-paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
-paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
-paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
-paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
-paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
-paths="$paths /sbin /usr/sbin /usr/libexec /gnuwin32/b18/H-i386-cygwin32/bin"
-
-case "x$OSTYPE$OS" in
- x*msys*Windows*)
- PATH='/usr/local/bin:/mingw/bin:/bin:/perl/bin'
- ;;
- x*)
- for p in $paths
- do
- case "$p_$PATH$p_" in
- *$p_$p$p_*) ;;
- *) test -d $p && PATH=$PATH$p_$p ;;
- esac
- done
-
- PATH=.$p_$PATH
- export PATH
- ;;
-esac
-
-: shall we be using ksh?
-inksh=''
-needksh=''
-avoidksh=''
-newsh=/bin/ksh
-changesh=''
-?X: Use (alias -x) and not (alias) since zsh and bash recognize the alias
-?X: builtin but not the -x option which is typically ksh...
-?X: We need to set up PATH before calling the "alias" built-in since some
-?X: systems like HP-UX have a binary called /bin/alias.
-if (PATH=.; alias -x) >/dev/null 2>&1; then
- inksh=true
-fi
-?X: On HP-UX, large Configure scripts may exercise a bug in /bin/sh, use ksh
-if test -f /hp-ux -a -f /bin/ksh; then
- needksh='to avoid sh bug in "here document" expansion'
-fi
-?X: On AIX4, /bin/sh is really ksh and it causes problems, use sh
-if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
- if test X`/usr/bin/uname -v` = X4; then
- avoidksh="to avoid AIX 4's /bin/sh"
- newsh=/usr/bin/bsh
- fi
-fi
-?X: If we are not in ksh and need it, then feed us back to it
-case "$inksh/$needksh" in
-/[a-z]*)
-?X: Unset ENV to avoid any ~/.kshrc that could alias cd or whatever...
- unset ENV
- changesh=true
- reason="$needksh"
- ;;
-esac
-?X: If we are in ksh and must avoid it, then feed us back to a new shell
-case "$inksh/$avoidksh" in
-true/[a-z]*)
- changesh=true
- reason="$avoidksh"
- ;;
-esac
-?X: Warn them if they use ksh on other systems, which are those where
-?X: we don't need ksh nor want to avoid it explicitely, yet are using it.
-case "$inksh/$needksh-$avoidksh-" in
-true/--)
- cat <<EOM
-(I see you are using the Korn shell. Some ksh's blow up on $me,
-mainly on older exotic systems. If yours does, try the Bourne shell instead.)
-EOM
- ;;
-esac
-case "$changesh" in
-true)
- echo "(Feeding myself to $newsh $reason.)"
-?X: Make sure they didn't say sh <Configure by checking whether $0 ends
-?X: with Configure or not. If they did say sh <../../Configure, then too
-?X: bad for them anyway, since we lost that path indication...
-?X: Otherwise, execing $0 ensures we keep the full remote source dir
-?X: indication for src.U.
- case "$0" in
- Configure|*/Configure) exec $newsh $0 "$@";;
- *) exec $newsh Configure "$@";;
- esac
- ;;
-esac
-
-: Configure runs within the UU subdirectory
-test -d UU || mkdir UU
-?X: Use ./* to avoid any confirmation prompts from enhanced shells -- WED
-?X: Unset CDPATH to avoid surprised when using cd under some shells
-unset CDPATH
-cd UU && rm -f ./*
-
+++ /dev/null
-?RCS: $Id: Loc.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Loc.U,v $
-?RCS: Revision 3.0.1.10 1997/02/28 15:04:16 ram
-?RCS: patch61: allow users to specify paths on the command line
-?RCS: patch61: will now substitute cp for ln if not supported
-?RCS:
-?RCS: Revision 3.0.1.9 1995/09/25 09:11:24 ram
-?RCS: patch59: commented the purpose of the #un-def directive
-?RCS: patch59: abort Configure run when mandatory command is missing
-?RCS:
-?RCS: Revision 3.0.1.8 1995/07/25 13:40:40 ram
-?RCS: patch56: now knows about OS/2 platforms
-?RCS:
-?RCS: Revision 3.0.1.7 1995/01/11 15:13:37 ram
-?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI
-?RCS: patch45: added path lookup for the 'comm' program
-?RCS:
-?RCS: Revision 3.0.1.6 1994/10/29 15:56:14 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS: patch36: be careful and guard against wildcard searching (ADO)
-?RCS:
-?RCS: Revision 3.0.1.5 1994/06/20 06:54:55 ram
-?RCS: patch30: now locates find
-?RCS:
-?RCS: Revision 3.0.1.4 1994/05/13 15:18:15 ram
-?RCS: patch27: added byacc to the trylist (ADO)
-?RCS: patch27: lint lines reformatted (ADO)
-?RCS:
-?RCS: Revision 3.0.1.3 1994/01/24 14:01:44 ram
-?RCS: patch16: added metalint hint on changed PATH variable
-?RCS:
-?RCS: Revision 3.0.1.2 1993/12/15 08:16:52 ram
-?RCS: patch15: now set _test variable when test is built-in
-?RCS: patch15: fixed rare cases where echo is not needed
-?RCS:
-?RCS: Revision 3.0.1.1 1993/09/13 15:47:13 ram
-?RCS: patch10: test program not always in /bin/test (WAD)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:05:05 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit produces a shell script "loc" which can be used to find out
-?X: where in a list of directories something is. It then uses loc to
-?X: determine the location of commonly used programs. It leaves loc sitting
-?X: around for other Configure units to use, but arranges for its demise
-?X: at the end of Configure.
-?X:
-?X: To add a new program to find, add it both to the ?MAKE: line and to either
-?X: the loclist or trylist variable.
-?X:
-?X: I put startsh at the end of the dependency list, in order to avoid the
-?X: loading of the spitshell unit before the instructions.
-?X:
-?MAKE:Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
- comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
- shar sleep smail sort submit tail tar tbl test touch tr troff \
- uname uniq uptime uuname vi zcat zip: eunicefix n c Instruct Myread \
- startsh
-?MAKE: -pick weed $@ %<
-?LINT:describe Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
- comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
- shar sleep smail sort submit tail tar tbl test touch tr troff \
- uname uniq uptime uuname vi zcat zip
-?V::pth loclist trylist
-?F:./loc
-?T:thisthing thing xxx dir file say _test
-?LINT:change PATH
-: find out where common programs are
-echo " "
-echo "Locating common programs..." >&4
-cat <<EOSC >loc
-$startsh
-case \$# in
-0) exit 1;;
-esac
-thing=\$1
-shift
-dflt=\$1
-shift
-for dir in \$*; do
- case "\$thing" in
- .)
- if test -d \$dir/\$thing; then
- echo \$dir
- exit 0
- fi
- ;;
- *)
-?X: Be careful in case thing includes wildcards that might expand to multiple
-?X: files. Choose the last one. This happens when searching for shared
-?X: libraries with version numbers. How to choose which one we want is
-?X: probably an insoluble problem, in general.
-?X: Some folks leave things like libc.so.orig around w/o read
-?X: permission. A -r test would handle that, but since ./loc is
-?X: also used to find executables (which are installed w/o read
-?X: permission on SCO ODT 3.0, we can't include the -r test.
- for thisthing in \$dir/\$thing; do
- : just loop through to pick last item
- done
- if test -f \$thisthing; then
- echo \$thisthing
- exit 0
- elif test -f \$dir/\$thing.exe; then
- : on Eunice apparently
- echo \$dir/\$thing
- exit 0
- fi
- ;;
- esac
-done
-echo \$dflt
-exit 1
-EOSC
-chmod +x loc
-$eunicefix loc
-loclist="
-?awk:awk
-?cat:cat
-?chgrp:chgrp
-?chmod:chmod
-?chown:chown
-?comm:comm
-?cp:cp
-?echo:echo
-?expr:expr
-?find:find
-?grep:grep
-?ls:ls
-?make:make
-?mkdir:mkdir
-?mv:mv
-?rm:rm
-?sed:sed
-?sleep:sleep
-?sort:sort
-?tail:tail
-?touch:touch
-?tr:tr
-?uniq:uniq
-"
-trylist="
-?Mcc:Mcc
-?ar:ar
-?bash:bash
-?bison:bison
-?byacc:byacc
-?compress:compress
-?cpio:cpio
-?cpp:cpp
-?csh:csh
-?date:date
-?egrep:egrep
-?emacs:emacs
-?flex:flex
-?gcc:gcc
-?gzip:gzip
-?inews:inews
-?ksh:ksh
-?less:less
-?line:line
-?lint:lint
-?ln:ln
-?lp:lp
-?lpr:lpr
-?mail:mail
-?mailx:mailx
-?more:more
-?nroff:nroff
-?perl:perl
-?pg:pg
-?pmake:pmake
-?pr:pr
-?rmail:rmail
-?sendmail:sendmail
-?shar:shar
-?smail:smail
-?submit:submit
-?tar:tar
-?tbl:tbl
-?test:test
-?troff:troff
-?uname:uname
-?uptime:uptime
-?uuname:uuname
-?vi:vi
-?zcat:zcat
-?zip:zip
-"
-?LINT:set Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
- comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
- shar sleep smail sort submit tail tar tbl test touch tr troff \
- uname uniq uptime uuname vi zcat zip
-pth=`echo $PATH | sed -e "s/$p_/ /g"`
-pth="$pth /lib /usr/lib"
-for file in $loclist; do
-?X:
-?X: Allow them to -Dmake=pmake on the command line for instance...
-?X: If the file is not fully qualified, as in -Dmake=pmake, then we
-?X: look the for the specified command (pmake here). If they say
-?X: -Dmake=/sbin/make for instance, then we make sure the file
-?X: exists, or we die...
-?X:
- eval xxx=\$$file
- case "$xxx" in
- /*|?:[\\/]*)
- if test -f "$xxx"; then
- : ok
- else
- echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
- xxx=`./loc $file $file $pth`
- fi
- ;;
- '') xxx=`./loc $file $file $pth`;;
- *) xxx=`./loc $xxx $xxx $pth`;;
- esac
- eval $file=$xxx
- eval _$file=$xxx
- case "$xxx" in
- /*)
- echo $file is in $xxx.
- ;;
-?X: Under OS/2, we have PC-like paths
- ?:[\\/]*)
- echo $file is in $xxx.
- ;;
- *)
- echo "I don't know where '$file' is, and my life depends on it." >&4
- echo "Go find a public domain implementation or fix your PATH setting!" >&4
- exit 1
- ;;
- esac
-done
-echo " "
-echo "Don't worry if any of the following aren't found..."
-say=offhand
-for file in $trylist; do
-?X: Allow them to -Dmake=pmake on the command line for instance (see above)
- eval xxx=\$$file
- case "$xxx" in
- /*|?:[\\/]*)
- if test -f "$xxx"; then
- : ok
- else
- echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
- xxx=`./loc $file $file $pth`
- fi
- ;;
- '') xxx=`./loc $file $file $pth`;;
- *) xxx=`./loc $xxx $xxx $pth`;;
- esac
- eval $file=$xxx
- eval _$file=$xxx
- case "$xxx" in
- /*)
- echo $file is in $xxx.
- ;;
-?X: Under OS/2, we have PC-like paths
- ?:[\\/]*)
- echo $file is in $xxx.
- ;;
- *)
- echo "I don't see $file out there, $say."
- say=either
- ;;
- esac
-done
-case "$egrep" in
-egrep)
- echo "Substituting grep for egrep."
- egrep=$grep
- ;;
-esac
-@if ln
-case "$ln" in
-ln)
- echo "Substituting cp for ln."
- ln=$cp
- ;;
-esac
-@end
-case "$test" in
-test)
- echo "Hopefully test is built into your sh."
- ;;
-*)
- if `sh -c "PATH= test true" >/dev/null 2>&1`; then
- echo "Using the test built into your sh."
-?X:
-?X: We need to set both test and _test, since Oldconfig.U will use the _test
-?X: value to systematically restore computed paths, which may be wrong if
-?X: we choose to load an old config.sh generated on another platform.
-?X:
- test=test
- _test=test
- fi
- ;;
-esac
-?LINT:change n c
-case "$echo" in
-echo)
- echo "Hopefully echo is built into your sh."
- ;;
-?X: For those rare cases where we don't need $echo...
-'') ;;
-*)
- echo " "
-echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
- $echo $n "hi there$c" >foo1
- echo $n "hi there$c" >foo2
- if cmp foo1 foo2 >/dev/null 2>&1; then
- echo "They are compatible. In fact, they may be identical."
- else
- case "$n" in
- '-n') n='' c='\c';;
- *) n='-n' c='';;
- esac
- cat <<FOO
-They are not compatible! You are probably running ksh on a non-USG system.
-I'll have to use $echo instead of the builtin, since Bourne shell doesn't
-have echo built in and we may have to run some Bourne shell scripts. That
-means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
-
-FOO
- $echo $n "The star should be here-->$c"
- $echo "*"
- fi
- $rm -f foo1 foo2
- ;;
-esac
-
+++ /dev/null
-?RCS: $Id: MailList.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
-?RCS:
-?RCS: $Log: MailList.U,v $
-?RCS: Revision 3.0.1.1 1994/01/24 14:01:49 ram
-?RCS: patch16: created
-?RCS:
-?RCS:
-?X:
-?X: This unit offers the user the option of subscribing to the mailing
-?X: list. To force inclusion of this unit, you must add it's name to the
-?X: dependancies on the MAKE line in your private copy of End.U.
-?X: The address of the mailing list server must be set via a "list_request=..."
-?X: entry in the .package file. This is usually done by running packinit and
-?X: answering the proper questions.
-?X:
-?MAKE:MailList: cat mailer package Myread cf_name cf_email
-?MAKE: -pick wipe $@ %<
-?T:list_request list_sub list_unsub list_name
-?X:
-?X: The cf_name dependency is used through list_sub when the mailing list
-?X: manager happens to be listserv, whereas cf_email is used whith majordomo
-?X: or when the mailing list request address is scanned by a human. Since
-?X: they do not appear within the unit itself, we need a lint hint.
-?X:
-?LINT:use cf_name cf_email
-: offer to join the mailing list
-list_request='<$list_request>'
-list_sub="<$list_sub>"
-list_unsub="<$list_unsub>"
-list_name="<$list_name>"
-$cat <<EOM
-
-There is a mailing list for discussion about $package and related issues.
-This is the preferred place to ask questions about the program and discuss
-modifications and additions with the author and other users. If you are able
-to send mail to the Internet, you are encouraged to subscribe. You need only
-ever subscribe once, and you can unsubscribe automatically at any time in the
-future. If you have already subscribed and you wish to unsubscribe now, you
-may do so by answering "unsubscribe". Answer "subscribe" to subscribe to the
-list.
-
-EOM
-rp="Subscribe to or unsubscribe from the $list_name mailing list?"
-dflt=neither
-. ./myread
-case "$ans" in
-[sS]*) $cat <<EOM
-
-You will be sent a message from the list server to let you know when your
-subscription has been successful and telling you how to submit articles and
-how to unsubscribe again when necessary. You may also unsubscribe by running
-this script again and asking it to do so for you.
-
-EOM
- echo "Sending mail to subscribe you to the $list_name list..." >&4
- $mailer $list_request <<EOM >/dev/null 2>&1
-To: $list_request
-Subject: Subscription request by configure
-
-$list_sub
-EOM
- ;;
-[uU]*) echo "Sending mail to unsubscribe you from the $list_name list..." >&4
- $mailer $list_request <<EOM >/dev/null 2>&1
-To: $list_request
-Subject: Unsubscription request by configure
-
-$list_unsub
-EOM
- ;;
-esac
-
+++ /dev/null
-?RCS: $Id: Myinit.U 1.5 Sun, 02 Feb 2003 10:43:44 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Myinit.U,v $
-?RCS: Revision 3.0.1.1 1994/10/31 09:47:29 ram
-?RCS: patch44: leading comment states this unit comes before option processing
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:05:07 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: If you want to initialize any default values, copy this unit to your
-?X: personal U directory and add the assignments to the end. This file
-?X: is included after variables are initialized but before any old
-?X: config.sh file is read in and before any Configure switch processing.
-?X:
-?MAKE:Myinit: Init
-?MAKE: -pick add $@ %<
-?LINT:set defvoidused libswanted
-defvoidused=15
-libswanted='nsl socket m c crypt bind resolv ld dl tcl intl'
-
+++ /dev/null
-?RCS: $Id: Oldconfig.U 1.3 Mon, 28 Jun 2004 09:20:49 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: Oldconfig.U,v $
-?RCS: Revision 1.2 1997/11/25 18:20:23 popiel
-?RCS: From dist
-?RCS:
-?RCS: Revision 3.0.1.10 1997/02/28 15:06:39 ram
-?RCS: patch61: added support for src.U
-?RCS: patch61: new OSNAME define
-?RCS: patch61: can now sense new OSes
-?RCS:
-?RCS: Revision 3.0.1.9 1995/07/25 13:40:51 ram
-?RCS: patch56: now knows about OS/2 platforms
-?RCS:
-?RCS: Revision 3.0.1.8 1995/05/12 12:04:18 ram
-?RCS: patch54: config.sh reload logic now knows about new -K switch
-?RCS: patch54: cleaned up and extended osvers for DEC OSF/1 (ADO)
-?RCS: patch54: added MachTen detection (ADO)
-?RCS:
-?RCS: Revision 3.0.1.7 1995/02/15 14:13:41 ram
-?RCS: patch51: adapted osvers computation for AIX (ADO)
-?RCS:
-?RCS: Revision 3.0.1.6 1995/01/30 14:27:15 ram
-?RCS: patch49: unit Options.U now exports file optdef.sh, not a variable
-?RCS: patch49: update code for myuname changed (WED)
-?RCS:
-?RCS: Revision 3.0.1.5 1995/01/11 15:15:36 ram
-?RCS: patch45: added quotes around the INITPROG variable (ADO)
-?RCS: patch45: allows variable overriding after config file loading
-?RCS:
-?RCS: Revision 3.0.1.4 1994/10/29 15:57:05 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS: patch36: merged with the version used for perl5's Configure (ADO)
-?RCS:
-?RCS: Revision 3.0.1.3 1994/05/06 14:24:17 ram
-?RCS: patch23: added support for osf1 hints
-?RCS: patch23: new support for solaris and i386 systems (ADO)
-?RCS:
-?RCS: Revision 3.0.1.2 1994/01/24 14:05:02 ram
-?RCS: patch16: added post-processing on myuname for Xenix targets
-?RCS: patch16: message proposing config.sh defaults made consistent
-?RCS:
-?RCS: Revision 3.0.1.1 1993/09/13 15:56:32 ram
-?RCS: patch10: force use of config.sh when -d option is used (WAD)
-?RCS: patch10: complain about non-existent hint files (WAD)
-?RCS: patch10: added Options dependency for fastread variable
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:05:12 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: This unit tries to remember what we did last time we ran Configure, mostly
-?X: for the sake of setting defaults.
-?X:
-?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \
- sh awk sed test cat rm lns n c contains Loc Options Tr src
-?MAKE: -pick wipe $@ %<
-?S:myuname:
-?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
-?S: pseudo variables assignments in the output are stripped, thank you. The
-?S: whole thing is then lower-cased.
-?S:.
-?S:hint:
-?S: Gives the type of hints used for previous answers. May be one of
-?S: "default", "recommended" or "previous".
-?S:.
-?S:osname:
-?S: This variable contains the operating system name (e.g. sunos,
-?S: solaris, hpux, etc.). It can be useful later on for setting
-?S: defaults. Any spaces are replaced with underscores. It is set
-?S: to a null string if we can't figure it out.
-?S:.
-?S:osvers:
-?S: This variable contains the operating system version (e.g.
-?S: 4.1.3, 5.2, etc.). It is primarily used for helping select
-?S: an appropriate hints file, but might be useful elsewhere for
-?S: setting defaults. It is set to '' if we can't figure it out.
-?S: We try to be flexible about how much of the version number
-?S: to keep, e.g. if 4.1.1, 4.1.2, and 4.1.3 are essentially the
-?S: same for this package, hints files might just be os_4.0 or
-?S: os_4.1, etc., not keeping separate files for each little release.
-?S:.
-?C:OSNAME:
-?C: This symbol contains the name of the operating system, as determined
-?C: by Configure. You shouldn't rely on it too much; the specific
-?C: feature tests from Configure are generally more reliable.
-?C:.
-?H:#define OSNAME "$osname" /**/
-?H:.
-?F:!config.sh
-?T:tmp tmp_n tmp_c tmp_sh file
-?T:xxxxfile xxxfile xxfile xfile hintfile newmyuname
-?T:tans _ isesix INITPROG
-?LINT:change n c sh
-: Try to determine whether config.sh was made on this system
-case "$config_sh" in
-'')
-?X: indentation wrong on purpose--RAM
-?X: Leave a white space between first two '(' for ksh. The sub-shell is needed
-?X: on some machines to avoid the error message when uname is not found; e.g.
-?X: old SUN-OS 3.2 would not execute hostname in (uname -a || hostname). Sigh!
-myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
-?X: Special mention for Xenix, whose 'uname -a' gives us output like this:
-?X: sysname=XENIX
-?X: nodename=whatever
-?X: release=2.3.2 .. etc...
-?X: Therefore, we strip all this variable assignment junk and remove all the
-?X: new lines to keep the myuname variable sane... --RAM
-myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
- ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
-?X: Save the value we just computed to reset myuname after we get done here.
-newmyuname="$myuname"
-dflt=n
-case "$knowitall" in
-'')
- if test -f ../config.sh; then
- if $contains myuname= ../config.sh >/dev/null 2>&1; then
- eval "`grep myuname= ../config.sh`"
- fi
- if test "X$myuname" = "X$newmyuname"; then
- dflt=y
- fi
- fi
- ;;
-*) dflt=y;;
-esac
-
-@if {test -d ../hints}
-: Get old answers from old config file if Configure was run on the
-: same system, otherwise use the hints.
-hint=default
-cd ..
-?X: Since we are now at the root of the source tree, we must use $src
-?X: to access the sources and not $rsrc. See src.U for details...
-if test -f config.sh; then
- echo " "
- rp="I see a config.sh file. Shall I use it to set the defaults?"
- . UU/myread
- case "$ans" in
- n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
- *) echo "Fetching default answers from your old config.sh file..." >&4
- tmp_n="$n"
- tmp_c="$c"
- tmp_sh="$sh"
- . ./config.sh
- cp config.sh UU
- n="$tmp_n"
- c="$tmp_c"
- : Older versions did not always set $sh. Catch re-use of such
- : an old config.sh.
- case "$sh" in
- '') sh="$tmp_sh" ;;
- esac
- hint=previous
- ;;
- esac
-fi
-if test ! -f config.sh; then
- $cat <<EOM
-
-First time through, eh? I have some defaults handy for the following systems:
-
-EOM
- (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
- dflt=''
- : Half the following guesses are probably wrong... If you have better
- : tests or hints, please send them to <MAINTLOC>
- : The metaconfig authors would also appreciate a copy...
- $test -f /irix && osname=irix
- $test -f /xenix && osname=sco_xenix
- $test -f /dynix && osname=dynix
- $test -f /dnix && osname=dnix
- $test -f /lynx.os && osname=lynxos
- $test -f /unicos && osname=unicos && osvers=`$uname -r`
- $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
- $test -f /bin/mips && /bin/mips && osname=mips
- $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
- $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
- $test -d /usr/apollo/bin && osname=apollo
- $test -f /etc/saf/_sactab && osname=svr4
- $test -d /usr/include/minix && osname=minix
- if $test -d /MachTen; then
-?X: MachTen uname -a output looks like
-?X: xxx 4 0.0 Macintosh
-?X: MachTen /sbin/version output looks like
-?X: MachTen 4.0 Mon Aug 28 10:18:00 1995
-?X: MachTen 3.x had the 'version' command in /usr/etc/version.
- osname=machten
- if $test -x /sbin/version; then
- osvers=`/sbin/version | $awk '{print $2}' |
- $sed -e 's/[A-Za-z]$//'`
- elif $test -x /usr/etc/version; then
- osvers=`/usr/etc/version | $awk '{print $2}' |
- $sed -e 's/[A-Za-z]$//'`
- else
- osvers="$2.$3"
- fi
- fi
-?X: If we have uname, we already computed a suitable uname -a output, correctly
-?X: formatted for Xenix, and it lies in $myuname.
- if $test -f $uname; then
- set X $myuname
- shift
-
- case "$5" in
- fps*) osname=fps ;;
- mips*)
- case "$4" in
- umips) osname=umips ;;
- *) osname=mips ;;
- esac;;
- [23]100) osname=mips ;;
- next*) osname=next ;;
- news*) osname=news ;;
-?X: Interactive Unix.
- i386*)
- if $test -f /etc/kconfig; then
- osname=isc
- if test "$lns" = "ln -s"; then
- osvers=4
- elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
- osvers=3
- elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
- osvers=2
- fi
- fi
- ;;
- esac
-
- case "$1" in
- aix) osname=aix
-?X: aix 4.1 uname -a output looks like
-?X: AIX foo 1 4 000123456789
-?X: where $4 is the major release number and $3 is the (minor) version.
-?X: More detail on the version is available with the oslevel command.
-?X: in 3.2.x, it output a string (see case statements below). In 4.1,
-?X: it puts out something like 4.1.1.0
- tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
- case "$tmp" in
- 'not found') osvers="$4"."$3" ;;
- '<3240'|'<>3240') osvers=3.2.0 ;;
- '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
- '=3250'|'>3250') osvers=3.2.5 ;;
- *) osvers=$tmp;;
- esac
- ;;
- *dc.osx) osname=dcosx
- osvers="$3"
- ;;
- dnix) osname=dnix
- osvers="$3"
- ;;
- domainos) osname=apollo
- osvers="$3"
- ;;
- dgux) osname=dgux
- osvers="$3"
- ;;
-?X: uname -a returns
-?X: DYNIX/ptx xxx 4.0 V4.1.2 i386
- dynixptx*) osname=dynixptx
- osvers="$3"
- ;;
- freebsd) osname=freebsd
- osvers="$3" ;;
- genix) osname=genix ;;
- hp*) osname=hpux
- case "$3" in
- *.08.*) osvers=9 ;;
- *.09.*) osvers=9 ;;
- *.10.*) osvers=10 ;;
- *) osvers="$3" ;;
- esac
- ;;
- irix*) osname=irix
- case "$3" in
- 4*) osvers=4 ;;
- 5*) osvers=5 ;;
- 6*) osvers=6 ;;
- *) osvers="$3" ;;
- esac
- ;;
- linux) osname=linux
- case "$3" in
- 1*) osvers=1 ;;
- *) osvers="$3" ;;
- esac
- ;;
- netbsd*) osname=netbsd
- osvers="$3"
- ;;
- bsd386) osname=bsd386
- osvers=`$uname -r`
- ;;
- next*) osname=next ;;
- solaris) osname=solaris
- case "$3" in
- 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
- *) osvers="$3" ;;
- esac
- ;;
- sunos) osname=sunos
- case "$3" in
- 5*) osname=solaris
- osvers=`echo $3 | $sed 's/^5/2/g'` ;;
- *) osvers="$3" ;;
- esac
- ;;
- titanos) osname=titanos
- case "$3" in
- 1*) osvers=1 ;;
- 2*) osvers=2 ;;
- 3*) osvers=3 ;;
- 4*) osvers=4 ;;
- *) osvers="$3" ;;
- esac
- ;;
- ultrix) osname=ultrix
- osvers="$3"
- ;;
- osf1|mls+) case "$5" in
- alpha)
-?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha
-?X: where the version number can be either vn.n or tn.n.
- osname=dec_osf
- osvers=`echo "$3" | sed 's/^[vt]//'`
- ;;
- hp*) osname=hp_osf1 ;;
- mips) osname=mips_osf1 ;;
-?X: hp and mips were unsupported Technology Releases -- ADO, 24/10/94
- esac
- ;;
- uts) osname=uts
- osvers="$3"
- ;;
- qnx) osname=qnx
- osvers="$4"
- ;;
- mingw32*) osname=mingw32
- osvers="$3"
- ;;
- $2) case "$osname" in
- *isc*) ;;
- *freebsd*) ;;
- svr*)
- : svr4.x or possibly later
- case "svr$3" in
- ${osname}*)
- osname=svr$3
- osvers=$4
- ;;
- esac
- case "$osname" in
- svr4.0)
- : Check for ESIX
- if test -f /stand/boot ; then
- eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
- if test -n "$INITPROG" -a -f "$INITPROG"; then
- isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
- if test -n "$isesix"; then
- osname=esix4
- fi
- fi
- fi
- ;;
- esac
- ;;
- *) if test -f /etc/systemid; then
- osname=sco
- set `echo $3 | $sed 's/\./ /g'` $4
- if $test -f sco_$1_$2_$3.sh; then
- osvers=$1.$2.$3
- elif $test -f sco_$1_$2.sh; then
- osvers=$1.$2
- elif $test -f sco_$1.sh; then
- osvers=$1
- fi
- else
- case "$osname" in
- '') : Still unknown. Probably a generic Sys V.
- osname="sysv"
- osvers="$3"
- ;;
- esac
- fi
- ;;
- esac
- ;;
- *) case "$osname" in
- '') : Still unknown. Probably a generic BSD.
- osname="$1"
- osvers="$3"
- ;;
- esac
- ;;
- esac
- else
-?X: Try to identify sony's NEWS-OS (BSD unix)
- if test -f /vmunix -a -f $src/hints/news_os.sh; then
- (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
- if $contains news-os UU/kernel.what >/dev/null 2>&1; then
- osname=news_os
- fi
- $rm -f UU/kernel.what
-?X: Maybe it's an OS/2
-?X: Might also be win32
- elif test -d c:/.; then
- : Check for cygwin32 emulation
- case "x$OS" in
- xWindows_*)
- set X $myuname
- osname=win32
- osvers="$3"
- ;;
- x*)
- set X $myuname
- osname=os2
- osvers="$5"
- ;;
- esac
- fi
- fi
-?X: Fix up cygwin32 to win32, just because...
- case "x$osname" in
- xcygwin32*)
- osname=win32
- ;;
- esac
-
- : Now look for a hint file osname_osvers, unless one has been
- : specified already.
- case "$hintfile" in
- ''|' ')
- file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
- : Also try without trailing minor version numbers.
- xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
- xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
- xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
- xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
- case "$file" in
- '') dflt=none ;;
- *) case "$osvers" in
- '') dflt=$file
- ;;
- *) if $test -f $src/hints/$file.sh ; then
- dflt=$file
- elif $test -f $src/hints/$xfile.sh ; then
- dflt=$xfile
- elif $test -f $src/hints/$xxfile.sh ; then
- dflt=$xxfile
- elif $test -f $src/hints/$xxxfile.sh ; then
- dflt=$xxxfile
- elif $test -f $src/hints/$xxxxfile.sh ; then
- dflt=$xxxxfile
- elif $test -f "$src/hints/${osname}.sh" ; then
- dflt="${osname}"
- else
- dflt=none
- fi
- ;;
- esac
- ;;
- esac
- ;;
- *)
- dflt=`echo $hintfile | $sed 's/\.sh$//'`
- ;;
- esac
-
- $cat <<EOM
-
-You may give one or more space-separated answers, or "none" if appropriate.
-If your OS version has no hints, DO NOT give a wrong version -- say "none".
-
-EOM
- rp="Which of these apply, if any?"
- . UU/myread
- tans=$ans
- for file in $tans; do
- if $test -f $src/hints/$file.sh; then
- . $src/hints/$file.sh
- $cat $src/hints/$file.sh >> UU/config.sh
- elif $test X$tans = X -o X$tans = Xnone ; then
- : nothing
- else
- : Give one chance to correct a possible typo.
- echo "$file.sh does not exist"
- dflt=$file
- rp="hint to use instead?"
- . UU/myread
- for file in $ans; do
- if $test -f "$src/hints/$file.sh"; then
- . $src/hints/$file.sh
- $cat $src/hints/$file.sh >> UU/config.sh
- elif $test X$ans = X -o X$ans = Xnone ; then
- : nothing
- else
- echo "$file.sh does not exist -- ignored."
- fi
- done
- fi
- done
-
- hint=recommended
- : Remember our hint file for later.
- if $test -f "$src/hints/$file.sh" ; then
- hintfile="$file"
- else
- hintfile=''
- fi
-fi
-cd UU
-?X: From here on, we must use $rsrc instead of $src
-@else
-: Get old answers, if there is a config file out there
-hint=default
-hintfile=''
-if test -f ../config.sh; then
- echo " "
- rp="I see a config.sh file. Shall I use it to set the defaults?"
- . ./myread
- case "$ans" in
- n*|N*) echo "OK, I'll ignore it.";;
- *) echo "Fetching default answers from your old config.sh file..." >&4
- tmp_n="$n"
- tmp_c="$c"
- . ../config.sh
- cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
- hint=previous
- ;;
- esac
-fi
-@end
-?X: remember, indentation is wrong--RAM
-;;
-*)
- echo " "
- echo "Fetching default answers from $config_sh..." >&4
- tmp_n="$n"
- tmp_c="$c"
- cd ..
-?X: preserve symbolic links, if any
- cp $config_sh config.sh 2>/dev/null
- chmod +w config.sh
- . ./config.sh
- cd UU
- cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
- hint=previous
- ;;
-esac
-test "$override" && . ./optdef.sh
-myuname="$newmyuname"
-
-: Restore computed paths
-for file in $loclist $trylist; do
- eval $file="\$_$file"
-done
-
-@if osname || osvers
-cat << EOM
-
-Configure uses the operating system name and version to set some defaults.
-The default value is probably right if the name rings a bell. Otherwise,
-since spelling matters for me, either accept the default or answer "none"
-to leave it blank.
-
-EOM
-@end
-@if osname
-case "$osname" in
- ''|' ')
- case "$hintfile" in
- ''|' '|none) dflt=none ;;
- *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
- esac
- ;;
- *) dflt="$osname" ;;
-esac
-rp="Operating system name?"
-. ./myread
-case "$ans" in
-none) osname='' ;;
-*) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
-esac
-@end
-@if osvers
-@if osname
-echo " "
-@end
-case "$osvers" in
- ''|' ')
- case "$hintfile" in
- ''|' '|none) dflt=none ;;
- *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
- dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
- case "$dflt" in
- ''|' ') dflt=none ;;
- esac
- ;;
- esac
- ;;
- *) dflt="$osvers" ;;
-esac
-rp="Operating system version?"
-. ./myread
-case "$ans" in
-none) osvers='' ;;
-*) osvers="$ans" ;;
-esac
-
-@end
+++ /dev/null
-?RCS: $Id: ccflags.U 1.6 Sat, 24 Jan 2004 13:13:31 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: ccflags.U,v $
-?RCS: Revision 3.0.1.9 1997/02/28 15:27:07 ram
-?RCS: patch61: removed support for NO_PROTOTYPE detection on SCO
-?RCS: patch61: new locincpth variable
-?RCS: patch61: added info on the "additional ld flags" question
-?RCS:
-?RCS: Revision 3.0.1.8 1995/07/25 13:48:54 ram
-?RCS: patch56: re-arranged compile line to include ldflags before objects
-?RCS:
-?RCS: Revision 3.0.1.7 1995/05/12 12:08:33 ram
-?RCS: patch54: now checks for cc/ccflags/ldflags coherency
-?RCS:
-?RCS: Revision 3.0.1.6 1994/10/29 16:07:02 ram
-?RCS: patch36: gcc versionning no longer relies on the C compiler's name
-?RCS: patch36: simplified check for gcc version checking (ADO)
-?RCS:
-?RCS: Revision 3.0.1.5 1994/08/29 16:06:35 ram
-?RCS: patch32: propagate -posix flag from ccflags to ldflags
-?RCS:
-?RCS: Revision 3.0.1.4 1994/05/06 14:28:45 ram
-?RCS: patch23: -fpcc-struct-return only needed in gcc 1.x (ADO)
-?RCS: patch23: cppflags now computed on an option-by-option basis
-?RCS: patch23: magically added cc flags now only done the first time
-?RCS:
-?RCS: Revision 3.0.1.3 1993/09/13 15:58:29 ram
-?RCS: patch10: explicitely mention -DDEBUG just in case they need it (WAD)
-?RCS: patch10: removed all the "tans" variable usage (WAD)
-?RCS:
-?RCS: Revision 3.0.1.2 1993/08/27 14:39:38 ram
-?RCS: patch7: added support for OSF/1 machines
-?RCS:
-?RCS: Revision 3.0.1.1 1993/08/25 14:00:24 ram
-?RCS: patch6: added defaults for cppflags, ccflags and ldflags
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:05:31 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:ccflags ldflags lkflags cppflags optimize warnings locincpth: test cat \
- Myread Guess Options Oldconfig +gccversion mips_type +usrinc \
- package contains rm +cc cppstdin cppminus cpprun cpplast libpth \
- loclibpth hint
-?MAKE: -pick add $@ %<
-?S:ccflags:
-?S: This variable contains any additional C compiler flags desired by
-?S: the user. It is up to the Makefile to use this.
-?S:.
-?S:cppflags:
-?S: This variable holds the flags that will be passed to the C pre-
-?S: processor. It is up to the Makefile to use it.
-?S:.
-?S:optimize:
-?S: This variable contains any optimizer/debugger flag that should be used.
-?S: It is up to the Makefile to use it.
-?S:.
-?S:warnings:
-?S: This variable contains any compiler warning flags that should be used.
-?S:.
-?S:ldflags:
-?S: This variable contains any additional C loader flags desired by
-?S: the user. It is up to the Makefile to use this.
-?S:.
-?S:lkflags:
-?S: This variable contains any additional C partial linker flags desired by
-?S: the user. It is up to the Makefile to use this.
-?S:.
-?S:locincpth:
-?S: This variable contains a list of additional directories to be
-?S: searched by the compiler. The appropriate -I directives will
-?S: be added to ccflags. This is intended to simplify setting
-?S: local directories from the Configure command line.
-?S: It's not much, but it parallels the loclibpth stuff in libpth.U.
-?S:.
-?T:inctest thisincl xxx flag inclwanted ftry previous thislibdir
-?D:cppflags=''
-?D:ccflags=''
-?D:ldflags=''
-?D:optimize=''
-?D:warnings=''
-?INIT:: Possible local include directories to search.
-?INIT:: Set locincpth to "" in a hint file to defeat local include searches.
-?INIT:locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
-?INIT:locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
-?INIT:locincpth="$locincpth /usr/kerberos/include"
-?INIT::
-?INIT:: no include file wanted by default
-?INIT:inclwanted=''
-?INIT:
-: determine optimize, if desired, or use for debug flag also
-case "$optimize" in
-' ') dflt='none';;
-'') case $gccversion in
- 2*) dflt='-g -O' ;;
- *egcs*) dflt='-g -O' ;;
- *) dflt='-g' ;;
- esac ;;
-*) dflt="$optimize";;
-esac
-$cat <<EOH
-
-Some C compilers have problems with their optimizers. By default, $package
-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".
-
-EOH
-rp="What optimizer/debugger flag should be used?"
-. ./myread
-optimize="$ans"
-case "$optimize" in
-'none') optimize=" ";;
-esac
-
-case "$warnings" in
-' ') dflt='none';;
-'') case $gccversion in
- 2*|egcs*) dflt='-W -Wall -Wno-comment' ;;
- *) dflt='none' ;;
- esac ;;
-*) dflt="$warnings";;
-esac
-$cat <<EOH
-
-EOH
-rp="What compiler warning flags should be used?"
-. ./myread
-warnings="$ans"
-case "$warnings" in
-'none') warnings=" ";;
-esac
-
-dflt=''
-: We will not override a previous value, but we might want to
-: augment a hint file
-case "$hint" in
-none|recommended)
- case "$gccversion" in
- 1*) dflt='-fpcc-struct-return' ;;
- esac
-?X: case "$optimize" in
-?X: *-g*) dflt="$dflt -DDEBUGGING";;
-?X: esac
-?X: check for POSIXized ISC
- case "$gccversion" in
- 2*) if test -d /etc/conf/kconfig.d &&
- $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
- then
- dflt="$dflt -posix"
- fi
- ;;
- esac
- ;;
-esac
-
-?X: In USG mode, a MIPS system may need some BSD includes
-case "$mips_type" in
-*BSD*|'') inclwanted="$locincpth $usrinc";;
-*) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
-esac
-for thisincl in $inclwanted; do
- if $test -d $thisincl; then
- if $test x$thisincl != x$usrinc; then
- case "$dflt" in
- *$thisincl*);;
- *) dflt="$dflt -I$thisincl";;
- esac
- fi
- fi
-done
-
-?X: Include test function (header, symbol)
-inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
- xxx=true;
-elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
- xxx=true;
-else
- xxx=false;
-fi;
-if $xxx; then
- case "$dflt" in
- *$2*);;
- *) dflt="$dflt -D$2";;
- esac;
-fi'
-
-?X:
-?X: OSF/1 uses __LANGUAGE_C__ instead of LANGUAGE_C
-?X:
-if ./osf1; then
- set signal.h __LANGUAGE_C__; eval $inctest
-else
- set signal.h LANGUAGE_C; eval $inctest
-fi
-
-case "$hint" in
-none|recommended) dflt="$ccflags $dflt" ;;
-*) dflt="$ccflags";;
-esac
-
-case "$dflt" in
-''|' ') dflt=none;;
-esac
-$cat <<EOH
-
-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 $package to honor its debug switch, you should include -DDEBUG here.
-
-To use no flags, specify the word "none".
-
-EOH
-?X: strip leading space
-set X $dflt
-shift
-dflt=${1+"$@"}
-rp="Any additional cc flags?"
-. ./myread
-case "$ans" in
-none) ccflags='';;
-*) ccflags="$ans";;
-esac
-
-: the following weeds options from ccflags that are of no interest to cpp
-cppflags="$ccflags"
-case "$gccversion" in
-1*) cppflags="$cppflags -D__GNUC__"
-esac
-case "$mips_type" in
-'');;
-*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
-esac
-case "$cppflags" in
-'');;
-*)
- echo " "
- echo "Let me guess what the preprocessor flags are..." >&4
- set X $cppflags
- shift
- cppflags=''
- $cat >cpp.c <<'EOM'
-#define BLURFL foo
-
-BLURFL xx LFRULB
-EOM
-?X:
-?X: For each cc flag, try it out with both cppstdin and cpprun, since the
-?X: first is almost surely a cc wrapper. We have to try both in case
-?X: of cc flags like '-Olimit 2900' that are actually two words...
-?X:
- previous=''
- for flag in $*
- do
- case "$flag" in
- -*) ftry="$flag";;
- *) ftry="$previous $flag";;
- esac
- if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
- >cpp1.out 2>/dev/null && \
- $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
- >cpp2.out 2>/dev/null && \
- $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
- $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
- then
- cppflags="$cppflags $ftry"
- previous=''
- else
- previous="$flag"
- fi
- done
- set X $cppflags
- shift
- cppflags=${1+"$@"}
- case "$cppflags" in
- *-*) echo "They appear to be: $cppflags";;
- esac
- $rm -f cpp.c cpp?.out
- ;;
-esac
-
-: flags used in final linking phase
-case "$ldflags" in
-'') if ./venix; then
- dflt='-i -z'
- else
- dflt=''
- fi
- case "$ccflags" in
- *-posix*) dflt="$dflt -posix" ;;
- esac
- ;;
-*) dflt="$ldflags";;
-esac
-
-: Try to guess additional flags to pick up local libraries.
-for thislibdir in $libpth; do
- case " $loclibpth " in
- *" $thislibdir "*)
- case "$dflt " in
- *"-L$thislibdir "*) ;;
- *) dflt="$dflt -L$thislibdir" ;;
- esac
- ;;
- esac
-done
-
-case "$dflt" in
-'') dflt='none' ;;
-esac
-
-$cat <<EOH
-
-Your C linker may need flags. For this question you should
-include -L/whatever and any other flags used by the C linker, but you
-should NOT include libraries like -lwhatever.
-
-Make sure you include the appropriate -L/path flags if your C linker
-does not normally search all of the directories you specified above,
-namely
- $libpth
-To use no flags, specify the word "none".
-
-EOH
-
-rp="Any additional ld flags (NOT including libraries)?"
-. ./myread
-case "$ans" in
-none) ldflags='';;
-*) ldflags="$ans";;
-esac
-rmlist="$rmlist pdp11"
-
-@if lkflags
-: partial linking may need other flags
-case "$lkflags" in
-'') case "$ldflags" in
- '') dflt='none';;
- *) dflt="$ldflags";;
- esac;;
-*) dflt="$lkflags";;
-esac
-echo " "
-rp="Partial linking flags to be used (NOT including -r)?"
-. ./myread
-case "$ans" in
-none) lkflags='';;
-*) lkflags="$ans";;
-esac
-
-@end
-?X:
-?X: If the user changes compilers after selecting a hint file, it's
-?X: possible that the suggested ccflags/ldflags will be wrong. Try to
-?X: compile and run a simple test program. Let the user see all the
-?X: error messages. -- ADO and RAM
-?X:
-: coherency check
-echo " "
-echo "Checking your choice of C compiler and flags for coherency..." >&4
-?X: Strip extra blanks in case some of the following variables are empty
-set X $cc $optimize $ccflags $ldflags try.c -o try
-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
-?X: Use "sh -c" to avoid error messages tagged with leading "Configure:".
-?X: We need to try the resulting executable, because cc might yield a 0 status
-?X: even when ld failed, in which case the executable will not run properly,
-?X: if its x bit is set at all...
-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
-?X: using -K will prevent default aborting--maybe they're cross compiling?
- 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
-
+++ /dev/null
-?RCS: $Id$
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
-?RCS:
-?RCS: $Log: cf_name.U,v $
-?RCS: Revision 3.0.1.2 1994/05/06 14:29:36 ram
-?RCS: patch23: fixed user name computation from /etc/passwd in bsd systems
-?RCS:
-?RCS: Revision 3.0.1.1 1994/01/24 14:05:11 ram
-?RCS: patch16: created
-?RCS:
-?RCS:
-?MAKE:cf_name: cf_by passcat Filexp nametype cat test
-?MAKE: -pick add $@ %<
-?S:cf_name:
-?S: Full name of the person who ran the Configure script and answered the
-?S: questions. This can be used by units that require the user's full name.
-?S: This variable is for internal use only.
-?S:.
-?T:xxx fn NAME
-: figure out their full name
-case "$NAME" in
-'') case "$nametype" in
- other)
- fn=`./filexp ~/.fullname`
- xxx=usg
- $test -f $fn && xxx=other
- ;;
- *)
- xxx="$nametype"
- ;;
- esac
-
- case "$xxx" in
- bsd)
- cf_name=`$passcat | grep "^$cf_by:" | \
- sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
- -e 's/,.*//'`
- ;;
- usg)
- cf_name=`$passcat | grep "^$cf_by:" | \
- sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
- -e 's/[^-]*-\(.*\)(.*)/\1/'`
- ;;
- *)
- cf_name=`$cat $fn`
- ;;
- esac
- ;;
-*)
- cf_name="$NAME"
- ;;
-esac
-?X:
-?X: In the original unit, Graham asked for the user name, in case the above
-?X: code was unable to figure it out correctly. Since now cf_name has been
-?X: made an internal variable only (i.e. it is not saved in config.sh), letting
-?X: the user override the computed default each time would be a pain.
-?X: Therefore, I have decided to trust the above code to get it right, and for
-?X: those rare cases where it will fail, too bad :-) --RAM.
-?X:
-echo " "
-echo "Pleased to meet you, $cf_name."
-
+++ /dev/null
-?RCS: $Id: d_attribut.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
-?RCS:
-?RCS: $Log: d_attribut.U,v $
-?RCS: Revision 3.0.1.3 1995/01/30 14:33:45 ram
-?RCS: patch49: test C program now includes <stdio.h> (WED)
-?RCS:
-?RCS: Revision 3.0.1.2 1995/01/11 15:25:47 ram
-?RCS: patch45: fixed typo in the d_attribut variable (ADO)
-?RCS:
-?RCS: Revision 3.0.1.1 1994/10/29 16:08:55 ram
-?RCS: patch36: created by ADO
-?RCS:
-?MAKE:d_attribut: Myread Oldconfig cat cc ccflags rm Setvar contains optimize
-?MAKE: -pick add $@ %<
-?S:d_attribut (d_attrib):
-?S: This variable conditionally defines HASATTRIBUTE, which
-?S: indicates the C compiler can check for function attributes,
-?S: such as printf formats.
-?S:.
-?C:HASATTRIBUTE ~ %< (GNUC_ATTRIBUTE_CHECK):
-?C: This symbol indicates the C compiler can check for function attributes,
-?C: such as printf formats. This is normally only supported by GNU cc.
-?C:.
-?H:?%<:#$d_attribut HASATTRIBUTE /**/
-?H:?%<:#ifndef HASATTRIBUTE
-?H:?%<:#define __attribute__(_arg_)
-?H:?%<:#endif
-?H:.
-?W:%<:__attribute__
-?LINT:set d_attribut
-?LINT:known __attribute__
-: Look for GNU-cc style attribute checking
-echo " "
-echo "Checking whether your compiler can handle __attribute__ ..." >&4
-$cat >attrib.c <<'EOCP'
-#include <stdio.h>
-void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
-EOCP
-if $cc $optimize $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
- echo "Your C compiler doesn't fully support __attribute__."
- val="$undef"
- else
- echo "Your C compiler supports __attribute__."
- val="$define"
- fi
-else
- echo "Your C compiler doesn't seem to understand __attribute__ at all."
- val="$undef"
-fi
-set d_attribut
-eval $setvar
-$rm -f attrib*
-
+++ /dev/null
-?RCS: $Id: d_crypt.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_crypt.U,v $
-?RCS: Revision 3.0 1993/08/18 12:05:52 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_crypt cryptlib i_crypt: Loc test xlibpth libpth Csym Setvar Inhdr
-?MAKE: -pick add $@ %<
-?S:d_crypt:
-?S: This variable conditionally defines the CRYPT symbol, which
-?S: indicates to the C program that the crypt() routine is available
-?S: to encrypt passwords and the like.
-?S:.
-?S:cryptlib:
-?S: This variable holds -lcrypt or the path to a libcrypt.a archive if
-?S: the crypt() function is not defined in the standard C library. It is
-?S: up to the Makefile to use this.
-?S:.
-?S:i_crypt:
-?S: This variable conditionally defines the I_CRYPT symbol, which
-?S: indicates whether a C program should include <crypt.h>
-?S:.
-?C:HAS_CRYPT (CRYPT):
-?C: This symbol, if defined, indicates that the crypt routine is available
-?C: to encrypt passwords and the like.
-?C:.
-?C:I_CRYPT:
-?C: This symbol, if defined, indicates that <crypt.h> can be included.
-?C:.
-?H:#$d_crypt HAS_CRYPT /**/
-?H:.
-?H:#$i_crypt I_CRYPT /**/
-?H:.
-?M:crypt: HAS_CRYPT
-?M:/* If your system doesn't have the crypt(3) DES encryption code,
-?M: * (which isn't exportable from the U.S.), then don't encrypt
-?M: */
-?M:#ifndef HAS_CRYPT
-?M:#define crypt(s,t) (s)
-?M:#endif
-?M:.
-?LINT:set d_crypt i_crypt
-?T:val
-: see if crypt exists
-echo " "
-if set crypt val -f d_crypt; eval $csym; $val; then
- echo 'crypt() found.' >&4
- val="$define"
- cryptlib=''
-else
- cryptlib=`./loc Slibcrypt.a "" $xlibpth`
- if $test -z "$cryptlib"; then
- cryptlib=`./loc Mlibcrypt.a "" $xlibpth`
- else
- cryptlib=-lcrypt
- fi
- if $test -z "$cryptlib"; then
- cryptlib=`./loc Llibcrypt.a "" $xlibpth`
- else
- cryptlib=-lcrypt
- fi
- if $test -z "$cryptlib"; then
- cryptlib=`./loc libcrypt.a "" $libpth`
- else
- cryptlib=-lcrypt
- fi
- if $test -z "$cryptlib"; then
- echo 'crypt() NOT found!' >&4
- val="$undef"
- else
- val="$define"
- fi
-fi
-set d_crypt
-eval $setvar
-: see if crypt.h can be included
-set crypt.h i_crypt
-eval $inhdr
-
+++ /dev/null
-?RCS:
-?RCS: Copyright (c) 2000, Shawn Wagner
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?MAKE:d_getadinf: Inlibc
-?MAKE: -pick add $@ %<
-?S:d_getadinf (d_getadinf):
-?S: This variable conditionally defines the HAS_GETADDRINFO symbol, which
-?S: indicates to the C program that the getaddrinfo() routine is available
-?S: to lookup internet addresses in one data base or another..
-?S:.
-?C:HAS_GETADDRINFO (GETADDRINFO):
-?C: This symbol, if defined, indicates that the getaddrinfo() routine is
-?C: available to lookup internet addresses in some data base or other.
-?C:.
-?H:#$d_getadinf HAS_GETADDRINFO /**/
-?H:.
-?LINT:set d_getadinf
-: see if getaddrinfo exists
-set getaddrinfo d_getadinf
-eval $inlibc
-
+++ /dev/null
-?RCS:
-?RCS: Copyright (c) 2000, Shawn Wagner
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?MAKE:d_getnminf: cat cc ccflags rm ldflags libs Inlibc
-?MAKE: -pick add $@ %<
-?S:d_getnminf (d_getnminf):
-?S: This variable conditionally defines the HAS_GETNAMEINFO symbol, which
-?S: indicates to the C program that the getnameinfo() routine is available
-?S: to lookup host names in one data base or another..
-?S:.
-?C:HAS_GETNAMEINFO (GETNAMEINFO):
-?C: This symbol, if defined, indicates that the getnameinfo() routine is
-?C: available to lookup host names in some data base or other.
-?C:.
-?H:#$d_getnminf HAS_GETNAMEINFO /**/
-?H:.
-?LINT:set d_getnminf
-: see if getnameinfo exists - along with constants we use
-set getnameinfo d_getnminf
-eval $inlibc
-
-if test $d_getnminf = 'define'; then
-
-echo " "
-$cat >test_getnminf.c <<EOCP
-#include <netdb.h>
-int main(int argc, char **argv) {
- int i;
- i = NI_MAXHOST + NI_MAXSERV + NI_NOFQDN + NI_NUMERICHOST + NI_NAMEREQD;
- i += NI_NUMERICSERV + NI_DGRAM;
-}
-EOCP
-
-if $cc $ccflags $ldflags -o test_getnminf test_getnminf.c $libs >/dev/null 2>&1 ; then
- d_getnminf='define'
- echo "You've got getnameinfo and the netdb constants." >&4
-else
- d_getnminf='undef'
- echo "You've got getnameinfo but not the NI_* constants! Broken!" >&4
-fi
-$rm -f test_getnminf* core
-
-fi
+++ /dev/null
-?RCS: $Id: d_getpagsz.U 1.2 Mon, 26 Mar 2001 15:18:14 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_getpagsz.U,v $
-?RCS: Revision 3.0.1.1 1994/10/29 16:13:10 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:06:14 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_getpagsz pagesize: Oldconfig Myread Inlibc cat contains cc ccflags \
- ldflags libs rm Findhdr osname d_sysctlbyname test
-?MAKE: -pick add $@ %<
-?S:d_getpagsz:
-?S: This variable conditionally defines HAS_GETPAGESIZE if getpagesize()
-?S: is available to get the system page size.
-?S:.
-?S:pagesize (pagsize):
-?S: This variable holds the size in bytes of a system page.
-?S:.
-?C:HAS_GETPAGESIZE (GETPAGESIZE):
-?C: This symbol, if defined, indicates that the getpagesize system call
-?C: is available to get system page size, which is the granularity of
-?C: many memory management calls.
-?C:.
-?X: Don't name it PAGESIZE, this is sometimes used by <sys/param.h>
-?C:PAGESIZE_VALUE (PAGSIZE):
-?C: This symbol holds the size in bytes of a system page (obtained via
-?C: the getpagesize() system call at configuration time or asked to the
-?C: user if the system call is not available).
-?C:.
-?H:#$d_getpagsz HAS_GETPAGESIZE /**/
-?H:#define PAGESIZE_VALUE $pagesize /* System page size, in bytes */
-?H:.
-?F:!page
-?T:guess
-?LINT:set d_getpagsz
-: see if getpagesize exists
-set getpagesize d_getpagsz
-eval $inlibc
-
-@if pagesize || PAGESIZE_VALUE
-: determine the system page size
-echo " "
-guess=' (OK to guess)'
-case "$pagesize" in
-'')
- $cat >page.c <<EOP
-#include <stdio.h>
-extern int getpagesize();
-int main()
-{
- printf("%d\n", getpagesize());
-}
-EOP
- echo "Computing the granularity of memory management calls..." >&4
- dflt='4096'
- case "$d_getpagsz" in
- "$define")
- if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then
- dflt=`./page`
- guess=''
- else
- echo "(I can't seem to compile the test program--guessing)"
- fi
- ;;
- *)
- if $cc $ccflags $ldflags page.c -o page $libs -lPW >/dev/null 2>&1; then
- dflt=`./page`
- guess=''
- echo "(For your eyes only: I used the getpagesize() from -lPW.)"
- else
- if $contains PAGESIZE `./findhdr sys/param.h` >/dev/null 2>&1; then
- $cat >page.c <<EOP
-#include <sys/param.h>
-#include <stdio.h>
-int main()
-{
- printf("%d\n", PAGESIZE);
-}
-EOP
- if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then
- dflt=`./page`
- guess=''
- echo "(Using value of PAGESIZE found in <sys/param.h>.)"
- else
- if $test "x$d_sysctlbyname" = "x$define"; then
- $cat >page.c <<EOP
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#include <stdio.h>
-int main()
-{
- int res, pgsize
- size_t len;
- len = sizeof(pgsize);
- res = sysctlbyname("hw.pagesize",&pgsize,&len,NULL,0);
- if (res < 0)
- res = sysctlbyname("hw_pagesize",&pgsize,&len,NULL,0);
- printf("%d\n", res ? -1 : pgsize);
-}
-EOP
- if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then
- dflt=`./page`
- if $test $dflt -gt 0; then
- guess=''
- echo "(Using value from sysctlbyname)"
- else
- dflt='4096'
- fi
- fi
- fi
- fi
- fi
- fi
- ;;
- esac
- ;;
-*) dflt="$pagesize"; guess='';;
-esac
-rp="What is the system page size, in bytes$guess?"
-. ./myread
-pagesize=$ans
-$rm -f page.c page
-
-@end
+++ /dev/null
-?RCS: $Id: d_gettext.U 1.2 Wed, 13 Sep 2000 14:49:45 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1995, Alan Schwartz
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?MAKE:d_gettext: Myread cat cc ccflags rm ldflags libs i_libintl
-?MAKE: -pick add $@ %<
-?S:d_gettext:
-?S: Defined if gettext() is available.
-?S:.
-?C:HAS_GETTEXT:
-?C: Defined if gettext is available().
-?C:.
-?H:#$d_gettext HAS_GETTEXT /**/
-?H:.
-: check for a new-style definitions
-echo " "
-$cat >test_gettext.c <<EOCP
-#$i_libintl I_LIBINTL
-#ifdef I_LIBINTL
-#include <libintl.h>
-#endif
-int main(int argc, char **argv) {
- return (int) gettext ("");
-}
-EOCP
-
-if $cc $ccflags $ldflags -o test_gettext test_gettext.c $libs >/dev/null 2>&1 ; then
- d_gettext='define'
- echo 'Voila! You seem to have gettext for translations.' >&4
-else
- d_gettext='undef'
- echo "You don't seem to have gettext. Quel dommage." >&4
-fi
-$rm -f test_gettext* core
-
+++ /dev/null
-?RCS: $Id: d_gnulibc.U,v 3.0.1.1 1997/02/28 15:34:33 ram Exp $
-?RCS:
-?RCS: Copyright (c) 1996, Andy Dougherty
-?RCS: Copyright (c) 1996, Sven Verdoolaege
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_gnulibc.U,v $
-?RCS: Revision 3.0.1.1 1997/02/28 15:34:33 ram
-?RCS: patch61: created
-?RCS:
-?MAKE:d_gnulibc: Myread Oldconfig Setvar contains rm \
- +cc +ccflags +ldflags +libs
-?MAKE: -pick add $@ %<
-?S:d_gnulibc:
-?S: Defined if we're dealing with the GNU C Library.
-?S:.
-?C:HAS_GNULIBC:
-?C: This symbol, if defined, indicates to the C program that
-?C: the GNU C library is being used.
-?C:.
-?H:#$d_gnulibc HAS_GNULIBC /**/
-?H.
-?LINT: set d_gnulibc
-?X: gnulibc can be executed by calling this entry point.
-?X: Ulrich Drepper doesn't think any other libc does that,
-?X: but we check if it says 'GNU C Library' to be sure.
-echo " "
-echo "Checking for GNU C Library..." >&4
-cat >gnulibc.c <<EOM
-int
-main()
-{
- return __libc_main();
-}
-EOM
-if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \
- ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
- val="$define"
- echo "You are using the GNU C Library" >&4
-else
-cat >gnulibc.c <<EOM
-#include <features.h>
-int main()
-{
-#ifdef __GLIBC__
- return 0;
-#else
- return 1;
-#endif
-}
-EOM
-if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \
- ./gnulibc; then
- val="$define"
- echo "You are using the GNU C Library" >&4
-else
- val="$undef"
- echo "You are not using the GNU C Library" >&4
-fi
-fi
-$rm -f gnulibc*
-set d_gnulibc
-eval $setvar
-
+++ /dev/null
-?MAKE:d_ipv6: test cc cat ccflags ldflags libs i_systypes i_syssock i_niin i_sysin
-?MAKE: -pick add $@ %<
-?S:d_ipv6:
-?S: This variable is set if the system defines the sockaddr_in6 struct.
-?S: and AF_INET6. We can't rely on just AF_INET6 being defined.
-?S:.
-?C:HAS_IPV6:
-?C: If defined, this system has the sockaddr_in6 struct and AF_INET6.
-?C: We can't rely on just AF_INET6 being defined.
-?C:.
-?H:#$d_ipv6 HAS_IPV6 /**/
-?H:.
-?LINT:set d_ipv6
-: see if we have struct sockaddr_in6.
-echo " "
-$cat >d_ipv6.c <<EOCP
-#$i_systypes I_SYS_TYPES
-#$i_syssock I_SYS_SOCK
-#$i_niin I_NETINET_IN
-#$i_sysin I_SYS_IN
-#ifdef I_SYS_TYPES
-#include <sys/types.h>
-#endif
-#ifdef I_SYS_SOCK
-#include <sys/socket.h>
-#endif
-#ifdef I_NETINET_IN
-#include <netinet/in.h>
-#else
-#ifdef I_SYS_IN
-#include <sys/in.h>
-#endif
-#endif
-#include <stdio.h>
-main()
-{
- struct sockaddr_in6 test;
- int foo = AF_INET6;
- printf("%d\n", foo);
-}
-EOCP
-if $cc $ccflags $ldflags d_ipv6.c -o d_ipv6 $libs >/dev/null 2>&1; then
- val="$define"
- set d_ipv6; eval $setvar
- echo "IPv6 structures found." >&4
-else
- val="$undef"
- set d_ipv6; eval $setvar
- echo "No IPv6 structures found. No problem." >&4
-fi
+++ /dev/null
-?RCS: $Id: d_keepsig.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_keepsig.U,v $
-?RCS: Revision 3.0.1.3 1995/01/11 15:26:25 ram
-?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI
-?RCS:
-?RCS: Revision 3.0.1.2 1994/10/29 16:13:59 ram
-?RCS: patch36: call ./bsd explicitely instead of relying on PATH
-?RCS:
-?RCS: Revision 3.0.1.1 1993/10/16 13:48:47 ram
-?RCS: patch12: comment for SIGNALS_KEPT was the other way round
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:06:26 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_keepsig: cat cc ccflags rm Guess contains echo n c Setvar d_sigaction ldflags
-?MAKE: -pick add $@ %<
-?S:d_keepsig:
-?S: This variable contains the eventual value of the SIGNALS_KEPT symbol,
-?S: which indicates to the C program if signal handlers need not reinstated
-?S: after receipt of a signal.
-?S:.
-?C:SIGNALS_KEPT (PERSISTENT_SIGNAL):
-?C: This symbol is defined if signal handlers needn't be reinstated after
-?C: receipt of a signal.
-?C:.
-?H:#$d_keepsig SIGNALS_KEPT /**/
-?H:.
-?LINT:set d_keepsig
-: see if signals are kept
-val="$undef"
-echo " "
-echo "Checking to see if signal handlers stick around..." >&4
-if test ${d_sigaction} = "$define"; then
- echo "You've got sigaction, so we can force 'em to." >&4
- val="$define"
-else
- $cat >try.c <<'EOCP'
-foo() {}
-
-int main()
-{
- signal(2, foo);
- kill(getpid(), 2);
- kill(getpid(), 2);
- printf("abc\n");
-}
-EOCP
- if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then
- sh -c ./try >try.out 2>/dev/null
- if $contains abc try.out >/dev/null 2>&1; then
- echo "Yes, they do."
- val="$define";
- else
- echo "No, they don't."
- fi
- else
- $echo $n "(I can't seem to compile the test program. Assuming $c"
- if ./bsd; then
- echo "they do.)"
- val="$define"
- else
- echo "they don't.)"
- fi
- fi
-fi
-set d_keepsig
-eval $setvar
-$rm -f try*
-
+++ /dev/null
-?RCS: $Id: d_memcpy.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_memcpy.U,v $
-?RCS: Revision 3.0.1.1 1993/09/13 16:02:58 ram
-?RCS: patch10: removed text recommending bcopy over memcpy (WAD)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:06:34 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_memcpy d_memmove: Inlibc
-?MAKE: -pick add $@ %<
-?S:d_memcpy:
-?S: This variable conditionally defines the HAS_MEMCPY symbol, which
-?S: indicates to the C program that the memcpy() routine is available
-?S: to copy blocks of memory.
-?S:.
-?S:d_memmove:
-?S: This variable conditionally defines the HAS_MEMMOVE symbol, which
-?S: indicates to the C program that the memmove() routine is available
-?S: to copy overlapping blocks of memory.
-?S:.
-?C:HAS_MEMCPY (MEMCPY):
-?C: This symbol, if defined, indicates that the memcpy routine is available
-?C: to copy blocks of memory. If not, it will be mapped to bcopy
-?C: in confmagic.h
-?C:.
-?C:HAS_MEMMOVE (MEMMOVE):
-?C: This symbol, if defined, indicates that the memmove routine is available
-?C: to copy blocks of memory. If not, it will be mapped to bcopy
-?C:.
-?H:#$d_memcpy HAS_MEMCPY /**/
-?H:.
-?H:#$d_memmove HAS_MEMMOVE /**/
-?H:.
-?M:memcpy:HAS_MEMCPY
-?M:#ifndef HAS_MEMCPY
-?M:#ifndef memcpy
-?M:#define memcpy(d,s,l) bcopy((s),(d),(l))
-?M:#endif
-?M:#endif
-?M:.
-?M:memmove:HAS_MEMMOVE
-?M:#ifndef HAS_MEMMOVE
-?M:#ifndef memmove
-?M:#define memmove(d,s,l) bcopy((s),(d),(l))
-?M:#endif
-?M:#endif
-?M:.
-?LINT:set d_memcpy d_memmove
-: see if memcpy exists
-set memcpy d_memcpy
-eval $inlibc
-set memmove d_memmove
-eval $inlibc
-
+++ /dev/null
-?RCS: $Id: d_open3.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_open3.U,v $
-?RCS: Revision 3.0.1.2 1997/02/28 15:37:12 ram
-?RCS: patch61: added ?F: metalint hint
-?RCS:
-?RCS: Revision 3.0.1.1 1995/07/25 13:58:26 ram
-?RCS: patch56: added knowledge of the O_NONBLOCK symbol
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:06:44 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_open3: test cc cat ccflags ldflags libs h_fcntl h_sysfile rm Setvar Findhdr
-?MAKE: -pick add $@ %<
-?X: It would be easy to separate the h_O_stuff from this.
-?X: Is there a reason to do so? -- HMS
-?S:d_open3:
-?S: This variable conditionally defines the HAS_OPEN3 manifest constant,
-?S: which indicates to the C program that the 3 argument version of
-?S: the open(2) function is available.
-?S:.
-?C:HAS_OPEN3 (OPEN3):
-?C: This manifest constant lets the C program know that the three
-?C: argument form of open(2) is available.
-?C:.
-?H:#$d_open3 HAS_OPEN3 /**/
-?H:.
-?W:%<:O_RDONLY O_WRONLY O_RDWR O_NDELAY O_APPEND O_SYNC O_CREAT O_TRUNC
-?W:%<:O_EXCL O_NONBLOCK
-?F:!open3
-?LINT:set d_open3
-?LINT:change h_fcntl h_sysfile
-: Locate the flags for 'open()'
-echo " "
-$cat >open3.c <<'EOCP'
-#include <sys/types.h>
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
-int main() {
- if(O_RDONLY);
-#ifdef O_TRUNC
- exit(0);
-#else
- exit(1);
-#endif
-}
-EOCP
-: check sys/file.h first to get FREAD on Sun
-if $test "`./findhdr sys/file.h`" && \
- $cc $ccflags $ldflags "-DI_SYS_FILE" open3.c -o open3 $libs >/dev/null 2>&1 ; then
- h_sysfile=true;
- echo "<sys/file.h> defines the O_* constants..." >&4
- if ./open3; then
- echo "and you have the 3 argument form of open()." >&4
- val="$define"
- else
- echo "but not the 3 argument form of open(). Oh, well." >&4
- val="$undef"
- fi
-elif $test "`./findhdr fcntl.h`" && \
- $cc $ccflags $ldflags "-DI_FCNTL" open3.c -o open3 $libs >/dev/null 2>&1 ; then
- h_fcntl=true;
- echo "<fcntl.h> defines the O_* constants..." >&4
- if ./open3; then
- echo "and you have the 3 argument form of open()." >&4
- val="$define"
- else
- echo "but not the 3 argument form of open(). Oh, well." >&4
- val="$undef"
- fi
-else
- val="$undef"
- echo "I can't find the O_* constant definitions! You got problems." >&4
-fi
-set d_open3
-eval $setvar
-$rm -f open3*
-
+++ /dev/null
-?RCS: $Id: d_random.U 1.4 Fri, 15 Feb 2002 16:56:28 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 1995, Alan Schwartz
-?RCS: Based on d_strchr.U
-?RCS:
-?MAKE:d_random d_lrand48 d_rand: Inlibc
-?MAKE: -pick add $@ %<
-?S:d_random:
-?S: This variable conditionally defines HAS_RANDOM if random() is there
-?S:.
-?S:d_lrand48:
-?S: This conditionally defines HAS_LRAND48 if lrand45() is there
-?S:.
-?S:d_rand:
-?S: This conditionally defines HAS_RAND if rand() is there
-?S:.
-?C:HAS_RANDOM:
-?C: Have we got random(), our first choice for number generation?
-?C:.
-?C:HAS_LRAND48:
-?C: Have we got lrand48(), our second choice?
-?C:.
-?C:HAS_RAND:
-?C: Have we got rand(), our last choice?
-?C:.
-?H:#$d_random HAS_RANDOM /**/
-?H:#$d_lrand48 HAS_LRAND48 /**/
-?H:#$d_rand HAS_RAND /**/
-?H:.
-?M:random: HAS_RANDOM HAS_LRAND48 HAS_RAND
-?M:#ifndef HAS_RANDOM
-?M:#ifndef random
-?M:#ifdef HAS_LRAND48
-?M:#define random lrand48
-?M:#define srandom srand48
-?M:#else
-?M:#ifdef HAS_RAND
-?M:#define random rand
-?M:#define srandom srand
-?M:#endif
-?M:#endif
-?M:#endif
-?M:#endif
-?M:.
-?LINT:set d_lrand48 d_rand d_random
-: random, lrand48, or rand
-set random d_random
-eval $inlibc
-set lrand48 d_lrand48
-eval $inlibc
-set rand d_rand
-eval $inlibc
-
+++ /dev/null
-?RCS: $Id: d_rlimit.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1995, Alan Schwartz
-?RCS:
-?RCS:
-?X: We may need to include <sys/resource.h> and <sys/time.h> FIXME
-?X:INC: i_sysresrc i_systime
-?MAKE:d_rlimit: Inlibc
-?MAKE: -pick add $@ %<
-?S:d_rlimit:
-?S: This variable conditionally defines the HAS_GETRLIMIT symbol, which
-?S: indicates that the getrlimit() routine exists. The getrlimit() routine
-?S: supports getting resource limits, and there should be a setrlimit() too
-?S: We probably need to include <sys/resource.h> and <sys/time.h>.
-?S:.
-?C:HAS_GETRLIMIT (RLIMIT GETRLIMIT):
-?C: This symbol, if defined, indicates that the getrlimit() routine is
-?C: available to get resource limits. Probably means setrlimit too.
-?C: Inclusion of <sys/resource.h> and <sys/time.h> may be necessary.
-?C:.
-?H:#$d_rlimit HAS_GETRLIMIT /**/
-?H:.
-?LINT:set d_rlimit
-: see if getrlimit exists
-set getrlimit d_rlimit
-eval $inlibc
-
+++ /dev/null
-?RCS: $Id: d_sigprocmask.U 1.1 Wed, 29 Nov 2000 11:35:38 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 2000 Shawn Wagner
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS:
-?MAKE:d_sigprocmask: Csym Setvar cat cc ccflags ldflags libs rm _o
-?MAKE: -pick add $@ %<
-?S:d_sigprocmask:
-?S: This variable conditionally defines the HAS_SIGPROCMASK symbol, which
-?S: indicates that the POSIX sigprocmask() routine is available.
-?S:.
-?C:HAS_SIGPROCMASK:
-?C: This symbol, if defined, indicates that POSIX's sigprocmask() routine
-?C: is available.
-?C:.
-?H:#$d_sigprocmask HAS_SIGPROCMASK /**/
-?H:.
-?T:val
-?LINT:set d_sigprocmask
-echo " "
-: see if we have sigprocmask
-if set sigprocmask val -f d_sigprocmask; eval $csym; $val; then
- echo 'sigprocmask() found.' >&4
- val="$define"
-else
- echo 'sigprocmask NOT found.' >&4
- val="$undef"
-fi
-?X:
-?X: Solaris 2.5_x86 with SunWorks Pro C 3.0.1 doesn't have a complete
-?X: sigaction structure if compiled with cc -Xc. This compile test
-?X: will fail then. <doughera@lafcol.lafayette.edu>
-?X:
-$cat > set.c <<'EOP'
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-main()
-{
- sigset_t mask, oldmask;
- sigprocmask(SIG_SETMASK, &mask, &oldmask);
-}
-EOP
-if $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1; then
- :
-else
- echo "But you don't seem to have a working sigprocmask." >&4
- val="$undef"
-fi
-set d_sigprocmask; eval $setvar
-$rm -f set set$_o set.c
-
+++ /dev/null
-?RCS: $Id: d_stdstdio.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Tye McQueen <tye@metronet.com>
-?RCS: Actually, now this won't do anything.
-?RCS:
-?RCS: $Log: d_stdstdio.U,v $
-?RCS: Revision 3.0.1.1 1995/05/12 12:12:11 ram
-?RCS: patch54: complete rewrite by Tye McQueen to fit modern systems
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:07:31 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_stdstdio d_stdiobase stdio_ptr stdio_cnt stdio_base \
- stdio_bufsiz: +ccflags \
- Setvar Findhdr Oldconfig
-?MAKE: -pick add $@ %<
-?LINT:describe d_stdstdio d_stdiobase stdio_base stdio_bufsiz \
- stdio_cnt stdio_ptr
-?LINT:set d_stdstdio d_stdiobase stdio_base stdio_bufsiz \
- stdio_cnt stdio_ptr
-: do nothing but prevent the standard stdstdio.U from running
-
+++ /dev/null
-?RCS: $Id: d_strchr.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_strchr.U,v $
-?RCS: Revision 3.0.1.2 1993/10/16 13:49:20 ram
-?RCS: patch12: added support for HAS_INDEX
-?RCS: patch12: added magic for index() and rindex()
-?RCS:
-?RCS: Revision 3.0.1.1 1993/09/13 16:05:26 ram
-?RCS: patch10: now only defines HAS_STRCHR, no macro remap of index (WAD)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:07:32 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_strchr d_index: contains strings Setvar Myread Oldconfig Csym
-?MAKE: -pick add $@ %<
-?S:d_strchr:
-?S: This variable conditionally defines HAS_STRCHR if strchr() and
-?S: strrchr() are available for string searching.
-?S:.
-?S:d_index:
-?S: This variable conditionally defines HAS_INDEX if index() and
-?S: rindex() are available for string searching.
-?S:.
-?C:HAS_STRCHR:
-?C: This symbol is defined to indicate that the strchr()/strrchr()
-?C: functions are available for string searching. If not, try the
-?C: index()/rindex() pair.
-?C:.
-?C:HAS_INDEX:
-?C: This symbol is defined to indicate that the index()/rindex()
-?C: functions are available for string searching.
-?C:.
-?H:#$d_strchr HAS_STRCHR /**/
-?H:#$d_index HAS_INDEX /**/
-?H:.
-?M:index: HAS_INDEX
-?M:#ifndef HAS_INDEX
-?M:#ifndef index
-?M:#define index strchr
-?M:#endif
-?M:#endif
-?M:.
-?M:strchr: HAS_STRCHR
-?M:#ifndef HAS_STRCHR
-?M:#ifndef strchr
-?M:#define strchr index
-?M:#endif
-?M:#endif
-?M:.
-?M:rindex: HAS_INDEX
-?M:#ifndef HAS_INDEX
-?M:#ifndef rindex
-?M:#define rindex strrchr
-?M:#endif
-?M:#endif
-?M:.
-?M:strrchr: HAS_STRCHR
-?M:#ifndef HAS_STRCHR
-?M:#ifndef strrchr
-?M:#define strrchr rindex
-?M:#endif
-?M:#endif
-?M:.
-?T:vali
-?LINT:set d_strchr d_index
-: index or strchr
-echo " "
-if set index val -f; eval $csym; $val; then
- if set strchr val -f d_strchr; eval $csym; $val; then
- if $contains strchr "$strings" >/dev/null 2>&1 ; then
-?X: has index, strchr, and strchr in string header
- val="$define"
- vali="$define"
- echo "strchr() and index() found." >&4
- else
-?X: has index, strchr, and no strchr in string header
- val="$undef"
- vali="$define"
- echo "index() found." >&4
- fi
- else
-?X: has only index, no strchr, string header is a moot point
- val="$undef"
- vali="$define"
- echo "index() found." >&4
- fi
-else
- if set strchr val -f d_strchr; eval $csym; $val; then
- val="$define"
- vali="$undef"
- echo "strchr() found." >&4
- else
- echo "No index() or strchr() found!" >&4
- val="$undef"
- vali="$undef"
- fi
-fi
-set d_strchr; eval $setvar
-val="$vali"
-set d_index; eval $setvar
-
+++ /dev/null
-?RCS: $Id: d_strcoll.U 1.3 Tue, 30 Sep 2003 18:01:23 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
-?RCS:
-?RCS: $Log: d_strcoll.U,v $
-?RCS: Revision 3.0.1.1 1994/08/29 16:12:01 ram
-?RCS: patch32: created by ADO
-?RCS:
-?MAKE:d_strcoll: Inlibc
-?MAKE: -pick add $@ %<
-?S:d_strcoll:
-?S: This variable conditionally defines HAS_STRCOLL if strcoll() is
-?S: available to compare strings using collating information.
-?S:.
-?C:HAS_STRCOLL:
-?C: This symbol, if defined, indicates that the strcoll routine is
-?C: available to compare strings using collating information.
-?C:.
-?H:#$d_strcoll HAS_STRCOLL /**/
-?H:.
-?M:strcoll: HAS_STRCOLL
-?M:#ifndef HAS_STRCOLL
-?M:#undef strcoll
-?M:#define strcoll strcmp
-?M:#endif
-?M:.
-?W:%<:strcoll
-?LINT:set d_strcoll
-: see if strcoll exists
-set strcoll d_strcoll
-eval $inlibc
-
+++ /dev/null
-?RCS: $Id: d_strxfrm.U 1.2 Tue, 20 Nov 2001 17:08:09 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
-?RCS:
-?RCS: $Log: d_strxfrm.U,v $
-?RCS: Revision 3.0.1.1 1994/08/29 16:12:01 ram
-?RCS: patch32: created by ADO
-?RCS:
-?MAKE:d_strxfrm: Inlibc
-?MAKE: -pick add $@ %<
-?S:d_strxfrm:
-?S: This variable conditionally defines HAS_STRXFRM if strxfrm() is
-?S: available to transform strings using collating information.
-?S:.
-?C:HAS_STRXFRM:
-?C: This symbol, if defined, indicates that the strxfrm routine is
-?C: available to transform strings using collating information.
-?C:.
-?H:#$d_strxfrm HAS_STRXFRM /**/
-?H:.
-?M:strxfrm: HAS_STRXFRM
-?M:#if !defined(WIN32) && !defined(HAS_STRXFRM)
-?M:#define strncoll strncmp
-?M:#define strncasecoll strncasecmp
-?M:#define strcasecoll strcasecmp
-?M:#endif
-?M:.
-?LINT:set d_strxfrm
-: see if strxfrm exists
-set strxfrm d_strxfrm
-eval $inlibc
-
+++ /dev/null
-?RCS:
-?RCS:
-?RCS:
-?MAKE:d_sysctl d_sysctlbyname: Inlibc
-?MAKE: -pick add $@ %<
-?S:d_sysctl:
-?S: This variable conditionally defines the HAS_SYSCTL symbol, which
-?S: indicates that the sysctl() routine exists.
-?S:.
-?S:d_sysctlbyname:
-?S: This variable conditionally defines the HAS_SYSCTLBYNAME symbol, which
-?S: indicates that the sysctlbyname() routine exists.
-?S:.
-?C:HAS_SYSCTL:
-?C: This symbol, if defined, indicates that the sysctl() routine is
-?C: available to get some system parameters.
-?C:.
-?C:HAS_SYSCTLBYNAME:
-?C: This symbol, if defined, indicates that the sysctlbyname() routine is
-?C: available to get some system parameters.
-?C:.
-?H:#$d_sysctl HAS_SYSCTL /**/
-?H:#$d_sysctlbyname HAS_SYSCTLBYNAME /**/
-?H:.
-?LINT:set d_sysctl d_sysctlbyname
-: see if sysctl exists
-set sysctl d_sysctl
-eval $inlibc
-: see if sysctlbyname exists
-set sysctlbyname d_sysctlbyname
-eval $inlibc
-
+++ /dev/null
-?RCS: $Id: d_uptime.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_uptime.U,v $
-?RCS: Revision 3.0.1.2 1993/10/16 13:49:20 ram
-?RCS: patch12: added support for HAS_INDEX
-?RCS: patch12: added magic for index() and rindex()
-?RCS:
-?RCS: Revision 3.0.1.1 1993/09/13 16:05:26 ram
-?RCS: patch10: now only defines HAS_STRCHR, no macro remap of index (WAD)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:07:32 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_uptime : Setvar Oldconfig Csym uptime test
-?MAKE: -pick add $@ %<
-?S:d_uptime:
-?S: This variable conditionally defines UPTIME_PATH if the uptime
-?S: program is available.
-?S:.
-?C:UPTIME_PATH:
-?C: This symbol gives the full path to the uptime(1) program if
-?C: it exists on the system. If not, this symbol is undefined.
-?C:.
-?C:HAS_UPTIME:
-?C: This symbol is defined if uptime(1) is available.
-?C:.
-?H:#$d_uptime HAS_UPTIME /**/
-?H:#define UPTIME_PATH "$uptime"
-?H:.
-?LINT:set d_uptime
-: uptime
-echo " "
-if $test -x $uptime ; then
- val="$define"
-else
- val="$undef"
-fi
-set d_uptime; eval $setvar
-
+++ /dev/null
-?RCS: $Id: d_uwait.U 1.2 Wed, 09 Aug 2000 14:09:22 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_uwait.U,v $
-?RCS: Revision 3.0.1.1 1994/01/24 14:10:49 ram
-?RCS: patch16: added knowledge about wait3()
-?RCS: patch16: revised 'union wait' look-up algorithm
-?RCS: patch16: fixed make dependency line accordingly
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:07:54 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_uwait d_uwait3: cat contains cppstdin cppminus +cppflags rm \
- Setvar Findhdr
-?MAKE: -pick add $@ %<
-?S:d_uwait:
-?S: This symbol conditionally defines UNION_WAIT which indicates to the C
-?S: program that argument for the wait() system call should be declared as
-?S: 'union wait status' instead of 'int status'.
-?S:.
-?S:d_uwait3:
-?S: This symbol conditionally defines UNION_WAIT3 which indicates to the C
-?S: program that the first argument for the wait3() system call should be
-?S: declared as 'union wait status' instead of 'int status'.
-?S:.
-?C:UNION_WAIT:
-?C: This symbol if defined indicates to the C program that the argument
-?C: for the wait() system call should be declared as 'union wait status'
-?C: instead of 'int status'. You probably need to include <sys/wait.h>
-?C: in the former case (see I_SYSWAIT).
-?C:.
-?C:UNION_WAIT3:
-?C: This symbol if defined indicates to the C program that the first argument
-?C: for the wait3() system call should be declared as 'union wait status'
-?C: instead of 'int status'. You probably need to include <sys/wait.h>
-?C: in the former case (see I_SYS_WAIT). It seems safe to assume that the
-?C: same rule applies to the second parameter of wait4().
-?C:.
-?H:#$d_uwait UNION_WAIT /**/
-?H:#$d_uwait3 UNION_WAIT3 /**/
-?H:.
-?T:val2 flags f also
-?LINT:set d_uwait d_uwait3
-: see if union wait is available
-echo " "
-?X:
-?X: Unfortunately, we can't just grep <sys/wait.h> for "union wait" because
-?X: some weird systems (did I hear HP-UX?) define union wait only when _BSD
-?X: is defined. The same thing happens on OSF/1, who is pushing weirdness to
-?X: its limits by requiring wait() to use (int *) but wait3() to use
-?X: (union wait *), unless _BSD is defined and -lbsd is used, in which case
-?X: wait() also expects (union wait *). Aaargh!!--RAM
-?X:
-set X $cppflags
-shift
-flags=''
-also=''
-for f in $*; do
- case "$f" in
- *NO_PROTO*) ;;
- *) flags="$flags $f";;
- esac
-done
-xxx="`./findhdr sys/wait.h`"
-case "x$xxx" in
-x) xxx=/dev/null
-esac
-$cat "$xxx" | $cppstdin $flags $cppminus >wait.out 2>/dev/null
-if $contains 'union.*wait.*{' wait.out >/dev/null 2>&1 ; then
- echo "Looks like your <sys/wait.h> knows about 'union wait'..." >&4
- val="$define"
-@if UNION_WAIT
- also='also '
- if $contains 'extern.*wait[ ]*([ ]*int' wait.out >/dev/null 2>&1
- then
- echo "But wait() seems to expect an 'int' pointer (POSIX way)." >&4
- val="$undef"
- also=''
- elif $contains 'extern.*wait[ ]*([ ]*union' wait.out >/dev/null 2>&1
- then
- echo "And indeed wait() expects an 'union wait' pointer (BSD way)." >&4
- else
- echo "So we'll use that for wait()." >&4
- fi
-@end
-@if UNION_WAIT3 || d_uwait3
- val2="$define"
-@end
-@if UNION_WAIT3
- if $contains 'extern.*wait3[ ]*([ ]*int' wait.out >/dev/null 2>&1
- then
- echo "However wait3() seems to expect an 'int' pointer, weird." >&4
- val2="$undef"
- elif $contains 'extern.*wait3[ ]*([ ]*union' wait.out >/dev/null 2>&1
- then
- echo "And wait3() ${also}expects an 'union wait' pointer, fine." >&4
- else
- echo "As expected, wait3() ${also}uses an 'union wait' pointer." >&4
- fi
-@end
-else
- echo "No trace of 'union wait' in <sys/wait.h>..." >&4
- val="$undef"
-@if UNION_WAIT && UNION_WAIT3
- echo "Both wait() and wait3() will use a plain 'int' pointer then." >&4
-@elsif UNION_WAIT
- echo "Your wait() should be happy with a plain 'int' pointer." >&4
-@elsif UNION_WAIT3
- echo "Your wait3() should be happy with a plain 'int' pointer." >&4
-@end
-fi
-set d_uwait
-eval $setvar
-@if UNION_WAIT3 || d_uwait3
-val="$val2"; set d_uwait3
-eval $setvar
-@end
-$rm -f wait.out
-
+++ /dev/null
-?RCS: $Id: d_vsnprintf.U 1.2 Sat, 30 Jun 2001 08:59:12 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: d_vsnprintf.U,v $
-?RCS: Revision 3.0 1993/08/18 12:07:59 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_vsnprintf: Guess cat +cc +ccflags Csym Setvar
-?MAKE: -pick add $@ %<
-?S:d_vsnprintf:
-?S: This variable conditionally defines the HAS_VSNPRINTF symbol, which
-?S: indicates to the C program that the vsnprintf() routine is available
-?S: to printf with a pointer to an argument list.
-?S:.
-?C:HAS_VSNPRINTF:
-?C: This symbol, if defined, indicates that the vsnprintf routine is
-?C: available to printf with a pointer to an argument list. If not, you
-?C: may need to write your own, probably in terms of _doprnt().
-?C:.
-?H:#$d_vsnprintf HAS_VSNPRINTF /**/
-?H:.
-?LINT:set d_vsnprintf
-: see if vsnprintf exists
-echo " "
-if set vsnprintf val -f d_vsnprintf; eval $csym; $val; then
- echo 'vsnprintf() found.' >&4
- val="$define"
-else
- echo 'vsnprintf() NOT found.' >&4
- val="$undef"
-fi
-set d_vsnprintf
-eval $setvar
-
+++ /dev/null
-?RCS: $Id: i_libintl.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_libintl.U,v $
-?RCS: Revision 3.0 1993/08/18 12:08:34 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: Look whether <libintl.h> can be included
-?X:
-?MAKE:i_libintl: Inhdr
-?MAKE: -pick add $@ %<
-?S:i_libintl:
-?S: This variable conditionally defines the I_LIBINTL symbol,
-?S: and indicates whether a C program can include <libintl.h>.
-?S:.
-?C:I_LIBINTL:
-?C: This symbol, if defined, indicates to the C program that it can
-?C: include <libintl.h>.
-?C:.
-?H:#$i_libintl I_LIBINTL /**/
-?H:.
-?LINT:set i_libintl
-: see if libintl.h can be included
-set libintl.h i_libintl
-eval $inhdr
+++ /dev/null
-?RCS: $Id: i_memory.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_memory.U,v $
-?RCS: Revision 1.2 1997/11/25 22:07:30 popiel
-?RCS: ,
-?RCS:
-?RCS: Revision 3.0.1.3 1994/06/20 07:01:55 ram
-?RCS: patch30: cosmetic changes
-?RCS:
-?RCS: Revision 3.0.1.2 1994/05/13 15:23:56 ram
-?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
-?RCS:
-?RCS: Revision 3.0.1.1 1994/05/06 15:02:25 ram
-?RCS: patch23: avoid conflicts with <string.h>
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:08:22 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:i_memory: Inhdr strings cppstdin cppflags cppminus contains rm Setvar
-?MAKE: -pick add $@ %<
-?S:i_memory:
-?S: This variable conditionally defines the I_MEMORY symbol, and indicates
-?S: whether a C program should include <memory.h>.
-?S:.
-?C:I_MEMORY:
-?C: This symbol, if defined, indicates to the C program that it should
-?C: include <memory.h>.
-?C:.
-?H:#$i_memory I_MEMORY /**/
-?H:.
-?LINT:set i_memory
-?X:
-?X: Unfortunately, the definitions of memory functions sometimes
-?X: conflict with those in <string.h>. We'll assume that if
-?X: <string.h> contains memcpy, then we don't need memory.h
-?X:
-: see if memory.h is available.
-val=''
-set memory.h val
-eval $inhdr
-
-: See if it conflicts with string.h
-case "$val" in
-$define)
- case "$strings" in
- '') ;;
- *)
- $cppstdin $cppflags $cppminus < "$strings" > mem.h
- if $contains 'memcpy' mem.h >/dev/null 2>&1; then
- echo " "
- echo "We won't be including <memory.h>."
- val="$undef"
- fi
- $rm -f mem.h
- ;;
- esac
-esac
-set i_memory
-eval $setvar
-
+++ /dev/null
-?RCS: $Id: i_netdb.U 1.1 Mon, 26 Mar 2001 15:51:56 -0600 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_netdb.U,v $
-?RCS: Revision 3.0 1993/08/18 12:08:34 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?X:
-?X: Look whether <netdb.h> needs to be included
-?X:
-?MAKE:i_netdb: Inhdr
-?MAKE: -pick add $@ %<
-?S:i_netdb:
-?S: This variable conditionally defines the I_NETDB symbol,
-?S: and indicates whether a C program can include <errno.h>.
-?S:.
-?C:I_NETDB:
-?C: This symbol, if defined, indicates to the C program that it can
-?C: include <errno.h>.
-?C:.
-?H:#$i_netdb I_NETDB /**/
-?H:.
-?LINT:set i_netdb
-: see if netdb.h can be included
-set netdb.h i_netdb
-eval $inhdr
+++ /dev/null
-?RCS: $Id: i_sysioctl.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_sysioctl.U,v $
-?RCS: Revision 3.0.1.2 1994/05/06 15:04:57 ram
-?RCS: patch23: added knowledge for <sys/filio.h> (WED)
-?RCS: patch23: optimized amount of findhdr calls
-?RCS:
-?RCS: Revision 3.0.1.1 1993/11/10 17:36:09 ram
-?RCS: patch14: now use a compiler check for TIOCNOTTY because of HP-UX 9.x
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:08:32 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:i_sysioctl i_bsdioctl i_sysfilio i_syssockio d_voidtty: test contains \
- cat i_termio i_termios i_sgtty Setvar Findhdr +cc rm Inhdr
-?MAKE: -pick add $@ %<
-?S:i_sysioctl:
-?S: This variable conditionally defines the I_SYS_IOCTL symbol, which
-?S: indicates to the C program that <sys/ioctl.h> exists and should
-?S: be included.
-?S:.
-?S:i_sysfilio:
-?S: This variable conditionally defines the I_SYS_FILIO symbol, which
-?S: indicates to the C program that <sys/filio.h> exists and should
-?S: be included in preference to <sys/ioctl.h>.
-?S:.
-?S:i_bsdioctl:
-?S: This variable conditionally defines the I_SYS_BSDIOCTL symbol, which
-?S: indicates to the C program that <sys/bsdioctl.h> exists and should
-?S: be included.
-?S:.
-?S:i_syssockio:
-?S: This variable conditionally defines I_SYS_SOCKIO to indicate to the
-?S: C program that socket ioctl codes may be found in <sys/sockio.h>
-?S: instead of <sys/ioctl.h>.
-?S:.
-?S:d_voidtty:
-?S: This variable conditionally defines USE_IOCNOTTY to indicate that the
-?S: ioctl() call with TIOCNOTTY should be used to void tty association.
-?S: Otherwise (on USG probably), it is enough to close the standard file
-?S: decriptors and do a setpgrp().
-?S:.
-?C:I_SYS_IOCTL (I_SYSIOCTL):
-?C: This symbol, if defined, indicates that <sys/ioctl.h> exists and should
-?C: be included. Otherwise, include <sgtty.h> or <termio.h>.
-?C:.
-?C:I_SYS_FILIO:
-?C: This symbol, if defined, indicates that <sys/filio.h> exists and
-?C: should be included instead of <sys/ioctl.h>.
-?C:.
-?C:I_SYS_BSDIOCTL (I_BSDIOCTL):
-?C: This symbol, if defined, indicates that <sys/bsdioctl.h> exists and should
-?C: be included. Otherwise, try <sys/ioctl.h>. This is primarly intended for
-?C: definitions of sockets options, like SIOCATMARK.
-?C:.
-?C:I_SYS_SOCKIO (I_SYSSOCKIO):
-?C: This symbol, if defined, indicates the <sys/sockio.h> should be included
-?C: to get socket ioctl options, like SIOCATMARK.
-?C:.
-?C:USE_TIOCNOTTY (VOIDTTY):
-?C: This symbol, if defined indicate to the C program that the ioctl()
-?C: call with TIOCNOTTY should be used to void tty association.
-?C: Otherwise (on USG probably), it is enough to close the standard file
-?C: decriptors and do a setpgrp().
-?C:.
-?H:#$i_sysioctl I_SYS_IOCTL /**/
-?H:#$i_sysfilio I_SYS_FILIO /**/
-?H:#$i_bsdioctl I_SYS_BSDIOCTL /**/
-?H:#$i_syssockio I_SYS_SOCKIO /**/
-?H:#$d_voidtty USE_TIOCNOTTY /**/
-?H:.
-?T:xxx
-: see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
-?LINT:set i_sysfilio
-set sys/filio.h i_sysfilio
-eval $inhdr
-echo " "
-if $test "`./findhdr sys/ioctl.h`"; then
- val="$define"
- echo '<sys/ioctl.h> found.' >&4
-else
- val="$undef"
- if $test $i_sysfilio = "$define"; then
- echo '<sys/ioctl.h> NOT found.' >&4
- else
- $test $i_sgtty = "$define" && xxx="sgtty.h"
- $test $i_termio = "$define" && xxx="termio.h"
- $test $i_termios = "$define" && xxx="termios.h"
-echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
- fi
-fi
-?LINT:set i_sysioctl
-set i_sysioctl
-eval $setvar
-
-@if I_BSDIOCTL || i_bsdioctl
-?X:
-?X: The only machine I know where this inclusion was necessary is a
-?X: BULL DPX 5000 (a French machine).
-?X:
-: see if socket ioctl defs are in sys/bsdioctl or sys/ioctl
-echo " "
-xxx="`./findhdr sys/bsdioctl.h`"
-if $test "$xxx"; then
- if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
- val="$define"
- echo "You have socket ioctls defined in <sys/bsdioctl.h>." >&4
- else
- val="$undef"
- echo "No socket ioctls found in <sys/bsdioctl.h>." >&4
- fi
-else
- val="$undef"
- echo "<sys/bsdioctl.h> not found, but that's ok." >&4
-fi
-?LINT:set i_bsdioctl
-set i_bsdioctl
-eval $setvar
-
-@end
-@if I_SYSSOCKIO || i_syssockio
-: see if socket ioctl defs are in sys/sockio.h
-echo " "
-xxx="`./findhdr sys/sockio.h`"
-if $test "$xxx"; then
- if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
- val="$define"
- echo "You have socket ioctls defined in <sys/sockio.h>." >&4
- else
- val="$undef"
- echo "No socket ioctls found in <sys/sockio.h>." >&4
- fi
-else
- val="$undef"
-@if I_BSDIOCTL
- case "$i_bsdioctl" in
- "$define") $cat <<EOM
-<sys/sockio.h> not found, using ioctls from <sys/bsdioctl.h>.
-EOM
- ;;
- *) $cat <<EOM
-<sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
-EOM
- ;;
- esac
-@else
- $cat <<EOM
-<sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
-EOM
-@end
-fi
-?LINT:set i_syssockio
-set i_syssockio
-eval $setvar
-
-@end
-@if VOIDTTY || d_voidtty
-: check how to void tty association
-echo " "
-case "$i_sysioctl" in
-"$define") xxx='sys/ioctl.h';;
-?X: otherwise $xxx was set during the determination of i_sysioctl, above.
-esac
-?X:
-?X: Can't use $contains here since HP-UX 9.x has TIOCNOTTY between a pair
-?X: of #ifdef/#endif and is never actually defined. Oh well...
-?X:
-$cat > tcio.c <<EOM
-#include <sys/types.h> /* Just in case */
-#include <$xxx>
-
-int main()
-{
-#ifdef TIOCNOTTY
- exit(0);
-#else
- exit(1);
-#endif
-}
-EOM
-if ($cc -o tcio tcio.c && ./tcio) >/dev/null 2>&1; then
- val="$define"
- echo "TIOCNOTTY found in <$xxx>." >&4
- echo "Using ioctl() call on /dev/tty to void tty association." >&4
-else
- val="$undef"
- echo "Closing standard file descriptors should void tty association." >&4
-fi
-?LINT:set d_voidtty
-set d_voidtty
-eval $setvar
-$rm -f tcio tcio.? core
-
-@end
+++ /dev/null
-?RCS: $Id: i_termio.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_termio.U,v $
-?RCS: Revision 3.0.1.4 1994/10/29 16:20:54 ram
-?RCS: patch36: call ./usg and ./Cppsym explicitely instead of relying on PATH
-?RCS:
-?RCS: Revision 3.0.1.3 1994/08/29 16:26:38 ram
-?RCS: patch32: don't include all threee I_* symbols in config.h
-?RCS: patch32: (had forgotten to undo this part last time)
-?RCS:
-?RCS: Revision 3.0.1.2 1994/05/13 15:25:03 ram
-?RCS: patch27: undone ADO's fix in previous patch since it was useless
-?RCS:
-?RCS: Revision 3.0.1.1 1994/05/06 15:05:23 ram
-?RCS: patch23: now include all three defines in config.h (ADO)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:08:44 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:i_termio i_sgtty i_termios: test Inlibc Cppsym Guess Setvar Findhdr
-?MAKE: -pick add $@ %<
-?S:i_termio:
-?S: This variable conditionally defines the I_TERMIO symbol, which
-?S: indicates to the C program that it should include <termio.h> rather
-?S: than <sgtty.h>.
-?S:.
-?S:i_termios:
-?S: This variable conditionally defines the I_TERMIOS symbol, which
-?S: indicates to the C program that the POSIX <termios.h> file is
-?S: to be included.
-?S:.
-?S:i_sgtty:
-?S: This variable conditionally defines the I_SGTTY symbol, which
-?S: indicates to the C program that it should include <sgtty.h> rather
-?S: than <termio.h>.
-?S:.
-?C:I_TERMIO:
-?C: This symbol, if defined, indicates that the program should include
-?C: <termio.h> rather than <sgtty.h>. There are also differences in
-?C: the ioctl() calls that depend on the value of this symbol.
-?C:.
-?C:I_TERMIOS:
-?C: This symbol, if defined, indicates that the program should include
-?C: the POSIX termios.h rather than sgtty.h or termio.h.
-?C: There are also differences in the ioctl() calls that depend on the
-?C: value of this symbol.
-?C:.
-?C:I_SGTTY:
-?C: This symbol, if defined, indicates that the program should include
-?C: <sgtty.h> rather than <termio.h>. There are also differences in
-?C: the ioctl() calls that depend on the value of this symbol.
-?C:.
-?H:#$i_termio I_TERMIO /**/
-?H:#$i_termios I_TERMIOS /**/
-?H:#$i_sgtty I_SGTTY /**/
-?H:.
-?T:val2 val3
-?LINT:set i_termio i_sgtty i_termios
-: see if this is a termio system
-val="$undef"
-val2="$undef"
-val3="$undef"
-?X: Prefer POSIX-approved termios.h over all else
-if $test "`./findhdr termios.h`"; then
- set tcsetattr i_termios
- eval $inlibc
- val3="$i_termios"
-fi
-echo " "
-case "$val3" in
-"$define") echo "You have POSIX termios.h... good!" >&4;;
-*) if ./Cppsym pyr; then
- case "`/bin/universe`" in
- ucb) if $test "`./findhdr sgtty.h`"; then
- val2="$define"
- echo "<sgtty.h> found." >&4
- else
- echo "System is pyramid with BSD universe."
- echo "<sgtty.h> not found--you could have problems." >&4
- fi;;
- *) if $test "`./findhdr termio.h`"; then
- val="$define"
- echo "<termio.h> found." >&4
- else
- echo "System is pyramid with USG universe."
- echo "<termio.h> not found--you could have problems." >&4
- fi;;
- esac
-?X: Start with USG to avoid problems if both usg/bsd was guessed
- elif ./usg; then
- if $test "`./findhdr termio.h`"; then
- echo "<termio.h> found." >&4
- val="$define"
- elif $test "`./findhdr sgtty.h`"; then
- echo "<sgtty.h> found." >&4
- val2="$define"
- else
-echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
- fi
- else
- if $test "`./findhdr sgtty.h`"; then
- echo "<sgtty.h> found." >&4
- val2="$define"
- elif $test "`./findhdr termio.h`"; then
- echo "<termio.h> found." >&4
- val="$define"
- else
-echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
- fi
- fi;;
-esac
-set i_termio; eval $setvar
-val=$val2; set i_sgtty; eval $setvar
-val=$val3; set i_termios; eval $setvar
-
+++ /dev/null
-?RCS: $Id: i_varhdr.U 1.2 Tue, 30 Sep 2003 18:01:23 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: i_varhdr.U,v $
-?RCS: Revision 3.0.1.3 1997/02/28 15:54:42 ram
-?RCS: patch61: varargs script now starts with leading "startsh"
-?RCS:
-?RCS: Revision 3.0.1.2 1994/10/29 16:21:02 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS:
-?RCS: Revision 3.0.1.1 1994/05/13 15:26:05 ram
-?RCS: patch27: this unit now supersedes old i_stdarg.U and i_varargs.U
-?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:08:49 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:i_stdarg i_varargs i_varhdr: cat cc ccflags rm test Setvar \
- Findhdr startsh _o ldflags
-?MAKE: -pick add $@ %<
-?S:i_stdarg:
-?S: This variable conditionally defines the I_STDARG symbol, which
-?S: indicates to the C program that <stdarg.h> exists and should
-?S: be included.
-?S:.
-?S:i_varargs:
-?S: This variable conditionally defines I_VARARGS, which indicates
-?S: to the C program that it should include <varargs.h>.
-?S:.
-?S:i_varhdr:
-?S: Contains the name of the header to be included to get va_dcl definition.
-?S: Typically one of varargs.h or stdarg.h.
-?S:.
-?C:I_STDARG:
-?C: This symbol, if defined, indicates that <stdarg.h> exists and should
-?C: be included.
-?C:.
-?C:I_VARARGS:
-?C: This symbol, if defined, indicates to the C program that it should
-?C: include <varargs.h>.
-?C:.
-?H:#$i_stdarg I_STDARG /**/
-?H:.
-?H:#$i_varargs I_VARARGS /**/
-?H:.
-?W:%<:va_dcl
-?F:!varargs
-?T:valstd
-?LINT:set i_stdarg i_varargs
-?X:
-?X: Don't use setvar because the varags test below might override these.
-?X: Actually, the messages here are just informative. We don't wish to set
-?X: i_varargs or i_stdarg to their final value before knowing which of the
-?X: two we'll include.
-?X:
-: see if stdarg is available
-echo " "
-if $test "`./findhdr stdarg.h`"; then
- echo "<stdarg.h> found." >&4
- valstd="$define"
-else
- echo "<stdarg.h> NOT found." >&4
- valstd="$undef"
-fi
-
-: see if varags is available
-echo " "
-if $test "`./findhdr varargs.h`"; then
- echo "<varargs.h> found." >&4
-else
- echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
-fi
-
-?X:
-?X: if you have stdarg.h, you need to support prototypes to actually use it;
-?X: but if stdarg.h exists and the compiler doesn't support prototypes (for some
-?X: bizarre reason), we'll fall back to varargs.h anyway so it's not so bad.
-?X:
-: set up the varargs testing programs
-$cat > varargs.c <<EOP
-#ifdef I_STDARG
-#include <stdarg.h>
-#endif
-#ifdef I_VARARGS
-#include <varargs.h>
-#endif
-
-#ifdef I_STDARG
-int f(char *p, ...)
-#else
-int f(va_alist)
-va_dcl
-#endif
-{
- va_list ap;
-#ifndef I_STDARG
- char *p;
-#endif
-#ifdef I_STDARG
- va_start(ap,p);
-#else
- va_start(ap);
- p = va_arg(ap, char *);
-#endif
- va_end(ap);
-}
-EOP
-$cat > varargs <<EOP
-$startsh
-if $cc -c $ccflags $ldflags -D\$1 varargs.c >/dev/null 2>&1; then
- echo "true"
-else
- echo "false"
-fi
-$rm -f varargs$_o
-EOP
-chmod +x varargs
-
-: now check which varargs header should be included
-echo " "
-i_varhdr=''
-case "$valstd" in
-"$define")
- if `./varargs I_STDARG`; then
- val='stdarg.h'
- elif `./varargs I_VARARGS`; then
- val='varargs.h'
- fi
- ;;
-*)
- if `./varargs I_VARARGS`; then
- val='varargs.h'
- fi
- ;;
-esac
-case "$val" in
-'')
-echo "I could not find the definition for va_dcl... You have problems..." >&4
- val="$undef"; set i_stdarg; eval $setvar
- val="$undef"; set i_varargs; eval $setvar
- ;;
-*)
- set i_varhdr
- eval $setvar
- case "$i_varhdr" in
- stdarg.h)
- val="$define"; set i_stdarg; eval $setvar
- val="$undef"; set i_varargs; eval $setvar
- ;;
- varargs.h)
- val="$undef"; set i_stdarg; eval $setvar
- val="$define"; set i_varargs; eval $setvar
- ;;
- esac
- echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
-esac
-$rm -f varargs*
-
+++ /dev/null
-?RCS: $Id: libc.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: libc.U,v $
-?RCS: Revision 3.0.1.10 1997/02/28 15:56:48 ram
-?RCS: patch61: replaced .a with $_a all over the place
-?RCS: patch61: added support for HPUX-10 nm output
-?RCS:
-?RCS: Revision 3.0.1.9 1995/07/25 14:11:56 ram
-?RCS: patch56: now knows about OS/2 platforms
-?RCS:
-?RCS: Revision 3.0.1.8 1995/05/12 12:20:47 ram
-?RCS: patch54: made sure only most recent version of shared lib is picked
-?RCS: patch54: final "nm -p" check now uses xscan and xrun like everybody
-?RCS: patch54: can now grok linux nm output with lead __IO (ADO)
-?RCS: patch54: added support for linux ELF output, using 'W' for alias (ADO)
-?RCS:
-?RCS: Revision 3.0.1.7 1994/10/29 16:23:40 ram
-?RCS: patch36: now looks for shared libraries before anything else (ADO)
-?RCS: patch36: added new nm output format (ADO)
-?RCS:
-?RCS: Revision 3.0.1.6 1994/08/29 16:28:10 ram
-?RCS: patch32: added I-type symbols for nm output parsing on Linux
-?RCS:
-?RCS: Revision 3.0.1.5 1994/06/20 07:03:24 ram
-?RCS: patch30: checks are now presented by succession of if/elif
-?RCS: patch30: uniformized checks for shared objects with new so symbol
-?RCS:
-?RCS: Revision 3.0.1.4 1994/05/06 15:06:33 ram
-?RCS: patch23: added shared library knowledge (ADO and WED)
-?RCS:
-?RCS: Revision 3.0.1.3 1994/01/24 14:12:17 ram
-?RCS: patch16: can now export nm_extract as an internal-use only variable
-?RCS:
-?RCS: Revision 3.0.1.2 1993/09/13 16:09:03 ram
-?RCS: patch10: added special handling for Apollo systems (WAD)
-?RCS:
-?RCS: Revision 3.0.1.1 1993/08/27 14:40:03 ram
-?RCS: patch7: added entry for /usr/shlib/libc.so (OSF/1 machines)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:08:57 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:libc +nm_extract: echo n c rm test grep Getfile Myread Oldconfig Loc \
- sed libs incpath libpth runnm nm_opt nm_so_opt contains xlibpth so _a _o
-?MAKE: -pick add $@ %<
-?S:libc:
-?S: This variable contains the location of the C library.
-?S:.
-?S:nm_extract:
-?S: This variable holds the name of the extraction command used to process
-?S: the output of nm and yield the list of defined symbols. It is used
-?S: internally by Configure.
-?S:.
-?T:thislib try libnames xxx xscan xrun thisname com tans file
-?F:!libnames
-?LINT:change nm_opt
-case "$runnm" in
-true)
-?X: indentation is wrong on purpose--RAM
-: get list of predefined functions in a handy place
-echo " "
-case "$libc" in
-'') libc=unknown
- case "$libs" in
- *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
- esac
- ;;
-esac
-libnames='';
-case "$libs" in
-'') ;;
-*) for thislib in $libs; do
- case "$thislib" in
- -lc|-lc_s)
- : Handle C library specially below.
- ;;
- -l*)
- thislib=`echo $thislib | $sed -e 's/^-l//'`
- if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
- :
- elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
- :
- elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
- :
- elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
- :
- elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
- :
- elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
- :
- elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
- :
- else
- try=''
- fi
- libnames="$libnames $try"
- ;;
- *) libnames="$libnames $thislib" ;;
- esac
- done
- ;;
-esac
-?X:
-?X: Some systems (e.g. DG/UX) use "environmental" links, which make the test
-?X: -f fail. Ditto for symbolic links. So in order to reliably check the
-?X: existence of a file, we use test -r. It will still fail with DG/UX links
-?X: though, but at least it will detect symbolic links. At some strategic
-?X: points, we make use of (test -h), using a sub-shell in case builtin test
-?X: does not implement the -h check for symbolic links. This makes it
-?X: possible to preset libc in a hint file for instance and have it show up
-?X: as-is in the question.
-?X:
-xxx=normal
-case "$libc" in
-unknown)
-?X:
-?X: The sed below transforms .so.9 .so.12 into something like .so.0009 .so.0012,
-?X: then sorts on it to allow keeping .so.12 instead of .so.9 as the latest
-?X: up-to-date library. The initial filename (before sed munging, saved in hold
-?X: space via 'h') is appended via 'G' before sorting, then the leading munged
-?X: part is removed after sorting. Nice efficient work from Tye McQueen.
-?X: The initial blurfl is here to prevent the trailing pipe from producing an
-?X: empty string, causing Configure to output all its set variables!
-?X:
- set /lib/libc.$so
- for xxx in $libpth; do
- $test -r $1 || set $xxx/libc.$so
- $test -r $1 || \
- set `echo blurfl; echo $xxx/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 \$$#
- done
- $test -r $1 || set /usr/ccs/lib/libc.$so
- $test -r $1 || set /lib/libsys_s$_a
- ;;
-*)
-?X: ensure the test below for the (shared) C library will fail
- set blurfl
- ;;
-esac
-if $test -r "$1"; then
- echo "Your (shared) C library seems to be in $1."
- libc="$1"
-elif $test -r /lib/libc && $test -r /lib/clib; then
-?X:
-?X: Apollo has its C library in /lib/clib AND /lib/libc
-?X: not to mention its math library in /lib/syslib...
-?X:
- echo "Your C library seems to be in both /lib/clib and /lib/libc."
- xxx=apollo
- libc='/lib/clib /lib/libc'
- if $test -r /lib/syslib; then
- echo "(Your math library is in /lib/syslib.)"
-?X: Put syslib in libc -- not quite right, but won't hurt
- libc="$libc /lib/syslib"
- fi
-elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
- echo "Your C library seems to be in $libc, as you said before."
-?X: For mips, and...
-elif $test -r $incpath/usr/lib/libc$_a; then
- libc=$incpath/usr/lib/libc$_a;
- echo "Your C library seems to be in $libc. That's fine."
-elif $test -r /lib/libc$_a; then
- libc=/lib/libc$_a;
- echo "Your C library seems to be in $libc. You're normal."
-else
- if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
- :
- elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
- libnames="$libnames "`./loc clib blurfl/dyick $libpth`
- elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
- :
- elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
- :
- elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
- :
- else
- tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
- fi
- if $test -r "$tans"; then
- echo "Your C library seems to be in $tans, of all places."
- libc=$tans
- else
- libc='blurfl'
- fi
-fi
-if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
- dflt="$libc"
- cat <<EOM
-
-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.
-
-EOM
-else
- dflt=''
- echo $libpth | tr ' ' '\012' | sort | uniq > libpath
- cat >&4 <<EOM
-I can't seem to find your C library. I've looked in the following places:
-
-EOM
- $sed 's/^/ /' libpath
- cat <<EOM
-
-None of these seems to contain your C library. I need to get its name...
-
-EOM
-fi
-fn=f
-rp='Where is your C library?'
-. ./getfile
-libc="$ans"
-
-echo " "
-echo $libc $libnames | tr ' ' '\012' | sort | uniq > libnames
-set X `cat libnames`
-shift
-xxx=files
-case $# in 1) xxx=file; esac
-echo "Extracting names from the following $xxx for later perusal:" >&4
-echo " "
-$sed 's/^/ /' libnames >&4
-echo " "
-$echo $n "This may take a while...$c" >&4
-
-?X:
-?X: Linux may need the special Dynamic option to nm for shared libraries.
-?X: In general, this is stored in the nm_so_opt variable.
-?X: Unfortunately, that option may be fatal on non-shared libraries.
-?X:
-for file in $*; do
- case $file in
- *$so*) nm $nm_so_opt $nm_opt $file 2>/dev/null;;
- *) nm $nm_opt $file 2>/dev/null;;
- esac
-done >libc.tmp
-
-$echo $n ".$c"
-?X:
-?X: To accelerate processing, we look at the correct 'sed' command
-?X: by using a small subset of libc.tmp, i.e. fprintf function.
-?X: When we know which sed command to use, do the name extraction
-?X:
-$grep fprintf libc.tmp > libc.ptf
-?X:
-?X: In order to ehance readability and save some space, we define
-?X: some variables that will be "eval"ed.
-?X:
-xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
-xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
-?X: BSD-like output, I and W types added for Linux
-?X: Some versions of Linux include a leading __IO in the symbol name.
-?X: HPUX10 reportedly has trailing spaces, though I'm suprised it has
-?X: BSD-like output. (AD).
-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
-?X: SYSV-like output
-elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
- -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-?X: mips nm output (sysV)
-elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-?X: OS/2 nm output
-elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-else
- nm -p $* 2>/dev/null >libc.tmp
- $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'
- eval $xrun
- else
- echo " "
- echo "nm didn't seem to work right. Trying ar instead..." >&4
- com=''
- if ar t $libc > libc.tmp; then
- for thisname in $libnames; do
- ar t $thisname >>libc.tmp
- done
- $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
- echo "Ok." >&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
- for thisname in $libnames; do
- bld t $libnames | \
- $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
- ar t $thisname >>libc.tmp
- done
- echo "Ok." >&4
- else
- echo "That didn't work either. Giving up." >&4
- exit 1
- fi
- fi
- fi
-fi
-nm_extract="$com"
-if $test -f /lib/syscalls.exp; then
- echo " "
- echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
- $sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
-fi
-?X: remember, indentation is wrong on purpose--RAM
-;;
-esac
-$rm -f libnames libpath
-
+++ /dev/null
-?RCS: $Id: libs.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: libs.U,v $
-?RCS: Revision 3.0.1.6 1997/02/28 16:09:11 ram
-?RCS: patch61: replaced .a with $_a all over the place
-?RCS:
-?RCS: Revision 3.0.1.5 1995/07/25 14:12:05 ram
-?RCS: patch56: now knows about OS/2 platforms
-?RCS:
-?RCS: Revision 3.0.1.4 1994/10/29 16:24:22 ram
-?RCS: patch36: removed old broken thislib/thatlib processing (ADO)
-?RCS:
-?RCS: Revision 3.0.1.3 1994/06/20 07:05:44 ram
-?RCS: patch30: code cleanup with if/elif by ADO and RAM
-?RCS: patch30: undone patch23 for libswanted default setting
-?RCS:
-?RCS: Revision 3.0.1.2 1994/05/06 15:08:45 ram
-?RCS: patch23: now includes ordered default libswanted variable (ADO)
-?RCS: patch23: major cleanup for library lookups (ADO)
-?RCS:
-?RCS: Revision 3.0.1.1 1993/08/25 14:02:31 ram
-?RCS: patch6: added default for libs
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:09:03 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:libs: test cat Myread Oldconfig Loc libpth package xlibpth so _a
-?MAKE: -pick add $@ %<
-?S:libs:
-?S: This variable holds the additional libraries we want to use.
-?S: It is up to the Makefile to deal with it.
-?S:.
-?T:xxx thislib libswanted
-?D:libs=''
-?X:
-?X: This order is chosen so that libraries -lndir, -ldir, -lucb, -lbsd,
-?X: -lBSD, -lPW, and -lx only get used if there are unresolved
-?X: routines at link time. Usually, these are backwards compatability
-?X: libraries, and may not be as reliable as the standard c library.
-?X:
-?X: The -lsocket -linet -lnsl order has been reported to be necessary
-?X: for at least one SVR4 implementation.
-?X: -lc must proceed -lucb or -lbsd for most Solaris applications.
-?X: -lc_s proceeds -lc so we pick up the shared library version, if
-?X: it is available.
-?X:
-?X: The ordering of c, posix, and cposix is a guess and almost
-?X: certainly wrong on about half of all systems.
-?X:
-?X: Set proper libswanted in your private Myinit.U if needed.
-?X:
-?X:: default ordered library list
-?X:libswanted='net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl'
-?X:libswanted="$libswanted dld sun m c_s c posix cposix ndir dir ucb"
-?X:libswanted="$libswanted bsd BSD PW x"
-?X:
-?INIT:: default library list
-?INIT:libswanted=''
-: Looking for optional libraries
-echo " "
-echo "Checking for optional libraries..." >&4
-case "$libs" in
-' '|'') dflt='';;
-*) dflt="$libs";;
-esac
-case "$libswanted" in
-'') libswanted='c_s';;
-esac
-for thislib in $libswanted; do
-
-?X:
-?X: Comparaisons via case statement use the string " $dflt " to ensure that
-?X: each library is separated by a space. That way, by looking to something
-?X: like *"-l$thislib "*, we ensure we find -lm and not -lmalloc (which was
-?X: the case with the old looking pattern *-l$thislib*.
-?X:
-
-?X: A kludge - if we find libbind, we don't want libresolv
-
- if $test "$thislib" = "resolv"; then
- case " $dflt " in
- *"-lbind "*) echo "We've already found -lbind, so we don't need -lresolv" ;;
- *)
-
- if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib (shared)."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
- echo "Found -l$thislib (shared)."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
-?X: Don't forget about OS/2 where -lmalloc is spelled out malloc.a
- elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l${thislib}_s."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l${thislib}_s";;
- esac
- elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- else
- echo "No -l$thislib."
- fi
-
- ;;
- esac
- else
-
- if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib (shared)."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
- echo "Found -l$thislib (shared)."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
-?X: Don't forget about OS/2 where -lmalloc is spelled out malloc.a
- elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l${thislib}_s."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l${thislib}_s";;
- esac
- elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- else
- echo "No -l$thislib."
- fi
-
- fi
-done
-set X $dflt
-shift
-dflt="$*"
-case "$libs" in
-'') dflt="$dflt";;
-*) dflt="$libs";;
-esac
-case "$dflt" in
-' '|'') dflt='none';;
-esac
-
-$cat <<EOM
-
-Some versions of Unix support shared libraries, which make executables smaller
-but make load time slightly longer.
-
-On some systems, mostly System V Release 3'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 $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 " "
-rp="Any additional libraries?"
-. ./myread
-case "$ans" in
-none) libs=' ';;
-*) libs="$ans";;
-esac
-
+++ /dev/null
-?RCS: $Id: mailer.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: mailer.U,v $
-?RCS: Revision 3.0.1.3 1995/01/11 15:32:11 ram
-?RCS: patch45: can now use Loc variables since path stripping is deferred
-?RCS:
-?RCS: Revision 3.0.1.2 1994/05/06 15:10:04 ram
-?RCS: patch23: ensure full path value is used for rmail also
-?RCS:
-?RCS: Revision 3.0.1.1 1994/01/24 14:14:18 ram
-?RCS: patch16: now use _sendmail vars and friends for portability issues
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:09:10 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:mailer: test cat rmail mail smail sendmail Getfile Oldconfig package
-?MAKE: -pick add $@ %<
-?S:mailer:
-?S: This variable contains the full pathname of a reasonable mailer.
-?S: By reasonable, we mean some program which can understand internet
-?S: addresses or at least forward them to some internet router. This
-?S: mailer should be invoked as "mailer [options] recipients <mail".
-?S:.
-: determine the name of a reasonable mailer
-case "$mailer" in
-'')
- if $test -f "$sendmail"; then
- dflt="$sendmail"
- elif $test -f "$smail"; then
- dflt="$smail"
- elif $test -f "$rmail"; then
- dflt="$rmail"
- elif $test -f /bin/mail; then
- dflt=/bin/mail
- else
- dflt=$mail
- fi
- ;;
-*) dflt="$mailer";;
-esac
-$cat <<EOM
-
-Later on, I'm going to offer you the chance to subscribe (or unsubscribe)
-to the $package mailing list. In order to do that, I need to figure out
-how to send mail, your name, and a few other things.
-
-I need the full pathname of the program used to deliver mail on your system.
-A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose
-any other program, as long as it can be fed from standard input and will
-honour any user-supplied headers.
-
-EOM
-fn=f
-rp='Mail transport agent to be used?'
-. ./getfile
-mailer="$ans"
-
+++ /dev/null
-?RCS: $Id$
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: nametype.U,v $
-?RCS: Revision 3.0.1.3 1994/10/29 16:26:09 ram
-?RCS: patch36: call ./usg and ./bsd explicitely instead of relying on PATH
-?RCS:
-?RCS: Revision 3.0.1.2 1994/08/29 16:36:48 ram
-?RCS: patch32: fixed typo: /etc/password -> /etc/passwd (WED)
-?RCS:
-?RCS: Revision 3.0.1.1 1993/09/13 16:10:09 ram
-?RCS: patch10: made questions more explicit for 'Configure -s' prompting (WAD)
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:09:20 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:nametype d_passnames d_berknames d_usgnames: Myread Guess Oldconfig cat test osname
-?MAKE: -pick add $@ %<
-?S:nametype:
-?S: This variable indicates how full names are stored on this system.
-?S: Values are bsd, usg, and other.
-?S:.
-?S:d_passnames:
-?S: This variable conditionally defines the PASSNAMES symbol,
-?S: which indicates to the C program that full names are stored in
-?S: the /etc/passwd file.
-?S:.
-?S:d_berknames:
-?S: This variable conditionally defines the PASSNAMES symbol,
-?S: which indicates to the C program that full names are stored in
-?S: the /etc/passwd file in Berkeley format.
-?S:.
-?S:d_usgnames:
-?S: This variable conditionally defines the PASSNAMES symbol,
-?S: which indicates to the C program that full names are stored in
-?S: the /etc/passwd file in USG format.
-?S:.
-?C:PASSNAMES:
-?C: This symbol, if defined, indicates that full names are stored in
-?C: the /etc/passwd file.
-?C:.
-?C:BERKNAMES:
-?C: This symbol, if defined, indicates that full names are stored in
-?C: the /etc/passwd file in Berkeley format (name first thing, everything
-?C: up to first comma, with & replaced by capitalized login id, yuck).
-?C:.
-?C:USGNAMES:
-?C: This symbol, if defined, indicates that full names are stored in
-?C: the /etc/passwd file in USG format (everything after - and before ( is
-?C: the name).
-?C:.
-?H:#$d_passnames PASSNAMES /* (undef to take name from ~/.fullname) */
-?H:#$d_berknames BERKNAMES /* (that is, ":name,stuff:") */
-?H:#$d_usgnames USGNAMES /* (that is, ":stuff-name(stuff):") */
-?H:.
-: find out how to find out full name
-case "$d_berknames" in
-"$define")
- dflt=y;;
-"$undef")
- dflt=n;;
-*)
- if ./bsd; then
- dflt=y
- elif ./xenix; then
- dflt=y
- elif $test "x$osname" = "xlinux"; then
- dflt=y
- else
- dflt=n
- fi
- ;;
-esac
-$cat <<'EOM'
-
-Does your /etc/passwd file keep full names in Berkeley/V7 format (name first
-thing after ':' in GCOS field)? In that case, a typical entry in the password
-file looks like this:
-
- guest:**paswword**:10:100:Mister Guest User:/usr/users:/bin/sh
- ^^^^^^^^^^^^^^^^^
-EOM
-rp="Berkeley/V7 format for full name in /etc/passwd?"
-. ./myread
-case "$ans" in
-y*) d_passnames="$define"
- d_berknames="$define"
- d_usgnames="$undef"
- nametype=bsd
- ;;
-*)
- case "$d_usgnames" in
- "$define") dflt=y;;
- "$undef") dflt=n;;
- *)
- if ./usg; then
- dflt=y
- else
- dflt=n
- fi
- ;;
- esac
-$cat <<'EOM'
-
-Does your passwd file keep full names in USG format (name sandwiched between a
-'-' and a '(')? In that case, a typical entry in the password file looks like
-this:
-
- guest:**paswword**:10:100:000-Mister Guest User(000):/usr/users:/bin/sh
- ^^^^^^^^^^^^^^^^^
-EOM
- rp="USG format for full name in /etc/passwd?"
- . ./myread
- case "$ans" in
- n*) echo "Full name will be taken from ~/.fullname"
- d_passnames="$undef"
- d_berknames="$undef"
- d_usgnames="$undef"
- nametype=other
- ;;
- *)
- d_passnames="$define"
- d_berknames="$undef"
- d_usgnames="$define"
- nametype=usg
- ;;
- esac;;
-esac
-
+++ /dev/null
-?RCS: $Id$
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: sockopt.U,v $
-?RCS: Revision 3.0.1.1 1995/07/25 14:16:14 ram
-?RCS: patch56: obsoleted KEEPALIVE in favor of CAN_KEEPALIVE for consistency
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:09:48 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:d_keepalive d_keepidle: cat rm contains +cc +ccflags socketlib sockethdr \
- d_oldsock libs Oldconfig Setvar Findhdr i_nitcp
-?MAKE: -pick add $@ %<
-?S:d_keepalive:
-?S: This symbol conditionally defines CAN_KEEPALIVE which indicates to the C
-?S: program that setsockopt SO_KEEPALIVE will work properly.
-?S:.
-?S:d_keepidle:
-?S: This symbol conditionally defines CAN_KEEPIDLE which indicates to the C
-?S: program that setsockopt TCP_KEEPIDLE will work properly.
-?S:.
-?C:CAN_KEEPALIVE:
-?C: This symbol if defined indicates to the C program that the SO_KEEPALIVE
-?C: option of setsockopt() will work as advertised in the manual.
-?C:.
-?C:CAN_KEEPIDLE:
-?C: This symbol if defined indicates to the C program that the TCP_KEEPIDLE
-?C: option of setsockopt() will work as advertised in the manual.
-?C:.
-?H:#$d_keepalive CAN_KEEPALIVE /**/
-?H:.
-?H:#$d_keepidle CAN_KEEPIDLE /**/
-?H:.
-?LINT:set d_keepalive d_keepidle
-: see if setsockopt with SO_KEEPALIVE works as advertised
-echo " "
-case "$d_oldsock" in
-"$undef")
- echo "OK, let's see if SO_KEEPALIVE works as advertised..." >&4
- $cat > socket.c <<EOP
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#$i_nitcp I_NETINET_TCP
-#ifdef I_NETINET_TCP
-#include <netinet/tcp.h>
-#endif
-#include <netdb.h>
-
-main()
-{
- int s = socket(AF_INET, SOCK_STREAM, 0);
- int val = 1;
- if (s == -1)
- exit(1);
- if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)))
- exit(2);
-#ifdef I_NETINET_TCP
-#ifdef TCP_KEEPIDLE
- val = 1;
- if (-1 == setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)))
- exit(3);
-#else
- exit(3);
-#endif
-#endif
- exit(0);
-}
-EOP
- if $cc $ccflags $sockethdr socket.c -o socket $libs \
- $socketlib >/dev/null 2>&1; then
- ./socket >/dev/null 2>&1
- case $? in
- 0) echo "Yes, it does!"
- val="$define"
- val2="$i_nitcp"
- ;;
- 1) $cat <<EOM
-(Something went wrong -- Assuming SO_KEEPALIVE is broken)
-EOM
- val="$undef"
- val2="$undef"
- ;;
- 2) echo "No, it doesn't. Don't trust your manuals!!"
- val="$undef"
- val2="$undef"
- ;;
- 3) echo "It does, but TCP_KEEPIDLE doesn't."
- val="$define"
- val2="$undef"
- ;;
- esac
- else
- cat <<EOM
-(I can't compile the test program -- Assuming SO_KEEPALIVE is broken)
-EOM
- val="$undef"
- val2="$undef"
- fi
- ;;
-*) cat <<EOM
-As you have an old socket interface, you can't have heard of SO_KEEPALIVE.
-EOM
- val="$undef"
- val2="$undef";;
-esac
-set d_keepalive
-eval $setvar
-val="$val2"
-set d_keepidle
-eval $setvar
-$rm -f socket socket.c
-
--- /dev/null
+?MAKE:uptime : Setvar Oldconfig Csym test
+?MAKE: -pick add $@ %<
+?S:uptime:
+?S: This variable conditionally defines UPTIME_PATH if the uptime
+?S: program is available.
+?S:.
+?C:UPTIME_PATH:
+?C: This symbol gives the full path to the uptime(1) program if
+?C: it exists on the system. If not, this symbol is undefined.
+?C:.
+?C:HAS_UPTIME:
+?C: This symbol is defined if uptime(1) is available.
+?C:.
+?H:#$uptime HAS_UPTIME /**/
+?H:#define UPTIME_PATH "$uptime"
+?H:.
+?LINT:set uptime
+: uptime
+echo " "
+if $test -x $uptime ; then
+ val="$define"
+else
+ val="$undef"
+fi
+set uptime; eval $setvar
+++ /dev/null
-?RCS: $Id: usenm.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $
-?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
-?RCS: as specified in the README file that comes with the distribution.
-?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
-?RCS: of the source tree for dist 3.0.
-?RCS:
-?RCS: $Log: usenm.U,v $
-?RCS: Revision 3.0.1.1 1997/02/28 16:26:40 ram
-?RCS: patch61: don't use nm with the GNU C library
-?RCS: patch61: added support for Linux shared libs
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:09:57 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:usenm runnm nm_opt nm_so_opt: cat test Myread Oldconfig myuname grep \
- d_gnulibc
-?MAKE: -pick add $@ %<
-?S:usenm:
-?S: This variable contains 'true' or 'false' depending whether the
-?S: nm extraction is wanted or not.
-?S:.
-?S:runnm:
-?S: This variable contains 'true' or 'false' depending whether the
-?S: nm extraction should be performed or not, according to the value
-?S: of usenm and the flags on the Configure command line.
-?S:.
-?S:nm_opt:
-?S: This variable holds the options that may be necessary for nm.
-?S:.
-?S:nm_so_opt:
-?S: This variable holds the options that may be necessary for nm
-?S: to work on a shared library but that can not be used on an
-?S: archive library. Currently, this is only used by Linux, where
-?S: nm --dynamic is *required* to get symbols from an ELF library which
-?S: has been stripped, but nm --dynamic is *fatal* on an archive library.
-?S: Maybe Linux should just always set usenm=false.
-?S:.
-: see if nm is to be used to determine whether a symbol is defined or not
-?X: If there is enough enquiries, it might be worth to wait for the nm
-?X: extraction. Otherwise, the C compilations might be a better deal.
-?X:
-?X: Don't bother if we're using GNU libc -- skimo
-case "$usenm" in
-'')
- case "$d_gnulibc" in
- $define)
- dflt=n
- ;;
- *)
- dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
- if $test $dflt -gt 20; then
- dflt=y
- else
- dflt=n
- fi
- ;;
- esac
- ;;
-*)
- case "$usenm" in
- true) dflt=y;;
- *) dflt=n;;
- esac
- ;;
-esac
-$cat <<EOM
-
-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.
-If you see a lot of messages about functions NOT found that you know you
-have, re-run Configure and don't let me use 'nm'.
-
-EOM
-rp='Shall I use nm to extract C symbols from the libraries?'
-. ./myread
-case "$ans" in
-n|N) usenm=false;;
-*) usenm=true;;
-esac
-
-?X: Name extraction is to be run if 'nm' usage is wanted and if no -r flag
-?X: was provided to configure (in which case we simply re-use the previous
-?X: values).
-runnm=$usenm
-case "$reuseval" in
-true) runnm=false;;
-esac
-
-: nm options which may be necessary
-case "$nm_opt" in
-'') if $test -f /mach_boot; then
- nm_opt=''
- elif $test -d /usr/ccs/lib; then
- nm_opt='-p'
- elif $test -f /dgux; then
- nm_opt='-p'
- else
- nm_opt=''
- fi;;
-esac
-
-: nm options which may be necessary for shared libraries but illegal
-: for archive libraries. Thank you, Linux.
-case "$nm_so_opt" in
-'') case "$myuname" in
- *linux*)
- if nm --help | $grep 'dynamic' > /dev/null 2>&1; then
- nm_so_opt='--dynamic'
- fi
- ;;
- esac
- ;;
-esac
-
char *args_left[MAX_ARG] __attribute__ ((__unused__)), \
char *arg_right __attribute__ ((__unused__)), \
char *args_right[MAX_ARG] __attribute__ ((__unused__)), \
- int fromport)
+ int fromport __attribute__ ((__unused__)))
/** Common command prototype macro */
#define COMMAND_PROTO(command_name) \
int cmpspec(cronspec a, cronspec b);
long long num_to_bits(unsigned int num);
-long long parse_spec(const char *str, unsigned int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp);
+long long parse_spec(const char *str, int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp);
char *show_spec(cronspec *spec);
cronjob *new_job(void);
/* Only QID_ACTIVE, QID_FALSE, and QID_FREEZE actually get thrown on a qid cell.
* * other are just used to pass in function shit */
enum qid_flags {QID_ACTIVE, QID_KILL, QID_FREEZE, QID_CONT, QID_TIME, QID_QUERY_T, QID_FALSE};
-extern int do_signal_qid(dbref signalby, int qid, enum qid_flags qid_flags, int time);
+extern int do_signal_qid(dbref signalby, unsigned qid, enum qid_flags qid_flags, int time);
/* From command.c */
enum hook_type { HOOK_BEFORE, HOOK_AFTER, HOOK_IGNORE, HOOK_OVERRIDE };
* lock_owner - lock owner
**/
-int cannot_write_this_attr_internal(dbref player, ATTR *attr, dbref obj, char safe, char ns_chk, dbref lowner) {
+int cannot_write_this_attr_internal(dbref player, ATTR *attr, dbref obj, char safe __attribute__ ((__unused__)), char ns_chk, dbref lowner) {
dbref lock_owner;
if(!GoodObject(lowner))
static unsigned char *
get_bytecode(boolexp b, u_int_16 * storelen)
{
- unsigned static char bytecode[BUFFER_LEN * 2];
+ static unsigned char bytecode[BUFFER_LEN * 2];
u_int_16 len;
len = chunk_fetch(b, bytecode, sizeof bytecode);
DESC *d;
dbref victim;
int first;
- int start, count;
+ int start = 0, count = 1;
int powered = !(strchr(called_as, 'M') != NULL) && Priv_Who(executor);
int xwho = *called_as == 'X';
int objid = strchr(called_as, 'D') != NULL;
#define MAX_QID 16384
-extern dbref global_parent_depth[1];
+extern dbref global_parent_depth[2];
EVAL_CONTEXT global_eval_context;
enum qid_flags qid_table[MAX_QID]; /**< List of flagged qids. */
-int qid_cnt; /**< What QID we're at */
+unsigned qid_cnt; /**< What QID we're at */
/** A queue entry.
* This structure reprsents a queue entry on a linked list of queue
/* set whole thing to NULL */
for(i = 0; i < MAX_QID; i++)
qid_table[i] = QID_FALSE;
- qid_table[MAX_QID] = '\0';
qid_cnt = 0;
}
int create_qid() { /* find an unused QID */
- int i;
+ unsigned i;
for(i = 0; i < MAX_QID; i++)
if(qid_table[i] == QID_FALSE)
/* first free up the QID */
qid_table[point->qid] = QID_FALSE;
if(point->qid == qid_cnt) {
- for(a = qid_cnt; a > -1; a--)
- if(qid_table[a] != QID_FALSE)
- break;
- if(qid_table[a] != QID_FALSE)
- qid_cnt = a;
- else /* nothing on the queue at all.. set us down to 0 */
- qid_cnt = 0;
+ a = qid_cnt;
+ for(;;) {
+ if(qid_table[a] != QID_FALSE)
+ break;
+ if(a == 0)
+ break;
+ a--;
+ }
+ qid_cnt = a;
}
for (a = 0; a < 10; a++)
if (point->env[a]) {
* qlist - set which queue list we're on
* return queue process we found
*/
-BQUE *find_qid(int qid, BQUE **qlist, BQUE **qprev) {
+BQUE *find_qid(unsigned qid, BQUE **qlist, BQUE **qprev) {
BQUE *qproc;
for(*qprev = qproc = qfirst; qproc; *qprev = qproc, qproc = qproc->next)
return NULL;
}
-int do_signal_qid(dbref signalby, int qid, enum qid_flags qflags, int time) {
+int do_signal_qid(dbref signalby, unsigned qid, enum qid_flags qflags, int time) {
BQUE *qproc, *qprev, *qsave;
/* Signal a QID with such & such signal */
}
FUNCTION(fun_psinfo) {
- int qid;
+ int tqid;
+ unsigned qid;
BQUE *tmp;
const char *type;
return;
}
- qid = parse_integer(args[0]);
- if (qid < 0) {
+ tqid = parse_integer(args[0]);
+ if (tqid < 0) {
safe_str(T(e_uint), buff, bp);
return;
- } else if (qid > qid_cnt || qid_table[qid] == QID_FALSE) {
- safe_str(T("#-1 INVALID QID"), buff, bp);
- return;
+ } else {
+ qid = (unsigned) tqid;
+ if (qid > qid_cnt || qid_table[qid] == QID_FALSE) {
+ safe_str(T("#-1 INVALID QID"), buff, bp);
+ return;
+ }
}
type = "player";
newzone = copy_zmo(zmo, executor);
/* Grab DBREF_LIST atrs and stick in da_vals */
+ da_sz = 0;
atr = atr_get(zmo, "DBREF_LIST");
if(atr) {
da_sz = list2arr(da_buf_arr, BUFFER_LEN / 2, atr_value(atr), ' ');
return new_room;
}
-dbref copy_exit(dbref loc, dbref tail, dbref exit, dbref *oldrooms, dbref *newrooms, dbref new_owner, int num_rooms) {
+dbref copy_exit(dbref loc, dbref tail __attribute__ ((__unused__)), dbref exit, dbref *oldrooms, dbref *newrooms, dbref new_owner, int num_rooms) {
int i;
dbref new_exit;
}
long long
-parse_spec(const char *str, unsigned int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp)
+parse_spec(const char *str, int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp)
{
char c;
int x;
/* powergroups_list() {{{3 - List powergroups able to set from 'players' point of view */
char *
-powergroups_list(dbref player, char flag)
+powergroups_list(dbref player __attribute__ ((__unused__)), char flag)
{
POWERGROUP *pgrp;
char pg_name[BUFFER_LEN];
}
Parent(obj) = SDIV(owner).object;
current_state.divisions++;
- sprintf(buf, object_header(owner, obj));
+ strncpy(buf, object_header(owner, obj), BUFFER_LEN);
notify_format(owner, T("Division created: %s Parent division: %s"),
buf, object_header(owner, SDIV(obj).object));
return obj;
notify_format(player, "Powers List: %s", tbuf);
}
-char *list_all_powers(dbref player, const char *name) {
+char *list_all_powers(dbref player __attribute__ ((__unused__)), const char *name) {
POWER *power;
static char buff[BUFFER_LEN];
char pname[BUFFER_LEN];
{"modify", LBL_LOCK, LBL_MODIFY},
{"see", LBL_LOCK, LBL_SEE},
{"hide", LBL_LOCK, LBL_HIDE},
- {NULL, LBL_ERROR}
+ {NULL, LBL_ERROR, LBL_ERROR}
}, *sfptr;
enum known_labels the_label, the_subfield;
};
continue;
subfield_checks:
+ the_subfield = LBL_ERROR;
for( sfptr = subfield; sfptr->subfield; sfptr++)
if((entry->tag == sfptr->tag) && !strcasecmp(sfptr->subfield, value) ) {
the_subfield = sfptr->stag;
u = onchannel(victim, chan);
if (!Channel_Quiet(chan) && !DarkLegal(victim)) {
format_channel_broadcast(chan, u, victim, CB_CHECKQUIET | CB_PRESENCE,
- T("%s %s has joined this channel."), NULL);
+ T("has joined this channel."), NULL);
}
ChanNumUsers(chan)++;
} else {
if (!Channel_Quiet(chan) && !DarkLegal(victim)) {
format_channel_broadcast(chan, NULL, victim,
CB_CHECKQUIET | CB_PRESENCE,
- T("%s %s has left this channel."), title);
+ T("has left this channel."), title);
}
notify_format(victim,
T("CHAT: %s removes you from channel <%s>."),
u = onchannel(player, chan);
if (!Channel_Quiet(chan) && !DarkLegal(player))
format_channel_broadcast(chan, u, player, CB_CHECKQUIET | CB_PRESENCE,
- T("%s %s has joined this channel."), NULL);
+ T("has joined this channel."), NULL);
ChanNumUsers(chan)++;
} else {
/* Should never happen */
if (remove_user(u, chan)) {
if (!Channel_Quiet(chan) && !DarkLegal(player))
format_channel_broadcast(chan, NULL, player, CB_CHECKQUIET | CB_PRESENCE,
- T("%s %s has left this channel."), title);
+ T("has left this channel."), title);
notify_format(player, T("CHAT: You leave channel <%s>."), ChanName(chan));
} else {
/* Should never happen */
{
CHAN *c;
CHANUSER *u;
- char buff[BUFFER_LEN], *bp;
for (c = channels; c; c = c->next) {
u = onchannel(player, c);
if (u) {
if (!Channel_Quiet(c) && (Channel_Admin(c) || Channel_Director(c)
- || (!Chanuser_Hide(u) && !Dark(player)))) {
- bp = buff;
-
- safe_format(buff, &bp, "%s %s", "%s", msg);
- *bp = '\0';
+ || (!Chanuser_Hide(u) && !Dark(player))))
format_channel_broadcast(c, u, player, CB_CHECKQUIET | CB_PRESENCE,
- buff, NULL);
- }
+ msg, NULL);
if (ungag)
CUtype(u) &= ~CU_GAG;
}
const char *msg, const char *extra)
{
const char *title = NULL;
+ char buff[BUFFER_LEN];
+
if (extra && *extra)
title = extra;
else if (u &&CUtitle(u))
- title = CUtitle(u);
+ title = CUtitle(u);
if (Channel_NoNames(chan)) {
if (Channel_NoTitles(chan) || !title)
- channel_broadcast(chan, victim, flags, msg, ChanObjName(chan), "Someone");
+ snprintf(buff, BUFFER_LEN, "%s %s %s", ChanObjName(chan), "Someone", msg);
else
- channel_broadcast(chan, victim, flags, msg, ChanObjName(chan), title);
+ snprintf(buff, BUFFER_LEN, "%s %s %s", ChanObjName(chan), title, msg);
} else
- channel_broadcast(chan, victim, flags, msg, ChanObjName(chan), Name(victim));
+ snprintf(buff, BUFFER_LEN, "%s %s %s", ChanObjName(chan), Name(victim), msg);
+
+ channel_broadcast(chan, victim, flags, "%s", buff);
}
static void
#include <ctype.h>
#if defined(__GNUC__) || defined(__LCC__)
/* Required to get the getdate() prototype on glibc. */
+#ifndef __USE_XOPEN_EXTENDED
#define __USE_XOPEN_EXTENDED
#endif
+#endif
#include <time.h>
#include <errno.h>
#include "conf.h"
}
}
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
len = strftime(s, BUFFER_LEN, args[0], ttm);
+#pragma GCC diagnostic pop
if (len == 0) {
/* Problem. Either the output from strftime would be over
* BUFFER_LEN characters, or there wasn't any output at all.
if (sep)
len = strlen(sep);
+ else
+ len = 0;
for (n = 0; n < help_dat->entries; n++)
if (quick_wild(pattern, help_dat->indx[n].topic + offset)) {
ansi_letter = 'w';
break;
default:
+ ansi_letter = '\0';
break; /* Not a valid color. */
}
/* If background color, change the letter to a capital. */
return match_exit_internal(who, name, type, flags, MASTER_ROOM,
match, exact_matches_to_go, matches_to_go);
/* Recursively search upwards in locations parent tree */
+ mret = MATCH_NONE;
while(GoodObject(loc) && !IsGarbage(loc) && mret != MATCH_EXACT ) {
mret = match_exit_internal(who, name, type, flags, loc,
match, exact_matches_to_go, matches_to_go);
host, ip);
return NOTHING;
}
- if (!Site_Can_Connect(host, player) || !Site_Can_Connect(ip, player)) {
- if (!Deny_Silent_Site(host, player) && !Deny_Silent_Site(ip, player)) {
- do_log(LT_CONN, 0, 0,
- T("Connection to %s not allowed from %s (%s)"), name,
- host, ip);
- strcpy(errbuf, T("Player connections not allowed."));
+ if (!isgst) {
+ if (!Site_Can_Connect(host, player) || !Site_Can_Connect(ip, player)) {
+ if (!Deny_Silent_Site(host, player) && !Deny_Silent_Site(ip, player)) {
+ do_log(LT_CONN, 0, 0,
+ T("Connection to %s not allowed from %s (%s)"), name,
+ host, ip);
+ strcpy(errbuf, T("Player connections not allowed."));
+ }
+ return NOTHING;
}
- return NOTHING;
- }
- /* validate password */
- if (!isgst)
if (!password_check(player, password)) {
/* Increment count of login failures */
ModTime(player)++;
check_lastfailed(player, host);
return NOTHING;
}
+ } else {
/* If it's a Guest player, and already connected, search the
* db for another Guest player to connect them to. */
- if(isgst) {
- player = create_guest(host, ip);
+ player = create_guest(host, ip);
if (!GoodObject(player)) {
do_log(LT_CONN, 0, 0, T("Can't connect to a guest (too many connected)"));
strcpy(errbuf, T("Too many guests are connected now."));
char numbuff[20];
int numfields;
char rbuff[BUFFER_LEN];
- int funccount;
+ int done;
int do_fieldnames = 0;
int i;
MYSQL_FIELD *fields;
}
rownum = 0;
+ done = 0;
while ((row_p = mysql_fetch_row(qres)) != NULL) {
if (rownum++ > 0 || do_fieldnames) {
safe_str(osep, buff, bp);
/* Now call the ufun. */
if (call_ufun(&ufun, wenv, i + 1, rbuff, executor, enactor, pe_info))
goto finished;
- if (safe_str(rbuff, buff, bp) && funccount == pe_info->fun_invocations)
+ if (safe_str(rbuff, buff, bp) && done)
goto finished;
- funccount = pe_info->fun_invocations;
+ done = 1;
}
finished:
free_sql_query(qres);
open CMDHDR, "<", "hdrs/command.h" or
die "Unable to open hdrs/command.h for reading: $!\n";
- my $numbytes = 20;
+ my $numbytes = 22;
while (<CMDHDR>) {
if (m/^#define\s+NUM_BYTES\s+(\d+)/o) {
$numbytes = $1;
my @switches = scan_files_for_pattern "src/SWITCHES", qr/^(.+)/;
- warn "Too many switches defined!\n" if length @switches > $MAXSWITCHES;
+ warn "Too many switches defined!\n" if scalar @switches > $MAXSWITCHES;
open HDR, ">", $temphdr or
die "Unable to open $temphdr for writing: $!\n";
* This symbol if defined indicates to the C program that the argument
* for the wait() system call should be declared as 'union wait status'
* instead of 'int status'. You probably need to include <sys/wait.h>
- * in the former case (see I_SYSWAIT).
+ * in the former case (see I_SYS_WAIT).
*/
#define UNION_WAIT / **/