]> git.pld-linux.org Git - packages/di.git/commitdiff
- last part of di source.
authorcieciwa <cieciwa@pld-linux.org>
Fri, 25 Feb 2000 13:56:53 +0000 (13:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    di-distr.003 -> 1.1

di-distr.003 [new file with mode: 0644]

diff --git a/di-distr.003 b/di-distr.003
new file mode 100644 (file)
index 0000000..e77f0d4
--- /dev/null
@@ -0,0 +1,4912 @@
+#! /bin/sh
+# This is a shell archive.  Remove anything before this line, then unpack
+# it by saving it into a file and typing "sh file".  To overwrite existing
+# files, type "sh file -c".  You can also feed this as standard input via
+# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
+# will see the following message at the end:
+#              "End of archive 3 (of 3)."
+# Contents:  Configure
+# Wrapped by root@seer on Thu Feb 24 10:15:51 2000
+PATH=/bin:/usr/bin:/usr/ucb ; export PATH
+if test -f 'Configure' -a "${1}" != "-c" ; then
+  echo shar: Will not clobber existing file \"'Configure'\"
+else
+echo shar: Extracting \"'Configure'\" \(106597 characters\)
+sed "s/^X//" >'Configure' <<'END_OF_FILE'
+X#! /bin/sh
+X#
+X# If these # comments don't work, trim them. Don't worry about any other
+X# shell scripts, Configure will trim # comments from them for you.
+X#
+X# (If you are trying to port this package to a machine without sh,
+X# I would suggest you have a look at the prototypical config_h.SH file
+X# and edit it to reflect your system. Some packages may include samples
+X# of config.h for certain machines, so you might look for one of those.)
+X#
+X# Yes, you may rip this off to use in other distribution packages. This
+X# script belongs to the public domain and cannot be copyrighted.
+X#
+X# (Note: this Configure script was generated automatically. Rather than
+X# working with this copy of Configure, you may wish to get metaconfig.
+X# The dist-3.0 package (which contains metaconfig) was posted in
+X# comp.sources.misc and is available on CPAN under authors/id/RAM so
+X# you may fetch it yourself from your nearest archive site.)
+X#
+X
+X# $Id$
+X#
+X# Generated on Sat Feb 12 13:14:26 PST 2000 [metaconfig 3.0 PL70b-1]
+X# (with additional metaconfig patches by bll@gentoo.com)
+X
+Xcat >/tmp/c1$$ <<EOF
+XARGGGHHHH!!!!!
+X
+XSCO csh still thinks true is false.  Write to SCO today and tell them that next
+Xyear Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
+X
+X(Actually, Configure ought to just patch csh in place.  Hmm.  Hmmmmm.  All
+Xwe'd have to do is go in and swap the && and || tokens, wherever they are.)
+X
+X[End of diatribe. We now return you to your regularly scheduled programming...]
+XEOF
+Xcat >/tmp/c2$$ <<EOF
+X
+XOOPS!  You naughty creature!  You didn't run Configure with sh!
+XI will attempt to remedy the situation by running sh for you...
+XEOF
+X
+Xtrue || cat /tmp/c1$$ /tmp/c2$$
+Xtrue || exec sh $0 $argv:q
+X
+X(exit $?0) || cat /tmp/c2$$
+X(exit $?0) || exec sh $0 $argv:q
+Xrm -f /tmp/c1$$ /tmp/c2$$
+X
+X: compute my invocation name
+Xme=$0
+Xcase "$0" in
+X*/*)
+X      me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
+X      test "$me" || me=$0
+X      ;;
+Xesac
+X
+X: Proper separator for the PATH environment variable
+Xp_=:
+X: On OS/2 this directory should exist if this is not floppy only system :-]
+Xif test -d c:/. ; then
+X    if test -n "$OS2_SHELL"; then
+X              p_=\;
+X              PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
+X              OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+X      elif test -n "$DJGPP"; then
+X              p_=\;
+X      fi
+Xfi
+X
+X: Proper PATH setting
+Xpaths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
+Xpaths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
+Xpaths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
+Xpaths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
+Xpaths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
+Xpaths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
+Xpaths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
+Xpaths="$paths /sbin /usr/sbin /usr/libexec"
+X
+Xfor p in $paths
+Xdo
+X      case "$p_$PATH$p_" in
+X      *$p_$p$p_*) ;;
+X      *) test -d $p && PATH=$PATH$p_$p ;;
+X      esac
+Xdone
+X
+XPATH=.$p_$PATH
+Xexport PATH
+X
+X: shall we be using ksh?
+Xinksh=''
+Xneedksh=''
+Xavoidksh=''
+Xnewsh=/bin/ksh
+Xchangesh=''
+Xif (PATH=.; alias -x) >/dev/null 2>&1; then
+X              inksh=true
+Xfi
+Xif test -f /hp-ux -a -f /bin/ksh; then
+X      needksh='to avoid sh bug in "here document" expansion'
+Xfi
+Xif test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
+X      if test X`/usr/bin/uname -v` = X4; then
+X              avoidksh="to avoid AIX 4's /bin/sh"
+X              newsh=/usr/bin/bsh
+X      fi
+Xfi
+Xcase "$inksh/$needksh" in
+X/[a-z]*)
+X              ENV=''
+X              changesh=true
+X              reason="$needksh"
+X      ;;
+Xesac
+Xcase "$inksh/$avoidksh" in
+Xtrue/[a-z]*)
+X      changesh=true
+X      reason="$avoidksh"
+X      ;;
+Xesac
+Xcase "$inksh/$needksh-$avoidksh-" in
+Xtrue/--)
+X              cat <<EOM
+X(I see you are using the Korn shell.  Some ksh's blow up on $me,
+Xmainly on older exotic systems.  If yours does, try the Bourne shell instead.)
+XEOM
+X      ;;
+Xesac
+Xcase "$changesh" in
+Xtrue)
+X      echo "(Feeding myself to $newsh $reason.)"
+X      case "$0" in
+X      Configure|*/Configure) exec $newsh $0 "$@";;
+X      *) exec $newsh Configure "$@";;
+X      esac
+X      ;;
+Xesac
+X
+X: if needed set CDPATH to a harmless value that is not chatty
+X: avoid bash 2.02 problems with empty CDPATH.
+Xcase "$CDPATH" in
+X'')   ;;
+X*)    case "$SHELL" in
+X      *bash*) CDPATH='.' ;;
+X      *)              CDPATH='' ;;
+X      esac
+X      ;;
+Xesac
+X: Configure runs within the UU subdirectory
+Xtest -d UU || mkdir UU
+Xcd UU && rm -f ./*
+X
+Xdi_otherobj=''
+Xdi_prog=''
+Xd_bsd=''
+Xd_eunice=''
+Xd_xenix=''
+Xeunicefix=''
+XMcc=''
+Xar=''
+Xawk=''
+Xbash=''
+Xbison=''
+Xbyacc=''
+Xcat=''
+Xchgrp=''
+Xchmod=''
+Xchown=''
+Xcomm=''
+Xcompress=''
+Xcp=''
+Xcpio=''
+Xcpp=''
+Xcsh=''
+Xdate=''
+Xecho=''
+Xegrep=''
+Xemacs=''
+Xexpr=''
+Xfind=''
+Xflex=''
+Xgrep=''
+Xgzip=''
+Xinews=''
+Xksh=''
+Xless=''
+Xline=''
+Xlint=''
+Xln=''
+Xlp=''
+Xlpr=''
+Xls=''
+Xmail=''
+Xmailx=''
+Xmake=''
+Xmkdir=''
+Xmore=''
+Xmv=''
+Xnm=''
+Xnroff=''
+Xperl=''
+Xpg=''
+Xpmake=''
+Xpr=''
+Xrm=''
+Xrmail=''
+Xsed=''
+Xsendmail=''
+Xshar=''
+Xsleep=''
+Xsmail=''
+Xsort=''
+Xsubmit=''
+Xtail=''
+Xtar=''
+Xtbl=''
+Xtee=''
+Xtest=''
+Xtouch=''
+Xtr=''
+Xtroff=''
+Xuname=''
+Xuniq=''
+Xuuname=''
+Xvi=''
+Xzcat=''
+Xzip=''
+Xlibswanted=''
+Xhint=''
+Xmyuname=''
+Xosname=''
+Xosvers=''
+XAuthor=''
+XDate=''
+XHeader=''
+XId=''
+XLocker=''
+XLog=''
+XRCSfile=''
+XRevision=''
+XSource=''
+XState=''
+X_a=''
+X_exe=''
+X_o=''
+Xarchobjs=''
+Xexe_ext=''
+Xfirstmakefile=''
+Xlib_ext=''
+Xobj_ext=''
+Xpath_sep=''
+Xafs=''
+Xcc=''
+Xgccversion=''
+Xccflags=''
+Xcppflags=''
+Xldflags=''
+Xlkflags=''
+Xlocincpth=''
+Xoptimize=''
+Xcf_by=''
+Xcf_time=''
+Xcontains=''
+Xcpplast=''
+Xcppminus=''
+Xcpprun=''
+Xcppstdin=''
+Xd_64bit_statfs_flds=''
+Xd_bcopy=''
+Xd_bzero=''
+Xd_endmntent=''
+Xd_fs_info=''
+Xd_getmnt=''
+Xd_getmntent=''
+Xd_getmntinfo=''
+Xd_getopt=''
+Xd_optind=''
+Xd_gnulibc=''
+Xd_memcpy=''
+Xd_memset=''
+Xd_mntctl=''
+Xd_mnttime=''
+Xd_portable=''
+Xd_setmntent=''
+Xd_setmntent_one_arg=''
+Xd_statfs=''
+Xd_statfsbsd=''
+Xd_statfssysv3=''
+Xubsize=''
+Xd_statvfs=''
+Xd_index=''
+Xd_strchr=''
+Xd_sysfs=''
+Xi_fshelp=''
+Xi_kernfsinfo=''
+Xi_limits=''
+Xi_malloc=''
+Xi_memory=''
+Xi_mntent=''
+Xi_mnttab=''
+Xi_stdlib=''
+Xi_stor_directory=''
+Xi_stor_entry=''
+Xi_stor_path=''
+Xi_string=''
+Xstrings=''
+Xi_sysfstyp=''
+Xi_sysfs_types=''
+Xi_sysfstypes=''
+Xi_sysmntctl=''
+Xi_sysmntent=''
+Xi_sysmnttab=''
+Xd_getmntinfobsize=''
+Xd_getmntinfofsize=''
+Xd_getmntinfofstype=''
+Xi_sysmount=''
+Xi_sysparam=''
+Xi_sysstat=''
+Xd_statfs_frsize=''
+Xi_sysstatfs=''
+Xd_statvfsbasetype=''
+Xi_sysstatvfs=''
+Xi_systypes=''
+Xi_sysvfs=''
+Xi_sysvfstab=''
+Xi_sysvmount=''
+Xi_systime=''
+Xi_systimek=''
+Xi_time=''
+Xtimeincl=''
+Xi_unistd=''
+Xlibc=''
+Xglibpth=''
+Xlibpth=''
+Xloclibpth=''
+Xplibpth=''
+Xxlibpth=''
+Xlibs=''
+Xlns=''
+Xmake_set_make=''
+Xinstallmansrc=''
+Xmanext=''
+Xmansrc=''
+Xmansrcexp=''
+Xc=''
+Xn=''
+Xpackage=''
+Xspackage=''
+Xprefix=''
+Xprefixexp=''
+Xprototype=''
+Xsh=''
+Xso=''
+Xsharpbang=''
+Xshsharp=''
+Xspitshell=''
+Xsrc=''
+Xstartsh=''
+Xsysman=''
+Xnm_opt=''
+Xnm_so_opt=''
+Xrunnm=''
+Xusenm=''
+Xincpath=''
+Xmips=''
+Xmips_type=''
+Xusrinc=''
+Xdefvoidused=''
+Xvoidflags=''
+XCONFIG=''
+X
+Xdefine='define'
+Xundef='undef'
+Xsmallmach='pdp11 i8086 z8000 i80286 iAPX286'
+Xrmlist=''
+X
+X: We must find out about Eunice early
+Xeunicefix=':'
+Xif test -f /etc/unixtovms; then
+X      eunicefix=/etc/unixtovms
+Xfi
+Xif test -f /etc/unixtovms.exe; then
+X      eunicefix=/etc/unixtovms.exe
+Xfi
+X
+X: Trailing extension.  Override this in a hint file, if needed.
+X_exe=''
+X: Extra object files, if any, needed on this platform.
+Xarchobjs=''
+Xgccversion=''
+X: Possible local include directories to search.
+X: Set locincpth to "" in a hint file to defeat local include searches.
+Xlocincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+Xlocincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+X:
+X: no include file wanted by default
+Xinclwanted=''
+X
+Xi_sysselct=''
+X: change the next line if compiling for Xenix/286 on Xenix/386
+Xxlibpth='/usr/lib/386 /lib/386'
+X
+X: Possible local library directories to search.
+Xloclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
+Xloclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+X
+X: general looking path for locating libraries
+Xglibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
+Xglibpth="$glibpth /lib /usr/lib $xlibpth"
+Xglibpth="$glibpth /lib/large /usr/lib/small /lib/small"
+Xglibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+X
+X: Private path used by Configure to find libraries.  Its value
+X: is prepended to libpth. This variable takes care of special
+X: machines, like the mips.  Usually, it should be empty.
+Xplibpth=''
+X
+X: default library list
+Xlibswanted=''
+Xlarge=''
+X: full support for void wanted by default
+Xdefvoidused=15
+X
+X: List of libraries we want.
+X: If anyone needs -lnet, put it in a hint file.
+Xlibswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl'
+Xlibswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
+Xlibswanted="$libswanted ucb bsd BSD PW x"
+X: We probably want to search /usr/shlib before most other libraries.
+X: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
+Xglibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
+Xglibpth="/usr/shlib $glibpth"
+X: Do not use vfork unless overridden by a hint file.
+Xusevfork=false
+X
+X: Find the basic shell for Bourne shell scripts
+Xcase "$sh" in
+X'')
+X      case "$SYSTYPE" in
+X      *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
+X      *) xxx='/bin/sh';;
+X      esac
+X      if test -f "$xxx"; then
+X              sh="$xxx"
+X      else
+X              : Build up a list and do a single loop so we can 'break' out.
+X              pth=`echo $PATH | sed -e "s/$p_/ /g"`
+X              for xxx in sh bash ksh pdksh ash; do
+X                      for p in $pth; do
+X                              try="$try ${p}/${xxx}"
+X                      done
+X              done
+X              for xxx in $try; do
+X                      if test -f "$xxx"; then
+X                              sh="$xxx";
+X                              break
+X                      elif test -f "$xxx.exe"; then
+X                              sh="$xxx";
+X                              break
+X                      fi
+X              done
+X      fi
+X      ;;
+Xesac
+X
+Xcase "$sh" in
+X'')   cat <<EOM >&2
+X$me:  Fatal Error:  I can't find a Bourne Shell anywhere.
+X
+XUsually it's in /bin/sh.  How did you even get this far?
+XPlease contact me (Brad Lanam) at bll@gentoo.com and
+Xwe'll try to straighten this all out.
+XEOM
+X      exit 1
+X      ;;
+Xesac
+X
+X: see if sh knows # comments
+Xif `$sh -c '#' >/dev/null 2>&1`; then
+X      shsharp=true
+X      spitshell=cat
+X      xcat=/bin/cat
+X      test -f $xcat || xcat=/usr/bin/cat
+X      echo "#!$xcat" >try
+X      $eunicefix try
+X      chmod +x try
+X      ./try > today
+X      if test -s today; then
+X              sharpbang='#!'
+X      else
+X              echo "#! $xcat" > try
+X              $eunicefix try
+X              chmod +x try
+X              ./try > today
+X              if test -s today; then
+X                      sharpbang='#! '
+X              else
+X                      sharpbang=': use '
+X              fi
+X      fi
+Xelse
+X      echo " "
+X      echo "Your $sh doesn't grok # comments--I will strip them later on."
+X      shsharp=false
+X      cd ..
+X      echo "exec grep -v '^[  ]*#'" >spitshell
+X      chmod +x spitshell
+X      $eunicefix spitshell
+X      spitshell=`pwd`/spitshell
+X      cd UU
+X      echo "I presume that if # doesn't work, #! won't work either!"
+X      sharpbang=': use '
+Xfi
+Xrm -f try today
+X
+X: figure out how to guarantee sh startup
+Xcase "$startsh" in
+X'') startsh=${sharpbang}${sh} ;;
+X*)
+Xesac
+Xcat >try <<EOSS
+X$startsh
+Xset abc
+Xtest "$?abc" != 1
+XEOSS
+X
+Xchmod +x try
+X$eunicefix try
+Xif ./try; then
+X      : echo "Yup, it does."
+Xelse
+X      echo "Hmm... '$startsh' does not guarantee sh startup..."
+X      echo "You may have to fix up the shell scripts to make sure $sh runs them."
+Xfi
+Xrm -f try
+X
+X
+X: Save command line options in file UU/cmdline.opt for later use in
+X: generating config.sh.
+Xcat > cmdline.opt <<EOSH
+X# Configure command line arguments.
+Xconfig_arg0='$0'
+Xconfig_args='$*'
+Xconfig_argc=$#
+XEOSH
+Xargn=1
+Xfor arg in "$@"; do
+X      cat >>cmdline.opt <<EOSH
+Xconfig_arg$argn='$arg'
+XEOSH
+X      argn=`expr $argn + 1`
+Xdone
+X
+X: produce awk script to parse command line options
+Xcat >options.awk <<'EOF'
+XBEGIN {
+X      optstr = "dD:eEf:hKOrsSU:V";    # getopt-style specification
+X
+X      len = length(optstr);
+X      for (i = 1; i <= len; i++) {
+X              c = substr(optstr, i, 1);
+X              if (i < len) a = substr(optstr, i + 1, 1); else a = "";
+X              if (a == ":") {
+X                      arg[c] = 1;
+X                      i++;
+X              }
+X              opt[c] = 1;
+X      }
+X}
+X{
+X      expect = 0;
+X      str = $0;
+X      if (substr(str, 1, 1) != "-") {
+X              printf("'%s'\n", str);
+X              next;
+X      }
+X      len = length($0);
+X      for (i = 2; i <= len; i++) {
+X              c = substr(str, i, 1);
+X              if (!opt[c]) {
+X                      printf("-%s\n", substr(str, i));
+X                      next;
+X              }
+X              printf("-%s\n", c);
+X              if (arg[c]) {
+X                      if (i < len)
+X                              printf("'%s'\n", substr(str, i + 1));
+X                      else
+X                              expect = 1;
+X                      next;
+X              }
+X      }
+X}
+XEND {
+X      if (expect)
+X              print "?";
+X}
+XEOF
+X
+X: process the command line options
+Xset X `for arg in "$@"; do echo "X$arg"; done |
+X      sed -e s/X// | awk -f options.awk`
+Xeval "set $*"
+Xshift
+Xrm -f options.awk
+X
+X: set up default values
+Xfastread=''
+Xreuseval=false
+Xconfig_sh=''
+Xalldone=''
+Xerror=''
+Xsilent=''
+Xextractsh=''
+Xoverride=''
+Xknowitall=''
+Xrm -f optdef.sh
+Xcat >optdef.sh <<EOS
+X$startsh
+XEOS
+X
+X
+X: option parsing
+Xwhile test $# -gt 0; do
+X      case "$1" in
+X      -d) shift; fastread=yes;;
+X      -e) shift; alldone=cont;;
+X      -f)
+X              shift
+X              cd ..
+X              if test -r "$1"; then
+X                      config_sh="$1"
+X              else
+X                      echo "$me: cannot read config file $1." >&2
+X                      error=true
+X              fi
+X              cd UU
+X              shift;;
+X      -h) shift; error=true;;
+X      -r) shift; reuseval=true;;
+X      -s) shift; silent=true; realsilent=true;;
+X      -E) shift; alldone=exit;;
+X      -K) shift; knowitall=true;;
+X      -O) shift; override=true;;
+X      -S) shift; silent=true; extractsh=true;;
+X      -D)
+X              shift
+X              case "$1" in
+X              *=)
+X                      echo "$me: use '-U symbol=', not '-D symbol='." >&2
+X                      echo "$me: ignoring -D $1" >&2
+X                      ;;
+X              *=*) echo "$1" | \
+X                              sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
+X              *) echo "$1='define'" >> optdef.sh;;
+X              esac
+X              shift
+X              ;;
+X      -U)
+X              shift
+X              case "$1" in
+X              *=) echo "$1" >> optdef.sh;;
+X              *=*)
+X                      echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
+X                      echo "$me: ignoring -U $1" >&2
+X                      ;;
+X              *) echo "$1='undef'" >> optdef.sh;;
+X              esac
+X              shift
+X              ;;
+X      -V) echo "$me generated by metaconfig 3.0 PL70b-1." >&2
+X              exit 0;;
+X      --) break;;
+X      -*) echo "$me: unknown option $1" >&2; shift; error=true;;
+X      *) break;;
+X      esac
+Xdone
+X
+Xcase "$error" in
+Xtrue)
+X      cat >&2 <<EOM
+XUsage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
+X                 [-U symbol] [-U symbol=]
+X  -d : use defaults for all answers.
+X  -e : go on without questioning past the production of config.sh.
+X  -f : specify an alternate default configuration file.
+X  -h : print this help message and exit (with an error status).
+X  -r : reuse C symbols value if possible (skips costly nm extraction).
+X  -s : silent mode, only echoes questions and essential information.
+X  -D : define symbol to have some value:
+X         -D symbol         symbol gets the value 'define'
+X         -D symbol=value   symbol gets the value 'value'
+X  -E : stop at the end of questions, after having produced config.sh.
+X  -K : do not use unless you know what you are doing.
+X  -O : let -D and -U override definitions from loaded configuration file.
+X  -S : perform variable substitutions on all .SH files (can mix with -f)
+X  -U : undefine symbol:
+X         -U symbol    symbol gets the value 'undef'
+X         -U symbol=   symbol gets completely empty
+X  -V : print version number and exit (with a zero status).
+XEOM
+X      exit 1
+X      ;;
+Xesac
+X
+X: Sanity checks
+Xcase "$fastread$alldone" in
+Xyescont|yesexit) ;;
+X*)
+X      if test ! -t 0; then
+X              echo "Say 'sh Configure', not 'sh <Configure'"
+X              exit 1
+X      fi
+X      ;;
+Xesac
+X
+Xexec 4>&1
+Xcase "$silent" in
+Xtrue) exec 1>/dev/null;;
+Xesac
+X
+X: run the defines and the undefines, if any, but leave the file out there...
+Xtouch optdef.sh
+X. ./optdef.sh
+X
+X: set package name
+Xpackage=di
+Xfirst=`echo $package | sed -e 's/^\(.\).*/\1/'`
+Xlast=`echo $package | sed -e 's/^.\(.*\)/\1/'`
+Xcase "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+XABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
+X*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
+Xesac
+X
+X: Some greps do not return status, grrr.
+Xecho "grimblepritz" >grimble
+Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
+X      contains=contains
+Xelif grep grimblepritz grimble >/dev/null 2>&1 ; then
+X      contains=grep
+Xelse
+X      contains=contains
+Xfi
+Xrm -f grimble
+X: the following should work in any shell
+Xcase "$contains" in
+Xcontains*)
+X      echo " "
+X      echo "AGH!  Grep doesn't return a status.  Attempting remedial action."
+X      cat >contains <<'EOSS'
+Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
+XEOSS
+Xchmod +x contains
+Xesac
+X
+X: Find the path to the source tree
+Xcase "$src" in
+X'') case "$0" in
+X    */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
+X    *)   src='.';;
+X    esac;;
+Xesac
+Xcase "$src" in
+X'')   src=/
+X      rsrc=/
+X      ;;
+X/*) rsrc="$src";;
+X*) rsrc="../$src";;
+Xesac
+Xif test -f $rsrc/Configure && \
+X      $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
+Xthen
+X   : found it, so we are ok.
+Xelse
+X      rsrc=''
+X      for src in . .. ../.. ../../.. ../../../..; do
+X              if test -f ../$src/Configure && \
+X                      $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
+X              then
+X                      rsrc=../$src
+X                      break
+X              fi
+X      done
+Xfi
+Xcase "$rsrc" in
+X'')
+X      cat <<EOM >&4
+X
+XSorry, I can't seem to locate the source dir for $package.  Please start
+XConfigure with an explicit path -- i.e. /some/path/Configure.
+X
+XEOM
+X      exit 1
+X      ;;
+X../.) rsrc='..';;
+X*)
+X      echo " "
+X      echo "Sources for $package found in \"$src\"." >&4
+X      ;;
+Xesac
+X
+X: script used to extract .SH files with variable substitutions
+Xcat >extract <<'EOS'
+XCONFIG=true
+Xecho "Doing variable substitutions on .SH files..."
+Xif test -f $src/MANIFEST; then
+X      set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
+Xelse
+X      echo "(Looking for .SH files under the source directory.)"
+X      set x `(cd $src; find . -name "*.SH" -print)`
+Xfi
+Xshift
+Xcase $# in
+X0) set x `(cd $src; echo *.SH)`; shift;;
+Xesac
+Xif test ! -f $src/$1; then
+X      shift
+Xfi
+Xmkdir_p='
+Xname=$1;
+Xcreate="";
+Xwhile test $name; do
+X      if test ! -d "$name"; then
+X              create="$name $create";
+X              name=`echo $name | sed -e "s|^[^/]*$||"`;
+X              name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
+X      else
+X              name="";
+X      fi;
+Xdone;
+Xfor file in $create; do
+X      mkdir $file;
+Xdone
+X'
+Xfor file in $*; do
+X      case "$src" in
+X      ".")
+X              case "$file" in
+X              */*)
+X                      dir=`expr X$file : 'X\(.*\)/'`
+X                      file=`expr X$file : 'X.*/\(.*\)'`
+X                      (cd $dir && . ./$file)
+X                      ;;
+X              *)
+X                      . ./$file
+X                      ;;
+X              esac
+X              ;;
+X      *)
+X              case "$file" in
+X              */*)
+X                      dir=`expr X$file : 'X\(.*\)/'`
+X                      file=`expr X$file : 'X.*/\(.*\)'`
+X                      (set x $dir; shift; eval $mkdir_p)
+X                      sh <$src/$dir/$file
+X                      ;;
+X              *)
+X                      sh <$src/$file
+X                      ;;
+X              esac
+X              ;;
+X      esac
+Xdone
+Xif test -f $src/config_h.SH; then
+X      if test ! -f config.h; then
+X      : oops, they left it out of MANIFEST, probably, so do it anyway.
+X      . $src/config_h.SH
+X      fi
+Xfi
+XEOS
+X
+X: extract files and exit if asked to do so
+Xcase "$extractsh" in
+Xtrue)
+X      case "$realsilent" in
+X      true) ;;
+X      *) exec 1>&4;;
+X      esac
+X      case "$config_sh" in
+X      '') config_sh='config.sh';;
+X      esac
+X      echo " "
+X      echo "Fetching answers from $config_sh..."
+X      cd ..
+X      . $config_sh
+X      test "$override" && . ./optdef.sh
+X      echo " "
+X      . UU/extract
+X      rm -rf UU
+X      echo "Done."
+X      exit 0
+X      ;;
+Xesac
+X
+X: Eunice requires " " instead of "", can you believe it
+Xecho " "
+X: Here we go...
+Xecho "Beginning of configuration questions for $package."
+X
+Xtrap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
+X
+X: first determine how to suppress newline on echo command
+Xecho " "
+Xecho "Checking echo to see how to suppress newlines..."
+X(echo "hi there\c" ; echo " ") >.echotmp
+Xif $contains c .echotmp >/dev/null 2>&1 ; then
+X      echo "...using -n."
+X      n='-n'
+X      c=''
+Xelse
+X      cat <<'EOM'
+X...using \c
+XEOM
+X      n=''
+X      c='\c'
+Xfi
+Xecho $n "The star should be here-->$c"
+Xecho '*'
+Xrm -f .echotmp
+X
+X: Now test for existence of everything in MANIFEST
+Xecho " "
+Xif test -f $rsrc/MANIFEST; then
+X      echo "First let's make sure your kit is complete.  Checking..." >&4
+X      awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
+X      rm -f missing
+X      tmppwd=`pwd`
+X      for filelist in x??; do
+X              (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
+X      done
+X      if test -s missing; then
+X              cat missing >&4
+X              cat >&4 <<'EOM'
+X
+XTHIS PACKAGE SEEMS TO BE INCOMPLETE.
+X
+XYou have the option of continuing the configuration process, despite the
+Xdistinct possibility that your kit is damaged, by typing 'y'es.  If you
+Xdo, don't blame me if something goes wrong.  I advise you to type 'n'o
+Xand contact the author (bll@gentoo.com).
+X
+XEOM
+X              echo $n "Continue? [n] $c" >&4
+X              read ans
+X              case "$ans" in
+X              y*)
+X                      echo "Continuing..." >&4
+X                      rm -f missing
+X                      ;;
+X              *)
+X                      echo "ABORTING..." >&4
+X                      kill $$
+X                      ;;
+X              esac
+X      else
+X              echo "Looks good..."
+X      fi
+Xelse
+X      echo "There is no MANIFEST file.  I hope your kit is complete !"
+Xfi
+Xrm -f missing x??
+X
+X: compute the number of columns on the terminal for proper question formatting
+Xcase "$COLUMNS" in
+X'') COLUMNS='80';;
+Xesac
+X
+X: set up the echo used in my read
+Xmyecho="case \"\$xxxm\" in
+X'') echo $n \"\$rp $c\" >&4;;
+X*) case \"\$rp\" in
+X      '') echo $n \"[\$xxxm] $c\";;
+X      *)
+X              if test \`echo \"\$rp [\$xxxm]  \" | wc -c\` -ge $COLUMNS; then
+X                      echo \"\$rp\" >&4
+X                      echo $n \"[\$xxxm] $c\" >&4
+X              else
+X                      echo $n \"\$rp [\$xxxm] $c\" >&4
+X              fi
+X              ;;
+X      esac;;
+Xesac"
+X
+X: now set up to do reads with possible shell escape and default assignment
+Xcat <<EOSC >myread
+X$startsh
+Xxxxm=\$dflt
+X$myecho
+Xans='!'
+Xcase "\$fastread" in
+Xyes) case "\$dflt" in
+X      '') ;;
+X      *) ans='';
+X              case "\$silent-\$rp" in
+X              true-) ;;
+X              *) echo " " >&4;;
+X              esac;;
+X      esac;;
+X*) case "\$silent" in
+X      true) case "\$rp" in
+X              '') ans='';;
+X              esac;;
+X      esac;;
+Xesac
+Xwhile expr "X\$ans" : "X!" >/dev/null; do
+X      read answ
+X      set x \$xxxm
+X      shift
+X      aok=''; eval "ans=\\"\$answ\\"" && aok=y
+X      case  "\$answ" in
+X      "!")
+X              sh 1>&4
+X              echo " "
+X              $myecho
+X              ;;
+X      !*)
+X              set x \`expr "X\$ans" : "X!\(.*\)\$"\`
+X              shift
+X              sh 1>&4 -c "\$*"
+X              echo " "
+X              $myecho
+X              ;;
+X      "\$ans")
+X              case "\$ans" in
+X              \\&*)
+X                      set x \`expr "X\$ans" : "X&\(.*\)\$"\`
+X                      shift
+X                      case "\$1" in
+X                      -d)
+X                              fastread=yes
+X                              echo "(OK, I'll run with -d after this question.)" >&4
+X                              ;;
+X                      -*)
+X                              echo "*** Sorry, \$1 not supported yet." >&4
+X                              ;;
+X                      esac
+X                      $myecho
+X                      ans=!
+X                      ;;
+X              esac;;
+X      *)
+X              case "\$aok" in
+X              y)
+X                      echo "*** Substitution done -- please confirm."
+X                      xxxm="\$ans"
+X                      ans=\`echo $n "\$ans$c" | tr '\012' ' '\`
+X                      xxxm="\$ans"
+X                      ans=!
+X                      ;;
+X              *)
+X                      echo "*** Error -- try again."
+X                      ans=!
+X                      ;;
+X              esac
+X              $myecho
+X              ;;
+X      esac
+X      case "\$ans\$xxxm\$nostick" in
+X      '')
+X              ans=!
+X              $myecho
+X              ;;
+X      esac
+Xdone
+Xcase "\$ans" in
+X'') ans="\$xxxm";;
+Xesac
+XEOSC
+X
+X: create .config dir to save info across Configure sessions
+Xtest -d ../.config || mkdir ../.config
+Xcat >../.config/README <<EOF
+XThis directory created by Configure to save information that should
+Xpersist across sessions for $package.
+X
+XYou may safely delete it if you wish.
+XEOF
+X
+X: general instructions
+Xneedman=true
+Xfirsttime=true
+Xuser=`(logname) 2>/dev/null`
+Xcase "$user" in
+X'') user=`whoami 2>&1`;;
+Xesac
+Xif $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
+X      firsttime=false
+X      echo " "
+X      rp='Would you like to see the instructions?'
+X      dflt=n
+X      . ./myread
+X      case "$ans" in
+X      [yY]*) ;;
+X      *) needman=false;;
+X      esac
+Xfi
+Xif $needman; then
+X      cat <<EOH
+X
+XThis installation shell script will examine your system and ask you questions
+Xto determine how the di package should be installed. If you get
+Xstuck on a question, you may use a ! shell escape to start a subshell or
+Xexecute a command.  Many of the questions will have default answers in square
+Xbrackets; typing carriage return will give you the default.
+X
+XOn some of the questions which ask for file or directory names you are allowed
+Xto use the ~name construct to specify the login directory belonging to "name",
+Xeven if you don't have a shell which knows about that.  Questions where this is
+Xallowed will be marked "(~name ok)".
+X
+XEOH
+X      rp=''
+X      dflt='Type carriage return to continue'
+X      . ./myread
+X      cat <<'EOH'
+X
+XThe prompter used in this script allows you to use shell variables and
+Xbackticks in your answers.  You may use $1, $2, etc...  to refer to the words
+Xin the default answer, as if the default line was a set of arguments given to a
+Xscript shell.  This means you may also use $* to repeat the whole default line,
+Xso you do not have to re-type everything to add something to the default.
+X
+XEverytime there is a substitution, you will have to confirm.  If there is an
+Xerror (e.g. an unmatched backtick), the default answer will remain unchanged
+Xand you will be prompted again.
+X
+XIf you are in a hurry, you may run 'Configure -d'.  This will bypass nearly all
+Xthe questions and use the computed defaults (or the previous answers if there
+Xwas already a config.sh file). Type 'Configure -h' for a list of options.
+XYou may also start interactively and then answer '& -d' at any prompt to turn
+Xon the non-interactive behaviour for the remainder of the execution.
+X
+XEOH
+X      . ./myread
+X      cat <<EOH
+X
+XMuch effort has been expended to ensure that this shell script will run on any
+XUnix system.  If despite that it blows up on yours, your best bet is to edit
+XConfigure and run it again.  If you can't run Configure for some reason,
+Xyou'll have to generate a config.sh file by hand.  Whatever problems you
+Xhave, let me (bll@gentoo.com) know how I blew it.
+X
+XThis installation script affects things in two ways:
+X
+X1) it may do direct variable substitutions on some of the files included
+X   in this kit.
+X2) it builds a config.h file for inclusion in C programs.  You may edit
+X   any of these files as the need arises after running this script.
+X
+XIf you make a mistake on a question, there is no easy way to back up to it
+Xcurrently.  The easiest thing to do is to edit config.sh and rerun all the SH
+Xfiles.  Configure will offer to let you do this before it runs the SH files.
+X
+XEOH
+X      dflt='Type carriage return to continue'
+X      . ./myread
+X      case "$firsttime" in
+X      true) echo $user >>../.config/instruct;;
+X      esac
+Xfi
+X
+X: find out where common programs are
+Xecho " "
+Xecho "Locating common programs..." >&4
+Xcat <<EOSC >loc
+X$startsh
+Xcase \$# in
+X0) exit 1;;
+Xesac
+Xthing=\$1
+Xshift
+Xdflt=\$1
+Xshift
+Xfor dir in \$*; do
+X      case "\$thing" in
+X      .)
+X      if test -d \$dir/\$thing; then
+X              echo \$dir
+X              exit 0
+X      fi
+X      ;;
+X      *)
+X      for thisthing in \$dir/\$thing; do
+X              : just loop through to pick last item
+X      done
+X      if test -f \$thisthing; then
+X              echo \$thisthing
+X              exit 0
+X      elif test -f \$dir/\$thing.exe; then
+X              if test -n "$DJGPP"; then
+X                      echo \$dir/\$thing.exe
+X              else
+X                      : on Eunice apparently
+X                      echo \$dir/\$thing
+X              fi
+X              exit 0
+X      fi
+X      ;;
+X      esac
+Xdone
+Xecho \$dflt
+Xexit 1
+XEOSC
+Xchmod +x loc
+X$eunicefix loc
+Xloclist="
+Xawk
+Xcat
+Xchgrp
+Xchmod
+Xchown
+Xcp
+Xecho
+Xexpr
+Xgrep
+Xmake
+Xmv
+Xrm
+Xsed
+Xtouch
+Xtr
+X"
+Xtrylist="
+XMcc
+Xar
+Xcpp
+Xdate
+Xegrep
+Xln
+Xnm
+Xnroff
+Xtest
+Xuname
+X"
+Xpth=`echo $PATH | sed -e "s/$p_/ /g"`
+Xpth="$pth /lib /usr/lib"
+Xfor file in $loclist; do
+X      eval xxx=\$$file
+X      case "$xxx" in
+X      /*|?:[\\/]*)
+X              if test -f "$xxx"; then
+X                      : ok
+X              else
+X                      echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+X                      xxx=`./loc $file $file $pth`
+X              fi
+X              ;;
+X      '') xxx=`./loc $file $file $pth`;;
+X      *) xxx=`./loc $xxx $xxx $pth`;;
+X      esac
+X      eval $file=$xxx
+X      eval _$file=$xxx
+X      case "$xxx" in
+X      /*)
+X              echo $file is in $xxx.
+X              ;;
+X      ?:[\\/]*)
+X              echo $file is in $xxx.
+X              ;;
+X      *)
+X              echo "I don't know where '$file' is, and my life depends on it." >&4
+X              echo "Go find a public domain implementation or fix your PATH setting!" >&4
+X              exit 1
+X              ;;
+X      esac
+Xdone
+Xecho " "
+Xecho "Don't worry if any of the following aren't found..."
+Xsay=offhand
+Xfor file in $trylist; do
+X      eval xxx=\$$file
+X      case "$xxx" in
+X      /*|?:[\\/]*)
+X              if test -f "$xxx"; then
+X                      : ok
+X              else
+X                      echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+X                      xxx=`./loc $file $file $pth`
+X              fi
+X              ;;
+X      '') xxx=`./loc $file $file $pth`;;
+X      *) xxx=`./loc $xxx $xxx $pth`;;
+X      esac
+X      eval $file=$xxx
+X      eval _$file=$xxx
+X      case "$xxx" in
+X      /*)
+X              echo $file is in $xxx.
+X              ;;
+X      ?:[\\/]*)
+X              echo $file is in $xxx.
+X              ;;
+X      *)
+X              echo "I don't see $file out there, $say."
+X              say=either
+X              ;;
+X      esac
+Xdone
+Xcase "$egrep" in
+Xegrep)
+X      echo "Substituting grep for egrep."
+X      egrep=$grep
+X      ;;
+Xesac
+Xcase "$ln" in
+Xln)
+X      echo "Substituting cp for ln."
+X      ln=$cp
+X      ;;
+Xesac
+Xcase "$test" in
+Xtest)
+X      echo "Hopefully test is built into your sh."
+X      ;;
+X*)
+X      if `sh -c "PATH= test true" >/dev/null 2>&1`; then
+X              echo "Using the test built into your sh."
+X              test=test
+X              _test=test
+X      fi
+X      ;;
+Xesac
+Xcase "$echo" in
+Xecho)
+X      echo "Hopefully echo is built into your sh."
+X      ;;
+X'') ;;
+X*)
+X      echo " "
+Xecho "Checking compatibility between $echo and builtin echo (if any)..." >&4
+X      $echo $n "hi there$c" >foo1
+X      echo $n "hi there$c" >foo2
+X      if cmp foo1 foo2 >/dev/null 2>&1; then
+X              echo "They are compatible.  In fact, they may be identical."
+X      else
+X              case "$n" in
+X              '-n') n='' c='\c';;
+X              *) n='-n' c='';;
+X              esac
+X              cat <<FOO
+XThey are not compatible!  You are probably running ksh on a non-USG system.
+XI'll have to use $echo instead of the builtin, since Bourne shell doesn't
+Xhave echo built in and we may have to run some Bourne shell scripts.  That
+Xmeans I'll have to use '$n$c' to suppress newlines now.  Life is ridiculous.
+X
+XFOO
+X              $echo $n "The star should be here-->$c"
+X              $echo "*"
+X      fi
+X      $rm -f foo1 foo2
+X      ;;
+Xesac
+X
+X: determine whether symbolic links are supported
+Xecho " "
+X$touch blurfl
+Xif $ln -s blurfl sym > /dev/null 2>&1 ; then
+X      echo "Symbolic links are supported." >&4
+X      lns="$ln -s"
+Xelse
+X      echo "Symbolic links are NOT supported." >&4
+X      lns="$ln"
+Xfi
+X$rm -f blurfl sym
+X
+X: see whether [:lower:] and [:upper:] are supported character classes
+Xecho " "
+Xup='[A-Z]'
+Xlow='[a-z]'
+Xcase "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+XABYZ)
+X      echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
+X      up='[:upper:]'
+X      low='[:lower:]'
+X      ;;
+X*)
+X      echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
+X      ;;
+Xesac
+X: set up the translation script tr, must be called with ./tr of course
+Xcat >tr <<EOSC
+X$startsh
+Xcase "\$1\$2" in
+X'[A-Z][a-z]') exec $tr '$up' '$low';;
+X'[a-z][A-Z]') exec $tr '$low' '$up';;
+Xesac
+Xexec $tr "\$@"
+XEOSC
+Xchmod +x tr
+X$eunicefix tr
+X
+X: Try to determine whether config.sh was made on this system
+Xcase "$config_sh" in
+X'')
+Xmyuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
+Xmyuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
+X      ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
+Xnewmyuname="$myuname"
+Xdflt=n
+Xcase "$knowitall" in
+X'')
+X      if test -f ../config.sh; then
+X              if $contains myuname= ../config.sh >/dev/null 2>&1; then
+X                      eval "`grep myuname= ../config.sh`"
+X              fi
+X              if test "X$myuname" = "X$newmyuname"; then
+X                      dflt=y
+X              fi
+X      fi
+X      ;;
+X*) dflt=y;;
+Xesac
+X
+X: Get old answers from old config file if Configure was run on the
+X: same system, otherwise use the hints.
+Xhint=default
+Xcd ..
+Xif test -f config.sh; then
+X      echo " "
+X      rp="I see a config.sh file.  Shall I use it to set the defaults?"
+X      . UU/myread
+X      case "$ans" in
+X      n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
+X      *)  echo "Fetching default answers from your old config.sh file..." >&4
+X              tmp_n="$n"
+X              tmp_c="$c"
+X              tmp_sh="$sh"
+X              . ./config.sh
+X              cp config.sh UU
+X              n="$tmp_n"
+X              c="$tmp_c"
+X              : Older versions did not always set $sh.  Catch re-use of such
+X              : an old config.sh.
+X              case "$sh" in
+X              '') sh="$tmp_sh" ;;
+X              esac
+X              hint=previous
+X              ;;
+X      esac
+Xfi
+Xif test ! -f config.sh; then
+X      $cat <<EOM
+X
+XFirst time through, eh?  I have some defaults handy for some systems
+Xthat need some extra help getting the Configure answers right:
+X
+XEOM
+X      (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/   /g' >&4
+X      dflt=''
+X      : Half the following guesses are probably wrong... If you have better
+X      : tests or hints, please send them to bll@gentoo.com
+X      : The metaconfig authors would also appreciate a copy...
+X      $test -f /irix && osname=irix
+X      $test -f /xenix && osname=sco_xenix
+X      $test -f /dynix && osname=dynix
+X      $test -f /dnix && osname=dnix
+X      $test -f /lynx.os && osname=lynxos
+X      $test -f /unicos && osname=unicos && osvers=`$uname -r`
+X      $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
+X      $test -f /bin/mips && /bin/mips && osname=mips
+X      $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
+X              $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
+X      $test -d /usr/apollo/bin && osname=apollo
+X      $test -f /etc/saf/_sactab && osname=svr4
+X      $test -d /usr/include/minix && osname=minix
+X      if $test -d /MachTen; then
+X              osname=machten
+X              if $test -x /sbin/version; then
+X                      osvers=`/sbin/version | $awk '{print $2}' |
+X                      $sed -e 's/[A-Za-z]$//'`
+X              elif $test -x /usr/etc/version; then
+X                      osvers=`/usr/etc/version | $awk '{print $2}' |
+X                      $sed -e 's/[A-Za-z]$//'`
+X              else
+X                      osvers="$2.$3"
+X              fi
+X      fi
+X      if $test -f $uname; then
+X              set X $myuname
+X              shift
+X
+X              case "$5" in
+X              fps*) osname=fps ;;
+X              mips*)
+X                      case "$4" in
+X                      umips) osname=umips ;;
+X                      *) osname=mips ;;
+X                      esac;;
+X              [23]100) osname=mips ;;
+X              next*) osname=next ;;
+X              i386*)
+X                      if $test -f /etc/kconfig; then
+X                              osname=isc
+X                              if test "$lns" = "ln -s"; then
+X                                      osvers=4
+X                              elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
+X                                      osvers=3
+X                              elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
+X                                      osvers=2
+X                              fi
+X                      fi
+X                      ;;
+X              pc*)
+X                      if test -n "$DJGPP"; then
+X                              osname=dos
+X                              osvers=djgpp
+X                      fi
+X                      ;;
+X              esac
+X
+X              case "$1" in
+X              aix) osname=aix
+X                      tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+X                      case "$tmp" in
+X                      'not found') osvers="$4"."$3" ;;
+X                      '<3240'|'<>3240') osvers=3.2.0 ;;
+X                      '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
+X                      '=3250'|'>3250') osvers=3.2.5 ;;
+X                      *) osvers=$tmp;;
+X                      esac
+X                      ;;
+X              *dc.osx) osname=dcosx
+X                      osvers="$3"
+X                      ;;
+X              dnix) osname=dnix
+X                      osvers="$3"
+X                      ;;
+X              domainos) osname=apollo
+X                      osvers="$3"
+X                      ;;
+X              dgux) osname=dgux
+X                      osvers="$3"
+X                      ;;
+X              dynixptx*) osname=dynixptx
+X                      osvers="$3"
+X                      ;;
+X              freebsd) osname=freebsd
+X                      osvers="$3" ;;
+X              genix) osname=genix ;;
+X              hp*) osname=hpux
+X                      osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
+X                      ;;
+X              irix*) osname=irix
+X                      case "$3" in
+X                      4*) osvers=4 ;;
+X                      5*) osvers=5 ;;
+X                      *)      osvers="$3" ;;
+X                      esac
+X                      ;;
+X              linux) osname=linux
+X                      case "$3" in
+X                      *)      osvers="$3" ;;
+X                      esac
+X                      ;;
+X              netbsd*) osname=netbsd
+X                      osvers="$3"
+X                      ;;
+X              news-os) osvers="$3"
+X                      case "$3" in
+X                      4*) osname=newsos4 ;;
+X                      *) osname=newsos ;;
+X                      esac
+X                      ;;
+X              bsd386) osname=bsd386
+X                      osvers=`$uname -r`
+X                      ;;
+X              powerux | power_ux | powermax_os | powermaxos | \
+X              powerunix | power_unix) osname=powerux
+X                      osvers="$3"
+X                      ;;
+X              next*) osname=next ;;
+X              solaris) osname=solaris
+X                      case "$3" in
+X                      5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+X                      *)      osvers="$3" ;;
+X                      esac
+X                      ;;
+X              sunos) osname=sunos
+X                      case "$3" in
+X                      5*) osname=solaris
+X                              osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+X                      *)      osvers="$3" ;;
+X                      esac
+X                      ;;
+X              titanos) osname=titanos
+X                      case "$3" in
+X                      1*) osvers=1 ;;
+X                      2*) osvers=2 ;;
+X                      3*) osvers=3 ;;
+X                      4*) osvers=4 ;;
+X                      *)      osvers="$3" ;;
+X                      esac
+X                      ;;
+X              ultrix) osname=ultrix
+X                      osvers="$3"
+X                      ;;
+X              osf1|mls+)      case "$5" in
+X                              alpha)
+X                                      osname=dec_osf
+X                                      osvers=`echo "$3" | sed 's/^[xvt]//'`
+X                                      ;;
+X                      hp*)    osname=hp_osf1  ;;
+X                      mips)   osname=mips_osf1 ;;
+X                      esac
+X                      ;;
+X              uts) osname=uts
+X                      osvers="$3"
+X                      ;;
+X              qnx) osname=qnx
+X                      osvers="$4"
+X                      ;;
+X              beos) osname=beos
+X                      osvers="$3"
+X                      ;;
+X              $2) case "$osname" in
+X                      *isc*) ;;
+X                      *freebsd*) ;;
+X                      svr*)
+X                              : svr4.x or possibly later
+X                              case "svr$3" in
+X                              ${osname}*)
+X                                      osname=svr$3
+X                                      osvers=$4
+X                                      ;;
+X                              esac
+X                              case "$osname" in
+X                              svr4.0)
+X                                      : Check for ESIX
+X                                      if test -f /stand/boot ; then
+X                                              eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
+X                                              if test -n "$INITPROG" -a -f "$INITPROG"; then
+X                      isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
+X                                                      if test -n "$isesix"; then
+X                                                              osname=esix4
+X                                                      fi
+X                                              fi
+X                                      fi
+X                                      ;;
+X                              esac
+X                              ;;
+X                      *)      if test -f /etc/systemid; then
+X                                      osname=sco
+X                                      set `echo $3 | $sed 's/\./ /g'` $4
+X                                      if $test -f $src/hints/sco_$1_$2_$3.sh; then
+X                                              osvers=$1.$2.$3
+X                                      elif $test -f $src/hints/sco_$1_$2.sh; then
+X                                              osvers=$1.$2
+X                                      elif $test -f $src/hints/sco_$1.sh; then
+X                                              osvers=$1
+X                                      fi
+X                              else
+X                                      case "$osname" in
+X                                      '') : Still unknown.  Probably a generic Sys V.
+X                                              osname="sysv"
+X                                              osvers="$3"
+X                                              ;;
+X                                      esac
+X                              fi
+X                              ;;
+X                      esac
+X                      ;;
+X              *)      case "$osname" in
+X                      '') : Still unknown.  Probably a generic BSD.
+X                              osname="$1"
+X                              osvers="$3"
+X                              ;;
+X                      esac
+X                      ;;
+X              esac
+X      else
+X              if test -f /vmunix -a -f $src/hints/news_os.sh; then
+X                      (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
+X                      if $contains news-os UU/kernel.what >/dev/null 2>&1; then
+X                              osname=news_os
+X                      fi
+X                      $rm -f UU/kernel.what
+X              elif test -d c:/.; then
+X                      set X $myuname
+X                      osname=os2
+X                      osvers="$5"
+X              fi
+X      fi
+X
+X      : Now look for a hint file osname_osvers, unless one has been
+X      : specified already.
+X      case "$hintfile" in
+X      ''|' ')
+X              file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
+X              : Also try without trailing minor version numbers.
+X              xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
+X              xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
+X              xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
+X              xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
+X              case "$file" in
+X              '') dflt=none ;;
+X              *)  case "$osvers" in
+X                      '') dflt=$file
+X                              ;;
+X                      *)  if $test -f $src/hints/$file.sh ; then
+X                                      dflt=$file
+X                              elif $test -f $src/hints/$xfile.sh ; then
+X                                      dflt=$xfile
+X                              elif $test -f $src/hints/$xxfile.sh ; then
+X                                      dflt=$xxfile
+X                              elif $test -f $src/hints/$xxxfile.sh ; then
+X                                      dflt=$xxxfile
+X                              elif $test -f $src/hints/$xxxxfile.sh ; then
+X                                      dflt=$xxxxfile
+X                              elif $test -f "$src/hints/${osname}.sh" ; then
+X                                      dflt="${osname}"
+X                              else
+X                                      dflt=none
+X                              fi
+X                              ;;
+X                      esac
+X                      ;;
+X              esac
+X              if $test -f Policy.sh ; then
+X                      case "$dflt" in
+X                      *Policy*) ;;
+X                      none) dflt="Policy" ;;
+X                      *) dflt="Policy $dflt" ;;
+X                      esac
+X              fi
+X              ;;
+X      *)
+X              dflt=`echo $hintfile | $sed 's/\.sh$//'`
+X              ;;
+X      esac
+X
+X      if $test -f Policy.sh ; then
+X              $cat <<EOM
+X
+XThere's also a Policy hint file available, which should make the
+Xsite-specific (policy) questions easier to answer.
+XEOM
+X
+X      fi
+X
+X      $cat <<EOM
+X
+XYou may give one or more space-separated answers, or "none" if appropriate.
+XA well-behaved OS will have no hints, so answering "none" or just "Policy"
+Xis a good thing.  DO NOT give a wrong version.
+X
+XEOM
+X
+X      rp="Which of these apply, if any?"
+X      . UU/myread
+X      tans=$ans
+X      for file in $tans; do
+X              if $test X$file = XPolicy -a -f Policy.sh; then
+X                      . Policy.sh
+X                      $cat Policy.sh >> UU/config.sh
+X              elif $test -f $src/hints/$file.sh; then
+X                      . $src/hints/$file.sh
+X                      $cat $src/hints/$file.sh >> UU/config.sh
+X              elif $test X$tans = X -o X$tans = Xnone ; then
+X                      : nothing
+X              else
+X                      : Give one chance to correct a possible typo.
+X                      echo "$file.sh does not exist"
+X                      dflt=$file
+X                      rp="hint to use instead?"
+X                      . UU/myread
+X                      for file in $ans; do
+X                              if $test -f "$src/hints/$file.sh"; then
+X                                      . $src/hints/$file.sh
+X                                      $cat $src/hints/$file.sh >> UU/config.sh
+X                              elif $test X$ans = X -o X$ans = Xnone ; then
+X                                      : nothing
+X                              else
+X                                      echo "$file.sh does not exist -- ignored."
+X                              fi
+X                      done
+X              fi
+X      done
+X
+X      hint=recommended
+X      : Remember our hint file for later.
+X      if $test -f "$src/hints/$file.sh" ; then
+X              hintfile="$file"
+X      else
+X              hintfile=''
+X      fi
+Xfi
+Xcd UU
+X;;
+X*)
+X      echo " "
+X      echo "Fetching default answers from $config_sh..." >&4
+X      tmp_n="$n"
+X      tmp_c="$c"
+X      cd ..
+X      cp $config_sh config.sh 2>/dev/null
+X      chmod +w config.sh
+X      . ./config.sh
+X      cd UU
+X      cp ../config.sh .
+X      n="$tmp_n"
+X      c="$tmp_c"
+X      hint=previous
+X      ;;
+Xesac
+Xtest "$override" && . ./optdef.sh
+Xmyuname="$newmyuname"
+X
+X: Restore computed paths
+Xfor file in $loclist $trylist; do
+X      eval $file="\$_$file"
+Xdone
+X
+Xcat << EOM
+X
+XConfigure uses the operating system name and version to set some defaults.
+XThe default value is probably right if the name rings a bell. Otherwise,
+Xsince spelling matters for me, either accept the default or answer "none"
+Xto leave it blank.
+X
+XEOM
+Xcase "$osname" in
+X      ''|' ')
+X              case "$hintfile" in
+X              ''|' '|none) dflt=none ;;
+X              *)  dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
+X              esac
+X              ;;
+X      *) dflt="$osname" ;;
+Xesac
+Xrp="Operating system name?"
+X. ./myread
+Xcase "$ans" in
+Xnone)  osname='' ;;
+X*) osname=`echo "$ans" | $sed -e 's/[         ][      ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
+Xesac
+X: who configured the system
+Xcf_time=`LC_ALL=C; export LC_ALL; $date 2>&1`
+Xcf_by=`(logname) 2>/dev/null`
+Xcase "$cf_by" in
+X"")
+X      cf_by=`(whoami) 2>/dev/null`
+X      case "$cf_by" in
+X      "") cf_by=unknown ;;
+X      esac ;;
+Xesac
+X
+X: is AFS running?
+Xecho " "
+Xcase "$afs" in
+X$define|true) afs=true ;;
+X$undef|false) afs=false ;;
+X*)    if test -d /afs; then
+X              afs=true
+X      else
+X              afs=false
+X      fi
+X      ;;
+Xesac
+Xif $afs; then
+X      echo "AFS may be running... I'll be extra cautious then..." >&4
+Xelse
+X      echo "AFS does not seem to be running..." >&4
+Xfi
+X
+X: determine where manual pages are on this system
+Xecho " "
+Xcase "$sysman" in
+X'')
+X      syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
+X      syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
+X      syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
+X      syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+X      syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
+X      sysman=`./loc . /usr/man/man1 $syspath`
+X      ;;
+Xesac
+Xif $test -d "$sysman"; then
+X      echo "System manual is in $sysman." >&4
+Xelse
+X      echo "Could not find manual pages in source form." >&4
+Xfi
+X
+X: decide how portable to be
+Xcase "$d_portable" in
+X"$define") dflt=y;;
+X*)    dflt=n;;
+Xesac
+X$cat <<'EOH'
+X
+XI can set things up so that your shell scripts and binaries are more portable,
+Xat what may be a noticable cost in performance.  In particular, if you
+Xask to be portable, the following happens:
+X
+X     1) Shell scripts will rely on the PATH variable rather than using
+X      the paths derived above.
+X     2) ~username interpretations will be done at run time rather than
+X      by Configure.
+X
+XEOH
+Xrp="Do you expect to run these scripts and binaries on multiple machines?"
+X. ./myread
+Xcase "$ans" in
+X      y*) d_portable="$define"
+X      ;;
+X      *)  d_portable="$undef" ;;
+Xesac
+X
+X: set up shell script to do ~ expansion
+Xcat >filexp <<EOSS
+X$startsh
+X: expand filename
+Xcase "\$1" in
+X ~/*|~)
+X      echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
+X      ;;
+X ~*)
+X      if $test -f /bin/csh; then
+X              /bin/csh -f -c "glob \$1"
+X              failed=\$?
+X              echo ""
+X              exit \$failed
+X      else
+X              name=\`$expr x\$1 : '..\([^/]*\)'\`
+X              dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
+X              if $test ! -d "\$dir"; then
+X                      me=\`basename \$0\`
+X                      echo "\$me: can't locate home directory for: \$name" >&2
+X                      exit 1
+X              fi
+X              case "\$1" in
+X              */*)
+X                      echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
+X                      ;;
+X              *)
+X                      echo \$dir
+X                      ;;
+X              esac
+X      fi
+X      ;;
+X*)
+X      echo \$1
+X      ;;
+Xesac
+XEOSS
+Xchmod +x filexp
+X$eunicefix filexp
+X
+X: now set up to get a file name
+Xcat <<EOS >getfile
+X$startsh
+XEOS
+Xcat <<'EOSC' >>getfile
+Xtilde=''
+Xfullpath=''
+Xalready=''
+Xskip=''
+Xnone_ok=''
+Xexp_file=''
+Xnopath_ok=''
+Xorig_rp="$rp"
+Xorig_dflt="$dflt"
+X
+Xcase "$fn" in
+X*\(*)
+X      expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
+X      fn=`echo $fn | sed 's/(.*)//'`
+X      ;;
+Xesac
+X
+Xcase "$fn" in
+X*:*)
+X      loc_file=`expr $fn : '.*:\(.*\)'`
+X      fn=`expr $fn : '\(.*\):.*'`
+X      ;;
+Xesac
+X
+Xcase "$fn" in
+X*~*) tilde=true;;
+Xesac
+Xcase "$fn" in
+X*/*) fullpath=true;;
+Xesac
+Xcase "$fn" in
+X*+*) skip=true;;
+Xesac
+Xcase "$fn" in
+X*n*) none_ok=true;;
+Xesac
+Xcase "$fn" in
+X*e*) exp_file=true;;
+Xesac
+Xcase "$fn" in
+X*p*) nopath_ok=true;;
+Xesac
+X
+Xcase "$fn" in
+X*f*) type='File';;
+X*d*) type='Directory';;
+X*l*) type='Locate';;
+Xesac
+X
+Xwhat="$type"
+Xcase "$what" in
+XLocate) what='File';;
+Xesac
+X
+Xcase "$exp_file" in
+X'')
+X      case "$d_portable" in
+X      "$define") ;;
+X      *) exp_file=true;;
+X      esac
+X      ;;
+Xesac
+X
+Xcd ..
+Xwhile test "$type"; do
+X      redo=''
+X      rp="$orig_rp"
+X      dflt="$orig_dflt"
+X      case "$tilde" in
+X      true) rp="$rp (~name ok)";;
+X      esac
+X      . UU/myread
+X      if test -f UU/getfile.ok && \
+X              $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
+X      then
+X              value="$ans"
+X              ansexp="$ans"
+X              break
+X      fi
+X      case "$ans" in
+X      none)
+X              value=''
+X              ansexp=''
+X              case "$none_ok" in
+X              true) type='';;
+X              esac
+X              ;;
+X      *)
+X              case "$tilde" in
+X              '') value="$ans"
+X                      ansexp="$ans";;
+X              *)
+X                      value=`UU/filexp $ans`
+X                      case $? in
+X                      0)
+X                              if test "$ans" != "$value"; then
+X                                      echo "(That expands to $value on this system.)"
+X                              fi
+X                              ;;
+X                      *) value="$ans";;
+X                      esac
+X                      ansexp="$value"
+X                      case "$exp_file" in
+X                      '') value="$ans";;
+X                      esac
+X                      ;;
+X              esac
+X              case "$fullpath" in
+X              true)
+X                      case "$ansexp" in
+X                      /*) value="$ansexp" ;;
+X                      *)
+X                              redo=true
+X                              case "$already" in
+X                              true)
+X                              echo "I shall only accept a full path name, as in /bin/ls." >&4
+X                              echo "Use a ! shell escape if you wish to check pathnames." >&4
+X                                      ;;
+X                              *)
+X                              echo "Please give a full path name, starting with slash." >&4
+X                                      case "$tilde" in
+X                                      true)
+X                              echo "Note that using ~name is ok provided it expands well." >&4
+X                                              already=true
+X                                              ;;
+X                                      esac
+X                              esac
+X                              ;;
+X                      esac
+X                      ;;
+X              esac
+X              case "$redo" in
+X              '')
+X                      case "$type" in
+X                      File)
+X                              if test -f "$ansexp"; then
+X                                      type=''
+X                              elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
+X                              then
+X                                      echo "($value is not a plain file, but that's ok.)"
+X                                      type=''
+X                              fi
+X                              ;;
+X                      Directory)
+X                              if test -d "$ansexp"; then
+X                                      type=''
+X                              fi
+X                              ;;
+X                      Locate)
+X                              if test -d "$ansexp"; then
+X                                      echo "(Looking for $loc_file in directory $value.)"
+X                                      value="$value/$loc_file"
+X                                      ansexp="$ansexp/$loc_file"
+X                              fi
+X                              if test -f "$ansexp"; then
+X                                      type=''
+X                              fi
+X                              case "$nopath_ok" in
+X                              true)   case "$value" in
+X                                      */*) ;;
+X                                      *)      echo "Assuming $value will be in people's path."
+X                                              type=''
+X                                              ;;
+X                                      esac
+X                                      ;;
+X                              esac
+X                              ;;
+X                      esac
+X
+X                      case "$skip" in
+X                      true) type='';
+X                      esac
+X
+X                      case "$type" in
+X                      '') ;;
+X                      *)
+X                              if test "$fastread" = yes; then
+X                                      dflt=y
+X                              else
+X                                      dflt=n
+X                              fi
+X                              rp="$what $value doesn't exist.  Use that name anyway?"
+X                              . UU/myread
+X                              dflt=''
+X                              case "$ans" in
+X                              y*) type='';;
+X                              *) echo " ";;
+X                              esac
+X                              ;;
+X                      esac
+X                      ;;
+X              esac
+X              ;;
+X      esac
+Xdone
+Xcd UU
+Xans="$value"
+Xrp="$orig_rp"
+Xdflt="$orig_dflt"
+Xrm -f getfile.ok
+XEOSC
+X
+X: determine root of directory hierarchy where package will be installed.
+Xcase "$prefix" in
+X'')
+X      dflt=`./loc . /usr/local /usr/local /local /opt /usr`
+X      ;;
+X*)
+X      dflt="$prefix"
+X      ;;
+Xesac
+X$cat <<EOM
+X
+XBy default, $package will be installed in $dflt/bin, manual
+Xpages under $dflt/man, etc..., i.e. with $dflt as prefix for
+Xall installation directories. Typically set to /usr/local, but you
+Xmay choose /usr if you wish to install $package among your system
+Xbinaries. If you wish to have binaries under /bin but manual pages
+Xunder /usr/local/man, that's ok: you will be prompted separately
+Xfor each of the installation directories, the prefix being only used
+Xto set the defaults.
+X
+XEOM
+Xfn=d~
+Xrp='Installation prefix to use?'
+X. ./getfile
+Xoldprefix=''
+Xcase "$prefix" in
+X'') ;;
+X*)
+X      case "$ans" in
+X      "$prefix") ;;
+X      *) oldprefix="$prefix";;
+X      esac
+X      ;;
+Xesac
+Xprefix="$ans"
+Xprefixexp="$ansexp"
+X
+X: set the prefixit variable, to compute a suitable default value
+Xprefixit='case "$3" in
+X""|none)
+X      case "$oldprefix" in
+X      "") eval "$1=\"\$$2\"";;
+X      *)
+X              case "$3" in
+X              "") eval "$1=";;
+X              none)
+X                      eval "tp=\"\$$2\"";
+X                      case "$tp" in
+X                      ""|" ") eval "$1=\"\$$2\"";;
+X                      *) eval "$1=";;
+X                      esac;;
+X              esac;;
+X      esac;;
+X*)
+X      eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
+X      case "$tp" in
+X      --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
+X      /*-$oldprefix/*|\~*-$oldprefix/*)
+X              eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
+X      *) eval "$1=\"\$$2\"";;
+X      esac;;
+Xesac'
+X
+X: set the prefixup variable, to restore leading tilda escape
+Xprefixup='case "$prefixexp" in
+X"$prefix") ;;
+X*) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
+Xesac'
+X
+X: determine where manual pages go
+Xset mansrc mansrc none
+Xeval $prefixit
+X$cat <<EOM
+X
+X$spackage has manual pages available in source form.
+XEOM
+Xcase "$nroff" in
+Xnroff)
+X      echo "However, you don't have nroff, so they're probably useless to you."
+X      case "$mansrc" in
+X      '') mansrc="none";;
+X      esac;;
+Xesac
+Xecho "If you don't want the manual sources installed, answer 'none'."
+Xcase "$mansrc" in
+X'')
+X      lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
+X      lookpath="$lookpath $prefixexp/man/l_man/man1"
+X      lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl"
+X      lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
+X      lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+X      lookpath="$lookpath /usr/man/man.L"
+X      mansrc=`./loc . $prefixexp/man/man1 $lookpath`
+X      if $test -d "$mansrc"; then
+X              dflt="$mansrc"
+X      else
+X              dflt="$sysman"
+X      fi
+X      set dflt
+X      eval $prefixup
+X      ;;
+X' ') dflt=none;;
+X*)  dflt="$mansrc"
+X      ;;
+Xesac
+Xecho " "
+Xfn=dn~
+Xrp='Where do the manual pages (source) go?'
+X. ./getfile
+Xif test "X$mansrcexp" != "X$ansexp"; then
+X      installmansrc=''
+Xfi
+Xmansrc="$ans"
+Xmansrcexp="$ansexp"
+Xcase "$mansrc" in
+X'') mansrc=' '
+X      installmansrc='';;
+Xesac
+Xif $afs && $test "$mansrc"; then
+X      $cat <<EOM
+X
+XSince you are running AFS, I need to distinguish the directory in which
+Xmanual pages reside from the directory in which they are installed (and from
+Xwhich they are presumably copied to the former directory by occult means).
+X
+XEOM
+X      case "$installmansrc" in
+X      '') dflt=`echo $mansrcexp | sed 's#^/afs/#/afs/.#'`;;
+X      *) dflt="$installmansrc";;
+X      esac
+X      fn=de~
+X      rp='Where will man pages be installed?'
+X      . ./getfile
+X      installmansrc="$ans"
+Xelse
+X      installmansrc="$mansrcexp"
+Xfi
+X
+Xcase "$mansrc" in
+X' ') manext='0';;
+X*l) manext=l;;
+X*n) manext=n;;
+X*o) manext=l;;
+X*p) manext=n;;
+X*C) manext=C;;
+X*L) manext=L;;
+X*L1) manext=L1;;
+X*) manext=1;;
+Xesac
+X
+X: set up the script used to warn in case of inconsistency
+Xcat <<EOS >whoa
+X$startsh
+XEOS
+Xcat <<'EOSC' >>whoa
+Xdflt=y
+Xecho " "
+Xecho "*** WHOA THERE!!! ***" >&4
+Xecho "    The $hint value for \$$var on this machine was \"$was\"!" >&4
+Xrp="    Keep the $hint value?"
+X. ./myread
+Xcase "$ans" in
+Xy) td=$was; tu=$was;;
+Xesac
+XEOSC
+X
+X: function used to set $1 to $val
+Xsetvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
+Xcase "$val$was" in
+X$define$undef) . ./whoa; eval "$var=\$td";;
+X$undef$define) . ./whoa; eval "$var=\$tu";;
+X*) eval "$var=$val";;
+Xesac'
+X
+X
+Xset valtemp
+Xvaltemp="$d_64bit_statfs_flds"
+Xcase $valtemp in
+X    '') valtemp="$undef" ;;
+Xesac
+X
+Xval=$valtemp
+Xset d_64bit_statfs_flds
+Xeval $setvar
+X: make some quick guesses about what we are up against
+Xecho " "
+X$echo $n "Hmm...  $c"
+Xecho exit 1 >bsd
+Xecho exit 1 >usg
+Xecho exit 1 >v7
+Xecho exit 1 >osf1
+Xecho exit 1 >eunice
+Xecho exit 1 >xenix
+Xecho exit 1 >venix
+Xecho exit 1 >os2
+Xd_bsd="$undef"
+X$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
+Xif test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
+Xthen
+X      echo "Looks kind of like an OSF/1 system, but we'll see..."
+X      echo exit 0 >osf1
+Xelif test `echo abc | tr a-z A-Z` = Abc ; then
+X      xxx=`./loc addbib blurfl $pth`
+X      if $test -f $xxx; then
+X      echo "Looks kind of like a USG system with BSD features, but we'll see..."
+X              echo exit 0 >bsd
+X              echo exit 0 >usg
+X      else
+X              if $contains SIGTSTP foo >/dev/null 2>&1 ; then
+X                      echo "Looks kind of like an extended USG system, but we'll see..."
+X              else
+X                      echo "Looks kind of like a USG system, but we'll see..."
+X              fi
+X              echo exit 0 >usg
+X      fi
+Xelif $contains SIGTSTP foo >/dev/null 2>&1 ; then
+X      echo "Looks kind of like a BSD system, but we'll see..."
+X      d_bsd="$define"
+X      echo exit 0 >bsd
+Xelse
+X      echo "Looks kind of like a Version 7 system, but we'll see..."
+X      echo exit 0 >v7
+Xfi
+Xcase "$eunicefix" in
+X*unixtovms*)
+X      $cat <<'EOI'
+XThere is, however, a strange, musty smell in the air that reminds me of
+Xsomething...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
+XEOI
+X      echo exit 0 >eunice
+X      d_eunice="$define"
+X: it so happens the Eunice I know will not run shell scripts in Unix format
+X      ;;
+X*)
+X      echo " "
+X      echo "Congratulations.  You aren't running Eunice."
+X      d_eunice="$undef"
+X      ;;
+Xesac
+X: Detect OS2.  The p_ variable is set above in the Head.U unit.
+Xcase "$p_" in
+X:) ;;
+X*)
+X      $cat <<'EOI'
+XI have the feeling something is not exactly right, however...don't tell me...
+Xlemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
+XEOI
+X      echo exit 0 >os2
+X      ;;
+Xesac
+Xif test -f /xenix; then
+X      echo "Actually, this looks more like a XENIX system..."
+X      echo exit 0 >xenix
+X      d_xenix="$define"
+Xelse
+X      echo " "
+X      echo "It's not Xenix..."
+X      d_xenix="$undef"
+Xfi
+Xchmod +x xenix
+X$eunicefix xenix
+Xif test -f /venix; then
+X      echo "Actually, this looks more like a VENIX system..."
+X      echo exit 0 >venix
+Xelse
+X      echo " "
+X      if ./xenix; then
+X              : null
+X      else
+X              echo "Nor is it Venix..."
+X      fi
+Xfi
+Xchmod +x bsd usg v7 osf1 eunice xenix venix os2
+X$eunicefix bsd usg v7 osf1 eunice xenix venix os2
+X$rm -f foo
+X
+X: see if we need a special compiler
+Xecho " "
+Xif ./usg; then
+X      case "$cc" in
+X      '') case "$Mcc" in
+X              /*) dflt='Mcc';;
+X              *) case "$large" in
+X                      -M*) dflt='cc';;
+X                      *)      if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
+X                                      if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
+X                                              dflt='cc'
+X                                      else
+X                                              dflt='cc -M'
+X                                      fi
+X                              else
+X                                      dflt='cc'
+X                              fi;;
+X                      esac;;
+X              esac;;
+X      *)  dflt="$cc";;
+X      esac
+X      case "$dflt" in
+X      *M*)    $cat <<'EOM'
+XOn some older systems the default C compiler will not resolve multiple global
+Xreferences that happen to have the same name.  On some such systems the "Mcc"
+Xcommand may be used to force these to be resolved.  On other systems a "cc -M"
+Xcommand is required.  (Note that the -M flag on other systems indicates a
+Xmemory model to use!) If you have the Gnu C compiler, you might wish to use
+Xthat instead.
+X
+XEOM
+X      ;;
+X      esac
+X      rp="Use which C compiler?"
+X      . ./myread
+X      cc="$ans"
+Xelse
+X      case "$cc" in
+X      '') dflt=cc;;
+X      *) dflt="$cc";;
+X      esac
+X      rp="Use which C compiler?"
+X      . ./myread
+X      cc="$ans"
+Xfi
+X: Look for a hint-file generated 'call-back-unit'.  Now that the
+X: user has specified the compiler, we may need to set or change some
+X: other defaults.
+Xif $test -f cc.cbu; then
+X    . ./cc.cbu
+Xfi
+Xecho " "
+Xecho "Checking for GNU cc in disguise and/or its version number..." >&4
+X$cat >gccvers.c <<EOM
+X#include <stdio.h>
+Xint main() {
+X#ifdef __GNUC__
+X#ifdef __VERSION__
+X      printf("%s\n", __VERSION__);
+X#else
+X      printf("%s\n", "1");
+X#endif
+X#endif
+X      exit(0);
+X}
+XEOM
+Xif $cc -o gccvers gccvers.c >/dev/null 2>&1; then
+X      gccversion=`./gccvers`
+X      case "$gccversion" in
+X      '') echo "You are not using GNU cc." ;;
+X      *)  echo "You are using GNU cc $gccversion." ;;
+X      esac
+Xelse
+X      echo " "
+X      echo "*** WHOA THERE!!! ***" >&4
+X      echo "    Your C compiler \"$cc\" doesn't seem to be working!" >&4
+X      case "$knowitall" in
+X      '')
+X      echo "    You'd better start hunting for one and let me know about it." >&4
+X              exit 1
+X              ;;
+X      esac
+Xfi
+X$rm -f gccvers*
+Xcase "$gccversion" in
+X1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
+Xesac
+X
+X: What should the include directory be ?
+Xecho " "
+X$echo $n "Hmm...  $c"
+Xdflt='/usr/include'
+Xincpath=''
+Xmips_type=''
+Xif $test -f /bin/mips && /bin/mips; then
+X      echo "Looks like a MIPS system..."
+X      $cat >usr.c <<'EOCP'
+X#ifdef SYSTYPE_BSD43
+X/bsd43
+X#endif
+XEOCP
+X      if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
+X              dflt='/bsd43/usr/include'
+X              incpath='/bsd43'
+X              mips_type='BSD 4.3'
+X      else
+X              mips_type='System V'
+X      fi
+X      $rm -f usr.c usr.out
+X      echo "and you're compiling with the $mips_type compiler and libraries."
+X      xxx_prompt=y
+X      echo "exit 0" >mips
+Xelse
+X      echo "Doesn't look like a MIPS system."
+X      xxx_prompt=n
+X      echo "exit 1" >mips
+Xfi
+Xchmod +x mips
+X$eunicefix mips
+Xcase "$usrinc" in
+X'') ;;
+X*) dflt="$usrinc";;
+Xesac
+Xcase "$xxx_prompt" in
+Xy)    fn=d/
+X      echo " "
+X      rp='Where are the include files you want to use?'
+X      . ./getfile
+X      usrinc="$ans"
+X      ;;
+X*)    usrinc="$dflt"
+X      ;;
+Xesac
+X
+X: Set private lib path
+Xcase "$plibpth" in
+X'') if ./mips; then
+X              plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+X      fi;;
+Xesac
+Xcase "$libpth" in
+X' ') dlist='';;
+X'') dlist="$loclibpth $plibpth $glibpth";;
+X*) dlist="$libpth";;
+Xesac
+X
+X: Now check and see which directories actually exist, avoiding duplicates
+Xlibpth=''
+Xfor xxx in $dlist
+Xdo
+X    if $test -d $xxx; then
+X              case " $libpth " in
+X              *" $xxx "*) ;;
+X              *) libpth="$libpth $xxx";;
+X              esac
+X    fi
+Xdone
+X$cat <<'EOM'
+X
+XSome systems have incompatible or broken versions of libraries.  Among
+Xthe directories listed in the question below, please remove any you
+Xknow not to be holding relevant libraries, and add any that are needed.
+XSay "none" for none.
+X
+XEOM
+Xcase "$libpth" in
+X'') dflt='none';;
+X*)
+X      set X $libpth
+X      shift
+X      dflt=${1+"$@"}
+X      ;;
+Xesac
+Xrp="Directories to use for library searches?"
+X. ./myread
+Xcase "$ans" in
+Xnone) libpth=' ';;
+X*) libpth="$ans";;
+Xesac
+X
+X: compute shared library extension
+Xcase "$so" in
+X'')
+X      if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
+X              dflt='sl'
+X      else
+X              dflt='so'
+X      fi
+X      ;;
+X*) dflt="$so";;
+Xesac
+X$cat <<EOM
+X
+XOn some systems, shared libraries may be available.  Answer 'none' if
+Xyou want to suppress searching of shared libraries for the remaining
+Xof this configuration.
+X
+XEOM
+Xrp='What is the file extension used for shared libraries?'
+X. ./myread
+Xso="$ans"
+X
+X: Define several unixisms.
+X: Hints files or command line option can be used to override them.
+X: The convoluted testing is in case hints files set either the old
+X: or the new name.
+Xcase "$_exe" in
+X'')   case "$exe_ext" in
+X    '')       ;;
+X      *)      _exe="$exe_ext" ;;
+X      esac
+X      ;;
+Xesac
+Xcase "$_a" in
+X'')   case "$lib_ext" in
+X    '')       _a='.a';;
+X      *)      _a="$lib_ext" ;;
+X      esac
+X      ;;
+Xesac
+Xcase "$_o" in
+X'') case "$obj_ext" in
+X      '')     _o='.o';;
+X      *)      _o="$obj_ext";;
+X      esac
+X      ;;
+Xesac
+Xcase "$p_" in
+X'') case "$path_sep" in
+X      '')     p_=':';;
+X      *)      p_="$path_sep";;
+X      esac
+X      ;;
+Xesac
+Xexe_ext=$_exe
+Xlib_ext=$_a
+Xobj_ext=$_o
+Xpath_sep=$p_
+X
+X: Looking for optional libraries
+Xecho " "
+Xecho "Checking for optional libraries..." >&4
+Xcase "$libs" in
+X' '|'') dflt='';;
+X*) dflt="$libs";;
+Xesac
+Xcase "$libswanted" in
+X'') libswanted='c_s';;
+Xesac
+Xfor thislib in $libswanted; do
+X
+X      if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
+X              echo "Found -l$thislib (shared)."
+X              case " $dflt " in
+X              *"-l$thislib "*);;
+X              *) dflt="$dflt -l$thislib";;
+X              esac
+X      elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
+X              echo "Found -l$thislib (shared)."
+X              case " $dflt " in
+X              *"-l$thislib "*);;
+X              *) dflt="$dflt -l$thislib";;
+X              esac
+X      elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
+X              echo "Found -l$thislib."
+X              case " $dflt " in
+X              *"-l$thislib "*);;
+X              *) dflt="$dflt -l$thislib";;
+X              esac
+X      elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
+X              echo "Found -l$thislib."
+X              case " $dflt " in
+X              *"-l$thislib "*);;
+X              *) dflt="$dflt -l$thislib";;
+X              esac
+X      elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
+X              echo "Found -l${thislib}_s."
+X              case " $dflt " in
+X              *"-l$thislib "*);;
+X              *) dflt="$dflt -l${thislib}_s";;
+X              esac
+X      elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
+X              echo "Found -l$thislib."
+X              case " $dflt " in
+X              *"-l$thislib "*);;
+X              *) dflt="$dflt -l$thislib";;
+X              esac
+X      else
+X              echo "No -l$thislib."
+X      fi
+Xdone
+Xset X $dflt
+Xshift
+Xdflt="$*"
+Xcase "$libs" in
+X'') dflt="$dflt";;
+X*) dflt="$libs";;
+Xesac
+Xcase "$dflt" in
+X' '|'') dflt='none';;
+Xesac
+X
+X$cat <<EOM
+X
+XSome versions of Unix support shared libraries, which make executables smaller
+Xbut make load time slightly longer.
+X
+XOn some systems, mostly System V Release 3's, the shared library is included
+Xby putting the option "-lc_s" as the last thing on the cc command line when
+Xlinking.  Other systems use shared libraries by default.  There may be other
+Xlibraries needed to compile $package on your machine as well.  If your system
+Xneeds the "-lc_s" option, include it here.  Include any other special libraries
+Xhere as well.  Say "none" for none.
+XEOM
+X
+Xecho " "
+Xrp="Any additional libraries?"
+X. ./myread
+Xcase "$ans" in
+Xnone) libs=' ';;
+X*) libs="$ans";;
+Xesac
+X
+X: see how we invoke the C preprocessor
+Xecho " "
+Xecho "Now, how can we feed standard input to your C preprocessor..." >&4
+Xcat <<'EOT' >testcpp.c
+X#define ABC abc
+X#define XYZ xyz
+XABC.XYZ
+XEOT
+Xcd ..
+Xecho 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+Xchmod 755 cppstdin
+Xwrapper=`pwd`/cppstdin
+Xok='false'
+Xcd UU
+X
+Xif $test "X$cppstdin" != "X" && \
+X      $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+Xthen
+X      echo "You used to use $cppstdin $cppminus so we'll use that again."
+X      case "$cpprun" in
+X      '') echo "But let's see if we can live without a wrapper..." ;;
+X      *)
+X              if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
+X                      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+X              then
+X                      echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
+X                      ok='true'
+X              else
+X                      echo "(However, $cpprun $cpplast does not work, let's see...)"
+X              fi
+X              ;;
+X      esac
+Xelse
+X      case "$cppstdin" in
+X      '') ;;
+X      *)
+X              echo "Good old $cppstdin $cppminus does not seem to be of any help..."
+X              ;;
+X      esac
+Xfi
+X
+Xif $ok; then
+X      : nothing
+Xelif echo 'Maybe "'"$cc"' -E" will work...'; \
+X      $cc -E <testcpp.c >testcpp.out 2>&1; \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X      echo "Yup, it does."
+X      x_cpp="$cc -E"
+X      x_minus='';
+Xelif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
+X      $cc -E - <testcpp.c >testcpp.out 2>&1; \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X      echo "Yup, it does."
+X      x_cpp="$cc -E"
+X      x_minus='-';
+Xelif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
+X      $cc -P <testcpp.c >testcpp.out 2>&1; \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X      echo "Yipee, that works!"
+X      x_cpp="$cc -P"
+X      x_minus='';
+Xelif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
+X      $cc -P - <testcpp.c >testcpp.out 2>&1; \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X      echo "At long last!"
+X      x_cpp="$cc -P"
+X      x_minus='-';
+Xelif echo 'No such luck, maybe "'$cpp'" will work...'; \
+X      $cpp <testcpp.c >testcpp.out 2>&1; \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X      echo "It works!"
+X      x_cpp="$cpp"
+X      x_minus='';
+Xelif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
+X      $cpp - <testcpp.c >testcpp.out 2>&1; \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X      echo "Hooray, it works!  I was beginning to wonder."
+X      x_cpp="$cpp"
+X      x_minus='-';
+Xelif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
+X      $wrapper <testcpp.c >testcpp.out 2>&1; \
+X      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X      x_cpp="$wrapper"
+X      x_minus=''
+X      echo "Eureka!"
+Xelse
+X      dflt=''
+X      rp="No dice.  I can't find a C preprocessor.  Name one:"
+X      . ./myread
+X      x_cpp="$ans"
+X      x_minus=''
+X      $x_cpp <testcpp.c >testcpp.out 2>&1
+X      if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+X              echo "OK, that will do." >&4
+X      else
+Xecho "Sorry, I can't get that to work.  Go find one and rerun Configure." >&4
+X              exit 1
+X      fi
+Xfi
+X
+Xcase "$ok" in
+Xfalse)
+X      cppstdin="$x_cpp"
+X      cppminus="$x_minus"
+X      cpprun="$x_cpp"
+X      cpplast="$x_minus"
+X      set X $x_cpp
+X      shift
+X      case "$1" in
+X      "$cpp")
+X              echo "Perhaps can we force $cc -E using a wrapper..."
+X              if $wrapper <testcpp.c >testcpp.out 2>&1; \
+X                      $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+X              then
+X                      echo "Yup, we can."
+X                      cppstdin="$wrapper"
+X                      cppminus='';
+X              else
+X                      echo "Nope, we'll have to live without it..."
+X              fi
+X              ;;
+X      esac
+X      case "$cpprun" in
+X      "$wrapper")
+X              cpprun=''
+X              cpplast=''
+X              ;;
+X      esac
+X      ;;
+Xesac
+X
+Xcase "$cppstdin" in
+X"$wrapper") ;;
+X*) $rm -f $wrapper;;
+Xesac
+X$rm -f testcpp.c testcpp.out
+X
+X: determine optimize, if desired, or use for debug flag also
+Xcase "$optimize" in
+X' '|$undef) dflt='none';;
+X'') dflt='-O';;
+X*) dflt="$optimize";;
+Xesac
+X$cat <<EOH
+X
+XSome C compilers have problems with their optimizers.  By default, $package
+Xcompiles with the -O flag to use the optimizer.  Alternately, you might want
+Xto use the symbolic debugger, which uses the -g flag (on traditional Unix
+Xsystems).  Either flag can be specified here.  To use neither flag, specify
+Xthe word "none".
+X
+XEOH
+Xrp="What optimizer/debugger flag should be used?"
+X. ./myread
+Xoptimize="$ans"
+Xcase "$optimize" in
+X'none') optimize=" ";;
+Xesac
+X
+Xdflt=''
+X: We will not override a previous value, but we might want to
+X: augment a hint file
+Xcase "$hint" in
+Xnone|recommended)
+X      case "$gccversion" in
+X      1*) dflt='-fpcc-struct-return' ;;
+X      esac
+X      case "$optimize" in
+X      *-g*) dflt="$dflt";;
+X      esac
+X      case "$gccversion" in
+X      2*) if test -d /etc/conf/kconfig.d &&
+X                      $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
+X              then
+X                      dflt="$dflt -posix"
+X              fi
+X              ;;
+X      esac
+X      ;;
+Xesac
+X
+Xcase "$mips_type" in
+X*BSD*|'') inclwanted="$locincpth $usrinc";;
+X*) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
+Xesac
+Xfor thisincl in $inclwanted; do
+X      if $test -d $thisincl; then
+X              if $test x$thisincl != x$usrinc; then
+X                      case "$dflt" in
+X                      *$thisincl*);;
+X                      *) dflt="$dflt -I$thisincl";;
+X                      esac
+X              fi
+X      fi
+Xdone
+X
+Xinctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
+X      xxx=true;
+Xelif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
+X      xxx=true;
+Xelse
+X      xxx=false;
+Xfi;
+Xif $xxx; then
+X      case "$dflt" in
+X      *$2*);;
+X      *) dflt="$dflt -D$2";;
+X      esac;
+Xfi'
+X
+Xif ./osf1; then
+X      set signal.h __LANGUAGE_C__; eval $inctest
+Xelse
+X      set signal.h LANGUAGE_C; eval $inctest
+Xfi
+X
+Xcase "$hint" in
+Xnone|recommended) dflt="$ccflags $dflt" ;;
+X*) dflt="$ccflags";;
+Xesac
+X
+Xcase "$dflt" in
+X''|' ') dflt=none;;
+Xesac
+X$cat <<EOH
+X
+XYour C compiler may want other flags.  For this question you should include
+X-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
+Xbut you should NOT include libraries or ld flags like -lwhatever.  If you
+Xwant $package to honor its debug switch, you should include -DDEBUGGING here.
+XYour C compiler might also need additional flags, such as -D_POSIX_SOURCE.
+X
+XTo use no flags, specify the word "none".
+X
+XEOH
+Xset X $dflt
+Xshift
+Xdflt=${1+"$@"}
+Xrp="Any additional cc flags?"
+X. ./myread
+Xcase "$ans" in
+Xnone) ccflags='';;
+X*) ccflags="$ans";;
+Xesac
+X
+X: the following weeds options from ccflags that are of no interest to cpp
+Xcppflags="$ccflags"
+Xcase "$gccversion" in
+X1*) cppflags="$cppflags -D__GNUC__"
+Xesac
+Xcase "$mips_type" in
+X'');;
+X*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
+Xesac
+Xcase "$cppflags" in
+X'');;
+X*)
+X      echo " "
+X      echo "Let me guess what the preprocessor flags are..." >&4
+X      set X $cppflags
+X      shift
+X      cppflags=''
+X      $cat >cpp.c <<'EOM'
+X#define BLURFL foo
+X
+XBLURFL xx LFRULB
+XEOM
+X      previous=''
+X      for flag in $*
+X      do
+X              case "$flag" in
+X              -*) ftry="$flag";;
+X              *) ftry="$previous $flag";;
+X              esac
+X              if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
+X                      >cpp1.out 2>/dev/null && \
+X                      $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
+X                      >cpp2.out 2>/dev/null && \
+X                      $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
+X                      $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
+X              then
+X                      cppflags="$cppflags $ftry"
+X                      previous=''
+X              else
+X                      previous="$flag"
+X              fi
+X      done
+X      set X $cppflags
+X      shift
+X      cppflags=${1+"$@"}
+X      case "$cppflags" in
+X      *-*)  echo "They appear to be: $cppflags";;
+X      esac
+X      $rm -f cpp.c cpp?.out
+X      ;;
+Xesac
+X
+X: flags used in final linking phase
+Xcase "$ldflags" in
+X'') if ./venix; then
+X              dflt='-i -z'
+X      else
+X              dflt=''
+X      fi
+X      case "$ccflags" in
+X      *-posix*) dflt="$dflt -posix" ;;
+X      esac
+X      ;;
+X*) dflt="$ldflags";;
+Xesac
+X
+X: Try to guess additional flags to pick up local libraries.
+Xfor thislibdir in $libpth; do
+X      case " $loclibpth " in
+X      *" $thislibdir "*)
+X              case "$dflt " in
+X              *"-L$thislibdir "*) ;;
+X              *)  dflt="$dflt -L$thislibdir" ;;
+X              esac
+X              ;;
+X      esac
+Xdone
+X
+Xcase "$dflt" in
+X'') dflt='none' ;;
+Xesac
+X
+X$cat <<EOH
+X
+XYour C linker may need flags.  For this question you should
+Xinclude -L/whatever and any other flags used by the C linker, but you
+Xshould NOT include libraries like -lwhatever.
+X
+XMake sure you include the appropriate -L/path flags if your C linker
+Xdoes not normally search all of the directories you specified above,
+Xnamely
+X      $libpth
+XTo use no flags, specify the word "none".
+X
+XEOH
+X
+Xrp="Any additional ld flags (NOT including libraries)?"
+X. ./myread
+Xcase "$ans" in
+Xnone) ldflags='';;
+X*) ldflags="$ans";;
+Xesac
+Xrmlist="$rmlist pdp11"
+X
+X: coherency check
+Xecho " "
+Xecho "Checking your choice of C compiler and flags for coherency..." >&4
+Xset X $cc $optimize $ccflags $ldflags -o try try.c $libs
+Xshift
+X$cat >try.msg <<EOM
+XI've tried to compile and run a simple program with:
+X
+X      $*
+X      ./try
+X
+Xand I got the following output:
+X
+XEOM
+X$cat > try.c <<'EOF'
+X#include <stdio.h>
+Xmain() { printf("Ok\n"); exit(0); }
+XEOF
+Xdflt=y
+Xif sh -c "$cc $optimize $ccflags $ldflags -o try try.c $libs" >>try.msg 2>&1; then
+X      if sh -c './try' >>try.msg 2>&1; then
+X              xxx=`./try`
+X              case "$xxx" in
+X              "Ok") dflt=n ;;
+X              *)      echo 'The program compiled OK, but produced no output.' >> try.msg
+X                      case " $libs " in
+X                      *" -lsfio "*)
+X                              cat >> try.msg <<'EOQS'
+XIf $libs contains -lsfio, and sfio is mis-configured, then it
+Xsometimes (apparently) runs and exits with a 0 status, but with no
+Xoutput!  It may have to do with sfio's use of _exit vs. exit.
+X
+XEOQS
+X                              rp="You have a big problem.  Shall I abort Configure"
+X                              dflt=y
+X                              ;;
+X                      esac
+X                      ;;
+X              esac
+X      else
+X              echo "The program compiled OK, but exited with status $?." >>try.msg
+X              rp="You have a problem.  Shall I abort Configure"
+X              dflt=y
+X      fi
+Xelse
+X      echo "I can't compile the test program." >>try.msg
+X      rp="You have a BIG problem.  Shall I abort Configure"
+X      dflt=y
+Xfi
+Xcase "$dflt" in
+Xy)
+X      $cat try.msg >&4
+X      case "$knowitall" in
+X      '')
+X              echo "(The supplied flags might be incorrect with this C compiler.)"
+X              ;;
+X      *) dflt=n;;
+X      esac
+X      echo " "
+X      . ./myread
+X      case "$ans" in
+X      n*|N*) ;;
+X      *)      echo "Ok.  Stopping Configure." >&4
+X              exit 1
+X              ;;
+X      esac
+X      ;;
+Xn) echo "OK, that should do.";;
+Xesac
+X$rm -f try try.* core
+X
+X: define a shorthand compile call
+Xcompile='
+Xmc_file=$1;
+Xshift;
+X$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;'
+X: define a shorthand compile call for compilations that should be ok.
+Xcompile_ok='
+Xmc_file=$1;
+Xshift;
+X$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs;'
+X
+Xecho " "
+Xecho "Checking for GNU C Library..." >&4
+Xcat >gnulibc.c <<EOM
+X#include <stdio.h>
+Xint
+Xmain()
+X{
+X#ifdef __GLIBC__
+X    exit(0);
+X#else
+X    exit(1);
+X#endif
+X}
+XEOM
+Xset gnulibc
+Xif eval $compile_ok && ./gnulibc; then
+X      val="$define"
+X      echo "You are using the GNU C Library"
+Xelse
+X      val="$undef"
+X      echo "You are not using the GNU C Library"
+Xfi
+X$rm -f gnulibc*
+Xset d_gnulibc
+Xeval $setvar
+X
+X: see if nm is to be used to determine whether a symbol is defined or not
+Xcase "$usenm" in
+X'')
+X      dflt=''
+X      case "$d_gnulibc" in
+X      "$define")
+X              echo " "
+X              echo "nm probably won't work on the GNU C Library." >&4
+X              dflt=n
+X              ;;
+X      esac
+X      case "$dflt" in
+X      '')
+X              if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
+X                      echo " "
+X                      echo "Whoops!  This is an AIX system without /lib/syscalls.exp!" >&4
+X                      echo "'nm' won't be sufficient on this sytem." >&4
+X                      dflt=n
+X              fi
+X              ;;
+X      esac
+X      case "$dflt" in
+X      '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
+X              if $test $dflt -gt 20; then
+X                      dflt=y
+X              else
+X                      dflt=n
+X              fi
+X              ;;
+X      esac
+X      ;;
+X*)
+X      case "$usenm" in
+X      true|$define) dflt=y;;
+X      *) dflt=n;;
+X      esac
+X      ;;
+Xesac
+X$cat <<EOM
+X
+XI can use $nm to extract the symbols from your C libraries. This
+Xis a time consuming task which may generate huge output on the disk (up
+Xto 3 megabytes) but that should make the symbols extraction faster. The
+Xalternative is to skip the 'nm' extraction part and to compile a small
+Xtest program instead to determine whether each symbol is present. If
+Xyou have a fast C compiler and/or if your 'nm' output cannot be parsed,
+Xthis may be the best solution.
+X
+XYou probably shouldn't let me use 'nm' if you are using the GNU C Library.
+X
+XEOM
+Xrp="Shall I use $nm to extract C symbols from the libraries?"
+X. ./myread
+Xcase "$ans" in
+X[Nn]*) usenm=false;;
+X*) usenm=true;;
+Xesac
+X
+Xrunnm=$usenm
+Xcase "$reuseval" in
+Xtrue) runnm=false;;
+Xesac
+X
+X: nm options which may be necessary
+Xcase "$nm_opt" in
+X'') if $test -f /mach_boot; then
+X              nm_opt=''       # Mach
+X      elif $test -d /usr/ccs/lib; then
+X              nm_opt='-p'     # Solaris (and SunOS?)
+X      elif $test -f /dgux; then
+X              nm_opt='-p'     # DG-UX
+X      elif $test -f /lib64/rld; then
+X              nm_opt='-p'     # 64-bit Irix
+X      else
+X              nm_opt=''
+X      fi;;
+Xesac
+X
+X: nm options which may be necessary for shared libraries but illegal
+X: for archive libraries.  Thank you, Linux.
+Xcase "$nm_so_opt" in
+X'')   case "$myuname" in
+X      *linux*)
+X              if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
+X                      nm_so_opt='--dynamic'
+X              fi
+X              ;;
+X      esac
+X      ;;
+Xesac
+X
+Xcase "$runnm" in
+Xtrue)
+X: get list of predefined functions in a handy place
+Xecho " "
+Xcase "$libc" in
+X'') libc=unknown
+X      case "$libs" in
+X      *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
+X      esac
+X      ;;
+Xesac
+Xlibnames='';
+Xcase "$libs" in
+X'') ;;
+X*)  for thislib in $libs; do
+X      case "$thislib" in
+X      -lc|-lc_s)
+X              : Handle C library specially below.
+X              ;;
+X      -l*)
+X              thislib=`echo $thislib | $sed -e 's/^-l//'`
+X              if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
+X                      :
+X              elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
+X                      :
+X              elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
+X                      :
+X              elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
+X                      :
+X              elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
+X                      :
+X              elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
+X                      :
+X              elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
+X                      :
+X              else
+X                      try=''
+X              fi
+X              libnames="$libnames $try"
+X              ;;
+X      *) libnames="$libnames $thislib" ;;
+X      esac
+X      done
+X      ;;
+Xesac
+Xxxx=normal
+Xcase "$libc" in
+Xunknown)
+X      set /lib/libc.$so
+X      for xxx in $libpth; do
+X              $test -r $1 || set $xxx/libc.$so
+X              : The messy sed command sorts on library version numbers.
+X              $test -r $1 || \
+X                      set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
+X                      tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e '
+X                              h
+X                              s/[0-9][0-9]*/0000&/g
+X                              s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
+X                              G
+X                              s/\n/ /' | \
+X                       sort | $sed -e 's/^.* //'`
+X              eval set \$$#
+X      done
+X      $test -r $1 || set /usr/ccs/lib/libc.$so
+X      $test -r $1 || set /lib/libsys_s$_a
+X      ;;
+X*)
+X      set blurfl
+X      ;;
+Xesac
+Xif $test -r "$1"; then
+X      echo "Your (shared) C library seems to be in $1."
+X      libc="$1"
+Xelif $test -r /lib/libc && $test -r /lib/clib; then
+X      echo "Your C library seems to be in both /lib/clib and /lib/libc."
+X      xxx=apollo
+X      libc='/lib/clib /lib/libc'
+X      if $test -r /lib/syslib; then
+X              echo "(Your math library is in /lib/syslib.)"
+X              libc="$libc /lib/syslib"
+X      fi
+Xelif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+X      echo "Your C library seems to be in $libc, as you said before."
+Xelif $test -r $incpath/usr/lib/libc$_a; then
+X      libc=$incpath/usr/lib/libc$_a;
+X      echo "Your C library seems to be in $libc.  That's fine."
+Xelif $test -r /lib/libc$_a; then
+X      libc=/lib/libc$_a;
+X      echo "Your C library seems to be in $libc.  You're normal."
+Xelse
+X      if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
+X              :
+X      elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
+X              libnames="$libnames "`./loc clib blurfl/dyick $libpth`
+X      elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
+X              :
+X      elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+X              :
+X      elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+X              :
+X      else
+X              tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
+X      fi
+X      if $test -r "$tans"; then
+X              echo "Your C library seems to be in $tans, of all places."
+X              libc=$tans
+X      else
+X              libc='blurfl'
+X      fi
+Xfi
+Xif $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+X      dflt="$libc"
+X      cat <<EOM
+X
+XIf the guess above is wrong (which it might be if you're using a strange
+Xcompiler, or your machine supports multiple models), you can override it here.
+X
+XEOM
+Xelse
+X      dflt=''
+X      echo $libpth | tr ' ' '\012' | sort | uniq > libpath
+X      cat >&4 <<EOM
+XI can't seem to find your C library.  I've looked in the following places:
+X
+XEOM
+X      $sed 's/^/      /' libpath
+X      cat <<EOM
+X
+XNone of these seems to contain your C library. I need to get its name...
+X
+XEOM
+Xfi
+Xfn=f
+Xrp='Where is your C library?'
+X. ./getfile
+Xlibc="$ans"
+X
+Xecho " "
+Xecho $libc $libnames | tr ' ' '\012' | sort | uniq > libnames
+Xset X `cat libnames`
+Xshift
+Xxxx=files
+Xcase $# in 1) xxx=file; esac
+Xecho "Extracting names from the following $xxx for later perusal:" >&4
+Xecho " "
+X$sed 's/^/    /' libnames >&4
+Xecho " "
+X$echo $n "This may take a while...$c" >&4
+X
+Xfor file in $*; do
+X      case $file in
+X      *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
+X      *) $nm $nm_opt $file 2>/dev/null;;
+X      esac
+Xdone >libc.tmp
+X
+X$echo $n ".$c"
+X$grep fprintf libc.tmp > libc.ptf
+Xxscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
+Xxrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
+Xxxx='[ADTSIW]'
+Xif com="$sed -n -e 's/__IO//' -e 's/^.* $xxx  *_[_.]*//p' -e 's/^.* $xxx  *//p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
+X                              -e '/ file/d' -e 's/^\([^       ]*\).*/\1/p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
+X      eval $xscan;\
+X      $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+X              eval $xrun
+Xelse
+X      $nm -p $* 2>/dev/null >libc.tmp
+X      $grep fprintf libc.tmp > libc.ptf
+X      if com="$sed -n -e 's/^.* [ADTSIW]  *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
+X              eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
+X      then
+X              nm_opt='-p'
+X              eval $xrun
+X      else
+X              echo " "
+X              echo "$nm didn't seem to work right. Trying $ar instead..." >&4
+X              com=''
+X              if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
+X                      for thisname in $libnames $libc; do
+X                              $ar t $thisname >>libc.tmp
+X                      done
+X                      $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
+X                      echo "Ok." >&4
+X              elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
+X                      # Repeat libc to extract forwarders to DLL entries too
+X                      for thisname in $libnames $libc; do
+X                              $ar tv $thisname >>libc.tmp
+X                              # Revision 50 of EMX has bug in $ar.
+X                              # it will not extract forwarders to DLL entries
+X                              # Use emximp which will extract exactly them.
+X                              emximp -o tmp.imp $thisname \
+X                                  2>/dev/null && \
+X                                  $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
+X                                  < tmp.imp >>libc.tmp
+X                              $rm tmp.imp
+X                      done
+X                      $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
+X                      echo "Ok." >&4
+X              else
+X                      echo "$ar didn't seem to work right." >&4
+X                      echo "Maybe this is a Cray...trying bld instead..." >&4
+X                      if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
+X                      then
+X                              for thisname in $libnames; do
+X                                      bld t $libnames | \
+X                                      $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
+X                                      $ar t $thisname >>libc.tmp
+X                              done
+X                              echo "Ok." >&4
+X                      else
+X                              echo "That didn't work either.  Giving up." >&4
+X                              exit 1
+X                      fi
+X              fi
+X      fi
+Xfi
+Xnm_extract="$com"
+Xif $test -f /lib/syscalls.exp; then
+X      echo " "
+X      echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
+X      $sed -n 's/^\([^        ]*\)[   ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
+Xfi
+X;;
+Xesac
+X$rm -f libnames libpath
+X
+X: is a C symbol defined?
+Xcsym='tlook=$1;
+Xcase "$3" in
+X-v) tf=libc.tmp; tc=""; tdc="";;
+X-a) tf=libc.tmp; tc="[0]"; tdc="[]";;
+X*) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
+Xesac;
+Xtx=yes;
+Xcase "$reuseval-$4" in
+Xtrue-) ;;
+Xtrue-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
+Xesac;
+Xcase "$tx" in
+Xyes)
+X      case "$runnm" in
+X      true)
+X              if $contains $tlook $tf >/dev/null 2>&1;
+X              then tval=true;
+X              else tval=false;
+X              fi;;
+X      *)
+X              echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
+X              if $cc $optimize $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
+X              then tval=true;
+X              else tval=false;
+X              fi;
+X              $rm -f t t.c;;
+X      esac;;
+X*)
+X      case "$tval" in
+X      $define) tval=true;;
+X      *) tval=false;;
+X      esac;;
+Xesac;
+Xeval "$2=$tval"'
+X
+X: define an is-in-libc? function
+Xinlibc='echo " "; td=$define; tu=$undef;
+Xsym=$1; var=$2; eval "was=\$$2";
+Xtx=yes;
+Xcase "$reuseval$was" in
+Xtrue) ;;
+Xtrue*) tx=no;;
+Xesac;
+Xcase "$tx" in
+Xyes)
+X      set $sym tres -f;
+X      eval $csym;
+X      case "$tres" in
+X      true)
+X              echo "$sym() found." >&4;
+X              case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
+X      *)
+X              echo "$sym() NOT found." >&4;
+X              case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
+X      esac;;
+X*)
+X      case "$was" in
+X      $define) echo "$sym() found." >&4;;
+X      *) echo "$sym() NOT found." >&4;;
+X      esac;;
+Xesac'
+X
+X: see if bcopy exists
+Xset bcopy d_bcopy
+Xeval $inlibc
+X
+X: see if bzero exists
+Xset bzero d_bzero
+Xeval $inlibc
+X
+X: see if endmntent exists
+Xset endmntent d_endmntent
+Xeval $inlibc
+X
+X: see if fs_info exists
+Xset fs_info d_fs_info
+Xeval $inlibc
+X
+X: see if getmnt exists
+Xset getmnt d_getmnt
+Xeval $inlibc
+X
+X: see if getmntent exists
+Xset getmntent d_getmntent
+Xeval $inlibc
+X
+X: see if getmntinfo exists
+Xset getmntinfo d_getmntinfo
+Xeval $inlibc
+X: determine filename position in cpp output
+Xecho " "
+Xecho "Computing filename position in cpp output for #include directives..." >&4
+Xecho '#include <stdio.h>' > foo.c
+X$cat >fieldn <<EOF
+X$startsh
+X$cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
+X$grep '^[     ]*#.*stdio\.h' | \
+Xwhile read cline; do
+X      pos=1
+X      set \$cline
+X      while $test \$# -gt 0; do
+X              if $test -r \`echo \$1 | $tr -d '"'\`; then
+X                      echo "\$pos"
+X                      exit 0
+X              fi
+X              shift
+X              pos=\`expr \$pos + 1\`
+X      done
+Xdone
+XEOF
+Xchmod +x fieldn
+Xfieldn=`./fieldn`
+X$rm -f foo.c fieldn
+Xcase $fieldn in
+X'') pos='???';;
+X1) pos=first;;
+X2) pos=second;;
+X3) pos=third;;
+X*) pos="${fieldn}th";;
+Xesac
+Xecho "Your cpp writes the filename in the $pos field of the line."
+X
+X: locate header file
+X$cat >findhdr <<EOF
+X$startsh
+Xwanted=\$1
+Xname=''
+Xif test -f $usrinc/\$wanted; then
+X      echo "$usrinc/\$wanted"
+X      exit 0
+Xfi
+Xawkprg='{ print \$$fieldn }'
+Xecho "#include <\$wanted>" > foo\$\$.c
+X$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
+X$grep "^[     ]*#.*\$wanted" | \
+Xwhile read cline; do
+X      name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
+X      case "\$name" in
+X      */\$wanted) echo "\$name"; exit 0;;
+X      *) name='';;
+X      esac;
+Xdone;
+X$rm -f foo\$\$.c;
+Xcase "\$name" in
+X'') exit 1;;
+Xesac
+XEOF
+Xchmod +x findhdr
+X
+X: define an alternate in-header-list? function
+Xinhdr='echo " "; td=$define; tu=$undef; yyy=$@;
+Xcont=true; xxf="echo \"<\$1> found.\" >&4";
+Xcase $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
+X*) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
+Xesac;
+Xcase $# in 4) instead=instead;; *) instead="at last";; esac;
+Xwhile $test "$cont"; do
+X      xxx=`./findhdr $1`
+X      var=$2; eval "was=\$$2";
+X      if $test "$xxx" && $test -r "$xxx";
+X      then eval $xxf;
+X      eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
+X              cont="";
+X      else eval $xxnf;
+X      eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
+X      set $yyy; shift; shift; yyy=$@;
+X      case $# in 0) cont="";;
+X      2) xxf="echo \"but I found <\$1> $instead.\" >&4";
+X              xxnf="echo \"and I did not find <\$1> either.\" >&4";;
+X      *) xxf="echo \"but I found <\$1\> instead.\" >&4";
+X              xxnf="echo \"there is no <\$1>, ...\" >&4";;
+X      esac;
+Xdone;
+Xwhile $test "$yyy";
+Xdo set $yyy; var=$2; eval "was=\$$2";
+X      eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
+X      set $yyy; shift; shift; yyy=$@;
+Xdone'
+X
+X: see if this is a sys/mount.h system
+Xset sys/mount.h i_sysmount
+Xeval $inhdr
+X
+Xset xxx valfstype valbsize valfsize
+Xvalfstype="$d_getmntinfofstype"
+Xvalbsize="$d_getmntinfobsize"
+Xvalfsize="$d_getmntinfofsize"
+X
+Xcase $valfstype in
+X    '') valfstype="$undef" ;;
+Xesac
+Xcase $valbsize in
+X    '') valbsize="$undef" ;;
+Xesac
+Xcase $valfsize in
+X    '') valfsize="$undef" ;;
+Xesac
+X
+Xxxx=`./findhdr sys/mount.h`
+Xif $test -f "$xxx";then
+X    $cppstdin $cppflags $cppminus < $xxx >$$.h
+X    : f_fsize is always more preferable. changed from bsize 17 dec 99
+X    if $contains "[^a-zA-Z_]f_fsize[^a-zA-Z_]*;" $$.h  > /dev/null 2>&1
+X    then
+X            valfsize="$define"
+X    else
+X        if $contains "[^a-zA-Z_]f_bsize[^a-zA-Z_]*;" $$.h  > /dev/null 2>&1
+X        then
+X            valbsize="$define"
+X        fi
+X    fi
+X    if $contains "[^a-zA-Z_]f_fstypename[^a-zA-Z_]*;" $$.h  > /dev/null 2>&1
+X    then
+X        valfstype="$define"
+X    fi
+Xfi
+X
+Xval=$valfstype
+Xset d_getmntinfofstype
+Xeval $setvar
+Xval=$valbsize
+Xset d_getmntinfobsize
+Xeval $setvar
+Xval=$valfsize
+Xset d_getmntinfofsize
+Xeval $setvar
+X
+X$rm -f $$.h > /dev/null 2>&1
+Xunset xxx valfstype valbsize valfsize
+X: see if memcpy exists
+Xset memcpy d_memcpy
+Xeval $inlibc
+X
+X: see if memset exists
+Xset memset d_memset
+Xeval $inlibc
+X
+X: see if mntctl exists
+Xset mntctl d_mntctl
+Xeval $inlibc
+X
+X
+Xset x xxx valmtime
+Xvalmtime="$d_mnttime"
+X
+Xcase $valmtime in
+X    '') valmtime="$undef" ;;
+Xesac
+X
+Xxxx=`./findhdr sys/mnttab.h`
+Xxxx="$xxx `./findhdr sys/mntctl.h`"
+Xfor x in $xxx
+Xdo
+X    if $test -f "$x";then
+X        $cppstdin $cppflags $cppminus < $x >$$.h
+X        if $contains "[^a-zA-Z_]mnt_time[^a-zA-Z_]*;" $$.h  > /dev/null 2>&1
+X        then
+X            valmtime="$define"
+X        fi
+X        if $contains "[^a-zA-Z_]vmt_time[^a-zA-Z_]*;" $$.h  > /dev/null 2>&1
+X        then
+X            valmtime="$define"
+X        fi
+X    fi
+Xdone
+X
+Xval=$valmtime
+Xset d_mnttime
+Xeval $setvar
+X
+X$rm -f $$.h > /dev/null 2>&1
+Xunset x xxx valmtime
+X
+X: see if stdlib is available
+Xset stdlib.h i_stdlib
+Xeval $inhdr
+X
+X: see if this is a unistd.h system
+Xset unistd.h i_unistd
+Xeval $inhdr
+X
+X: see if getopt exists
+Xset getopt d_getopt
+Xeval $inlibc
+X
+Xif $test $i_stdlib = "$define" ; then
+X    x1="#include <stdlib.h>"
+Xfi
+Xif $test $i_unistd = "$define" ; then
+X    x2="#include <unistd.h>"
+Xfi
+X
+X$echo "#include <stdio.h>" > gotest.c
+X$echo "$x1" >> gotest.c
+X$echo "$x2" >> gotest.c
+X$cat >>gotest.c <<'EOF'
+X
+Xmain() { optind; optarg; }
+X
+XEOF
+X
+Xif $cc $ccflags $ldflags gotest.c -o gotest $libs >/dev/null 2>&1; then
+X    val="$define"
+X    $echo "optind is defined in stdio.h, stdlib.h or unistd.h."
+Xelse
+X    val="$undef"
+X    $echo "optind is not defined in stdio.h, stdlib.h or unistd.h."
+Xfi
+X
+Xset d_optind
+Xeval $setvar
+X
+X$rm -f gotest gotest.c > /dev/null 2>&1
+X: see if setmntent exists
+Xset setmntent d_setmntent
+Xeval $inlibc
+X
+Xset x xxx valtemp
+Xvaltemp="$d_setmntent_one_arg"
+Xcase $valtemp in
+X    '') valtemp="$undef" ;;
+Xesac
+X
+Xcase "$d_setmntent" in
+X    "$define")
+X        :  We will try the easy way first...
+X        :  This only works if there are prototypes.
+X        :  And hope the dual universe machines dont define both!
+X        xxx="`./findhdr mntent.h`"
+X        xxx="$xxx `./findhdr sys/mount.h`"
+X        for x in $xxx
+X        do
+X            if $test -f "$x"; then
+X                $cppstdin $cppflags $cppminus < $x >smtest.h
+X                if $contains '[^a-zA-Z_]setmntent.*([^),]+)' smtest.h  > /dev/null 2>&1
+X                then
+X                    valtemp="$define"
+X                    $echo 'You appear to have a single argument setmntent().'
+X                fi
+X            fi
+X        done
+X
+X        $rm -f smtest.h > /dev/null 2>&1
+X        ;;
+Xesac
+X
+Xval=$valtemp
+Xset d_setmntent_one_arg
+Xeval $setvar
+Xunset x xxx valtemp
+X
+X: see if this is a sys/statfs.h system
+Xset sys/statfs.h i_sysstatfs
+Xeval $inhdr
+X
+Xset xxx valfrsize
+Xvalfrsize="$d_statfs_frsize"
+Xcase $valfrsize in
+X    '') valfrsize="$undef" ;;
+Xesac
+X
+Xxxx=`./findhdr sys/statfs.h`
+Xif $test -f "$xxx";then
+X    $cppstdin $cppflags $cppminus < $xxx >sftemp.h
+X    if $contains "[^a-zA-Z_]f_frsize[^a-zA-Z_]*;" sftemp.h  > /dev/null 2>&1
+X    then
+X        valfrsize="$define"
+X    fi
+Xfi
+X
+Xval=$valfrsize
+Xset d_statfs_frsize
+Xeval $setvar
+X
+X$rm -f sftemp.h > /dev/null 2>&1
+Xunset xxx valfrsize
+X: see if statvfs exists
+Xset statvfs d_statvfs
+Xeval $inlibc
+X
+X
+Xif $test "$d_getmnt" = "$define" || \
+X      $test "$d_getmntinfo" = "$define" || \
+X      $test "$d_statvfs" = "$define"
+Xthen
+X    d_statfs="$undef"    # we don't care if it's there or not.
+X    d_statfsbsd="$undef"
+X    d_statfssysv3="$undef"
+X    ubsize=""
+Xelse
+X    : see if statfs exists
+X    set statfs d_statfs
+X    eval $inlibc
+X
+X    set valbsd xxx valsysv3
+X    valbsd="$d_statfsbsd"
+X    valsysv3="$d_statfssysv3"
+X
+X    case $valbsd in
+X        '') valbsd="$undef" ;;
+X    esac
+X    case $valsysv3 in
+X        '') valsysv3="$undef" ;;
+X    esac
+X
+X    case "$d_statfs" in
+X        "$define")
+X            :  We will try the easy way first...
+X            :  This only works if there are prototypes.
+X            :  And hope the dual universe machines dont define both!
+X            xxx="`./findhdr sys/statfs.h`"
+X            xxx="$xxx `./findhdr sys/mount.h`"
+X            xxx="$xxx `./findhdr sys/vfs.h`"
+X      for x in $xxx
+X            do
+X                if $test -f "$x"; then
+X                    $cppstdin $cppflags $cppminus < $x >sftest.h
+X                    if $contains '[^a-zA-Z_]statfs.*([^,]*,[^,]*,[^,]*,[^,]*)' sftest.h  > /dev/null 2>&1
+X                    then
+X                        valsysv3="$define"
+X                        valbsd="$undef"
+X                        $echo 'You appear to have the System V.3 style statfs()'
+X                    fi
+X                    if $contains '[^a-zA-Z_]statfs.*([^,]*,[^,]*)' sftest.h  > /dev/null 2>&1
+X                    then
+X                        valsysv3="$undef"
+X                        valbsd="$define"
+X                        $echo 'You appear to have the BSD style statfs()'
+X                    fi
+X
+X                    if $contains '[^a-zA-Z_]statfs.*([^,]*,[^,]*,[^,]*)' sftest.h  > /dev/null 2>&1
+X                    then
+X                        valsysv3="$undef"
+X                        valbsd="$define"
+X                        $echo 'You appear to have the BSD style of statfs()'
+X                    fi
+X                fi
+X            done
+X
+X            case "$valbsd" in
+X                "$undef")
+X                    case "$valsysv3" in
+X                        "$undef")
+X
+X                            unset dflt
+X                            rp='How many arguments does your statfs system call accept (2/3/4)?'
+X                            . ./myread
+X                            case "$ans" in
+X                                2)  valbsd="$define"
+X                                    valsysv3="$undef"
+X                                    ;;
+X                                3)  valbsd="$define"
+X                                    valsysv3="$undef"
+X                                    ;;
+X                                4)  valbsd="$undef"
+X                                    valsysv3="$define"
+X                                    ;;
+X                            esac
+X                        ;;
+X                    esac
+X                ;;
+X            esac
+X
+X            $rm -f sftest.h > /dev/null 2>&1
+X            ;;
+X    esac
+X
+X    val=$valbsd
+X    set d_statfsbsd
+X    eval $setvar
+X    val=$valsysv3
+X    set d_statfssysv3
+X    eval $setvar
+X    unset x xxx valbsd valsysv3
+X
+X    case ${d_statfssysv3} in
+X        "$define") ;;
+X        *) ubsize="" ;;
+X    esac
+Xfi
+X: see if this is a sys/statvfs.h system
+Xset sys/statvfs.h i_sysstatvfs
+Xeval $inhdr
+X
+Xset xxx valbasetype
+Xvalbasetype="$d_statvfsbasetype"
+Xcase $valbasetype in
+X    '') valbasetype="$undef" ;;
+Xesac
+Xxxx=`./findhdr sys/statvfs.h`
+Xif $test -f "$xxx";then
+X    $cppstdin $cppflags $cppminus < $xxx >$$.h
+X    if $contains "[^a-zA-Z_]f_basetype[^a-zA-Z_]*;" $$.h  > /dev/null 2>&1
+X    then
+X            valbasetype="$define"
+X    fi
+Xfi
+X
+Xval=$valbasetype
+Xset d_statvfsbasetype
+Xeval $setvar
+X
+X$rm -f $$.h > /dev/null 2>&1
+Xunset xxx valbasetype
+X: see which of string.h or strings.h is needed
+Xecho " "
+Xstrings=`./findhdr string.h`
+Xif $test "$strings" && $test -r "$strings"; then
+X      echo "Using <string.h> instead of <strings.h>." >&4
+X      val="$define"
+Xelse
+X      val="$undef"
+X      strings=`./findhdr strings.h`
+X      if $test "$strings" && $test -r "$strings"; then
+X              echo "Using <strings.h> instead of <string.h>." >&4
+X      else
+X              echo "No string header found -- You'll surely have problems." >&4
+X      fi
+Xfi
+Xset i_string
+Xeval $setvar
+Xcase "$i_string" in
+X"$undef") strings=`./findhdr strings.h`;;
+X*)      strings=`./findhdr string.h`;;
+Xesac
+X
+X: index or strchr
+Xecho " "
+Xif set index val -f; eval $csym; $val; then
+X      if set strchr val -f d_strchr; eval $csym; $val; then
+X              if $contains strchr "$strings" >/dev/null 2>&1 ; then
+X                      val="$define"
+X                      vali="$undef"
+X                      echo "strchr() found." >&4
+X              else
+X                      val="$undef"
+X                      vali="$define"
+X                      echo "index() found." >&4
+X              fi
+X      else
+X              val="$undef"
+X              vali="$define"
+X              echo "index() found." >&4
+X      fi
+Xelse
+X      if set strchr val -f d_strchr; eval $csym; $val; then
+X              val="$define"
+X              vali="$undef"
+X              echo "strchr() found." >&4
+X      else
+X              echo "No index() or strchr() found!" >&4
+X              val="$undef"
+X              vali="$undef"
+X      fi
+Xfi
+Xset d_strchr; eval $setvar
+Xval="$vali"
+Xset d_index; eval $setvar
+X
+X: see if sysfs exists
+Xset sysfs d_sysfs
+Xeval $inlibc
+X
+X: preserve RCS keywords in files with variable substitution, grrr
+XId='$Id'
+XSource='$Source'
+X
+X
+Xif $test "$di_prog" = ""; then
+X    set di_prog
+X    val="di"
+X    eval $setvar
+Xfi
+Xif $test "$d_getopt" = "$define";then
+X    val=""
+Xelse
+X    val="getopt$_o"
+Xfi
+Xset di_otherobj
+Xeval $setvar
+Xecho " "
+Xecho "Checking if your $make program sets \$(MAKE)..." >&4
+Xcase "$make_set_make" in
+X'')
+X      $sed 's/^X //' > testmake.mak << 'EOF'
+XXall:
+XX     @echo 'maketemp="$(MAKE)"'
+XEOF
+X      case "`$make -f testmake.mak 2>/dev/null`" in
+X      *maketemp=*) make_set_make='#' ;;
+X      *)      make_set_make="MAKE=$make" ;;
+X      esac
+X      $rm -f testmake.mak
+X      ;;
+Xesac
+Xcase "$make_set_make" in
+X'#') echo "Yup, it does.";;
+X*) echo "Nope, it doesn't.";;
+Xesac
+X
+X: Cruising for prototypes
+Xecho " "
+Xecho "Checking out function prototypes..." >&4
+X$cat >prototype.c <<'EOCP'
+Xmain(int argc, char *argv[]) {
+X      exit(0);}
+XEOCP
+Xif $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
+X      echo "Your C compiler appears to support function prototypes."
+X      val="$define"
+Xelse
+X      echo "Your C compiler doesn't seem to understand function prototypes."
+X      val="$undef"
+Xfi
+Xset prototype
+Xeval $setvar
+X$rm -f prototype*
+X
+X: check for void type
+Xecho " "
+Xecho "Checking to see how well your C compiler groks the void type..." >&4
+Xcase "$voidflags" in
+X'')
+X      $cat >try.c <<'EOCP'
+X#if TRY & 1
+Xvoid sub() {
+X#else
+Xsub() {
+X#endif
+X      extern void moo();      /* function returning void */
+X      void (*goo)();          /* ptr to func returning void */
+X#if TRY & 8
+X      void *hue;              /* generic ptr */
+X#endif
+X#if TRY & 2
+X      void (*foo[10])();
+X#endif
+X
+X#if TRY & 4
+X      if(goo == moo) {
+X              exit(0);
+X      }
+X#endif
+X      exit(0);
+X}
+Xmain() { sub(); }
+XEOCP
+X      if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
+X              voidflags=$defvoidused
+X      echo "Good.  It appears to support void to the level $package wants.">&4
+X              if $contains warning .out >/dev/null 2>&1; then
+X                      echo "However, you might get some warnings that look like this:"
+X                      $cat .out
+X              fi
+X      else
+Xecho "Hmm, your compiler has some difficulty with void. Checking further..." >&4
+X              if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
+X                      echo "It supports 1..."
+X                      if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
+X                              echo "It also supports 2..."
+X                              if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
+X                                      voidflags=7
+X                                      echo "And it supports 4 but not 8 definitely."
+X                              else
+X                                      echo "It doesn't support 4..."
+X                                      if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
+X                                              voidflags=11
+X                                              echo "But it supports 8."
+X                                      else
+X                                              voidflags=3
+X                                              echo "Neither does it support 8."
+X                                      fi
+X                              fi
+X                      else
+X                              echo "It does not support 2..."
+X                              if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
+X                                      voidflags=13
+X                                      echo "But it supports 4 and 8."
+X                              else
+X                                      if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
+X                                              voidflags=5
+X                                              echo "And it supports 4 but has not heard about 8."
+X                                      else
+X                                              echo "However it supports 8 but not 4."
+X                                      fi
+X                              fi
+X                      fi
+X              else
+X                      echo "There is no support at all for void."
+X                      voidflags=0
+X              fi
+X      fi
+Xesac
+Xcase "$voidflags" in
+X"$defvoidused") ;;
+X*)    $cat >&4 <<'EOM'
+X  Support flag bits are:
+X    1: basic void declarations.
+X    2: arrays of pointers to functions returning void.
+X    4: operations between pointers to and addresses of void functions.
+X    8: generic void pointers.
+XEOM
+X      dflt="$voidflags";
+X      rp="Your void support flags add up to what?"
+X      . ./myread
+X      voidflags="$ans"
+X      ;;
+Xesac
+X$rm -f try.* .out
+X
+X: see if this is an fshelp.h system
+Xset fshelp.h i_fshelp
+Xeval $inhdr
+X
+X: see if this is an kernel/fs_info.h system
+Xset kernel/fs_info.h i_kernfsinfo
+Xeval $inhdr
+X
+X: see if this is a limits.h system
+Xset limits.h i_limits
+Xeval $inhdr
+X
+X: see if this is a malloc.h system
+Xset malloc.h i_malloc
+Xeval $inhdr
+X
+X: see if memory.h is available.
+Xval=''
+Xset memory.h val
+Xeval $inhdr
+X
+X: See if it conflicts with string.h
+Xcase "$val" in
+X$define)
+X      case "$strings" in
+X      '') ;;
+X      *)
+X              $cppstdin $cppflags $cppminus < $strings > mem.h
+X              if $contains 'memcpy' mem.h >/dev/null 2>&1; then
+X                      echo " "
+X                      echo "We won't be including <memory.h>."
+X                      val="$undef"
+X              fi
+X              $rm -f mem.h
+X              ;;
+X      esac
+Xesac
+Xset i_memory
+Xeval $setvar
+X
+X: see if this is an mntent.h system
+Xset mntent.h i_mntent
+Xeval $inhdr
+X
+X: see if this is an mnttab.h system
+Xset mnttab.h i_mnttab
+Xeval $inhdr
+X: see if this is an storage/Directory.h system
+Xset storage/Directory.h i_stor_directory
+Xeval $inhdr
+X
+X: see if this is an storage/Entry.h system
+Xset storage/Entry.h i_stor_entry
+Xeval $inhdr
+X
+X: see if this is an storage/Path.h system
+Xset storage/Path.h i_stor_path
+Xeval $inhdr
+X
+X: see if this is a sys/fstypes.h system
+Xset sys/fstypes.h i_sysfstypes
+Xeval $inhdr
+Xset sys/fs_types.h i_sysfs_types
+Xeval $inhdr
+X
+X: see if this is a sys/fstyp.h system
+Xset sys/fstyp.h i_sysfstyp
+Xeval $inhdr
+X
+X: see if this is a sys/mntctl.h system
+Xset sys/mntctl.h i_sysmntctl
+Xeval $inhdr
+X
+X: see if this is a sys/mntent.h system
+Xset sys/mntent.h i_sysmntent
+Xeval $inhdr
+X
+X: see if this is a sys/mnttab.h system
+Xset sys/mnttab.h i_sysmnttab
+Xeval $inhdr
+X
+X: see if this is a sys/param system
+Xset sys/param.h i_sysparam
+Xeval $inhdr
+X
+X: see if sys/stat.h is available
+Xset sys/stat.h i_sysstat
+Xeval $inhdr
+X
+X: see if we should include time.h, sys/time.h, or both
+Xecho " "
+Xecho "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
+X$echo $n "I'm now running the test program...$c"
+X$cat >try.c <<'EOCP'
+X#include <sys/types.h>
+X#ifdef I_TIME
+X#include <time.h>
+X#endif
+X#ifdef I_SYSTIME
+X#ifdef SYSTIMEKERNEL
+X#define KERNEL
+X#endif
+X#include <sys/time.h>
+X#endif
+X#ifdef I_SYSSELECT
+X#include <sys/select.h>
+X#endif
+Xmain()
+X{
+X      struct tm foo;
+X#ifdef S_TIMEVAL
+X      struct timeval bar;
+X#endif
+X#ifdef S_TIMEZONE
+X      struct timezone tzp;
+X#endif
+X      if (foo.tm_sec == foo.tm_sec)
+X              exit(0);
+X#ifdef S_TIMEVAL
+X      if (bar.tv_sec == bar.tv_sec)
+X              exit(0);
+X#endif
+X      exit(1);
+X}
+XEOCP
+Xflags=''
+Xs_timezone=''
+Xsysselect=''
+Xfor s_timeval in '-DS_TIMEVAL' ''; do
+Xfor i_systimek in '' '-DSYSTIMEKERNEL'; do
+Xfor i_time in '' '-DI_TIME'; do
+Xfor i_systime in '-DI_SYSTIME' ''; do
+X      case "$flags" in
+X      '') $echo $n ".$c"
+X              set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
+X              if eval $compile; then
+X                              set X $i_time $i_systime $i_systimek $sysselect $s_timeval
+X                      shift
+X                      flags="$*"
+X                      echo " "
+X                      $echo $n "Succeeded with $flags$c"
+X              fi
+X              ;;
+X      esac
+Xdone
+Xdone
+Xdone
+Xdone
+Xtimeincl=''
+Xecho " "
+Xcase "$flags" in
+X*SYSTIMEKERNEL*) i_systimek="$define"
+X      timeincl=`./findhdr sys/time.h`
+X      echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
+X*) i_systimek="$undef";;
+Xesac
+Xcase "$flags" in
+X*I_TIME*) i_time="$define"
+X      timeincl=`./findhdr time.h`" $timeincl"
+X      echo "We'll include <time.h>." >&4;;
+X*) i_time="$undef";;
+Xesac
+Xcase "$flags" in
+X*I_SYSTIME*) i_systime="$define"
+X      timeincl=`./findhdr sys/time.h`" $timeincl"
+X      echo "We'll include <sys/time.h>." >&4;;
+X*) i_systime="$undef";;
+Xesac
+X$rm -f try.c try
+X
+X: see if sys/types.h has to be included
+Xset sys/types.h i_systypes
+Xeval $inhdr
+X
+X: see if this is a sys/vfs.h system
+Xset sys/vfs.h i_sysvfs
+Xeval $inhdr
+X
+X: see if this is a sys/vfstab.h system
+Xset sys/vfstab.h i_sysvfstab
+Xeval $inhdr
+X
+X: see if this is a sys/vmount.h system
+Xset sys/vmount.h i_sysvmount
+Xeval $inhdr
+X
+X: end of configuration questions
+Xecho " "
+Xecho "End of configuration questions."
+Xecho " "
+X
+X: back to where it started
+Xif test -d ../UU; then
+X      cd ..
+Xfi
+X
+X: configuration may be patched via a 'config.over' file
+Xif $test -f config.over; then
+X      echo " "
+X      dflt=y
+X      rp='I see a config.over file.  Do you wish to load it?'
+X      . UU/myread
+X      case "$ans" in
+X      n*) echo "OK, I'll ignore it.";;
+X      *)      . ./config.over
+X              echo "Configuration override changes have been loaded."
+X              ;;
+X      esac
+Xfi
+X
+X: in case they want portability, strip down executable paths
+Xcase "$d_portable" in
+X"$define")
+X      echo " "
+X      echo "Stripping down executable paths..." >&4
+X      for file in $loclist $trylist; do
+X              if test X$file != Xln -a X$file != Xar -o X$osname != Xos2; then
+X                      eval $file="\$file"
+X              fi
+X      done
+X      ;;
+Xesac
+X
+X: create config.sh file
+Xecho " "
+Xecho "Creating config.sh..." >&4
+X$spitshell <<EOT >config.sh
+X$startsh
+X#
+X# This file was produced by running the Configure script. It holds all the
+X# definitions figured out by Configure. Should you modify one of these values,
+X# do not forget to propagate your changes by running "Configure -der". You may
+X# instead choose to run each of the .SH files by yourself, or "Configure -S".
+X#
+X
+X# Package name      : $package
+X# Source directory  : $src
+X# Configuration time: $cf_time
+X# Configured by     : $cf_by
+X# Target system     : $myuname
+X
+XAuthor='$Author'
+XDate='$Date'
+XHeader='$Header'
+XId='$Id'
+XLocker='$Locker'
+XLog='$Log'
+XMcc='$Mcc'
+XRCSfile='$RCSfile'
+XRevision='$Revision'
+XSource='$Source'
+XState='$State'
+X_a='$_a'
+X_exe='$_exe'
+X_o='$_o'
+Xafs='$afs'
+Xar='$ar'
+Xarchobjs='$archobjs'
+Xawk='$awk'
+Xbash='$bash'
+Xbison='$bison'
+Xbyacc='$byacc'
+Xc='$c'
+Xcat='$cat'
+Xcc='$cc'
+Xccflags='$ccflags'
+Xcf_by='$cf_by'
+Xcf_time='$cf_time'
+Xchgrp='$chgrp'
+Xchmod='$chmod'
+Xchown='$chown'
+Xcomm='$comm'
+Xcompress='$compress'
+Xcontains='$contains'
+Xcp='$cp'
+Xcpio='$cpio'
+Xcpp='$cpp'
+Xcppflags='$cppflags'
+Xcpplast='$cpplast'
+Xcppminus='$cppminus'
+Xcpprun='$cpprun'
+Xcppstdin='$cppstdin'
+Xcsh='$csh'
+Xd_64bit_statfs_flds='$d_64bit_statfs_flds'
+Xd_bcopy='$d_bcopy'
+Xd_bsd='$d_bsd'
+Xd_bzero='$d_bzero'
+Xd_endmntent='$d_endmntent'
+Xd_eunice='$d_eunice'
+Xd_fs_info='$d_fs_info'
+Xd_getmnt='$d_getmnt'
+Xd_getmntent='$d_getmntent'
+Xd_getmntinfo='$d_getmntinfo'
+Xd_getmntinfobsize='$d_getmntinfobsize'
+Xd_getmntinfofsize='$d_getmntinfofsize'
+Xd_getmntinfofstype='$d_getmntinfofstype'
+Xd_getopt='$d_getopt'
+Xd_gnulibc='$d_gnulibc'
+Xd_index='$d_index'
+Xd_memcpy='$d_memcpy'
+Xd_memset='$d_memset'
+Xd_mntctl='$d_mntctl'
+Xd_mnttime='$d_mnttime'
+Xd_optind='$d_optind'
+Xd_portable='$d_portable'
+Xd_setmntent='$d_setmntent'
+Xd_setmntent_one_arg='$d_setmntent_one_arg'
+Xd_statfs='$d_statfs'
+Xd_statfs_frsize='$d_statfs_frsize'
+Xd_statfsbsd='$d_statfsbsd'
+Xd_statfssysv3='$d_statfssysv3'
+Xd_statvfs='$d_statvfs'
+Xd_statvfsbasetype='$d_statvfsbasetype'
+Xd_strchr='$d_strchr'
+Xd_sysfs='$d_sysfs'
+Xd_xenix='$d_xenix'
+Xdate='$date'
+Xdefvoidused='$defvoidused'
+Xdi_otherobj='$di_otherobj'
+Xdi_prog='$di_prog'
+Xecho='$echo'
+Xegrep='$egrep'
+Xemacs='$emacs'
+Xeunicefix='$eunicefix'
+Xexe_ext='$exe_ext'
+Xexpr='$expr'
+Xfind='$find'
+Xfirstmakefile='$firstmakefile'
+Xflex='$flex'
+Xgccversion='$gccversion'
+Xglibpth='$glibpth'
+Xgrep='$grep'
+Xgzip='$gzip'
+Xhint='$hint'
+Xi_fshelp='$i_fshelp'
+Xi_kernfsinfo='$i_kernfsinfo'
+Xi_limits='$i_limits'
+Xi_malloc='$i_malloc'
+Xi_memory='$i_memory'
+Xi_mntent='$i_mntent'
+Xi_mnttab='$i_mnttab'
+Xi_stdlib='$i_stdlib'
+Xi_stor_directory='$i_stor_directory'
+Xi_stor_entry='$i_stor_entry'
+Xi_stor_path='$i_stor_path'
+Xi_string='$i_string'
+Xi_sysfs_types='$i_sysfs_types'
+Xi_sysfstyp='$i_sysfstyp'
+Xi_sysfstypes='$i_sysfstypes'
+Xi_sysmntctl='$i_sysmntctl'
+Xi_sysmntent='$i_sysmntent'
+Xi_sysmnttab='$i_sysmnttab'
+Xi_sysmount='$i_sysmount'
+Xi_sysparam='$i_sysparam'
+Xi_sysstat='$i_sysstat'
+Xi_sysstatfs='$i_sysstatfs'
+Xi_sysstatvfs='$i_sysstatvfs'
+Xi_systime='$i_systime'
+Xi_systimek='$i_systimek'
+Xi_systypes='$i_systypes'
+Xi_sysvfs='$i_sysvfs'
+Xi_sysvfstab='$i_sysvfstab'
+Xi_sysvmount='$i_sysvmount'
+Xi_time='$i_time'
+Xi_unistd='$i_unistd'
+Xincpath='$incpath'
+Xinews='$inews'
+Xinstallmansrc='$installmansrc'
+Xksh='$ksh'
+Xldflags='$ldflags'
+Xless='$less'
+Xlib_ext='$lib_ext'
+Xlibc='$libc'
+Xlibpth='$libpth'
+Xlibs='$libs'
+Xlibswanted='$libswanted'
+Xline='$line'
+Xlint='$lint'
+Xlkflags='$lkflags'
+Xln='$ln'
+Xlns='$lns'
+Xlocincpth='$locincpth'
+Xloclibpth='$loclibpth'
+Xlp='$lp'
+Xlpr='$lpr'
+Xls='$ls'
+Xmail='$mail'
+Xmailx='$mailx'
+Xmake='$make'
+Xmake_set_make='$make_set_make'
+Xmanext='$manext'
+Xmansrc='$mansrc'
+Xmansrcexp='$mansrcexp'
+Xmips='$mips'
+Xmips_type='$mips_type'
+Xmkdir='$mkdir'
+Xmore='$more'
+Xmv='$mv'
+Xmyuname='$myuname'
+Xn='$n'
+Xnm='$nm'
+Xnm_opt='$nm_opt'
+Xnm_so_opt='$nm_so_opt'
+Xnroff='$nroff'
+Xobj_ext='$obj_ext'
+Xoptimize='$optimize'
+Xosname='$osname'
+Xosvers='$osvers'
+Xpackage='$package'
+Xpath_sep='$path_sep'
+Xperl='$perl'
+Xpg='$pg'
+Xplibpth='$plibpth'
+Xpmake='$pmake'
+Xpr='$pr'
+Xprefix='$prefix'
+Xprefixexp='$prefixexp'
+Xprototype='$prototype'
+Xrm='$rm'
+Xrmail='$rmail'
+Xrunnm='$runnm'
+Xsed='$sed'
+Xsendmail='$sendmail'
+Xsh='$sh'
+Xshar='$shar'
+Xsharpbang='$sharpbang'
+Xshsharp='$shsharp'
+Xsleep='$sleep'
+Xsmail='$smail'
+Xso='$so'
+Xsort='$sort'
+Xspackage='$spackage'
+Xspitshell='$spitshell'
+Xsrc='$src'
+Xstartsh='$startsh'
+Xstrings='$strings'
+Xsubmit='$submit'
+Xsysman='$sysman'
+Xtail='$tail'
+Xtar='$tar'
+Xtbl='$tbl'
+Xtee='$tee'
+Xtest='$test'
+Xtimeincl='$timeincl'
+Xtouch='$touch'
+Xtr='$tr'
+Xtroff='$troff'
+Xubsize='$ubsize'
+Xuname='$uname'
+Xuniq='$uniq'
+Xusenm='$usenm'
+Xusrinc='$usrinc'
+Xuuname='$uuname'
+Xvi='$vi'
+Xvoidflags='$voidflags'
+Xxlibpth='$xlibpth'
+Xzcat='$zcat'
+Xzip='$zip'
+XEOT
+X
+X: Add in command line options if available
+X$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
+X
+X: add special variables
+X$test -f $src/patchlevel.h && \
+Xawk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
+Xecho "CONFIG=true" >>config.sh
+X
+X: propagate old symbols
+Xif $test -f UU/config.sh; then
+X      <UU/config.sh sort | uniq >UU/oldconfig.sh
+X      sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
+X      sort | uniq -u >UU/oldsyms
+X      set X `cat UU/oldsyms`
+X      shift
+X      case $# in
+X      0) ;;
+X      *)
+X              cat <<EOM
+XHmm...You had some extra variables I don't know about...I'll try to keep 'em...
+XEOM
+X              echo "# Variables propagated from previous config.sh file." >>config.sh
+X              for sym in `cat UU/oldsyms`; do
+X                      echo "    Propagating $hint variable "'$'"$sym..."
+X                      eval 'tmp="$'"${sym}"'"'
+X                      echo "$tmp" | \
+X                              sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
+X              done
+X              ;;
+X      esac
+Xfi
+X
+X: Finish up by extracting the .SH files
+Xcase "$alldone" in
+Xexit)
+X      $rm -rf UU
+X      echo "Done."
+X      exit 0
+X      ;;
+Xcont)
+X      ;;
+X'')
+X      dflt=''
+X      nostick=true
+X      $cat <<EOM
+X
+XIf you'd like to make any changes to the config.sh file before I begin
+Xto configure things, do it as a shell escape now (e.g. !vi config.sh).
+X
+XEOM
+X      rp="Press return or use a shell escape to edit config.sh:"
+X      . UU/myread
+X      nostick=''
+X      case "$ans" in
+X      '') ;;
+X      *) : in case they cannot read
+X              sh 1>&4 -c "$ans";;
+X      esac
+X      ;;
+Xesac
+X
+X: if this fails, just run all the .SH files by hand
+X. ./config.sh
+X
+Xecho " "
+Xexec 1>&4
+X. ./UU/extract
+X
+Xif $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
+X      dflt=y
+X      case "$silent" in
+X      true) ;;
+X      *)
+X              $cat <<EOM
+X
+XNow you need to generate make dependencies by running "make depend".
+XYou might prefer to run it in background: "make depend > makedepend.out &"
+XIt can take a while, so you might not want to run it right now.
+X
+XEOM
+X              ;;
+X      esac
+X      rp="Run make depend now?"
+X      . UU/myread
+X      case "$ans" in
+X      y*)
+X              make depend && echo "Now you must run a make."
+X              ;;
+X      *)
+X              echo "You must run 'make depend' then 'make'."
+X              ;;
+X      esac
+Xelif test -f [Mm]akefile; then
+X      echo " "
+X      echo "Now you must run a make."
+Xelse
+X      echo "Done."
+Xfi
+X
+Xif $test -f Policy.sh; then
+X    $cat <<EOM
+X
+XIf you compile $package on a different machine or from a different object
+Xdirectory, copy the Policy.sh file from this object directory to the
+Xnew one before you run Configure -- this will help you with most of
+Xthe policy defaults.
+X
+XEOM
+Xfi
+Xif $test -f config.msg; then
+X    echo "Hmm.  I also noted the following information while running:"
+X    echo " "
+X    $cat config.msg >&4
+X    $rm -f config.msg
+Xfi
+X$rm -f kit*isdone ark*isdone
+X$rm -rf UU
+X
+X: End of Configure
+X
+END_OF_FILE
+if test 106597 -ne `wc -c <'Configure'`; then
+    echo shar: \"'Configure'\" unpacked with wrong size!
+fi
+chmod +x 'Configure'
+# end of 'Configure'
+fi
+echo shar: End of archive 3 \(of 3\).
+cp /dev/null ark3isdone
+MISSING=""
+for I in 1 2 3 ; do
+    if test ! -f ark${I}isdone ; then
+       MISSING="${MISSING} ${I}"
+    fi
+done
+if test "${MISSING}" = "" ; then
+    echo You have unpacked all 3 archives.
+    rm -f ark[1-9]isdone
+else
+    echo You still need to unpack the following archives:
+    echo "        " ${MISSING}
+fi
+##  End of shell archive.
+exit 0
+
+
This page took 0.490814 seconds and 4 git commands to generate.