home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume43 / mailagent / patch08 next >
Internet Message Format  |  1994-07-24  |  56KB

  1. From: Raphael Manfredi <ram@acri.fr>
  2. Newsgroups: comp.sources.misc
  3. Subject: v43i125:  mailagent - Flexible mail filtering and processing package, v3.0, Patch08
  4. Date: 24 Jul 1994 19:40:44 -0500
  5. Organization: Advanced Computer Research Institute, Lyon, France
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <30v1mc$i1r@sparky.sterling.com>
  9. X-Md4-Signature: 2e9d8297eb8d2b6fd83c5f15be52c1f0
  10.  
  11. Submitted-by: Raphael Manfredi <ram@acri.fr>
  12. Posting-number: Volume 43, Issue 125
  13. Archive-name: mailagent/patch08
  14. Environment: UNIX, Perl
  15. Patch-To: mailagent: Volume 41, Issue 1-26
  16.  
  17. [The latest patch for mailagent version 3.0 is #11.]
  18.  
  19. System: mailagent version 3.0
  20. Patch #: 8
  21. Priority: LOW
  22. Subject: regenerated Configure with newer metaconfig
  23. Subject: new contribution from Khalid Sattar <khalid@harlequin.co.uk>
  24. Subject: emphasize that perl 5.0 will not work
  25. Subject: eleven new config variables for better tuning
  26. Subject: now honours the queuewait config variable when present
  27. Subject: now honours the lockhold config variable if present
  28. Subject: metaconfig now defines Strerror instead of strerror
  29. Subject: new routine get_confval to get integer config variables
  30. Subject: fixed leading From date format (spacing problem)
  31. Subject: documents new eleven configuration variables
  32. Subject: sub-section on timeouts has been expanded
  33. Subject: emphasize .forward optimization danger with sendmail
  34. Subject: new UMASK command
  35. Subject: now uses lockmax and lockdelay config variables
  36. Subject: timeout for RUN commands now defined by runmax config variable
  37. Subject: now systematically escape leading From if fromall is ON
  38. Subject: general umask is now reset before analyzing a message
  39. Subject: added support for the UMASK command for local rule scope
  40. Subject: now parses the new tome config variable for vacation messages
  41. Subject: disable vacation message if Illegal-Object or Illegal-Field header
  42. Subject: now honours new lockhold config variable for lock breaking
  43. Subject: cannot dataload exit
  44. Subject: now honours new queuehold and queuelost config variables
  45. Subject: default mode is now 0777, relies on umask for proper setting
  46. Subject: allow macro substitution on patterns if rulemac is ON
  47. Subject: now honours new queuehold config variable
  48. Subject: set proper default values for new optional config variables
  49. Subject: created
  50. Subject: added exit status test for PERL command
  51. Subject: added new test for vacation message with tome config variable
  52. Subject: new set of tests for the new UMASK command
  53. Subject: added tests for new fromall config option
  54. Subject: added test for correct exit status propagation
  55. Subject: added check for no vacation when Illegal-Object or Illegal-Field
  56. Subject: make sure the new tome config variable is honored
  57. Subject: the cp_mail routine is now located in mail.pl
  58. Subject: now uses the cp_mail routine to copy mail
  59. Subject: fixed RCS leading comment string
  60. Subject: now defines the cp_mail routine
  61. Subject: the replace_header routine can now supersede header lines
  62. Subject: added test rules for macro substitution in patterns
  63. Subject: new metaconfig now uses Strerror instead of strerror
  64. Subject: three new files
  65. Date: Fri Jul 01 17:16:37 MET DST 1994
  66. From: Raphael Manfredi <ram@acri.fr>
  67.  
  68. Description:
  69.     This patch finally implements all the clean-up suggestions that
  70.     have been sent to me directly or discussed in the agent-users list.
  71.  
  72.     Mainly, there is a new UMASK command, and macro substitution is
  73.     now possible in rule patterns. It is also possible to escape all
  74.     the From lines in a message, regardless of whether or not mailagent
  75.     thinks they could be dangerous. Finally, the locking scheme is now
  76.     configurable.
  77.  
  78.     Regenerated Configure with newer metaconfig. No real need, that just
  79.     helps me find out bugs in dist-3.0 ;-)
  80.  
  81.     New contribution from Khalid Sattar <khalid@harlequin.co.uk>.
  82.  
  83.     README now emphasize that perl 5.0 will not work, merely due to
  84.     perload which does not work. Perl 5.0 also has trouble understanding
  85.     \U\l in replace patterns... (alpha 10).
  86.  
  87.     Eleven new config variables for better tuning:
  88.         umask
  89.         fromall
  90.         lockmax
  91.         lockdelay
  92.         lockhold
  93.         queuewait
  94.         queuehold
  95.         queuelost
  96.         runmax
  97.         tome
  98.         rulemac
  99.     Please refer to the manual page for more information.
  100.         
  101.     metaconfig now defines Strerror instead of strerror.
  102.  
  103.     New routine get_confval to get integer config variables in filter.
  104.  
  105.     Fixed leading From date format (spacing problem). The date
  106.     now has a leading '0' if it's before 9 O'clock.
  107.  
  108.     Sub-section on timeouts has been expanded in the manual page.
  109.     Also, it now emphasizes on .forward optimization danger with
  110.     sendmail.
  111.  
  112.     New UMASK command for umask setting. This can be achieved globally
  113.     or locally in the scope of a rule.
  114.  
  115.     Now uses lockmax and lockdelay config variables to lock files
  116.     and the new lockhold config variable for lock breaking
  117.  
  118.     Timeout for RUN commands now defined by runmax config variable.
  119.  
  120.     Now systematically escape leading From if fromall is ON
  121.  
  122.     General umask is now reset before analyzing a message.
  123.  
  124.     Now parses the new tome config variable for vacation messages to
  125.     see whether any mail alias has been defined there and if, by
  126.     extraordinary, the message was not sent to one of these aliases...
  127.  
  128.     Disable vacation message if Illegal-Object or Illegal-Field header.
  129.  
  130.     Cannot dataload exit or PERL cannot report a proper exit status
  131.     when &exit is called from a perl escape script.
  132.  
  133.     Default directory creation mode is now 0777, &makedir relies on
  134.     umask for proper permission setting.
  135.  
  136.     Allow macro substitution on patterns if rulemac is ON.
  137.  
  138.     Set proper default values for new optional config variables.
  139.  
  140.     Added new test for vacation message with tome config variable.
  141.     New set of tests for the new UMASK command
  142.     Added tests for new fromall config option
  143.     Added test for correct exit status propagation in PERL command.
  144.     Added check for no vacation when Illegal-Object or Illegal-Field.
  145.     Make sure the new tome config variable is honored in vacation.
  146.     Added test rules for macro substitution in patterns
  147.  
  148.     Regression test suite fix-up:
  149.         the cp_mail routine is now located in mail.pl
  150.         now uses the cp_mail routine to copy mail
  151.         fixed RCS leading comment string
  152.         now defines the cp_mail routine
  153.         the replace_header routine can now supersede header lines
  154.  
  155.     Three new files.
  156.  
  157. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your mailagent source
  158.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  159.     If you don't have the patch program, apply the following by hand,
  160.     or get patch (version 2.0, latest patchlevel).
  161.  
  162.     After patching:
  163.         *** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #11 FIRST ***
  164.  
  165.     If patch indicates that patchlevel is the wrong version, you may need
  166.     to apply one or more previous patches, or the patch may already
  167.     have been applied.  See the patchlevel.h file to find out what has or
  168.     has not been applied.  In any event, don't continue with the patch.
  169.  
  170.     If you are missing previous patches they can be obtained from me:
  171.  
  172.         Raphael Manfredi <ram@acri.fr>
  173.  
  174.     If you send a mail message of the following form it will greatly speed
  175.     processing:
  176.  
  177.         Subject: Command
  178.         @SH mailpatch PATH mailagent 3.0 LIST
  179.                ^ note the c
  180.  
  181.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  182.     or in bang notation from some well-known host, and LIST is the number
  183.     of one or more patches you need, separated by spaces, commas, and/or
  184.     hyphens.  Saying 35- says everything from 35 to the end.
  185.  
  186.     To get some more detailed instructions, send me the following mail:
  187.  
  188.         Subject: Command
  189.         @SH mailhelp PATH
  190.  
  191.  
  192. Index: patchlevel.h
  193. Prereq: 7
  194. 4c4
  195. < #define PATCHLEVEL 7
  196. ---
  197. > #define PATCHLEVEL 8
  198.  
  199. Index: Configure
  200. Prereq: 3.0.1.3
  201. *** Configure.old    Fri Jul  1 17:15:54 1994
  202. --- Configure    Fri Jul  1 17:15:58 1994
  203. ***************
  204. *** 18,26 ****
  205.   # archive site. Check with Archie if you don't know where that can be.)
  206.   #
  207.   
  208. ! # $Id: Configure,v 3.0.1.3 1994/01/26 09:24:20 ram Exp $
  209.   #
  210. ! # Generated on Mon Jan 24 17:53:52 MET 1994 [metaconfig 3.0 PL22]
  211.   
  212.   cat >/tmp/c1$$ <<EOF
  213.   ARGGGHHHH!!!!!
  214. --- 18,26 ----
  215.   # archive site. Check with Archie if you don't know where that can be.)
  216.   #
  217.   
  218. ! # $Id: Configure,v 3.0.1.4 1994/07/01 14:50:29 ram Exp $
  219.   #
  220. ! # Generated on Fri Jul 01 16:47:56 MET DST 1994 [metaconfig 3.0 PL31]
  221.   
  222.   cat >/tmp/c1$$ <<EOF
  223.   ARGGGHHHH!!!!!
  224. ***************
  225. *** 46,51 ****
  226. --- 46,60 ----
  227.   (exit $?0) || exec sh $0 $argv:q
  228.   rm -f /tmp/c1$$ /tmp/c2$$
  229.   
  230. + : compute my invocation name
  231. + me=$0
  232. + case "$0" in
  233. + */*)
  234. +     me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
  235. +     test "$me" || me=$0
  236. +     ;;
  237. + esac
  238.   : Sanity checks
  239.   PATH=".:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin"
  240.   PATH=$PATH:'/usr/5bin:/etc:/usr/gnu/bin:/usr/new:/usr/new/bin:/usr/nbin'
  241. ***************
  242. *** 56,62 ****
  243.   export PATH
  244.   
  245.   if test ! -t 0; then
  246. !     echo "Say 'sh Configure', not 'sh <Configure'"
  247.       exit 1
  248.   fi
  249.   
  250. --- 65,71 ----
  251.   export PATH
  252.   
  253.   if test ! -t 0; then
  254. !     echo "Say 'sh $me', not 'sh <$me'"
  255.       exit 1
  256.   fi
  257.   
  258. ***************
  259. *** 73,80 ****
  260.   else
  261.       : Warn them if they use ksh on other systems
  262.       (PATH=.; alias -x) >/dev/null 2>&1 && \
  263. !         cat <<'EOM'
  264. ! (I see you are using the Korn shell.  Some ksh's blow up on Configure,
  265.   especially on exotic machines.  If yours does, try the Bourne shell instead.)
  266.   EOM
  267.   fi
  268. --- 82,89 ----
  269.   else
  270.       : Warn them if they use ksh on other systems
  271.       (PATH=.; alias -x) >/dev/null 2>&1 && \
  272. !         cat <<EOM
  273. ! (I see you are using the Korn shell.  Some ksh's blow up on $me,
  274.   especially on exotic machines.  If yours does, try the Bourne shell instead.)
  275.   EOM
  276.   fi
  277. ***************
  278. *** 91,96 ****
  279. --- 100,106 ----
  280.   awk=''
  281.   bash=''
  282.   bison=''
  283. + byacc=''
  284.   cat=''
  285.   chgrp=''
  286.   chmod=''
  287. ***************
  288. *** 105,110 ****
  289. --- 115,121 ----
  290.   egrep=''
  291.   emacs=''
  292.   expr=''
  293. + find=''
  294.   flex=''
  295.   gcc=''
  296.   grep=''
  297. ***************
  298. *** 171,176 ****
  299. --- 182,188 ----
  300.   binexp=''
  301.   installbin=''
  302.   cc=''
  303. + gccversion=''
  304.   ccflags=''
  305.   cppflags=''
  306.   ldflags=''
  307. ***************
  308. *** 210,215 ****
  309. --- 222,228 ----
  310.   d_uwait3=''
  311.   d_uwait=''
  312.   d_vfork=''
  313. + usevfork=''
  314.   d_voidsig=''
  315.   signal_t=''
  316.   h_fcntl=''
  317. ***************
  318. *** 220,225 ****
  319. --- 233,239 ----
  320.   i_sysfile=''
  321.   d_voidtty=''
  322.   i_bsdioctl=''
  323. + i_sysfilio=''
  324.   i_sysioctl=''
  325.   i_syssockio=''
  326.   i_syswait=''
  327. ***************
  328. *** 232,237 ****
  329. --- 246,252 ----
  330.   timeincl=''
  331.   intsize=''
  332.   libc=''
  333. + glibpth=''
  334.   libpth=''
  335.   plibpth=''
  336.   xlibpth=''
  337. ***************
  338. *** 297,302 ****
  339. --- 312,318 ----
  340.   installscript=''
  341.   scriptdir=''
  342.   scriptdirexp=''
  343. + so=''
  344.   sharpbang=''
  345.   shsharp=''
  346.   spitshell=''
  347. ***************
  348. *** 355,361 ****
  349.   : produce awk script to parse command line options
  350.   cat >options.awk <<'EOF'
  351.   BEGIN {
  352. !     optstr = "deEf:hrsSV";    # getopt-style specification
  353.   
  354.       len = length(optstr);
  355.       for (i = 1; i <= len; i++) {
  356. --- 371,377 ----
  357.   : produce awk script to parse command line options
  358.   cat >options.awk <<'EOF'
  359.   BEGIN {
  360. !     optstr = "deEf:hrsSD:U:V";    # getopt-style specification
  361.   
  362.       len = length(optstr);
  363.       for (i = 1; i <= len; i++) {
  364. ***************
  365. *** 412,417 ****
  366. --- 428,434 ----
  367.   error=''
  368.   silent=''
  369.   extractsh=''
  370. + optdef='optdef.sh'
  371.   
  372.   : option parsing
  373.   while test $# -gt 0; do
  374. ***************
  375. *** 424,430 ****
  376.           if test -r "$1"; then
  377.               config_sh="$1"
  378.           else
  379. !             echo "Configure: cannot read config file $1." >&2
  380.               error=true
  381.           fi
  382.           cd UU
  383. --- 441,447 ----
  384.           if test -r "$1"; then
  385.               config_sh="$1"
  386.           else
  387. !             echo "$me: cannot read config file $1." >&2
  388.               error=true
  389.           fi
  390.           cd UU
  391. ***************
  392. *** 434,443 ****
  393.       -s) shift; silent=true;;
  394.       -E) shift; alldone=exit;;
  395.       -S) shift; extractsh=true;;
  396. !     -V) echo "Configure generated by metaconfig 3.0 PL22." >&2
  397.           exit 0;;
  398.       --) break;;
  399. !     -*) echo "Configure: unknown option $1" >&2; shift; error=true;;
  400.       *) break;;
  401.       esac
  402.   done
  403. --- 451,484 ----
  404.       -s) shift; silent=true;;
  405.       -E) shift; alldone=exit;;
  406.       -S) shift; extractsh=true;;
  407. !     -D)
  408. !         shift
  409. !         case "$1" in
  410. !         *=)
  411. !             echo "$me: use '-U symbol=', not '-D symbol='." >&2
  412. !             echo "$me: ignoring -D $1" >&2
  413. !             ;;
  414. !         *=*) echo "$1" >> $optdef;;
  415. !         *) echo "$1='define'" >> $optdef;;
  416. !         esac
  417. !         shift
  418. !         ;;
  419. !     -U)
  420. !         shift
  421. !         case "$1" in
  422. !         *=) echo "$1" >> $optdef;;
  423. !         *=*)
  424. !             echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
  425. !             echo "$me: ignoring -U $1" >&2
  426. !             ;;
  427. !         *) echo "$1='undef'" >> $optdef;;
  428. !         esac
  429. !         shift
  430. !         ;;
  431. !     -V) echo "$me generated by metaconfig 3.0 PL31." >&2
  432.           exit 0;;
  433.       --) break;;
  434. !     -*) echo "$me: unknown option $1" >&2; shift; error=true;;
  435.       *) break;;
  436.       esac
  437.   done
  438. ***************
  439. *** 445,459 ****
  440.   case "$error" in
  441.   true)
  442.       cat >&2 <<EOM
  443. ! Usage: Configure [-dehrESV] [-f config.sh]
  444.     -d : use defaults for all answers.
  445.     -e : go on without questioning past the production of config.sh.
  446.     -f : specify an alternate default configuration file.
  447.     -h : print this help message and exit (with an error status).
  448.     -r : reuse C symbols value if possible (skips costly nm extraction).
  449.     -s : silent mode, only echoes questions and essential information.
  450.     -E : stop at the end of questions, after having produced config.sh.
  451.     -S : perform variable substitutions on all .SH files (can mix with -f)
  452.     -V : print version number and exit (with a zero status).
  453.   EOM
  454.       exit 1
  455. --- 486,507 ----
  456.   case "$error" in
  457.   true)
  458.       cat >&2 <<EOM
  459. ! Usage: $me [-dehrESV] [-f config.sh] [-D symbol] [-D symbol=value]
  460. !                  [-U symbol] [-U symbol=]
  461.     -d : use defaults for all answers.
  462.     -e : go on without questioning past the production of config.sh.
  463.     -f : specify an alternate default configuration file.
  464.     -h : print this help message and exit (with an error status).
  465.     -r : reuse C symbols value if possible (skips costly nm extraction).
  466.     -s : silent mode, only echoes questions and essential information.
  467. +   -D : define symbol to have some value:
  468. +          -D symbol         symbol gets the value 'define'
  469. +          -D symbol=value   symbol gets the value 'value'
  470.     -E : stop at the end of questions, after having produced config.sh.
  471.     -S : perform variable substitutions on all .SH files (can mix with -f)
  472. +   -U : undefine symbol:
  473. +          -U symbol    symbol gets the value 'undef'
  474. +          -U symbol=   symbol gets completely empty
  475.     -V : print version number and exit (with a zero status).
  476.   EOM
  477.       exit 1
  478. ***************
  479. *** 465,470 ****
  480. --- 513,523 ----
  481.   true) exec 1>/dev/null;;
  482.   esac
  483.   
  484. + : run the defines and the undefines, if any
  485. + touch $optdef
  486. + . ./$optdef
  487. + rm -f $optdef
  488.   case "$extractsh" in
  489.   true)
  490.       case "$config_sh" in
  491. ***************
  492. *** 509,527 ****
  493.   fi
  494.   
  495.   : list of known cpp symbols
  496. ! attrlist="__alpha __bsdi__ BSD_NET2 DGUX M_I186 M_I286 M_I386"
  497. ! attrlist="$attrlist M_I8086 M_XENIX UTS __DGUX__"
  498. ! attrlist="$attrlist _AIX __STDC__ __m88k__ ansi bsd4_2 gcos gimpel"
  499. ! attrlist="$attrlist hp9000s300 hp9000s400 hp9000s500 hp9000s700"
  500. ! attrlist="$attrlist hp9000s800 hpux"
  501. ! attrlist="$attrlist i186 i386 i486 i8086 iAPX286 ibm interdata"
  502. ! attrlist="$attrlist m88k mc300 mc500 mc68000 mc68k mc700 mert"
  503. ! attrlist="$attrlist mips NeXT ns16000 ns32000 nsc32000 os"
  504. ! attrlist="$attrlist __osf__ pdp11 posix"
  505. ! attrlist="$attrlist pyr sinix sony sparc sun tower tower32 tower32_600"
  506. ! attrlist="$attrlist tower32_800 tss u3b2 u3b20 u3b200 u3b5 ultrix unix"
  507. ! attrlist="$attrlist __unix__ vax venix xenix z8000"
  508.   
  509.   : no include file wanted by default
  510.   inclwanted=''
  511.   
  512. --- 562,627 ----
  513.   fi
  514.   
  515.   : list of known cpp symbols
  516. ! al="AMIX BIT_MSF BSD BSD4_3 BSD_NET2 CRAY DGUX DOLPHIN DPX2"
  517. ! al="$al GO32 HP700 I386 I80960 I960 Lynx M68000 M68K MACH"
  518. ! al="$al MIPSEB MIPSEL MSDOS MTXINU MVS"
  519. ! al="$al M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM"
  520. ! al="$al M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX"
  521. ! al="$al NeXT OCS88 OSF1 PARISC PC532 PORTAR POSIX"
  522. ! al="$al PWB R3000 SVR3 SVR4"
  523. ! al="$al SYSTYPE_BSD SYSTYPE_SVR4 SYSTYPE_SYSV"
  524. ! al="$al UTEK UTS UTek UnicomPBB UnicomPBD Utek VMS"
  525. ! al="$al _AIX _AIX32 _AM29000 _COFF _CRAY _EPI _IBMR2"
  526. ! al="$al _MIPSEB _MIPSEL _M_COFF _M_I86 _M_I86SM _M_SYS3"
  527. ! al="$al _M_SYS5 _M_SYSIII _M_SYSV _M_UNIX _M_XENIX _R3000"
  528. ! al="$al _SYSTYPE_BSD _SYSTYPE_BSD43 _SYSTYPE_SVR4"
  529. ! al="$al _SYSTYPE_SYSV _SYSV3 _UNICOS"
  530. ! al="$al __386BSD__ __BIG_ENDIAN __BIG_ENDIAN__ __BSD_4_4__"
  531. ! al="$al __DGUX__ __DPX2__ __H3050R __H3050RX"
  532. ! al="$al __LITTLE_ENDIAN __LITTLE_ENDIAN__ __MACH__"
  533. ! al="$al __MIPSEB __MIPSEB__ __MIPSEL __MIPSEL__"
  534. ! al="$al __Next__ __OSF1__ __PARAGON__ __PWB __STDC__"
  535. ! al="$al ____386BSD____ __alpha __alpha__ __amiga"
  536. ! al="$al __bsd4_2 __bsd4_2__ __bsdi__ __convex__"
  537. ! al="$al __host_mips__"
  538. ! al="$al __hp9000s200 __hp9000s300 __hp9000s400 __hp9000s500"
  539. ! al="$al __hp9000s500 __hp9000s700 __hp9000s800"
  540. ! al="$al __hppa __hpux __i286 __i286__ __i386 __i386__"
  541. ! al="$al __i486 __i486__ __i860 __i860__"
  542. ! al="$al __m68k __m68k__ __m88100__ __m88k __m88k__"
  543. ! al="$al __mc68000 __mc68000__ __mc68020 __mc68020__"
  544. ! al="$al __mc68030 __mc68030__ __mc68040 __mc68040__"
  545. ! al="$al __mc88100 __mc88100__ __mips __mips__"
  546. ! al="$al __motorola__ __osf__ __pa_risc __sparc__ __stdc__"
  547. ! al="$al __sun __sun__ __svr3__ __svr4__ __ultrix __ultrix__"
  548. ! al="$al __unix __unix__ __vax __vax__"
  549. ! al="$al _host_mips _mips _unix"
  550. ! al="$al a29k aegis alliant am29000 amiga ansi"
  551. ! al="$al bsd bsd43 bsd4_2 bsd4_3 bsd4_4 bull"
  552. ! al="$al convex cray ctix encore gcos gimpel"
  553. ! al="$al hcx host_mips hp200 hp300 hp700 hp800"
  554. ! al="$al hp9000 hp9000s300 hp9000s400 hp9000s500"
  555. ! al="$al hp9000s700 hp9000s800 hp9k8 hpux"
  556. ! al="$al i186 i286 i386 i486 i8086"
  557. ! al="$al i80960 i860 iAPX286 ibm interdata is68k"
  558. ! al="$al linux luna luna88k m68k m88100 m88k"
  559. ! al="$al mc300 mc500 mc68000 mc68010 mc68020 mc68030"
  560. ! al="$al mc68040 mc68060 mc68k mc68k32 mc700"
  561. ! al="$al mc88000 mc88100 merlin mert mips mvs n16"
  562. ! al="$al ncl_el ncl_mr"
  563. ! al="$al news1500 news1700 news1800 news1900 news3700"
  564. ! al="$al news700 news800 news900 ns16000 ns32000"
  565. ! al="$al ns32016 ns32332 ns32k nsc32000 os osf"
  566. ! al="$al parisc pc532 pdp11 plexus posix pyr"
  567. ! al="$al riscix riscos sequent sgi sinix sony sony_news"
  568. ! al="$al sonyrisc sparc sparclite spectrum stratos"
  569. ! al="$al sun sun3 sun386 svr4 sysV68 sysV88"
  570. ! al="$al tower tower32 tower32_200 tower32_600 tower32_700"
  571. ! al="$al tower32_800 tower32_850 tss u3b u3b2 u3b20 u3b200"
  572. ! al="$al u3b5 ultrix unix unixpc unos vax venix vms"
  573. ! al="$al xenix z8000"
  574.   
  575. + gccversion='1'
  576.   : no include file wanted by default
  577.   inclwanted=''
  578.   
  579. ***************
  580. *** 531,545 ****
  581.   xlibpth='/usr/lib/386 /lib/386'
  582.   
  583.   : general looking path for locating libraries
  584. ! libpth='/usr/lib/large /lib '$xlibpth' /lib/large'
  585. ! libpth=$libpth' /usr/lib/small /lib/small'
  586.   
  587. ! : no additional library wanted by default
  588.   libswanted=''
  589.   : full support for void wanted by default
  590.   defvoidused=15
  591.   
  592.   
  593.   : Some greps do not return status, grrr.
  594.   echo "grimblepritz" >grimble
  595. --- 631,651 ----
  596.   xlibpth='/usr/lib/386 /lib/386'
  597.   
  598.   : general looking path for locating libraries
  599. ! glibpth="/usr/lib/large /lib /usr/lib $xlibpth /lib/large"
  600. ! glibpth="$glibpth /usr/lib/small /lib/small"
  601. ! glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib /usr/shlib"
  602. ! : Private path used by Configure to find libraries.  Its value
  603. ! : is prepended to libpth. This variable takes care of special
  604. ! : machines, like the mips.  Usually, it should be empty.
  605. ! plibpth=''
  606.   
  607. ! : default library list
  608.   libswanted=''
  609.   : full support for void wanted by default
  610.   defvoidused=15
  611.   
  612. + libswanted=''
  613.   
  614.   : Some greps do not return status, grrr.
  615.   echo "grimblepritz" >grimble
  616. ***************
  617. *** 1076,1082 ****
  618.   
  619.   : who configured the system
  620.   cf_time=`$date 2>&1`
  621. ! cf_by=`( (logname) 2>/dev/null || whoami) 2>&1`
  622.   
  623.   : decide how portable to be
  624.   case "$d_portable" in
  625. --- 1182,1192 ----
  626.   
  627.   : who configured the system
  628.   cf_time=`$date 2>&1`
  629. ! (logname > .temp) >/dev/null 2>&1
  630. ! $test -s .temp || (whoami > .temp) >/dev/null 2>&1
  631. ! $test -s .temp || echo unknown > .temp
  632. ! cf_by=`$cat .temp`
  633. ! $rm -f .temp
  634.   
  635.   : decide how portable to be
  636.   case "$d_portable" in
  637. ***************
  638. *** 1118,1124 ****
  639.    ~*)
  640.       if $test -f /bin/csh; then
  641.           /bin/csh -f -c "glob \$1"
  642. !         failed=$?
  643.           echo ""
  644.           exit \$failed
  645.       else
  646. --- 1228,1234 ----
  647.    ~*)
  648.       if $test -f /bin/csh; then
  649.           /bin/csh -f -c "glob \$1"
  650. !         failed=\$?
  651.           echo ""
  652.           exit \$failed
  653.       else
  654. ***************
  655. *** 1155,1164 ****
  656. --- 1265,1282 ----
  657.   skip=''
  658.   none_ok=''
  659.   exp_file=''
  660. + nopath_ok=''
  661.   orig_rp="$rp"
  662.   orig_dflt="$dflt"
  663.   
  664.   case "$fn" in
  665. + *:*)
  666. +     loc_file=`expr $fn : '.*:\(.*\)'`
  667. +     fn=`expr $fn : '\(.*\):.*'`
  668. +     ;;
  669. + esac
  670. + case "$fn" in
  671.   *~*) tilde=true;;
  672.   esac
  673.   case "$fn" in
  674. ***************
  675. *** 1173,1183 ****
  676.   case "$fn" in
  677.   *e*) exp_file=true;;
  678.   esac
  679.   
  680.   case "$fn" in
  681.   *f*) type='File';;
  682.   *d*) type='Directory';;
  683. ! *l*) type='Locate'; fn=`expr $fn : '.*:\(.*\)'`;;
  684.   esac
  685.   
  686.   what="$type"
  687. --- 1291,1304 ----
  688.   case "$fn" in
  689.   *e*) exp_file=true;;
  690.   esac
  691. + case "$fn" in
  692. + *p*) nopath_ok=true;;
  693. + esac
  694.   
  695.   case "$fn" in
  696.   *f*) type='File';;
  697.   *d*) type='Directory';;
  698. ! *l*) type='Locate';;
  699.   esac
  700.   
  701.   what="$type"
  702. ***************
  703. *** 1274,1285 ****
  704.                   ;;
  705.               Locate)
  706.                   if test -d "$value"; then
  707. !                     echo "(Looking for $fn in directory $value.)"
  708. !                     value="$value/$fn"
  709.                   fi
  710.                   if test -f "$value"; then
  711.                       type=''
  712.                   fi
  713.                   ;;
  714.               esac
  715.   
  716. --- 1395,1415 ----
  717.                   ;;
  718.               Locate)
  719.                   if test -d "$value"; then
  720. !                     echo "(Looking for $loc_file in directory $value.)"
  721. !                     value="$value/$loc_file"
  722.                   fi
  723.                   if test -f "$value"; then
  724.                       type=''
  725.                   fi
  726. +                 case "$nopath_ok" in
  727. +                 true)    case "$value" in
  728. +                     */*) ;;
  729. +                     *)    echo "Assuming $value will be in people's path."
  730. +                         type=''
  731. +                         ;;
  732. +                     esac
  733. +                     ;;
  734. +                 esac
  735.                   ;;
  736.               esac
  737.   
  738. ***************
  739. *** 1319,1331 ****
  740.   echo " "
  741.   case "$sysman" in
  742.   '') 
  743. !     syspath='/usr/man/man1 /usr/man/man1 /usr/man/mann'
  744. !     syspath="$syspath /usr/man/manl /usr/man/local/man1"
  745.       syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
  746.       syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
  747.       syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
  748. !     syspath="$syspath /usr/man/man.L /local/man/man1"
  749. !     sysman=`./loc . $syspath`
  750.       ;;
  751.   esac
  752.   if $test -d "$sysman"; then
  753. --- 1449,1460 ----
  754.   echo " "
  755.   case "$sysman" in
  756.   '') 
  757. !     syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
  758.       syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
  759.       syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
  760.       syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
  761. !     syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
  762. !     sysman=`./loc . /usr/man/man1 $syspath`
  763.       ;;
  764.   esac
  765.   if $test -d "$sysman"; then
  766. ***************
  767. *** 1600,1615 ****
  768.       cc="$ans"
  769.   fi
  770.   case "$cc" in
  771. ! gcc*) cpp=`./loc gcc-cpp $cpp $pth`;;
  772.   esac
  773.   
  774.   : What should the include directory be ?
  775.   echo " "
  776.   $echo $n "Hmm...  $c"
  777. ! case "$usrinc" in
  778. ! '') dflt='/usr/include';;
  779. ! *) dflt=$usrinc;;
  780. ! esac
  781.   incpath=''
  782.   mips_type=''
  783.   if $test -f /bin/mips && /bin/mips; then
  784. --- 1729,1777 ----
  785.       cc="$ans"
  786.   fi
  787.   case "$cc" in
  788. ! gcc*)
  789. !     echo "Checking out which version of gcc you have..." >&4
  790. !     $cat >gccvers.c <<EOM
  791. ! #include <stdio.h>
  792. ! int main()
  793. ! {
  794. !     char *v;
  795. !     v = "unknown";
  796. ! #ifdef __GNUC__
  797. ! #ifdef __VERSION__
  798. !     v = __VERSION__;
  799. ! #endif
  800. ! #endif
  801. !     switch((int) v[0]) {
  802. !         case '1': printf("1\n"); break;
  803. !         case '2': printf("2\n"); break;
  804. !         case '3': printf("3\n"); break;
  805. !         default: break;
  806. !     }
  807. ! #ifdef __GNUC__
  808. !     return 0;
  809. ! #else
  810. !     return 1;
  811. ! #endif
  812. ! }
  813. ! EOM
  814. !     if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
  815. !         gccversion=`./gccvers`
  816. !         echo "You appear to have version $gccversion."
  817. !     else
  818. !         echo "Doesn't appear to be GNU cc after all."
  819. !     fi
  820. !     $rm -f gccvers*
  821. !     if $test "$gccversion" = '1'; then
  822. !         cpp=`./loc gcc-cpp $cpp $pth`
  823. !     fi
  824. !     ;;
  825.   esac
  826.   
  827.   : What should the include directory be ?
  828.   echo " "
  829.   $echo $n "Hmm...  $c"
  830. ! dflt='/usr/include'
  831.   incpath=''
  832.   mips_type=''
  833.   if $test -f /bin/mips && /bin/mips; then
  834. ***************
  835. *** 1635,1640 ****
  836. --- 1797,1806 ----
  837.       $eunicefix mips
  838.   fi
  839.   echo " "
  840. + case "$usrinc" in
  841. + '') ;;
  842. + *) dflt="$usrinc";;
  843. + esac
  844.   fn=d/
  845.   rp='Where are the include files you want to use?'
  846.   . ./getfile
  847. ***************
  848. *** 1644,1654 ****
  849.   case "$plibpth" in
  850.   '') if mips; then
  851.           plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
  852. -     else
  853. -         plibpth="/usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib"
  854.       fi;;
  855.   esac
  856. ! libpth="$plibpth $libpth"
  857.   
  858.   : Looking for optional libraries
  859.   echo " "
  860. --- 1810,1872 ----
  861.   case "$plibpth" in
  862.   '') if mips; then
  863.           plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
  864.       fi;;
  865.   esac
  866. ! case "$libpth" in
  867. ! ' ') dlist='';;
  868. ! '') dlist="$plibpth $glibpth";;
  869. ! *) dlist="$libpth";;
  870. ! esac
  871. ! : Now check and see which directories actually exist, avoiding duplicates
  872. ! libpth=''
  873. ! for xxx in $dlist
  874. ! do
  875. !     if $test -d $xxx; then
  876. !         case " $libpth " in
  877. !         *" $xxx "*) ;;
  878. !         *) libpth="$libpth $xxx";;
  879. !         esac
  880. !     fi
  881. ! done
  882. ! $cat <<'EOM'
  883. ! Some systems have incompatible or broken versions of libraries.  Among
  884. ! the directories listed in the question below, please remove the one
  885. ! you know not to be holding relevant libraries.  Say "none" for none.
  886. ! EOM
  887. ! case "$libpth" in
  888. ! '') dflt='none';;
  889. ! *)
  890. !     set X $libpth
  891. !     shift
  892. !     dflt=${1+"$@"}
  893. !     ;;
  894. ! esac
  895. ! rp="Directories to use for library searches?"
  896. ! . ./myread
  897. ! case "$ans" in
  898. ! none) libpth=' ';;
  899. ! *) libpth="$ans";;
  900. ! esac
  901. ! : compute shared library extension
  902. ! echo " "
  903. ! case "$so" in
  904. ! '')
  905. !     if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
  906. !         dflt='sl'
  907. !     else
  908. !         dflt='so'
  909. !     fi
  910. !     ;;
  911. !     
  912. ! *) dflt="$so";;
  913. ! esac
  914. ! rp='What is the file extension used for shared libraries?'
  915. ! . ./myread
  916. ! so="$ans"
  917.   
  918.   : Looking for optional libraries
  919.   echo " "
  920. ***************
  921. *** 1665,1701 ****
  922.       dbm) thatlib=ndbm;;
  923.       *_s) thatlib=NONE;;
  924.       *) thatlib="${thislib}_s";;
  925. -     *) thatlib=NONE;;
  926.       esac
  927. !     yyy="$incpath/usr/ccs/lib $incpath/usr/lib $incpath/usr/ucblib"
  928. !     yyy="$yyy $incpath/usr/local/lib $incpath/lib"
  929. !     xxx=`./loc lib$thislib.a X $yyy`
  930. !     if $test -f $xxx; then
  931.           echo "Found -l$thislib."
  932.           case "$dflt" in
  933.           *-l$thislib*|*-l$thatlib*);;
  934. !         *) dflt="$dflt -l$thislib";;
  935.           esac
  936.       else
  937. !         xxx=`./loc lib$thislib.a X $libpth`
  938. !         if $test -f $xxx; then
  939. !             echo "Found $xxx."
  940. !             case "$dflt" in
  941. !             *$xxx*);;
  942. !             *) dflt="$dflt $xxx";;
  943. !             esac
  944. !         else
  945. !             xxx=`./loc Slib$thislib.a X $xlibpth`
  946. !             if $test -f $xxx; then
  947. !                 echo "Found -l$thislib."
  948. !                 case "$dflt" in
  949. !                 *-l$thislib*|*-l$thatlib*);;
  950. !                 *) dflt="$dflt -l$thislib";;
  951. !                 esac
  952. !             else
  953. !                 echo "No -l$thislib."
  954. !             fi
  955. !         fi
  956.       fi
  957.   done
  958.   set X $dflt
  959. --- 1883,1934 ----
  960.       dbm) thatlib=ndbm;;
  961.       *_s) thatlib=NONE;;
  962.       *) thatlib="${thislib}_s";;
  963.       esac
  964. !     
  965. !     if xxx=`./loc lib$thislib.a X $libpth`; $test -f "$xxx"; then
  966.           echo "Found -l$thislib."
  967. +         case " $dflt " in
  968. +         *"-l$thislib "*|*"-l$thatlib "*);;
  969. +         *) dflt="$dflt -l$thislib";;
  970. +         esac
  971. +     elif xxx=`./loc lib$thatlib.a X $libpth`; $test -f "$xxx"; then
  972. +         echo "Found -l$thatlib."
  973. +         case " $dflt " in
  974. +         *"-l$thatlib "*);;
  975. +         *) dflt="$dflt -l$thatlib";;
  976. +         esac
  977. +     elif xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
  978. +         echo "Found -l$thislib (shared only)."
  979. +         case " $dflt " in
  980. +         *"-l$thislib "*|*"-l$thatlib "*);;
  981. +         *) dflt="$dflt -l$thislib";;
  982. +         esac
  983. +     elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
  984. +         echo "Found -l$thislib (shared only)."
  985. +         case " $dflt " in
  986. +         *"-l$thislib "*|*"-l$thatlib "*);;
  987. +         *) dflt="$dflt -l$thislib";;
  988. +         esac
  989. +     elif xxx=`./loc Slib$thislib.a X $xlibpth`; $test -f "$xxx"; then
  990. +         echo "Found -l$thislib."
  991. +         case " $dflt " in
  992. +         *"-l$thislib "*|*"-l$thatlib "*);;
  993. +         *) dflt="$dflt -l$thislib";;
  994. +         esac
  995. +     elif xxx=`./loc Slib$thatlib.a X $xlibpth`; $test -f "$xxx"; then
  996. +         echo "Found -l$thatlib."
  997. +         case " $dflt " in
  998. +         *"-l$thatlib "*);;
  999. +         *) dflt="$dflt -l$thatlib";;
  1000. +         esac
  1001. +     elif xxx=`./loc lib$thatlib.$so X $libpth`; $test -f "$xxx"; then
  1002. +         echo "Found -l$thatlib (shared only)."
  1003.           case "$dflt" in
  1004.           *-l$thislib*|*-l$thatlib*);;
  1005. !         *) dflt="$dflt -l$thatlib";;
  1006.           esac
  1007.       else
  1008. !         echo "No -l$thislib."
  1009.       fi
  1010.   done
  1011.   set X $dflt
  1012. ***************
  1013. *** 1793,1799 ****
  1014.       esac
  1015.       ;;
  1016.   esac
  1017. - libpth="$plibpth $libpth"
  1018.   libnames='';
  1019.   case "$libs" in
  1020.   '') ;;
  1021. --- 2026,2031 ----
  1022. ***************
  1023. *** 1801,1818 ****
  1024.       case "$thislib" in
  1025.       -l*)
  1026.           thislib=`expr X$thislib : 'X-l\(.*\)'`
  1027. !         try=`./loc lib$thislib.a blurfl/dyick $libpth`
  1028. !         if test ! -f $try; then
  1029. !             try=`./loc lib$thislib blurfl/dyick $libpth`
  1030. !             if test ! -f $try; then
  1031. !                 try=`./loc $thislib blurfl/dyick $libpth`
  1032. !                 if test ! -f $try; then
  1033. !                     try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
  1034. !                     if test ! -f $try; then
  1035. !                         try=''
  1036. !                     fi
  1037. !                 fi
  1038. !             fi
  1039.           fi
  1040.           libnames="$libnames $try"
  1041.           ;;
  1042. --- 2033,2052 ----
  1043.       case "$thislib" in
  1044.       -l*)
  1045.           thislib=`expr X$thislib : 'X-l\(.*\)'`
  1046. !         if try=`./loc lib$thislib.a X $libpth`; $test -f "$try"; then
  1047. !             :
  1048. !         elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
  1049. !             :
  1050. !         elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
  1051. !             :
  1052. !         elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
  1053. !             :
  1054. !         elif try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
  1055. !             :
  1056. !         elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
  1057. !             :
  1058. !         else
  1059. !             try=''
  1060.           fi
  1061.           libnames="$libnames $try"
  1062.           ;;
  1063. ***************
  1064. *** 1824,1833 ****
  1065.   xxx=normal
  1066.   case "$libc" in
  1067.   unknown)
  1068. !     set /usr/ccs/lib/libc.so
  1069. !     $test -r $1 || set /usr/lib/libc.so
  1070. !     $test -r $1 || set /usr/shlib/libc.so
  1071. !     $test -r $1 || set /usr/lib/libc.so.[0-9]*
  1072.       $test -r $1 || set /lib/libsys_s.a
  1073.       eval set \$$#
  1074.       ;;
  1075. --- 2058,2068 ----
  1076.   xxx=normal
  1077.   case "$libc" in
  1078.   unknown)
  1079. !     set /usr/ccs/lib/libc.$so
  1080. !     $test -r $1 || set /usr/lib/libc.$so
  1081. !     $test -r $1 || set /usr/shlib/libc.$so
  1082. !     $test -r $1 || set /usr/lib/libc.$so.[0-9]*
  1083. !     $test -r $1 || set /lib/libc.$so
  1084.       $test -r $1 || set /lib/libsys_s.a
  1085.       eval set \$$#
  1086.       ;;
  1087. ***************
  1088. *** 2000,2009 ****
  1089.   esac
  1090.   $rm -f libnames libpath
  1091.   
  1092.   : determine optimize, if desired, or use for debug flag also
  1093.   case "$optimize" in
  1094. ! ' ') dflt="none";;
  1095. ! '') dflt="-O";;
  1096.   *) dflt="$optimize";;
  1097.   esac
  1098.   $cat <<EOH
  1099. --- 2235,2382 ----
  1100.   esac
  1101.   $rm -f libnames libpath
  1102.   
  1103. + : see how we invoke the C preprocessor
  1104. + echo " "
  1105. + echo "Now, how can we feed standard input to your C preprocessor..." >&4
  1106. + cat <<'EOT' >testcpp.c
  1107. + #define ABC abc
  1108. + #define XYZ xyz
  1109. + ABC.XYZ
  1110. + EOT
  1111. + cd ..
  1112. + echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
  1113. + chmod 755 cppstdin
  1114. + wrapper=`pwd`/cppstdin
  1115. + ok='false'
  1116. + cd UU
  1117. + if $test "X$cppstdin" != "X" && \
  1118. +     $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
  1119. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
  1120. + then
  1121. +     echo "You used to use $cppstdin $cppminus so we'll use that again."
  1122. +     case "$cpprun" in
  1123. +     '') echo "But let's see if we can live without a wrapper..." ;;
  1124. +     *)
  1125. +         if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
  1126. +             $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
  1127. +         then
  1128. +             echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
  1129. +             ok='true'
  1130. +         else
  1131. +             echo "(However, $cpprun $cpplast does not work, let's see...)"
  1132. +         fi
  1133. +         ;;
  1134. +     esac
  1135. + else
  1136. +     case "$cppstdin" in
  1137. +     '') ;;
  1138. +     *)
  1139. +         echo "Good old $cppstdin $cppminus does not seem to be of any help..."
  1140. +         ;;
  1141. +     esac
  1142. + fi
  1143. + if $ok; then
  1144. +     : nothing
  1145. + elif echo 'Maybe "'"$cc"' -E" will work...'; \
  1146. +     $cc -E <testcpp.c >testcpp.out 2>&1; \
  1147. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1148. +     echo "Yup, it does."
  1149. +     x_cpp="$cc -E"
  1150. +     x_minus='';
  1151. + elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
  1152. +     $cc -E - <testcpp.c >testcpp.out 2>&1; \
  1153. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1154. +     echo "Yup, it does."
  1155. +     x_cpp="$cc -E"
  1156. +     x_minus='-';
  1157. + elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
  1158. +     $cc -P <testcpp.c >testcpp.out 2>&1; \
  1159. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1160. +     echo "Yipee, that works!"
  1161. +     x_cpp="$cc -P"
  1162. +     x_minus='';
  1163. + elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
  1164. +     $cc -P - <testcpp.c >testcpp.out 2>&1; \
  1165. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1166. +     echo "At long last!"
  1167. +     x_cpp="$cc -P"
  1168. +     x_minus='-';
  1169. + elif echo 'No such luck, maybe "'$cpp'" will work...'; \
  1170. +     $cpp <testcpp.c >testcpp.out 2>&1; \
  1171. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1172. +     echo "It works!"
  1173. +     x_cpp="$cpp"
  1174. +     x_minus='';
  1175. + elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
  1176. +     $cpp - <testcpp.c >testcpp.out 2>&1; \
  1177. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1178. +     echo "Hooray, it works!  I was beginning to wonder."
  1179. +     x_cpp="$cpp"
  1180. +     x_minus='-';
  1181. + elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
  1182. +     $wrapper <testcpp.c >testcpp.out 2>&1; \
  1183. +     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1184. +     x_cpp="$wrapper"
  1185. +     x_minus=''
  1186. +     echo "Eureka!"
  1187. + else
  1188. +     dflt=''
  1189. +     rp="No dice.  I can't find a C preprocessor.  Name one:"
  1190. +     . ./myread
  1191. +     x_cpp="$ans"
  1192. +     x_minus=''
  1193. +     $x_cpp <testcpp.c >testcpp.out 2>&1
  1194. +     if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1195. +         echo "OK, that will do." >&4
  1196. +     else
  1197. + echo "Sorry, I can't get that to work.  Go find one and rerun Configure." >&4
  1198. +         exit 1
  1199. +     fi
  1200. + fi
  1201. + case "$ok" in
  1202. + false)
  1203. +     cppstdin="$x_cpp"
  1204. +     cppminus="$x_minus"
  1205. +     cpprun="$x_cpp"
  1206. +     cpplast="$x_minus"
  1207. +     set X $x_cpp
  1208. +     shift
  1209. +     case "$1" in
  1210. +     "$cpp")
  1211. +         echo "Perhaps can we force $cc -E using a wrapper..."
  1212. +         if $wrapper <testcpp.c >testcpp.out 2>&1; \
  1213. +             $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
  1214. +         then
  1215. +             echo "Yup, we can."
  1216. +             cppstdin="$wrapper"
  1217. +             cppminus='';
  1218. +         else
  1219. +             echo "Nope, we'll have to live without it..."
  1220. +         fi
  1221. +         ;;
  1222. +     esac
  1223. +     case "$cpprun" in
  1224. +     "$wrapper")
  1225. +         cpprun=''
  1226. +         cpplast=''
  1227. +         ;;
  1228. +     esac
  1229. +     ;;
  1230. + esac
  1231. + case "$cppstdin" in
  1232. + "$wrapper") ;;
  1233. + *) $rm -f $wrapper;;
  1234. + esac
  1235. + $rm -f testcpp.c testcpp.out
  1236.   : determine optimize, if desired, or use for debug flag also
  1237.   case "$optimize" in
  1238. ! ' ') dflt='none';;
  1239. ! '') dflt='-O';;
  1240.   *) dflt="$optimize";;
  1241.   esac
  1242.   $cat <<EOH
  1243. ***************
  1244. *** 2022,2031 ****
  1245.   'none') optimize=" ";;
  1246.   esac
  1247.   
  1248.   case "$ccflags" in
  1249.   '')    case "$cc" in
  1250. !     *gcc*) dflt='-fpcc-struct-return';;
  1251. !     *) dflt='';;
  1252.       esac
  1253.       case "$optimize" in
  1254.       *-g*) dflt="$dflt -DDEBUG";;
  1255. --- 2395,2408 ----
  1256.   'none') optimize=" ";;
  1257.   esac
  1258.   
  1259. + dflt=''
  1260.   case "$ccflags" in
  1261.   '')    case "$cc" in
  1262. !     *gcc*)
  1263. !         if $test "$gccversion" = '1'; then
  1264. !             dflt='-fpcc-struct-return'
  1265. !         fi
  1266. !         ;;
  1267.       esac
  1268.       case "$optimize" in
  1269.       *-g*) dflt="$dflt -DDEBUG";;
  1270. ***************
  1271. *** 2039,2045 ****
  1272.           ;;
  1273.       esac
  1274.       ;;
  1275. - *) dflt="$ccflags" ;;
  1276.   esac
  1277.   
  1278.   case "$mips_type" in
  1279. --- 2416,2421 ----
  1280. ***************
  1281. *** 2083,2088 ****
  1282. --- 2459,2468 ----
  1283.   case "$dflt" in
  1284.   '') dflt=none;;
  1285.   esac
  1286. + case "$ccflags" in
  1287. + '') ;;
  1288. + *) dflt="$ccflags";;
  1289. + esac
  1290.   $cat <<EOH
  1291.   
  1292.   Your C compiler may want other flags.  For this question you should include
  1293. ***************
  1294. *** 2105,2111 ****
  1295.   : the following weeds options from ccflags that are of no interest to cpp
  1296.   cppflags="$ccflags"
  1297.   case "$cc" in
  1298. ! *gcc*) cppflags="$cppflags -D__GNUC__";;
  1299.   esac
  1300.   case "$mips_type" in
  1301.   '');;
  1302. --- 2485,2495 ----
  1303.   : the following weeds options from ccflags that are of no interest to cpp
  1304.   cppflags="$ccflags"
  1305.   case "$cc" in
  1306. ! *gcc*)
  1307. !     if $test "$gccversion" = "1"; then
  1308. !         cppflags="$cppflags -D__GNUC__"
  1309. !     fi
  1310. !     ;;
  1311.   esac
  1312.   case "$mips_type" in
  1313.   '');;
  1314. ***************
  1315. *** 2113,2129 ****
  1316.   esac
  1317.   case "$cppflags" in
  1318.   '');;
  1319. ! *)  set X $cppflags
  1320.       cppflags=''
  1321. !     for flag
  1322.       do
  1323. !         case $flag in
  1324. !         -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
  1325. !         esac
  1326.       done
  1327.       case "$cppflags" in
  1328. !     *-*)  echo "(C preprocessor flags: $cppflags)";;
  1329.       esac
  1330.       ;;
  1331.   esac
  1332.   
  1333. --- 2497,2540 ----
  1334.   esac
  1335.   case "$cppflags" in
  1336.   '');;
  1337. ! *)
  1338. !     echo " "
  1339. !     echo "Let me guess what the preprocessor flags are..." >&4
  1340. !     set X $cppflags
  1341. !     shift
  1342.       cppflags=''
  1343. !     $cat >cpp.c <<'EOM'
  1344. ! #define BLURFL foo
  1345. ! BLURFL xx LFRULB
  1346. ! EOM
  1347. !     previous=''
  1348. !     for flag in $*
  1349.       do
  1350. !         case "$flag" in
  1351. !         -*) ftry="$flag";;
  1352. !         *) ftry="$previous $flag";;
  1353. !         esac
  1354. !         if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
  1355. !             >cpp1.out 2>/dev/null && \
  1356. !             $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
  1357. !             >cpp2.out 2>/dev/null && \
  1358. !             $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
  1359. !             $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
  1360. !         then
  1361. !             cppflags="$cppflags $ftry"
  1362. !             previous=''
  1363. !         else
  1364. !             previous="$flag"
  1365. !         fi
  1366.       done
  1367. +     set X $cppflags
  1368. +     shift
  1369. +     cppflags=${1+"$@"}
  1370.       case "$cppflags" in
  1371. !     *-*)  echo "They appear to be: $cppflags";;
  1372.       esac
  1373. +     $rm -f cpp.c cpp?.out
  1374.       ;;
  1375.   esac
  1376.   
  1377. ***************
  1378. *** 2421,2428 ****
  1379.   : translate upper to lower if necessary
  1380.   case "$myhostname" in
  1381.   *[A-Z]*)
  1382. -     myhostname=`echo $myhostname | tr '[A-Z]' '[a-z]'`
  1383.       echo "(Normalizing case in your host name)"
  1384.       ;;
  1385.   esac
  1386.   
  1387. --- 2832,2839 ----
  1388.   : translate upper to lower if necessary
  1389.   case "$myhostname" in
  1390.   *[A-Z]*)
  1391.       echo "(Normalizing case in your host name)"
  1392. +     myhostname=`echo $myhostname | tr '[A-Z]' '[a-z]'`
  1393.       ;;
  1394.   esac
  1395.   
  1396. ***************
  1397. *** 2459,2465 ****
  1398.               $sed -n -e "s/$myhostname\.\([a-zA-Z_.]\)/\1/p"`
  1399.           case "$dflt" in
  1400.           .) echo "(You do not have fully-qualified names in /etc/hosts)"
  1401. !             dflt='.uucp';;
  1402.           esac
  1403.           $rm -f hosts
  1404.           ;;
  1405. --- 2870,2896 ----
  1406.               $sed -n -e "s/$myhostname\.\([a-zA-Z_.]\)/\1/p"`
  1407.           case "$dflt" in
  1408.           .) echo "(You do not have fully-qualified names in /etc/hosts)"
  1409. !             tans=`./loc resolv.conf X /etc /usr/etc`
  1410. !             if $test -f "$tans"; then
  1411. !                 echo "(Attempting domain name extraction from $tans)"
  1412. !                 dflt=.`egrep '^domain' $tans | $sed 's/domain[     ]*\(.*\)/\1/' \
  1413. !                     | tr '[A-Z]' '[a-z]' 2>/dev/null`
  1414. !             fi
  1415. !             ;;
  1416. !         esac
  1417. !         case "$dflt" in
  1418. !         .) echo "(No help from resolv.conf either -- attempting clever guess)"
  1419. !             dflt=.`sh -c domainname 2>/dev/null`
  1420. !             case "$dflt" in
  1421. !             '') dflt='.';;
  1422. !             .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
  1423. !             esac
  1424. !             ;;
  1425. !         esac
  1426. !         case "$dflt" in
  1427. !         .) echo "(Lost all hope -- silly guess then)"
  1428. !             dflt='.uucp'
  1429. !             ;;
  1430.           esac
  1431.           $rm -f hosts
  1432.           ;;
  1433. ***************
  1434. *** 2477,2487 ****
  1435.   esac
  1436.   mydomain="$tans"
  1437.   
  1438.   : a little sanity check here
  1439.   case "$phostname" in
  1440.   '') ;;
  1441.   *)
  1442. !     case `$phostname` in
  1443.       $myhostname$mydomain|$myhostname) ;;
  1444.       *)
  1445.           case "$phostname" in
  1446. --- 2908,2926 ----
  1447.   esac
  1448.   mydomain="$tans"
  1449.   
  1450. + : translate upper to lower if necessary
  1451. + case "$mydomain" in
  1452. + *[A-Z]*)
  1453. +     echo "(Normalizing case in your domain name)"
  1454. +     mydomain=`echo $mydomain | tr '[A-Z]' '[a-z]'`
  1455. +     ;;
  1456. + esac
  1457.   : a little sanity check here
  1458.   case "$phostname" in
  1459.   '') ;;
  1460.   *)
  1461. !     case `$phostname | tr '[A-Z]' '[a-z]'` in
  1462.       $myhostname$mydomain|$myhostname) ;;
  1463.       *)
  1464.           case "$phostname" in
  1465. ***************
  1466. *** 2613,2763 ****
  1467.   '') d_phostname="$undef";;
  1468.   esac
  1469.   
  1470. - : see how we invoke the C preprocessor
  1471. - echo " "
  1472. - echo "Now, how can we feed standard input to your C preprocessor..." >&4
  1473. - cat <<'EOT' >testcpp.c
  1474. - #define ABC abc
  1475. - #define XYZ xyz
  1476. - ABC.XYZ
  1477. - EOT
  1478. - cd ..
  1479. - echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
  1480. - chmod 755 cppstdin
  1481. - wrapper=`pwd`/cppstdin
  1482. - ok='false'
  1483. - cd UU
  1484. - if $test "X$cppstdin" != "X" && \
  1485. -     $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
  1486. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
  1487. - then
  1488. -     echo "You used to use $cppstdin $cppminus so we'll use that again."
  1489. -     case "$cpprun" in
  1490. -     '') echo "But let's see if we can live without a wrapper..." ;;
  1491. -     *)
  1492. -         if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
  1493. -             $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
  1494. -         then
  1495. -             echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
  1496. -             ok='true'
  1497. -         else
  1498. -             echo "(However, $cpprun $cpplast does not work, let's see...)"
  1499. -         fi
  1500. -         ;;
  1501. -     esac
  1502. - else
  1503. -     case "$cppstdin" in
  1504. -     '') ;;
  1505. -     *)
  1506. -         echo "Good old $cppstdin $cppminus does not seem to be of any help..."
  1507. -         ;;
  1508. -     esac
  1509. - fi
  1510. - if $ok; then
  1511. -     : nothing
  1512. - elif echo 'Maybe "'"$cc"' -E" will work...'; \
  1513. -     $cc -E <testcpp.c >testcpp.out 2>&1; \
  1514. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1515. -     echo "Yup, it does."
  1516. -     x_cpp="$cc -E"
  1517. -     x_minus='';
  1518. - elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
  1519. -     $cc -E - <testcpp.c >testcpp.out 2>&1; \
  1520. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1521. -     echo "Yup, it does."
  1522. -     x_cpp="$cc -E"
  1523. -     x_minus='-';
  1524. - elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
  1525. -     $cc -P <testcpp.c >testcpp.out 2>&1; \
  1526. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1527. -     echo "Yipee, that works!"
  1528. -     x_cpp="$cc -P"
  1529. -     x_minus='';
  1530. - elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
  1531. -     $cc -P - <testcpp.c >testcpp.out 2>&1; \
  1532. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1533. -     echo "At long last!"
  1534. -     x_cpp="$cc -P"
  1535. -     x_minus='-';
  1536. - elif echo 'No such luck, maybe "'$cpp'" will work...'; \
  1537. -     $cpp <testcpp.c >testcpp.out 2>&1; \
  1538. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1539. -     echo "It works!"
  1540. -     x_cpp="$cpp"
  1541. -     x_minus='';
  1542. - elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
  1543. -     $cpp - <testcpp.c >testcpp.out 2>&1; \
  1544. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1545. -     echo "Hooray, it works!  I was beginning to wonder."
  1546. -     x_cpp="$cpp"
  1547. -     x_minus='-';
  1548. - elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
  1549. -     $wrapper <testcpp.c >testcpp.out 2>&1; \
  1550. -     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1551. -     x_cpp="$wrapper"
  1552. -     x_minus=''
  1553. -     echo "Eureka!"
  1554. - else
  1555. -     dflt=''
  1556. -     rp="No dice.  I can't find a C preprocessor.  Name one:"
  1557. -     . ./myread
  1558. -     x_cpp="$ans"
  1559. -     x_minus=''
  1560. -     $x_cpp <testcpp.c >testcpp.out 2>&1
  1561. -     if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  1562. -         echo "OK, that will do." >&4
  1563. -     else
  1564. - echo "Sorry, I can't get that to work.  Go find one and rerun Configure." >&4
  1565. -         exit 1
  1566. -     fi
  1567. - fi
  1568. - case "$ok" in
  1569. - false)
  1570. -     cppstdin="$x_cpp"
  1571. -     cppminus="$x_minus"
  1572. -     cpprun="$x_cpp"
  1573. -     cpplast="$x_minus"
  1574. -     set X $x_cpp
  1575. -     shift
  1576. -     case "$1" in
  1577. -     "$cpp")
  1578. -         echo "Perhaps can we force $cc -E using a wrapper..."
  1579. -         if $wrapper <testcpp.c >testcpp.out 2>&1; \
  1580. -             $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
  1581. -         then
  1582. -             echo "Yup, we can."
  1583. -             cppstdin="$wrapper"
  1584. -             cppminus='';
  1585. -         else
  1586. -             echo "Nope, we'll have to live without it..."
  1587. -         fi
  1588. -         ;;
  1589. -     esac
  1590. -     case "$cpprun" in
  1591. -     "$wrapper")
  1592. -         cpprun=''
  1593. -         cpplast=''
  1594. -         ;;
  1595. -     esac
  1596. -     ;;
  1597. - esac
  1598. - case "$cppstdin" in
  1599. - "$wrapper") ;;
  1600. - *) $rm -f $wrapper;;
  1601. - esac
  1602. - $rm -f testcpp.c testcpp.out
  1603.   : determine filename position in cpp output
  1604.   echo " "
  1605.   echo "Computing filename position in cpp output for #include directives..." >&4
  1606.   echo '#include <stdio.h>' > foo.c
  1607.   $cat >fieldn <<EOF
  1608.   $startsh
  1609. ! $cppstdin $cppminus $cppflags <foo.c 2>/dev/null | \
  1610.   $grep '^[     ]*#.*stdio\.h' | \
  1611.   while read cline; do
  1612.       pos=1
  1613. --- 3052,3064 ----
  1614.   '') d_phostname="$undef";;
  1615.   esac
  1616.   
  1617.   : determine filename position in cpp output
  1618.   echo " "
  1619.   echo "Computing filename position in cpp output for #include directives..." >&4
  1620.   echo '#include <stdio.h>' > foo.c
  1621.   $cat >fieldn <<EOF
  1622.   $startsh
  1623. ! $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
  1624.   $grep '^[     ]*#.*stdio\.h' | \
  1625.   while read cline; do
  1626.       pos=1
  1627. ***************
  1628. *** 2939,2945 ****
  1629.   if set strerror val -f d_strerror; eval $csym; $val; then
  1630.       echo 'strerror() found.' >&4
  1631.       d_strerror="$define"
  1632. !     d_strerrm="$undef"
  1633.       if set sys_errlist val -a d_syserrlst; eval $csym; $val; then    
  1634.           echo "(You also have sys_errlist[], so we could roll our own strerror.)" 
  1635.           d_syserrlst="$define"
  1636. --- 3240,3246 ----
  1637.   if set strerror val -f d_strerror; eval $csym; $val; then
  1638.       echo 'strerror() found.' >&4
  1639.       d_strerror="$define"
  1640. !     d_strerrm='strerror(e)'
  1641.       if set sys_errlist val -a d_syserrlst; eval $csym; $val; then    
  1642.           echo "(You also have sys_errlist[], so we could roll our own strerror.)" 
  1643.           d_syserrlst="$define"
  1644. ***************
  1645. *** 2951,2957 ****
  1646.       $contains '#[     ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
  1647.       echo 'strerror() found in string header.' >&4
  1648.       d_strerror="$define"
  1649. !     d_strerrm="$undef"
  1650.       if set sys_errlist val -a d_syserrlst; eval $csym; $val; then    
  1651.           echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
  1652.           d_syserrlst="$define"
  1653. --- 3252,3258 ----
  1654.       $contains '#[     ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
  1655.       echo 'strerror() found in string header.' >&4
  1656.       d_strerror="$define"
  1657. !     d_strerrm='strerror(e)'
  1658.       if set sys_errlist val -a d_syserrlst; eval $csym; $val; then    
  1659.           echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
  1660.           d_syserrlst="$define"
  1661. ***************
  1662. *** 2963,2974 ****
  1663.   echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
  1664.       d_strerror="$undef"
  1665.       d_syserrlst="$define"
  1666. !     d_strerrm="$define"
  1667.   else
  1668.       echo 'strerror() and sys_errlist[] NOT found.' >&4
  1669.       d_strerror="$undef"
  1670.       d_syserrlst="$undef"
  1671. !     d_strerrm="$undef"
  1672.   fi
  1673.   if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
  1674.       echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
  1675. --- 3264,3275 ----
  1676.   echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
  1677.       d_strerror="$undef"
  1678.       d_syserrlst="$define"
  1679. !     d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
  1680.   else
  1681.       echo 'strerror() and sys_errlist[] NOT found.' >&4
  1682.       d_strerror="$undef"
  1683.       d_syserrlst="$undef"
  1684. !     d_strerrm='"unknown"'
  1685.   fi
  1686.   if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
  1687.       echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
  1688. ***************
  1689. *** 3022,3033 ****
  1690.       d_hvfork=''
  1691.   fi
  1692.   : see if there is a vfork
  1693. ! set vfork d_vfork
  1694.   eval $inlibc
  1695.   
  1696.   : get C preprocessor symbols handy
  1697.   echo " "
  1698. ! echo $attrlist | $tr ' ' '\012' >Cppsym.know
  1699.   $cat <<EOSS >Cppsym
  1700.   $startsh
  1701.   case "\$1" in
  1702. --- 3323,3362 ----
  1703.       d_hvfork=''
  1704.   fi
  1705.   : see if there is a vfork
  1706. ! val=''
  1707. ! set vfork val
  1708.   eval $inlibc
  1709.   
  1710. + : Ok, but do we want to use it. vfork is reportedly unreliable in 
  1711. + : perl on Solaris 2.x, and probably elsewhere.
  1712. + case "$val" in
  1713. + $define)
  1714. +     echo " "
  1715. +     case "$usevfork" in
  1716. +     true) dflt='y';;
  1717. +     *) dflt='n';;
  1718. +     esac
  1719. +     rp="Some systems have problems with vfork().  Do you want to use it?"
  1720. +     . ./myread
  1721. +     case "$ans" in
  1722. +     y|Y) ;;
  1723. +     *)
  1724. +         echo "Ok, we won't use vfork()."
  1725. +         val="$undef"
  1726. +         ;;
  1727. +     esac
  1728. +     ;;
  1729. + esac
  1730. + set d_vfork
  1731. + eval $setvar
  1732. + case "$d_vfork" in
  1733. + $define) usevfork='true';;
  1734. + *) usevfork='false';;
  1735. + esac
  1736.   : get C preprocessor symbols handy
  1737.   echo " "
  1738. ! echo $al | $tr ' ' '\012' >Cppsym.know
  1739.   $cat <<EOSS >Cppsym
  1740.   $startsh
  1741.   case "\$1" in
  1742. ***************
  1743. *** 3074,3080 ****
  1744.   chmod +x Cppsym
  1745.   $eunicefix Cppsym
  1746.   echo "Your C preprocessor defines the following symbols:"
  1747. ! Cppsym -l $attrlist >Cppsym.true
  1748.   $cat Cppsym.true
  1749.   
  1750.   : see if this is a termio system
  1751. --- 3403,3409 ----
  1752.   chmod +x Cppsym
  1753.   $eunicefix Cppsym
  1754.   echo "Your C preprocessor defines the following symbols:"
  1755. ! Cppsym -l $al >Cppsym.true
  1756.   $cat Cppsym.true
  1757.   
  1758.   : see if this is a termio system
  1759. ***************
  1760. *** 3132,3148 ****
  1761.   val=$val2; set i_sgtty; eval $setvar
  1762.   val=$val3; set i_termios; eval $setvar
  1763.   
  1764. ! : see if ioctl defs are in sgtty/termio or sys/ioctl
  1765.   echo " "
  1766.   if $test `./findhdr sys/ioctl.h`; then
  1767.       val="$define"
  1768. !     echo "<sys/ioctl.h> found." >&4
  1769.   else
  1770.       val="$undef"
  1771. !     $test $i_termio = "$define" && xxx="termio.h"
  1772. !     $test $i_termios = "$define" && xxx="termios.h"
  1773. !     $test $i_sgtty = "$define" && xxx="sgtty.h"
  1774.   echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
  1775.   fi
  1776.   set i_sysioctl
  1777.   eval $setvar
  1778. --- 3461,3513 ----
  1779.   val=$val2; set i_sgtty; eval $setvar
  1780.   val=$val3; set i_termios; eval $setvar
  1781.   
  1782. ! : define an alternate in-header-list? function
  1783. ! inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
  1784. ! cont=true; xxf="echo \"<\$1> found.\" >&4";
  1785. ! case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
  1786. ! *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
  1787. ! esac;
  1788. ! case $# in 4) instead=instead;; *) instead="at last";; esac;
  1789. ! while $test "$cont"; do
  1790. !     xxx=`./findhdr $1`
  1791. !     var=$2; eval "was=\$$2";
  1792. !     if $test "$xxx" && $test -r "$xxx";
  1793. !     then eval $xxf;
  1794. !         eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
  1795. !         cont="";
  1796. !     else eval $xxnf;
  1797. !         eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
  1798. !     set $yyy; shift; shift; yyy=$@;
  1799. !     case $# in 0) cont="";;
  1800. !     2) xxf="echo \"but I found <\$1> $instead.\" >&4";
  1801. !         xxnf="echo \"and I did not find <\$1> either.\" >&4";;
  1802. !     *) xxf="echo \"but I found <\$1\> instead.\" >&4";
  1803. !         xxnf="echo \"there is no <\$1>, ...\" >&4";;
  1804. !     esac;
  1805. ! done;
  1806. ! while $test "$yyy";
  1807. ! do set $yyy; var=$2; eval "was=\$$2";
  1808. !     eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
  1809. !     set $yyy; shift; shift; yyy=$@;
  1810. ! done'
  1811. ! : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
  1812. ! set sys/filio.h i_sysfilio
  1813. ! eval $inhdr
  1814.   echo " "
  1815.   if $test `./findhdr sys/ioctl.h`; then
  1816.       val="$define"
  1817. !     echo '<sys/ioctl.h> found.' >&4
  1818.   else
  1819.       val="$undef"
  1820. !     if $test $i_sysfilio = "$define"; then
  1821. !         echo '<sys/ioctl.h> NOT found.' >&4
  1822. !     else
  1823. !         $test $i_sgtty = "$define" && xxx="sgtty.h"
  1824. !         $test $i_termio = "$define" && xxx="termio.h"
  1825. !         $test $i_termios = "$define" && xxx="termios.h"
  1826.   echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
  1827. +     fi
  1828.   fi
  1829.   set i_sysioctl
  1830.   eval $setvar
  1831. ***************
  1832. *** 3522,3528 ****
  1833.       elif $test -f "$_smail"; then
  1834.           dflt="$_smail"
  1835.       elif $test -f "$_rmail"; then
  1836. !         dflt="$rmail"
  1837.       elif $test -f /bin/mail; then
  1838.           dflt=/bin/mail
  1839.       else
  1840. --- 3887,3893 ----
  1841.       elif $test -f "$_smail"; then
  1842.           dflt="$_smail"
  1843.       elif $test -f "$_rmail"; then
  1844. !         dflt="$_rmail"
  1845.       elif $test -f /bin/mail; then
  1846.           dflt=/bin/mail
  1847.       else
  1848. ***************
  1849. *** 3858,3864 ****
  1850.   main(int argc, char *argv[]) {
  1851.       exit(0);}
  1852.   EOCP
  1853. ! if $cc -c prototype.c >prototype.out 2>&1 ; then
  1854.       echo "Your C compiler appears to support function prototypes."
  1855.       val="$define"
  1856.   else
  1857. --- 4223,4229 ----
  1858.   main(int argc, char *argv[]) {
  1859.       exit(0);}
  1860.   EOCP
  1861. ! if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
  1862.       echo "Your C compiler appears to support function prototypes."
  1863.       val="$define"
  1864.   else
  1865. ***************
  1866. *** 3928,3941 ****
  1867.       '')
  1868.       echo "I can't determine whether signal handler returns void or int..." >&4
  1869.           dflt=void
  1870. !         rp="What type does your signal handler returns?"
  1871.           . ./myread
  1872. !         case "$ans" in
  1873. !         void) val="$define"; signal_t="void";;
  1874. !         *) val="$undef"; signal_t="int";;
  1875. !         esac;;
  1876.       *) echo "As you already told me, signal handler returns $signal_t." >&4;;
  1877.       esac
  1878.   fi
  1879.   set d_voidsig
  1880.   eval $setvar
  1881. --- 4293,4308 ----
  1882.       '')
  1883.       echo "I can't determine whether signal handler returns void or int..." >&4
  1884.           dflt=void
  1885. !         rp="What type does your signal handler return?"
  1886.           . ./myread
  1887. !         signal_t="$ans"
  1888. !         ;;
  1889.       *) echo "As you already told me, signal handler returns $signal_t." >&4;;
  1890.       esac
  1891. +     case "$signal_t" in
  1892. +     void) val="$define";;
  1893. +     *) val="$undef";;
  1894. +     esac
  1895.   fi
  1896.   set d_voidsig
  1897.   eval $setvar
  1898. ***************
  1899. *** 4015,4023 ****
  1900.   *)  dflt="$uidtype";;
  1901.   esac
  1902.   echo " "
  1903. ! rp="What type are user ids on this system declared as?"
  1904.   . ./myread
  1905. ! uidtype="$ans"
  1906.   
  1907.   : check for void type
  1908.   echo " "
  1909. --- 4382,4392 ----
  1910.   *)  dflt="$uidtype";;
  1911.   esac
  1912.   echo " "
  1913. ! rp="What is the type for user ids returned by getuid()?"
  1914.   . ./myread
  1915. ! val="$ans"
  1916. ! set uidtype
  1917. ! eval $setvar
  1918.   
  1919.   : check for void type
  1920.   echo " "
  1921. ***************
  1922. *** 4108,4143 ****
  1923.   voidflags="$ans"
  1924.   $rm -f try.* .out
  1925.   
  1926. - : define an alternate in-header-list? function
  1927. - inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
  1928. - cont=true; xxf="echo \"<\$1> found.\" >&4";
  1929. - case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
  1930. - *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
  1931. - esac;
  1932. - case $# in 4) instead=instead;; *) instead="at last";; esac;
  1933. - while $test "$cont"; do
  1934. -     xxx=`./findhdr $1`
  1935. -     var=$2; eval "was=\$$2";
  1936. -     if $test "$xxx" && $test -r "$xxx";
  1937. -     then eval $xxf;
  1938. -         eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
  1939. -         cont="";
  1940. -     else eval $xxnf;
  1941. -         eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
  1942. -     set $yyy; shift; shift; yyy=$@;
  1943. -     case $# in 0) cont="";;
  1944. -     2) xxf="echo \"but I found <\$1> $instead.\" >&4";
  1945. -         xxnf="echo \"and I did not find <\$1> either.\" >&4";;
  1946. -     *) xxf="echo \"but I found <\$1\> instead.\" >&4";
  1947. -         xxnf="echo \"there is no <\$1>, ...\" >&4";;
  1948. -     esac;
  1949. - done;
  1950. - while $test "$yyy";
  1951. - do set $yyy; var=$2; eval "was=\$$2";
  1952. -     eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
  1953. -     set $yyy; shift; shift; yyy=$@;
  1954. - done'
  1955.   : see if this is a sys/file.h system
  1956.   val=''
  1957.   set sys/file.h val
  1958. --- 4477,4482 ----
  1959. ***************
  1960. *** 4484,4490 ****
  1961.       case "$xxx" in
  1962.       bsd)
  1963.           cf_name=`$passcat | grep "^$cf_by:" | \
  1964. !             sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/'`
  1965.           ;;
  1966.       usg)
  1967.           cf_name=`$passcat | grep "^$cf_by:" | \
  1968. --- 4823,4830 ----
  1969.       case "$xxx" in
  1970.       bsd)
  1971.           cf_name=`$passcat | grep "^$cf_by:" | \
  1972. !             sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
  1973. !             -e 's/,.*//'`
  1974.           ;;
  1975.       usg)
  1976.           cf_name=`$passcat | grep "^$cf_by:" | \
  1977. ***************
  1978. *** 4633,4638 ****
  1979. --- 4973,4979 ----
  1980.   awk='$awk'
  1981.   bash='$bash'
  1982.   bison='$bison'
  1983. + byacc='$byacc'
  1984.   cat='$cat'
  1985.   chgrp='$chgrp'
  1986.   chmod='$chmod'
  1987. ***************
  1988. *** 4647,4652 ****
  1989. --- 4988,4994 ----
  1990.   egrep='$egrep'
  1991.   emacs='$emacs'
  1992.   expr='$expr'
  1993. + find='$find'
  1994.   flex='$flex'
  1995.   gcc='$gcc'
  1996.   grep='$grep'
  1997. ***************
  1998. *** 4713,4718 ****
  1999. --- 5055,5061 ----
  2000.   binexp='$binexp'
  2001.   installbin='$installbin'
  2002.   cc='$cc'
  2003. + gccversion='$gccversion'
  2004.   ccflags='$ccflags'
  2005.   cppflags='$cppflags'
  2006.   ldflags='$ldflags'
  2007. ***************
  2008. *** 4752,4757 ****
  2009. --- 5095,5101 ----
  2010.   d_uwait3='$d_uwait3'
  2011.   d_uwait='$d_uwait'
  2012.   d_vfork='$d_vfork'
  2013. + usevfork='$usevfork'
  2014.   d_voidsig='$d_voidsig'
  2015.   signal_t='$signal_t'
  2016.   h_fcntl='$h_fcntl'
  2017. ***************
  2018. *** 4762,4767 ****
  2019. --- 5106,5112 ----
  2020.   i_sysfile='$i_sysfile'
  2021.   d_voidtty='$d_voidtty'
  2022.   i_bsdioctl='$i_bsdioctl'
  2023. + i_sysfilio='$i_sysfilio'
  2024.   i_sysioctl='$i_sysioctl'
  2025.   i_syssockio='$i_syssockio'
  2026.   i_syswait='$i_syswait'
  2027. ***************
  2028. *** 4774,4779 ****
  2029. --- 5119,5125 ----
  2030.   timeincl='$timeincl'
  2031.   intsize='$intsize'
  2032.   libc='$libc'
  2033. + glibpth='$glibpth'
  2034.   libpth='$libpth'
  2035.   plibpth='$plibpth'
  2036.   xlibpth='$xlibpth'
  2037. ***************
  2038. *** 4839,4844 ****
  2039. --- 5185,5191 ----
  2040.   installscript='$installscript'
  2041.   scriptdir='$scriptdir'
  2042.   scriptdirexp='$scriptdirexp'
  2043. + so='$so'
  2044.   sharpbang='$sharpbang'
  2045.   shsharp='$shsharp'
  2046.   spitshell='$spitshell'
  2047. ***************
  2048. *** 4951,4954 ****
  2049. --- 5298,5303 ----
  2050.   
  2051.   $rm -f kit*isdone ark*isdone
  2052.   $rm -rf UU
  2053.   : End of Configure
  2054.  
  2055. *** End of Patch 8 ***
  2056.  
  2057. exit 0 # Just in case...
  2058.