home *** CD-ROM | disk | FTP | other *** search
- From: Raphael Manfredi <ram@acri.fr>
- Newsgroups: comp.sources.misc
- Subject: v43i125: mailagent - Flexible mail filtering and processing package, v3.0, Patch08
- Date: 24 Jul 1994 19:40:44 -0500
- Organization: Advanced Computer Research Institute, Lyon, France
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <30v1mc$i1r@sparky.sterling.com>
- X-Md4-Signature: 2e9d8297eb8d2b6fd83c5f15be52c1f0
-
- Submitted-by: Raphael Manfredi <ram@acri.fr>
- Posting-number: Volume 43, Issue 125
- Archive-name: mailagent/patch08
- Environment: UNIX, Perl
- Patch-To: mailagent: Volume 41, Issue 1-26
-
- [The latest patch for mailagent version 3.0 is #11.]
-
- System: mailagent version 3.0
- Patch #: 8
- Priority: LOW
- Subject: regenerated Configure with newer metaconfig
- Subject: new contribution from Khalid Sattar <khalid@harlequin.co.uk>
- Subject: emphasize that perl 5.0 will not work
- Subject: eleven new config variables for better tuning
- Subject: now honours the queuewait config variable when present
- Subject: now honours the lockhold config variable if present
- Subject: metaconfig now defines Strerror instead of strerror
- Subject: new routine get_confval to get integer config variables
- Subject: fixed leading From date format (spacing problem)
- Subject: documents new eleven configuration variables
- Subject: sub-section on timeouts has been expanded
- Subject: emphasize .forward optimization danger with sendmail
- Subject: new UMASK command
- Subject: now uses lockmax and lockdelay config variables
- Subject: timeout for RUN commands now defined by runmax config variable
- Subject: now systematically escape leading From if fromall is ON
- Subject: general umask is now reset before analyzing a message
- Subject: added support for the UMASK command for local rule scope
- Subject: now parses the new tome config variable for vacation messages
- Subject: disable vacation message if Illegal-Object or Illegal-Field header
- Subject: now honours new lockhold config variable for lock breaking
- Subject: cannot dataload exit
- Subject: now honours new queuehold and queuelost config variables
- Subject: default mode is now 0777, relies on umask for proper setting
- Subject: allow macro substitution on patterns if rulemac is ON
- Subject: now honours new queuehold config variable
- Subject: set proper default values for new optional config variables
- Subject: created
- Subject: added exit status test for PERL command
- Subject: added new test for vacation message with tome config variable
- Subject: new set of tests for the new UMASK command
- Subject: added tests for new fromall config option
- Subject: added test for correct exit status propagation
- Subject: added check for no vacation when Illegal-Object or Illegal-Field
- Subject: make sure the new tome config variable is honored
- Subject: the cp_mail routine is now located in mail.pl
- Subject: now uses the cp_mail routine to copy mail
- Subject: fixed RCS leading comment string
- Subject: now defines the cp_mail routine
- Subject: the replace_header routine can now supersede header lines
- Subject: added test rules for macro substitution in patterns
- Subject: new metaconfig now uses Strerror instead of strerror
- Subject: three new files
- Date: Fri Jul 01 17:16:37 MET DST 1994
- From: Raphael Manfredi <ram@acri.fr>
-
- Description:
- This patch finally implements all the clean-up suggestions that
- have been sent to me directly or discussed in the agent-users list.
-
- Mainly, there is a new UMASK command, and macro substitution is
- now possible in rule patterns. It is also possible to escape all
- the From lines in a message, regardless of whether or not mailagent
- thinks they could be dangerous. Finally, the locking scheme is now
- configurable.
-
- Regenerated Configure with newer metaconfig. No real need, that just
- helps me find out bugs in dist-3.0 ;-)
-
- New contribution from Khalid Sattar <khalid@harlequin.co.uk>.
-
- README now emphasize that perl 5.0 will not work, merely due to
- perload which does not work. Perl 5.0 also has trouble understanding
- \U\l in replace patterns... (alpha 10).
-
- Eleven new config variables for better tuning:
- umask
- fromall
- lockmax
- lockdelay
- lockhold
- queuewait
- queuehold
- queuelost
- runmax
- tome
- rulemac
- Please refer to the manual page for more information.
-
- metaconfig now defines Strerror instead of strerror.
-
- New routine get_confval to get integer config variables in filter.
-
- Fixed leading From date format (spacing problem). The date
- now has a leading '0' if it's before 9 O'clock.
-
- Sub-section on timeouts has been expanded in the manual page.
- Also, it now emphasizes on .forward optimization danger with
- sendmail.
-
- New UMASK command for umask setting. This can be achieved globally
- or locally in the scope of a rule.
-
- Now uses lockmax and lockdelay config variables to lock files
- and the new lockhold config variable for lock breaking
-
- Timeout for RUN commands now defined by runmax config variable.
-
- Now systematically escape leading From if fromall is ON
-
- General umask is now reset before analyzing a message.
-
- Now parses the new tome config variable for vacation messages to
- see whether any mail alias has been defined there and if, by
- extraordinary, the message was not sent to one of these aliases...
-
- Disable vacation message if Illegal-Object or Illegal-Field header.
-
- Cannot dataload exit or PERL cannot report a proper exit status
- when &exit is called from a perl escape script.
-
- Default directory creation mode is now 0777, &makedir relies on
- umask for proper permission setting.
-
- Allow macro substitution on patterns if rulemac is ON.
-
- Set proper default values for new optional config variables.
-
- Added new test for vacation message with tome config variable.
- New set of tests for the new UMASK command
- Added tests for new fromall config option
- Added test for correct exit status propagation in PERL command.
- Added check for no vacation when Illegal-Object or Illegal-Field.
- Make sure the new tome config variable is honored in vacation.
- Added test rules for macro substitution in patterns
-
- Regression test suite fix-up:
- the cp_mail routine is now located in mail.pl
- now uses the cp_mail routine to copy mail
- fixed RCS leading comment string
- now defines the cp_mail routine
- the replace_header routine can now supersede header lines
-
- Three new files.
-
- Fix: From rn, say "| patch -p -N -d DIR", where DIR is your mailagent source
- directory. Outside of rn, say "cd DIR; patch -p -N <thisarticle".
- If you don't have the patch program, apply the following by hand,
- or get patch (version 2.0, latest patchlevel).
-
- After patching:
- *** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #11 FIRST ***
-
- If patch indicates that patchlevel is the wrong version, you may need
- to apply one or more previous patches, or the patch may already
- have been applied. See the patchlevel.h file to find out what has or
- has not been applied. In any event, don't continue with the patch.
-
- If you are missing previous patches they can be obtained from me:
-
- Raphael Manfredi <ram@acri.fr>
-
- If you send a mail message of the following form it will greatly speed
- processing:
-
- Subject: Command
- @SH mailpatch PATH mailagent 3.0 LIST
- ^ note the c
-
- where PATH is a return path FROM ME TO YOU either in Internet notation,
- or in bang notation from some well-known host, and LIST is the number
- of one or more patches you need, separated by spaces, commas, and/or
- hyphens. Saying 35- says everything from 35 to the end.
-
- To get some more detailed instructions, send me the following mail:
-
- Subject: Command
- @SH mailhelp PATH
-
-
- Index: patchlevel.h
- Prereq: 7
- 4c4
- < #define PATCHLEVEL 7
- ---
- > #define PATCHLEVEL 8
-
- Index: Configure
- Prereq: 3.0.1.3
- *** Configure.old Fri Jul 1 17:15:54 1994
- --- Configure Fri Jul 1 17:15:58 1994
- ***************
- *** 18,26 ****
- # archive site. Check with Archie if you don't know where that can be.)
- #
-
- ! # $Id: Configure,v 3.0.1.3 1994/01/26 09:24:20 ram Exp $
- #
- ! # Generated on Mon Jan 24 17:53:52 MET 1994 [metaconfig 3.0 PL22]
-
- cat >/tmp/c1$$ <<EOF
- ARGGGHHHH!!!!!
- --- 18,26 ----
- # archive site. Check with Archie if you don't know where that can be.)
- #
-
- ! # $Id: Configure,v 3.0.1.4 1994/07/01 14:50:29 ram Exp $
- #
- ! # Generated on Fri Jul 01 16:47:56 MET DST 1994 [metaconfig 3.0 PL31]
-
- cat >/tmp/c1$$ <<EOF
- ARGGGHHHH!!!!!
- ***************
- *** 46,51 ****
- --- 46,60 ----
- (exit $?0) || exec sh $0 $argv:q
- rm -f /tmp/c1$$ /tmp/c2$$
-
- + : compute my invocation name
- + me=$0
- + case "$0" in
- + */*)
- + me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
- + test "$me" || me=$0
- + ;;
- + esac
- +
- : Sanity checks
- PATH=".:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin"
- PATH=$PATH:'/usr/5bin:/etc:/usr/gnu/bin:/usr/new:/usr/new/bin:/usr/nbin'
- ***************
- *** 56,62 ****
- export PATH
-
- if test ! -t 0; then
- ! echo "Say 'sh Configure', not 'sh <Configure'"
- exit 1
- fi
-
- --- 65,71 ----
- export PATH
-
- if test ! -t 0; then
- ! echo "Say 'sh $me', not 'sh <$me'"
- exit 1
- fi
-
- ***************
- *** 73,80 ****
- else
- : Warn them if they use ksh on other systems
- (PATH=.; alias -x) >/dev/null 2>&1 && \
- ! cat <<'EOM'
- ! (I see you are using the Korn shell. Some ksh's blow up on Configure,
- especially on exotic machines. If yours does, try the Bourne shell instead.)
- EOM
- fi
- --- 82,89 ----
- else
- : Warn them if they use ksh on other systems
- (PATH=.; alias -x) >/dev/null 2>&1 && \
- ! cat <<EOM
- ! (I see you are using the Korn shell. Some ksh's blow up on $me,
- especially on exotic machines. If yours does, try the Bourne shell instead.)
- EOM
- fi
- ***************
- *** 91,96 ****
- --- 100,106 ----
- awk=''
- bash=''
- bison=''
- + byacc=''
- cat=''
- chgrp=''
- chmod=''
- ***************
- *** 105,110 ****
- --- 115,121 ----
- egrep=''
- emacs=''
- expr=''
- + find=''
- flex=''
- gcc=''
- grep=''
- ***************
- *** 171,176 ****
- --- 182,188 ----
- binexp=''
- installbin=''
- cc=''
- + gccversion=''
- ccflags=''
- cppflags=''
- ldflags=''
- ***************
- *** 210,215 ****
- --- 222,228 ----
- d_uwait3=''
- d_uwait=''
- d_vfork=''
- + usevfork=''
- d_voidsig=''
- signal_t=''
- h_fcntl=''
- ***************
- *** 220,225 ****
- --- 233,239 ----
- i_sysfile=''
- d_voidtty=''
- i_bsdioctl=''
- + i_sysfilio=''
- i_sysioctl=''
- i_syssockio=''
- i_syswait=''
- ***************
- *** 232,237 ****
- --- 246,252 ----
- timeincl=''
- intsize=''
- libc=''
- + glibpth=''
- libpth=''
- plibpth=''
- xlibpth=''
- ***************
- *** 297,302 ****
- --- 312,318 ----
- installscript=''
- scriptdir=''
- scriptdirexp=''
- + so=''
- sharpbang=''
- shsharp=''
- spitshell=''
- ***************
- *** 355,361 ****
- : produce awk script to parse command line options
- cat >options.awk <<'EOF'
- BEGIN {
- ! optstr = "deEf:hrsSV"; # getopt-style specification
-
- len = length(optstr);
- for (i = 1; i <= len; i++) {
- --- 371,377 ----
- : produce awk script to parse command line options
- cat >options.awk <<'EOF'
- BEGIN {
- ! optstr = "deEf:hrsSD:U:V"; # getopt-style specification
-
- len = length(optstr);
- for (i = 1; i <= len; i++) {
- ***************
- *** 412,417 ****
- --- 428,434 ----
- error=''
- silent=''
- extractsh=''
- + optdef='optdef.sh'
-
- : option parsing
- while test $# -gt 0; do
- ***************
- *** 424,430 ****
- if test -r "$1"; then
- config_sh="$1"
- else
- ! echo "Configure: cannot read config file $1." >&2
- error=true
- fi
- cd UU
- --- 441,447 ----
- if test -r "$1"; then
- config_sh="$1"
- else
- ! echo "$me: cannot read config file $1." >&2
- error=true
- fi
- cd UU
- ***************
- *** 434,443 ****
- -s) shift; silent=true;;
- -E) shift; alldone=exit;;
- -S) shift; extractsh=true;;
- ! -V) echo "Configure generated by metaconfig 3.0 PL22." >&2
- exit 0;;
- --) break;;
- ! -*) echo "Configure: unknown option $1" >&2; shift; error=true;;
- *) break;;
- esac
- done
- --- 451,484 ----
- -s) shift; silent=true;;
- -E) shift; alldone=exit;;
- -S) shift; extractsh=true;;
- ! -D)
- ! shift
- ! case "$1" in
- ! *=)
- ! echo "$me: use '-U symbol=', not '-D symbol='." >&2
- ! echo "$me: ignoring -D $1" >&2
- ! ;;
- ! *=*) echo "$1" >> $optdef;;
- ! *) echo "$1='define'" >> $optdef;;
- ! esac
- ! shift
- ! ;;
- ! -U)
- ! shift
- ! case "$1" in
- ! *=) echo "$1" >> $optdef;;
- ! *=*)
- ! echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
- ! echo "$me: ignoring -U $1" >&2
- ! ;;
- ! *) echo "$1='undef'" >> $optdef;;
- ! esac
- ! shift
- ! ;;
- ! -V) echo "$me generated by metaconfig 3.0 PL31." >&2
- exit 0;;
- --) break;;
- ! -*) echo "$me: unknown option $1" >&2; shift; error=true;;
- *) break;;
- esac
- done
- ***************
- *** 445,459 ****
- case "$error" in
- true)
- cat >&2 <<EOM
- ! Usage: Configure [-dehrESV] [-f config.sh]
- -d : use defaults for all answers.
- -e : go on without questioning past the production of config.sh.
- -f : specify an alternate default configuration file.
- -h : print this help message and exit (with an error status).
- -r : reuse C symbols value if possible (skips costly nm extraction).
- -s : silent mode, only echoes questions and essential information.
- -E : stop at the end of questions, after having produced config.sh.
- -S : perform variable substitutions on all .SH files (can mix with -f)
- -V : print version number and exit (with a zero status).
- EOM
- exit 1
- --- 486,507 ----
- case "$error" in
- true)
- cat >&2 <<EOM
- ! Usage: $me [-dehrESV] [-f config.sh] [-D symbol] [-D symbol=value]
- ! [-U symbol] [-U symbol=]
- -d : use defaults for all answers.
- -e : go on without questioning past the production of config.sh.
- -f : specify an alternate default configuration file.
- -h : print this help message and exit (with an error status).
- -r : reuse C symbols value if possible (skips costly nm extraction).
- -s : silent mode, only echoes questions and essential information.
- + -D : define symbol to have some value:
- + -D symbol symbol gets the value 'define'
- + -D symbol=value symbol gets the value 'value'
- -E : stop at the end of questions, after having produced config.sh.
- -S : perform variable substitutions on all .SH files (can mix with -f)
- + -U : undefine symbol:
- + -U symbol symbol gets the value 'undef'
- + -U symbol= symbol gets completely empty
- -V : print version number and exit (with a zero status).
- EOM
- exit 1
- ***************
- *** 465,470 ****
- --- 513,523 ----
- true) exec 1>/dev/null;;
- esac
-
- + : run the defines and the undefines, if any
- + touch $optdef
- + . ./$optdef
- + rm -f $optdef
- +
- case "$extractsh" in
- true)
- case "$config_sh" in
- ***************
- *** 509,527 ****
- fi
-
- : list of known cpp symbols
- ! attrlist="__alpha __bsdi__ BSD_NET2 DGUX M_I186 M_I286 M_I386"
- ! attrlist="$attrlist M_I8086 M_XENIX UTS __DGUX__"
- ! attrlist="$attrlist _AIX __STDC__ __m88k__ ansi bsd4_2 gcos gimpel"
- ! attrlist="$attrlist hp9000s300 hp9000s400 hp9000s500 hp9000s700"
- ! attrlist="$attrlist hp9000s800 hpux"
- ! attrlist="$attrlist i186 i386 i486 i8086 iAPX286 ibm interdata"
- ! attrlist="$attrlist m88k mc300 mc500 mc68000 mc68k mc700 mert"
- ! attrlist="$attrlist mips NeXT ns16000 ns32000 nsc32000 os"
- ! attrlist="$attrlist __osf__ pdp11 posix"
- ! attrlist="$attrlist pyr sinix sony sparc sun tower tower32 tower32_600"
- ! attrlist="$attrlist tower32_800 tss u3b2 u3b20 u3b200 u3b5 ultrix unix"
- ! attrlist="$attrlist __unix__ vax venix xenix z8000"
-
- : no include file wanted by default
- inclwanted=''
-
- --- 562,627 ----
- fi
-
- : list of known cpp symbols
- ! al="AMIX BIT_MSF BSD BSD4_3 BSD_NET2 CRAY DGUX DOLPHIN DPX2"
- ! al="$al GO32 HP700 I386 I80960 I960 Lynx M68000 M68K MACH"
- ! al="$al MIPSEB MIPSEL MSDOS MTXINU MVS"
- ! al="$al M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM"
- ! al="$al M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX"
- ! al="$al NeXT OCS88 OSF1 PARISC PC532 PORTAR POSIX"
- ! al="$al PWB R3000 SVR3 SVR4"
- ! al="$al SYSTYPE_BSD SYSTYPE_SVR4 SYSTYPE_SYSV"
- ! al="$al UTEK UTS UTek UnicomPBB UnicomPBD Utek VMS"
- ! al="$al _AIX _AIX32 _AM29000 _COFF _CRAY _EPI _IBMR2"
- ! al="$al _MIPSEB _MIPSEL _M_COFF _M_I86 _M_I86SM _M_SYS3"
- ! al="$al _M_SYS5 _M_SYSIII _M_SYSV _M_UNIX _M_XENIX _R3000"
- ! al="$al _SYSTYPE_BSD _SYSTYPE_BSD43 _SYSTYPE_SVR4"
- ! al="$al _SYSTYPE_SYSV _SYSV3 _UNICOS"
- ! al="$al __386BSD__ __BIG_ENDIAN __BIG_ENDIAN__ __BSD_4_4__"
- ! al="$al __DGUX__ __DPX2__ __H3050R __H3050RX"
- ! al="$al __LITTLE_ENDIAN __LITTLE_ENDIAN__ __MACH__"
- ! al="$al __MIPSEB __MIPSEB__ __MIPSEL __MIPSEL__"
- ! al="$al __Next__ __OSF1__ __PARAGON__ __PWB __STDC__"
- ! al="$al ____386BSD____ __alpha __alpha__ __amiga"
- ! al="$al __bsd4_2 __bsd4_2__ __bsdi__ __convex__"
- ! al="$al __host_mips__"
- ! al="$al __hp9000s200 __hp9000s300 __hp9000s400 __hp9000s500"
- ! al="$al __hp9000s500 __hp9000s700 __hp9000s800"
- ! al="$al __hppa __hpux __i286 __i286__ __i386 __i386__"
- ! al="$al __i486 __i486__ __i860 __i860__"
- ! al="$al __m68k __m68k__ __m88100__ __m88k __m88k__"
- ! al="$al __mc68000 __mc68000__ __mc68020 __mc68020__"
- ! al="$al __mc68030 __mc68030__ __mc68040 __mc68040__"
- ! al="$al __mc88100 __mc88100__ __mips __mips__"
- ! al="$al __motorola__ __osf__ __pa_risc __sparc__ __stdc__"
- ! al="$al __sun __sun__ __svr3__ __svr4__ __ultrix __ultrix__"
- ! al="$al __unix __unix__ __vax __vax__"
- ! al="$al _host_mips _mips _unix"
- ! al="$al a29k aegis alliant am29000 amiga ansi"
- ! al="$al bsd bsd43 bsd4_2 bsd4_3 bsd4_4 bull"
- ! al="$al convex cray ctix encore gcos gimpel"
- ! al="$al hcx host_mips hp200 hp300 hp700 hp800"
- ! al="$al hp9000 hp9000s300 hp9000s400 hp9000s500"
- ! al="$al hp9000s700 hp9000s800 hp9k8 hpux"
- ! al="$al i186 i286 i386 i486 i8086"
- ! al="$al i80960 i860 iAPX286 ibm interdata is68k"
- ! al="$al linux luna luna88k m68k m88100 m88k"
- ! al="$al mc300 mc500 mc68000 mc68010 mc68020 mc68030"
- ! al="$al mc68040 mc68060 mc68k mc68k32 mc700"
- ! al="$al mc88000 mc88100 merlin mert mips mvs n16"
- ! al="$al ncl_el ncl_mr"
- ! al="$al news1500 news1700 news1800 news1900 news3700"
- ! al="$al news700 news800 news900 ns16000 ns32000"
- ! al="$al ns32016 ns32332 ns32k nsc32000 os osf"
- ! al="$al parisc pc532 pdp11 plexus posix pyr"
- ! al="$al riscix riscos sequent sgi sinix sony sony_news"
- ! al="$al sonyrisc sparc sparclite spectrum stratos"
- ! al="$al sun sun3 sun386 svr4 sysV68 sysV88"
- ! al="$al tower tower32 tower32_200 tower32_600 tower32_700"
- ! al="$al tower32_800 tower32_850 tss u3b u3b2 u3b20 u3b200"
- ! al="$al u3b5 ultrix unix unixpc unos vax venix vms"
- ! al="$al xenix z8000"
-
- + gccversion='1'
- : no include file wanted by default
- inclwanted=''
-
- ***************
- *** 531,545 ****
- xlibpth='/usr/lib/386 /lib/386'
-
- : general looking path for locating libraries
- ! libpth='/usr/lib/large /lib '$xlibpth' /lib/large'
- ! libpth=$libpth' /usr/lib/small /lib/small'
-
- ! : no additional library wanted by default
- libswanted=''
- -
- : full support for void wanted by default
- defvoidused=15
-
-
- : Some greps do not return status, grrr.
- echo "grimblepritz" >grimble
- --- 631,651 ----
- xlibpth='/usr/lib/386 /lib/386'
-
- : general looking path for locating libraries
- ! glibpth="/usr/lib/large /lib /usr/lib $xlibpth /lib/large"
- ! glibpth="$glibpth /usr/lib/small /lib/small"
- ! glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib /usr/shlib"
- !
- ! : Private path used by Configure to find libraries. Its value
- ! : is prepended to libpth. This variable takes care of special
- ! : machines, like the mips. Usually, it should be empty.
- ! plibpth=''
-
- ! : default library list
- libswanted=''
- : full support for void wanted by default
- defvoidused=15
-
- + libswanted=''
-
- : Some greps do not return status, grrr.
- echo "grimblepritz" >grimble
- ***************
- *** 1076,1082 ****
-
- : who configured the system
- cf_time=`$date 2>&1`
- ! cf_by=`( (logname) 2>/dev/null || whoami) 2>&1`
-
- : decide how portable to be
- case "$d_portable" in
- --- 1182,1192 ----
-
- : who configured the system
- cf_time=`$date 2>&1`
- ! (logname > .temp) >/dev/null 2>&1
- ! $test -s .temp || (whoami > .temp) >/dev/null 2>&1
- ! $test -s .temp || echo unknown > .temp
- ! cf_by=`$cat .temp`
- ! $rm -f .temp
-
- : decide how portable to be
- case "$d_portable" in
- ***************
- *** 1118,1124 ****
- ~*)
- if $test -f /bin/csh; then
- /bin/csh -f -c "glob \$1"
- ! failed=$?
- echo ""
- exit \$failed
- else
- --- 1228,1234 ----
- ~*)
- if $test -f /bin/csh; then
- /bin/csh -f -c "glob \$1"
- ! failed=\$?
- echo ""
- exit \$failed
- else
- ***************
- *** 1155,1164 ****
- --- 1265,1282 ----
- skip=''
- none_ok=''
- exp_file=''
- + nopath_ok=''
- orig_rp="$rp"
- orig_dflt="$dflt"
-
- case "$fn" in
- + *:*)
- + loc_file=`expr $fn : '.*:\(.*\)'`
- + fn=`expr $fn : '\(.*\):.*'`
- + ;;
- + esac
- +
- + case "$fn" in
- *~*) tilde=true;;
- esac
- case "$fn" in
- ***************
- *** 1173,1183 ****
- case "$fn" in
- *e*) exp_file=true;;
- esac
-
- case "$fn" in
- *f*) type='File';;
- *d*) type='Directory';;
- ! *l*) type='Locate'; fn=`expr $fn : '.*:\(.*\)'`;;
- esac
-
- what="$type"
- --- 1291,1304 ----
- case "$fn" in
- *e*) exp_file=true;;
- esac
- + case "$fn" in
- + *p*) nopath_ok=true;;
- + esac
-
- case "$fn" in
- *f*) type='File';;
- *d*) type='Directory';;
- ! *l*) type='Locate';;
- esac
-
- what="$type"
- ***************
- *** 1274,1285 ****
- ;;
- Locate)
- if test -d "$value"; then
- ! echo "(Looking for $fn in directory $value.)"
- ! value="$value/$fn"
- fi
- if test -f "$value"; then
- type=''
- fi
- ;;
- esac
-
- --- 1395,1415 ----
- ;;
- Locate)
- if test -d "$value"; then
- ! echo "(Looking for $loc_file in directory $value.)"
- ! value="$value/$loc_file"
- fi
- if test -f "$value"; then
- type=''
- fi
- + case "$nopath_ok" in
- + true) case "$value" in
- + */*) ;;
- + *) echo "Assuming $value will be in people's path."
- + type=''
- + ;;
- + esac
- + ;;
- + esac
- ;;
- esac
-
- ***************
- *** 1319,1331 ****
- echo " "
- case "$sysman" in
- '')
- ! syspath='/usr/man/man1 /usr/man/man1 /usr/man/mann'
- ! syspath="$syspath /usr/man/manl /usr/man/local/man1"
- syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
- syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
- ! syspath="$syspath /usr/man/man.L /local/man/man1"
- ! sysman=`./loc . $syspath`
- ;;
- esac
- if $test -d "$sysman"; then
- --- 1449,1460 ----
- echo " "
- case "$sysman" in
- '')
- ! syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
- syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
- syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
- ! syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
- ! sysman=`./loc . /usr/man/man1 $syspath`
- ;;
- esac
- if $test -d "$sysman"; then
- ***************
- *** 1600,1615 ****
- cc="$ans"
- fi
- case "$cc" in
- ! gcc*) cpp=`./loc gcc-cpp $cpp $pth`;;
- esac
-
- : What should the include directory be ?
- echo " "
- $echo $n "Hmm... $c"
- ! case "$usrinc" in
- ! '') dflt='/usr/include';;
- ! *) dflt=$usrinc;;
- ! esac
- incpath=''
- mips_type=''
- if $test -f /bin/mips && /bin/mips; then
- --- 1729,1777 ----
- cc="$ans"
- fi
- case "$cc" in
- ! gcc*)
- ! echo "Checking out which version of gcc you have..." >&4
- ! $cat >gccvers.c <<EOM
- ! #include <stdio.h>
- ! int main()
- ! {
- ! char *v;
- ! v = "unknown";
- ! #ifdef __GNUC__
- ! #ifdef __VERSION__
- ! v = __VERSION__;
- ! #endif
- ! #endif
- ! switch((int) v[0]) {
- ! case '1': printf("1\n"); break;
- ! case '2': printf("2\n"); break;
- ! case '3': printf("3\n"); break;
- ! default: break;
- ! }
- ! #ifdef __GNUC__
- ! return 0;
- ! #else
- ! return 1;
- ! #endif
- ! }
- ! EOM
- ! if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
- ! gccversion=`./gccvers`
- ! echo "You appear to have version $gccversion."
- ! else
- ! echo "Doesn't appear to be GNU cc after all."
- ! fi
- ! $rm -f gccvers*
- ! if $test "$gccversion" = '1'; then
- ! cpp=`./loc gcc-cpp $cpp $pth`
- ! fi
- ! ;;
- esac
-
- : What should the include directory be ?
- echo " "
- $echo $n "Hmm... $c"
- ! dflt='/usr/include'
- incpath=''
- mips_type=''
- if $test -f /bin/mips && /bin/mips; then
- ***************
- *** 1635,1640 ****
- --- 1797,1806 ----
- $eunicefix mips
- fi
- echo " "
- + case "$usrinc" in
- + '') ;;
- + *) dflt="$usrinc";;
- + esac
- fn=d/
- rp='Where are the include files you want to use?'
- . ./getfile
- ***************
- *** 1644,1654 ****
- case "$plibpth" in
- '') if mips; then
- plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
- - else
- - plibpth="/usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib"
- fi;;
- esac
- ! libpth="$plibpth $libpth"
-
- : Looking for optional libraries
- echo " "
- --- 1810,1872 ----
- case "$plibpth" in
- '') if mips; then
- plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
- fi;;
- esac
- ! case "$libpth" in
- ! ' ') dlist='';;
- ! '') dlist="$plibpth $glibpth";;
- ! *) dlist="$libpth";;
- ! esac
- !
- ! : Now check and see which directories actually exist, avoiding duplicates
- ! libpth=''
- ! for xxx in $dlist
- ! do
- ! if $test -d $xxx; then
- ! case " $libpth " in
- ! *" $xxx "*) ;;
- ! *) libpth="$libpth $xxx";;
- ! esac
- ! fi
- ! done
- ! $cat <<'EOM'
- !
- ! Some systems have incompatible or broken versions of libraries. Among
- ! the directories listed in the question below, please remove the one
- ! you know not to be holding relevant libraries. Say "none" for none.
- !
- ! EOM
- ! case "$libpth" in
- ! '') dflt='none';;
- ! *)
- ! set X $libpth
- ! shift
- ! dflt=${1+"$@"}
- ! ;;
- ! esac
- ! rp="Directories to use for library searches?"
- ! . ./myread
- ! case "$ans" in
- ! none) libpth=' ';;
- ! *) libpth="$ans";;
- ! esac
- !
- ! : compute shared library extension
- ! echo " "
- ! case "$so" in
- ! '')
- ! if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
- ! dflt='sl'
- ! else
- ! dflt='so'
- ! fi
- ! ;;
- !
- ! *) dflt="$so";;
- ! esac
- ! rp='What is the file extension used for shared libraries?'
- ! . ./myread
- ! so="$ans"
-
- : Looking for optional libraries
- echo " "
- ***************
- *** 1665,1701 ****
- dbm) thatlib=ndbm;;
- *_s) thatlib=NONE;;
- *) thatlib="${thislib}_s";;
- - *) thatlib=NONE;;
- esac
- ! yyy="$incpath/usr/ccs/lib $incpath/usr/lib $incpath/usr/ucblib"
- ! yyy="$yyy $incpath/usr/local/lib $incpath/lib"
- ! xxx=`./loc lib$thislib.a X $yyy`
- ! if $test -f $xxx; then
- echo "Found -l$thislib."
- case "$dflt" in
- *-l$thislib*|*-l$thatlib*);;
- ! *) dflt="$dflt -l$thislib";;
- esac
- else
- ! xxx=`./loc lib$thislib.a X $libpth`
- ! if $test -f $xxx; then
- ! echo "Found $xxx."
- ! case "$dflt" in
- ! *$xxx*);;
- ! *) dflt="$dflt $xxx";;
- ! esac
- ! else
- ! xxx=`./loc Slib$thislib.a X $xlibpth`
- ! if $test -f $xxx; then
- ! echo "Found -l$thislib."
- ! case "$dflt" in
- ! *-l$thislib*|*-l$thatlib*);;
- ! *) dflt="$dflt -l$thislib";;
- ! esac
- ! else
- ! echo "No -l$thislib."
- ! fi
- ! fi
- fi
- done
- set X $dflt
- --- 1883,1934 ----
- dbm) thatlib=ndbm;;
- *_s) thatlib=NONE;;
- *) thatlib="${thislib}_s";;
- esac
- !
- ! if xxx=`./loc lib$thislib.a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- + case " $dflt " in
- + *"-l$thislib "*|*"-l$thatlib "*);;
- + *) dflt="$dflt -l$thislib";;
- + esac
- + elif xxx=`./loc lib$thatlib.a X $libpth`; $test -f "$xxx"; then
- + echo "Found -l$thatlib."
- + case " $dflt " in
- + *"-l$thatlib "*);;
- + *) dflt="$dflt -l$thatlib";;
- + esac
- + elif xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
- + echo "Found -l$thislib (shared only)."
- + case " $dflt " in
- + *"-l$thislib "*|*"-l$thatlib "*);;
- + *) dflt="$dflt -l$thislib";;
- + esac
- + elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
- + echo "Found -l$thislib (shared only)."
- + case " $dflt " in
- + *"-l$thislib "*|*"-l$thatlib "*);;
- + *) dflt="$dflt -l$thislib";;
- + esac
- + elif xxx=`./loc Slib$thislib.a X $xlibpth`; $test -f "$xxx"; then
- + echo "Found -l$thislib."
- + case " $dflt " in
- + *"-l$thislib "*|*"-l$thatlib "*);;
- + *) dflt="$dflt -l$thislib";;
- + esac
- + elif xxx=`./loc Slib$thatlib.a X $xlibpth`; $test -f "$xxx"; then
- + echo "Found -l$thatlib."
- + case " $dflt " in
- + *"-l$thatlib "*);;
- + *) dflt="$dflt -l$thatlib";;
- + esac
- + elif xxx=`./loc lib$thatlib.$so X $libpth`; $test -f "$xxx"; then
- + echo "Found -l$thatlib (shared only)."
- case "$dflt" in
- *-l$thislib*|*-l$thatlib*);;
- ! *) dflt="$dflt -l$thatlib";;
- esac
- else
- ! echo "No -l$thislib."
- fi
- done
- set X $dflt
- ***************
- *** 1793,1799 ****
- esac
- ;;
- esac
- - libpth="$plibpth $libpth"
- libnames='';
- case "$libs" in
- '') ;;
- --- 2026,2031 ----
- ***************
- *** 1801,1818 ****
- case "$thislib" in
- -l*)
- thislib=`expr X$thislib : 'X-l\(.*\)'`
- ! try=`./loc lib$thislib.a blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=`./loc lib$thislib blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=`./loc $thislib blurfl/dyick $libpth`
- ! if test ! -f $try; then
- ! try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
- ! if test ! -f $try; then
- ! try=''
- ! fi
- ! fi
- ! fi
- fi
- libnames="$libnames $try"
- ;;
- --- 2033,2052 ----
- case "$thislib" in
- -l*)
- thislib=`expr X$thislib : 'X-l\(.*\)'`
- ! if try=`./loc lib$thislib.a X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
- ! :
- ! elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
- ! :
- ! else
- ! try=''
- fi
- libnames="$libnames $try"
- ;;
- ***************
- *** 1824,1833 ****
- xxx=normal
- case "$libc" in
- unknown)
- ! set /usr/ccs/lib/libc.so
- ! $test -r $1 || set /usr/lib/libc.so
- ! $test -r $1 || set /usr/shlib/libc.so
- ! $test -r $1 || set /usr/lib/libc.so.[0-9]*
- $test -r $1 || set /lib/libsys_s.a
- eval set \$$#
- ;;
- --- 2058,2068 ----
- xxx=normal
- case "$libc" in
- unknown)
- ! set /usr/ccs/lib/libc.$so
- ! $test -r $1 || set /usr/lib/libc.$so
- ! $test -r $1 || set /usr/shlib/libc.$so
- ! $test -r $1 || set /usr/lib/libc.$so.[0-9]*
- ! $test -r $1 || set /lib/libc.$so
- $test -r $1 || set /lib/libsys_s.a
- eval set \$$#
- ;;
- ***************
- *** 2000,2009 ****
- esac
- $rm -f libnames libpath
-
- : determine optimize, if desired, or use for debug flag also
- case "$optimize" in
- ! ' ') dflt="none";;
- ! '') dflt="-O";;
- *) dflt="$optimize";;
- esac
- $cat <<EOH
- --- 2235,2382 ----
- esac
- $rm -f libnames libpath
-
- + : see how we invoke the C preprocessor
- + echo " "
- + echo "Now, how can we feed standard input to your C preprocessor..." >&4
- + cat <<'EOT' >testcpp.c
- + #define ABC abc
- + #define XYZ xyz
- + ABC.XYZ
- + EOT
- + cd ..
- + echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
- + chmod 755 cppstdin
- + wrapper=`pwd`/cppstdin
- + ok='false'
- + cd UU
- +
- + if $test "X$cppstdin" != "X" && \
- + $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- + then
- + echo "You used to use $cppstdin $cppminus so we'll use that again."
- + case "$cpprun" in
- + '') echo "But let's see if we can live without a wrapper..." ;;
- + *)
- + if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- + then
- + echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
- + ok='true'
- + else
- + echo "(However, $cpprun $cpplast does not work, let's see...)"
- + fi
- + ;;
- + esac
- + else
- + case "$cppstdin" in
- + '') ;;
- + *)
- + echo "Good old $cppstdin $cppminus does not seem to be of any help..."
- + ;;
- + esac
- + fi
- +
- + if $ok; then
- + : nothing
- + elif echo 'Maybe "'"$cc"' -E" will work...'; \
- + $cc -E <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Yup, it does."
- + x_cpp="$cc -E"
- + x_minus='';
- + elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
- + $cc -E - <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Yup, it does."
- + x_cpp="$cc -E"
- + x_minus='-';
- + elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
- + $cc -P <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Yipee, that works!"
- + x_cpp="$cc -P"
- + x_minus='';
- + elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
- + $cc -P - <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "At long last!"
- + x_cpp="$cc -P"
- + x_minus='-';
- + elif echo 'No such luck, maybe "'$cpp'" will work...'; \
- + $cpp <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "It works!"
- + x_cpp="$cpp"
- + x_minus='';
- + elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
- + $cpp - <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "Hooray, it works! I was beginning to wonder."
- + x_cpp="$cpp"
- + x_minus='-';
- + elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
- + $wrapper <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + x_cpp="$wrapper"
- + x_minus=''
- + echo "Eureka!"
- + else
- + dflt=''
- + rp="No dice. I can't find a C preprocessor. Name one:"
- + . ./myread
- + x_cpp="$ans"
- + x_minus=''
- + $x_cpp <testcpp.c >testcpp.out 2>&1
- + if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- + echo "OK, that will do." >&4
- + else
- + echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
- + exit 1
- + fi
- + fi
- +
- + case "$ok" in
- + false)
- + cppstdin="$x_cpp"
- + cppminus="$x_minus"
- + cpprun="$x_cpp"
- + cpplast="$x_minus"
- + set X $x_cpp
- + shift
- + case "$1" in
- + "$cpp")
- + echo "Perhaps can we force $cc -E using a wrapper..."
- + if $wrapper <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- + then
- + echo "Yup, we can."
- + cppstdin="$wrapper"
- + cppminus='';
- + else
- + echo "Nope, we'll have to live without it..."
- + fi
- + ;;
- + esac
- + case "$cpprun" in
- + "$wrapper")
- + cpprun=''
- + cpplast=''
- + ;;
- + esac
- + ;;
- + esac
- +
- + case "$cppstdin" in
- + "$wrapper") ;;
- + *) $rm -f $wrapper;;
- + esac
- + $rm -f testcpp.c testcpp.out
- +
- : determine optimize, if desired, or use for debug flag also
- case "$optimize" in
- ! ' ') dflt='none';;
- ! '') dflt='-O';;
- *) dflt="$optimize";;
- esac
- $cat <<EOH
- ***************
- *** 2022,2031 ****
- 'none') optimize=" ";;
- esac
-
- case "$ccflags" in
- '') case "$cc" in
- ! *gcc*) dflt='-fpcc-struct-return';;
- ! *) dflt='';;
- esac
- case "$optimize" in
- *-g*) dflt="$dflt -DDEBUG";;
- --- 2395,2408 ----
- 'none') optimize=" ";;
- esac
-
- + dflt=''
- case "$ccflags" in
- '') case "$cc" in
- ! *gcc*)
- ! if $test "$gccversion" = '1'; then
- ! dflt='-fpcc-struct-return'
- ! fi
- ! ;;
- esac
- case "$optimize" in
- *-g*) dflt="$dflt -DDEBUG";;
- ***************
- *** 2039,2045 ****
- ;;
- esac
- ;;
- - *) dflt="$ccflags" ;;
- esac
-
- case "$mips_type" in
- --- 2416,2421 ----
- ***************
- *** 2083,2088 ****
- --- 2459,2468 ----
- case "$dflt" in
- '') dflt=none;;
- esac
- + case "$ccflags" in
- + '') ;;
- + *) dflt="$ccflags";;
- + esac
- $cat <<EOH
-
- Your C compiler may want other flags. For this question you should include
- ***************
- *** 2105,2111 ****
- : the following weeds options from ccflags that are of no interest to cpp
- cppflags="$ccflags"
- case "$cc" in
- ! *gcc*) cppflags="$cppflags -D__GNUC__";;
- esac
- case "$mips_type" in
- '');;
- --- 2485,2495 ----
- : the following weeds options from ccflags that are of no interest to cpp
- cppflags="$ccflags"
- case "$cc" in
- ! *gcc*)
- ! if $test "$gccversion" = "1"; then
- ! cppflags="$cppflags -D__GNUC__"
- ! fi
- ! ;;
- esac
- case "$mips_type" in
- '');;
- ***************
- *** 2113,2129 ****
- esac
- case "$cppflags" in
- '');;
- ! *) set X $cppflags
- cppflags=''
- ! for flag
- do
- ! case $flag in
- ! -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
- ! esac
- done
- case "$cppflags" in
- ! *-*) echo "(C preprocessor flags: $cppflags)";;
- esac
- ;;
- esac
-
- --- 2497,2540 ----
- esac
- case "$cppflags" in
- '');;
- ! *)
- ! echo " "
- ! echo "Let me guess what the preprocessor flags are..." >&4
- ! set X $cppflags
- ! shift
- cppflags=''
- ! $cat >cpp.c <<'EOM'
- ! #define BLURFL foo
- !
- ! BLURFL xx LFRULB
- ! EOM
- ! previous=''
- ! for flag in $*
- do
- ! case "$flag" in
- ! -*) ftry="$flag";;
- ! *) ftry="$previous $flag";;
- ! esac
- ! if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
- ! >cpp1.out 2>/dev/null && \
- ! $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
- ! >cpp2.out 2>/dev/null && \
- ! $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
- ! $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
- ! then
- ! cppflags="$cppflags $ftry"
- ! previous=''
- ! else
- ! previous="$flag"
- ! fi
- done
- + set X $cppflags
- + shift
- + cppflags=${1+"$@"}
- case "$cppflags" in
- ! *-*) echo "They appear to be: $cppflags";;
- esac
- + $rm -f cpp.c cpp?.out
- ;;
- esac
-
- ***************
- *** 2421,2428 ****
- : translate upper to lower if necessary
- case "$myhostname" in
- *[A-Z]*)
- - myhostname=`echo $myhostname | tr '[A-Z]' '[a-z]'`
- echo "(Normalizing case in your host name)"
- ;;
- esac
-
- --- 2832,2839 ----
- : translate upper to lower if necessary
- case "$myhostname" in
- *[A-Z]*)
- echo "(Normalizing case in your host name)"
- + myhostname=`echo $myhostname | tr '[A-Z]' '[a-z]'`
- ;;
- esac
-
- ***************
- *** 2459,2465 ****
- $sed -n -e "s/$myhostname\.\([a-zA-Z_.]\)/\1/p"`
- case "$dflt" in
- .) echo "(You do not have fully-qualified names in /etc/hosts)"
- ! dflt='.uucp';;
- esac
- $rm -f hosts
- ;;
- --- 2870,2896 ----
- $sed -n -e "s/$myhostname\.\([a-zA-Z_.]\)/\1/p"`
- case "$dflt" in
- .) echo "(You do not have fully-qualified names in /etc/hosts)"
- ! tans=`./loc resolv.conf X /etc /usr/etc`
- ! if $test -f "$tans"; then
- ! echo "(Attempting domain name extraction from $tans)"
- ! dflt=.`egrep '^domain' $tans | $sed 's/domain[ ]*\(.*\)/\1/' \
- ! | tr '[A-Z]' '[a-z]' 2>/dev/null`
- ! fi
- ! ;;
- ! esac
- ! case "$dflt" in
- ! .) echo "(No help from resolv.conf either -- attempting clever guess)"
- ! dflt=.`sh -c domainname 2>/dev/null`
- ! case "$dflt" in
- ! '') dflt='.';;
- ! .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
- ! esac
- ! ;;
- ! esac
- ! case "$dflt" in
- ! .) echo "(Lost all hope -- silly guess then)"
- ! dflt='.uucp'
- ! ;;
- esac
- $rm -f hosts
- ;;
- ***************
- *** 2477,2487 ****
- esac
- mydomain="$tans"
-
- : a little sanity check here
- case "$phostname" in
- '') ;;
- *)
- ! case `$phostname` in
- $myhostname$mydomain|$myhostname) ;;
- *)
- case "$phostname" in
- --- 2908,2926 ----
- esac
- mydomain="$tans"
-
- + : translate upper to lower if necessary
- + case "$mydomain" in
- + *[A-Z]*)
- + echo "(Normalizing case in your domain name)"
- + mydomain=`echo $mydomain | tr '[A-Z]' '[a-z]'`
- + ;;
- + esac
- +
- : a little sanity check here
- case "$phostname" in
- '') ;;
- *)
- ! case `$phostname | tr '[A-Z]' '[a-z]'` in
- $myhostname$mydomain|$myhostname) ;;
- *)
- case "$phostname" in
- ***************
- *** 2613,2763 ****
- '') d_phostname="$undef";;
- esac
-
- - : see how we invoke the C preprocessor
- - echo " "
- - echo "Now, how can we feed standard input to your C preprocessor..." >&4
- - cat <<'EOT' >testcpp.c
- - #define ABC abc
- - #define XYZ xyz
- - ABC.XYZ
- - EOT
- - cd ..
- - echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
- - chmod 755 cppstdin
- - wrapper=`pwd`/cppstdin
- - ok='false'
- - cd UU
- -
- - if $test "X$cppstdin" != "X" && \
- - $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- - then
- - echo "You used to use $cppstdin $cppminus so we'll use that again."
- - case "$cpprun" in
- - '') echo "But let's see if we can live without a wrapper..." ;;
- - *)
- - if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- - then
- - echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
- - ok='true'
- - else
- - echo "(However, $cpprun $cpplast does not work, let's see...)"
- - fi
- - ;;
- - esac
- - else
- - case "$cppstdin" in
- - '') ;;
- - *)
- - echo "Good old $cppstdin $cppminus does not seem to be of any help..."
- - ;;
- - esac
- - fi
- -
- - if $ok; then
- - : nothing
- - elif echo 'Maybe "'"$cc"' -E" will work...'; \
- - $cc -E <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Yup, it does."
- - x_cpp="$cc -E"
- - x_minus='';
- - elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
- - $cc -E - <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Yup, it does."
- - x_cpp="$cc -E"
- - x_minus='-';
- - elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
- - $cc -P <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Yipee, that works!"
- - x_cpp="$cc -P"
- - x_minus='';
- - elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
- - $cc -P - <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "At long last!"
- - x_cpp="$cc -P"
- - x_minus='-';
- - elif echo 'No such luck, maybe "'$cpp'" will work...'; \
- - $cpp <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "It works!"
- - x_cpp="$cpp"
- - x_minus='';
- - elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
- - $cpp - <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "Hooray, it works! I was beginning to wonder."
- - x_cpp="$cpp"
- - x_minus='-';
- - elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
- - $wrapper <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - x_cpp="$wrapper"
- - x_minus=''
- - echo "Eureka!"
- - else
- - dflt=''
- - rp="No dice. I can't find a C preprocessor. Name one:"
- - . ./myread
- - x_cpp="$ans"
- - x_minus=''
- - $x_cpp <testcpp.c >testcpp.out 2>&1
- - if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- - echo "OK, that will do." >&4
- - else
- - echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
- - exit 1
- - fi
- - fi
- -
- - case "$ok" in
- - false)
- - cppstdin="$x_cpp"
- - cppminus="$x_minus"
- - cpprun="$x_cpp"
- - cpplast="$x_minus"
- - set X $x_cpp
- - shift
- - case "$1" in
- - "$cpp")
- - echo "Perhaps can we force $cc -E using a wrapper..."
- - if $wrapper <testcpp.c >testcpp.out 2>&1; \
- - $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- - then
- - echo "Yup, we can."
- - cppstdin="$wrapper"
- - cppminus='';
- - else
- - echo "Nope, we'll have to live without it..."
- - fi
- - ;;
- - esac
- - case "$cpprun" in
- - "$wrapper")
- - cpprun=''
- - cpplast=''
- - ;;
- - esac
- - ;;
- - esac
- -
- - case "$cppstdin" in
- - "$wrapper") ;;
- - *) $rm -f $wrapper;;
- - esac
- - $rm -f testcpp.c testcpp.out
- -
- : determine filename position in cpp output
- echo " "
- echo "Computing filename position in cpp output for #include directives..." >&4
- echo '#include <stdio.h>' > foo.c
- $cat >fieldn <<EOF
- $startsh
- ! $cppstdin $cppminus $cppflags <foo.c 2>/dev/null | \
- $grep '^[ ]*#.*stdio\.h' | \
- while read cline; do
- pos=1
- --- 3052,3064 ----
- '') d_phostname="$undef";;
- esac
-
- : determine filename position in cpp output
- echo " "
- echo "Computing filename position in cpp output for #include directives..." >&4
- echo '#include <stdio.h>' > foo.c
- $cat >fieldn <<EOF
- $startsh
- ! $cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
- $grep '^[ ]*#.*stdio\.h' | \
- while read cline; do
- pos=1
- ***************
- *** 2939,2945 ****
- if set strerror val -f d_strerror; eval $csym; $val; then
- echo 'strerror() found.' >&4
- d_strerror="$define"
- ! d_strerrm="$undef"
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "(You also have sys_errlist[], so we could roll our own strerror.)"
- d_syserrlst="$define"
- --- 3240,3246 ----
- if set strerror val -f d_strerror; eval $csym; $val; then
- echo 'strerror() found.' >&4
- d_strerror="$define"
- ! d_strerrm='strerror(e)'
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "(You also have sys_errlist[], so we could roll our own strerror.)"
- d_syserrlst="$define"
- ***************
- *** 2951,2957 ****
- $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
- echo 'strerror() found in string header.' >&4
- d_strerror="$define"
- ! d_strerrm="$undef"
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
- d_syserrlst="$define"
- --- 3252,3258 ----
- $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
- echo 'strerror() found in string header.' >&4
- d_strerror="$define"
- ! d_strerrm='strerror(e)'
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
- d_syserrlst="$define"
- ***************
- *** 2963,2974 ****
- echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
- d_strerror="$undef"
- d_syserrlst="$define"
- ! d_strerrm="$define"
- else
- echo 'strerror() and sys_errlist[] NOT found.' >&4
- d_strerror="$undef"
- d_syserrlst="$undef"
- ! d_strerrm="$undef"
- fi
- if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
- echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
- --- 3264,3275 ----
- echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
- d_strerror="$undef"
- d_syserrlst="$define"
- ! d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
- else
- echo 'strerror() and sys_errlist[] NOT found.' >&4
- d_strerror="$undef"
- d_syserrlst="$undef"
- ! d_strerrm='"unknown"'
- fi
- if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
- echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
- ***************
- *** 3022,3033 ****
- d_hvfork=''
- fi
- : see if there is a vfork
- ! set vfork d_vfork
- eval $inlibc
-
- : get C preprocessor symbols handy
- echo " "
- ! echo $attrlist | $tr ' ' '\012' >Cppsym.know
- $cat <<EOSS >Cppsym
- $startsh
- case "\$1" in
- --- 3323,3362 ----
- d_hvfork=''
- fi
- : see if there is a vfork
- ! val=''
- ! set vfork val
- eval $inlibc
-
- + : Ok, but do we want to use it. vfork is reportedly unreliable in
- + : perl on Solaris 2.x, and probably elsewhere.
- + case "$val" in
- + $define)
- + echo " "
- + case "$usevfork" in
- + true) dflt='y';;
- + *) dflt='n';;
- + esac
- + rp="Some systems have problems with vfork(). Do you want to use it?"
- + . ./myread
- + case "$ans" in
- + y|Y) ;;
- + *)
- + echo "Ok, we won't use vfork()."
- + val="$undef"
- + ;;
- + esac
- + ;;
- + esac
- + set d_vfork
- + eval $setvar
- + case "$d_vfork" in
- + $define) usevfork='true';;
- + *) usevfork='false';;
- + esac
- +
- : get C preprocessor symbols handy
- echo " "
- ! echo $al | $tr ' ' '\012' >Cppsym.know
- $cat <<EOSS >Cppsym
- $startsh
- case "\$1" in
- ***************
- *** 3074,3080 ****
- chmod +x Cppsym
- $eunicefix Cppsym
- echo "Your C preprocessor defines the following symbols:"
- ! Cppsym -l $attrlist >Cppsym.true
- $cat Cppsym.true
-
- : see if this is a termio system
- --- 3403,3409 ----
- chmod +x Cppsym
- $eunicefix Cppsym
- echo "Your C preprocessor defines the following symbols:"
- ! Cppsym -l $al >Cppsym.true
- $cat Cppsym.true
-
- : see if this is a termio system
- ***************
- *** 3132,3148 ****
- val=$val2; set i_sgtty; eval $setvar
- val=$val3; set i_termios; eval $setvar
-
- ! : see if ioctl defs are in sgtty/termio or sys/ioctl
- echo " "
- if $test `./findhdr sys/ioctl.h`; then
- val="$define"
- ! echo "<sys/ioctl.h> found." >&4
- else
- val="$undef"
- ! $test $i_termio = "$define" && xxx="termio.h"
- ! $test $i_termios = "$define" && xxx="termios.h"
- ! $test $i_sgtty = "$define" && xxx="sgtty.h"
- echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
- fi
- set i_sysioctl
- eval $setvar
- --- 3461,3513 ----
- val=$val2; set i_sgtty; eval $setvar
- val=$val3; set i_termios; eval $setvar
-
- ! : define an alternate in-header-list? function
- ! inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
- ! cont=true; xxf="echo \"<\$1> found.\" >&4";
- ! case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
- ! *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
- ! esac;
- ! case $# in 4) instead=instead;; *) instead="at last";; esac;
- ! while $test "$cont"; do
- ! xxx=`./findhdr $1`
- ! var=$2; eval "was=\$$2";
- ! if $test "$xxx" && $test -r "$xxx";
- ! then eval $xxf;
- ! eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
- ! cont="";
- ! else eval $xxnf;
- ! eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
- ! set $yyy; shift; shift; yyy=$@;
- ! case $# in 0) cont="";;
- ! 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
- ! xxnf="echo \"and I did not find <\$1> either.\" >&4";;
- ! *) xxf="echo \"but I found <\$1\> instead.\" >&4";
- ! xxnf="echo \"there is no <\$1>, ...\" >&4";;
- ! esac;
- ! done;
- ! while $test "$yyy";
- ! do set $yyy; var=$2; eval "was=\$$2";
- ! eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
- ! set $yyy; shift; shift; yyy=$@;
- ! done'
- !
- ! : see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
- ! set sys/filio.h i_sysfilio
- ! eval $inhdr
- echo " "
- if $test `./findhdr sys/ioctl.h`; then
- val="$define"
- ! echo '<sys/ioctl.h> found.' >&4
- else
- val="$undef"
- ! if $test $i_sysfilio = "$define"; then
- ! echo '<sys/ioctl.h> NOT found.' >&4
- ! else
- ! $test $i_sgtty = "$define" && xxx="sgtty.h"
- ! $test $i_termio = "$define" && xxx="termio.h"
- ! $test $i_termios = "$define" && xxx="termios.h"
- echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
- + fi
- fi
- set i_sysioctl
- eval $setvar
- ***************
- *** 3522,3528 ****
- elif $test -f "$_smail"; then
- dflt="$_smail"
- elif $test -f "$_rmail"; then
- ! dflt="$rmail"
- elif $test -f /bin/mail; then
- dflt=/bin/mail
- else
- --- 3887,3893 ----
- elif $test -f "$_smail"; then
- dflt="$_smail"
- elif $test -f "$_rmail"; then
- ! dflt="$_rmail"
- elif $test -f /bin/mail; then
- dflt=/bin/mail
- else
- ***************
- *** 3858,3864 ****
- main(int argc, char *argv[]) {
- exit(0);}
- EOCP
- ! if $cc -c prototype.c >prototype.out 2>&1 ; then
- echo "Your C compiler appears to support function prototypes."
- val="$define"
- else
- --- 4223,4229 ----
- main(int argc, char *argv[]) {
- exit(0);}
- EOCP
- ! if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
- echo "Your C compiler appears to support function prototypes."
- val="$define"
- else
- ***************
- *** 3928,3941 ****
- '')
- echo "I can't determine whether signal handler returns void or int..." >&4
- dflt=void
- ! rp="What type does your signal handler returns?"
- . ./myread
- ! case "$ans" in
- ! void) val="$define"; signal_t="void";;
- ! *) val="$undef"; signal_t="int";;
- ! esac;;
- *) echo "As you already told me, signal handler returns $signal_t." >&4;;
- esac
- fi
- set d_voidsig
- eval $setvar
- --- 4293,4308 ----
- '')
- echo "I can't determine whether signal handler returns void or int..." >&4
- dflt=void
- ! rp="What type does your signal handler return?"
- . ./myread
- ! signal_t="$ans"
- ! ;;
- *) echo "As you already told me, signal handler returns $signal_t." >&4;;
- esac
- + case "$signal_t" in
- + void) val="$define";;
- + *) val="$undef";;
- + esac
- fi
- set d_voidsig
- eval $setvar
- ***************
- *** 4015,4023 ****
- *) dflt="$uidtype";;
- esac
- echo " "
- ! rp="What type are user ids on this system declared as?"
- . ./myread
- ! uidtype="$ans"
-
- : check for void type
- echo " "
- --- 4382,4392 ----
- *) dflt="$uidtype";;
- esac
- echo " "
- ! rp="What is the type for user ids returned by getuid()?"
- . ./myread
- ! val="$ans"
- ! set uidtype
- ! eval $setvar
-
- : check for void type
- echo " "
- ***************
- *** 4108,4143 ****
- voidflags="$ans"
- $rm -f try.* .out
-
- - : define an alternate in-header-list? function
- - inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
- - cont=true; xxf="echo \"<\$1> found.\" >&4";
- - case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
- - *) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
- - esac;
- - case $# in 4) instead=instead;; *) instead="at last";; esac;
- - while $test "$cont"; do
- - xxx=`./findhdr $1`
- - var=$2; eval "was=\$$2";
- - if $test "$xxx" && $test -r "$xxx";
- - then eval $xxf;
- - eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
- - cont="";
- - else eval $xxnf;
- - eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
- - set $yyy; shift; shift; yyy=$@;
- - case $# in 0) cont="";;
- - 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
- - xxnf="echo \"and I did not find <\$1> either.\" >&4";;
- - *) xxf="echo \"but I found <\$1\> instead.\" >&4";
- - xxnf="echo \"there is no <\$1>, ...\" >&4";;
- - esac;
- - done;
- - while $test "$yyy";
- - do set $yyy; var=$2; eval "was=\$$2";
- - eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
- - set $yyy; shift; shift; yyy=$@;
- - done'
- -
- : see if this is a sys/file.h system
- val=''
- set sys/file.h val
- --- 4477,4482 ----
- ***************
- *** 4484,4490 ****
- case "$xxx" in
- bsd)
- cf_name=`$passcat | grep "^$cf_by:" | \
- ! sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/'`
- ;;
- usg)
- cf_name=`$passcat | grep "^$cf_by:" | \
- --- 4823,4830 ----
- case "$xxx" in
- bsd)
- cf_name=`$passcat | grep "^$cf_by:" | \
- ! sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
- ! -e 's/,.*//'`
- ;;
- usg)
- cf_name=`$passcat | grep "^$cf_by:" | \
- ***************
- *** 4633,4638 ****
- --- 4973,4979 ----
- awk='$awk'
- bash='$bash'
- bison='$bison'
- + byacc='$byacc'
- cat='$cat'
- chgrp='$chgrp'
- chmod='$chmod'
- ***************
- *** 4647,4652 ****
- --- 4988,4994 ----
- egrep='$egrep'
- emacs='$emacs'
- expr='$expr'
- + find='$find'
- flex='$flex'
- gcc='$gcc'
- grep='$grep'
- ***************
- *** 4713,4718 ****
- --- 5055,5061 ----
- binexp='$binexp'
- installbin='$installbin'
- cc='$cc'
- + gccversion='$gccversion'
- ccflags='$ccflags'
- cppflags='$cppflags'
- ldflags='$ldflags'
- ***************
- *** 4752,4757 ****
- --- 5095,5101 ----
- d_uwait3='$d_uwait3'
- d_uwait='$d_uwait'
- d_vfork='$d_vfork'
- + usevfork='$usevfork'
- d_voidsig='$d_voidsig'
- signal_t='$signal_t'
- h_fcntl='$h_fcntl'
- ***************
- *** 4762,4767 ****
- --- 5106,5112 ----
- i_sysfile='$i_sysfile'
- d_voidtty='$d_voidtty'
- i_bsdioctl='$i_bsdioctl'
- + i_sysfilio='$i_sysfilio'
- i_sysioctl='$i_sysioctl'
- i_syssockio='$i_syssockio'
- i_syswait='$i_syswait'
- ***************
- *** 4774,4779 ****
- --- 5119,5125 ----
- timeincl='$timeincl'
- intsize='$intsize'
- libc='$libc'
- + glibpth='$glibpth'
- libpth='$libpth'
- plibpth='$plibpth'
- xlibpth='$xlibpth'
- ***************
- *** 4839,4844 ****
- --- 5185,5191 ----
- installscript='$installscript'
- scriptdir='$scriptdir'
- scriptdirexp='$scriptdirexp'
- + so='$so'
- sharpbang='$sharpbang'
- shsharp='$shsharp'
- spitshell='$spitshell'
- ***************
- *** 4951,4954 ****
- --- 5298,5303 ----
-
- $rm -f kit*isdone ark*isdone
- $rm -rf UU
- +
- : End of Configure
- +
-
- *** End of Patch 8 ***
-
- exit 0 # Just in case...
-