mailagent-svn Mailing List for mailagent - Perl mail filter / processor (Page 4)
Brought to you by:
rmanfredi
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(21) |
Jun
(30) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rma...@us...> - 2008-05-28 09:25:52
|
Revision: 7 http://mailagent.svn.sourceforge.net/mailagent/?rev=7&view=rev Author: rmanfredi Date: 2008-05-28 02:25:49 -0700 (Wed, 28 May 2008) Log Message: ----------- Remove all usage of $* as it is no longer accepted by Perl 5.10. Modified Paths: -------------- trunk/mailagent/agent/test/option/c.t trunk/mailagent/agent/test/option/h.t trunk/mailagent/agent/test/option/i.t Modified: trunk/mailagent/agent/test/option/c.t =================================================================== --- trunk/mailagent/agent/test/option/c.t 2008-05-28 09:17:55 UTC (rev 6) +++ trunk/mailagent/agent/test/option/c.t 2008-05-28 09:25:49 UTC (rev 7) @@ -21,8 +21,7 @@ do '../pl/init.pl'; $output = `cat ../mail | $mailagent -c foo 2>&1`; $? != 0 || print "1\n"; # Cannot open config file -$* = 1; -$output =~ /^\*\*.*not processed/ || print "2\n"; +$output =~ /^\*\*.*not processed/m || print "2\n"; chdir '../out'; $user = $ENV{'USER'}; unlink "$user"; Modified: trunk/mailagent/agent/test/option/h.t =================================================================== --- trunk/mailagent/agent/test/option/h.t 2008-05-28 09:17:55 UTC (rev 6) +++ trunk/mailagent/agent/test/option/h.t 2008-05-28 09:25:49 UTC (rev 7) @@ -18,6 +18,5 @@ do '../pl/init.pl'; $output = `$mailagent -h 2>&1`; $? != 0 || print "1\n"; # -h -> exit status 1 -$* = 1; -$output =~ /-h : print/ || print "2\n"; +$output =~ /-h : print/m || print "2\n"; print "0\n"; Modified: trunk/mailagent/agent/test/option/i.t =================================================================== --- trunk/mailagent/agent/test/option/i.t 2008-05-28 09:17:55 UTC (rev 6) +++ trunk/mailagent/agent/test/option/i.t 2008-05-28 09:25:49 UTC (rev 7) @@ -20,13 +20,12 @@ unlink 'agentlog'; $output = `$mailagent -d -i 2>&1 >/dev/null`; $? == 0 || print "1\n"; -$* = 1; open(LOG, 'agentlog') || print "2\n"; undef $/; $log = <LOG>; close LOG; -$output =~ s/^$mailagent_prog://g; -$log =~ s/^.*$mailagent_prog\[.*\]\s*://g; +$output =~ s/^$mailagent_prog://mg; +$log =~ s/^.*$mailagent_prog\[.*\]\s*://mg; $output eq $log || print "3\n"; $output ne '' || print "4\n"; print "0\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2008-05-28 09:18:05
|
Revision: 6 http://mailagent.svn.sourceforge.net/mailagent/?rev=6&view=rev Author: rmanfredi Date: 2008-05-28 02:17:55 -0700 (Wed, 28 May 2008) Log Message: ----------- Regenerated. Modified Paths: -------------- trunk/mailagent/Configure trunk/mailagent/config_h.SH Modified: trunk/mailagent/Configure =================================================================== --- trunk/mailagent/Configure 2008-05-28 08:00:09 UTC (rev 5) +++ trunk/mailagent/Configure 2008-05-28 09:17:55 UTC (rev 6) @@ -11,18 +11,16 @@ # Yes, you may rip this off to use in other distribution packages. This # script belongs to the public domain and cannot be copyrighted. # -# (Note: this Configure script was generated automatically. Rather than +# Note: this Configure script was generated automatically. Rather than # working with this copy of Configure, you may wish to get metaconfig. -# The dist-3.0 package (which contains metaconfig) was posted in -# comp.sources.misc and is available on CPAN under authors/id/RAM so -# you may fetch it yourself from your nearest archive site.) -# +# The dist package (which contains metaconfig) is available via SVN: +# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist -# $Id: Configure,v 3.0.1.15 1999/07/12 13:39:45 ram Exp ram $ +# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $ # -# Generated on Mon Jul 12 15:23:12 METDST 1999 [metaconfig 3.0 PL70] +# Generated on Wed May 28 11:04:29 CEST 2008 [metaconfig 3.5 PL0] -cat >/tmp/c1$$ <<EOF +cat >c1$$ <<EOF ARGGGHHHH!!!!! SCO csh still thinks true is false. Write to SCO today and tell them that next @@ -33,18 +31,18 @@ [End of diatribe. We now return you to your regularly scheduled programming...] EOF -cat >/tmp/c2$$ <<EOF +cat >c2$$ <<EOF OOPS! You naughty creature! You didn't run Configure with sh! I will attempt to remedy the situation by running sh for you... EOF -true || cat /tmp/c1$$ /tmp/c2$$ +true || cat c1$$ c2$$ true || exec sh $0 $argv:q -(exit $?0) || cat /tmp/c2$$ +(exit $?0) || cat c2$$ (exit $?0) || exec sh $0 $argv:q -rm -f /tmp/c1$$ /tmp/c2$$ +rm -f c1$$ c2$$ : compute my invocation name me=$0 @@ -55,13 +53,20 @@ ;; esac -: Proper PATH separator +: Proper separator for the PATH environment variable p_=: -: On OS/2 this directory should exist if this is not floppy only system :-] -if test -d c:/.; then - p_=\; - PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` - OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` +: On OS/2 this directory should exist if this is not floppy only system ":-]" +if test -d c:/. ; then + if test -n "$OS2_SHELL"; then + p_=\; + PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` + OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` + elif test -n "$DJGPP"; then + case "X${MACHTYPE:-nonesuchmach}" in + *cygwin) ;; + *) p_=\; ;; + esac + fi fi : Proper PATH setting @@ -73,6 +78,7 @@ paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin" paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" paths="$paths /sbin /usr/sbin /usr/libexec" +paths="$paths /system/gnu_library/bin" for p in $paths do @@ -103,9 +109,16 @@ newsh=/usr/bin/bsh fi fi +if test -f /osf_boot -a -f /usr/sbin/setld; then + if test X`/usr/bin/uname -s` = XOSF1; then + avoidksh="to avoid Digital UNIX' ksh" + newsh=/bin/sh + unset BIN_SH + fi +fi case "$inksh/$needksh" in /[a-z]*) - unset ENV + ENV='' changesh=true reason="$needksh" ;; @@ -126,6 +139,7 @@ esac case "$changesh" in true) + export newsh echo "(Feeding myself to $newsh $reason.)" case "$0" in Configure|*/Configure) exec $newsh $0 "$@";; @@ -134,16 +148,38 @@ ;; esac +: if needed, set CDPATH to a harmless value that is not chatty +case "$CDPATH" in +'') ;; +*) case "$SHELL" in + *bash*) CDPATH='.' ;; + *) CDPATH='' ;; + esac + ;; +esac + : Configure runs within the UU subdirectory test -d UU || mkdir UU -unset CDPATH cd UU && rm -f ./* +ccname='' +ccversion='' +ccsymbols='' +cppccsymbols='' +cppsymbols='' +from='' +run='' +targetarch='' +to='' +usecrosscompile='' d_bsd='' +d_dos='' d_eunice='' +d_linux='' +d_os2='' d_xenix='' +_exe='' eunicefix='' -Mcc='' ar='' awk='' bash='' @@ -166,7 +202,7 @@ expr='' find='' flex='' -gcc='' +gmake='' grep='' gzip='' inews='' @@ -184,6 +220,7 @@ mkdir='' more='' mv='' +nm='' nroff='' perl='' pg='' @@ -201,6 +238,7 @@ tail='' tar='' tbl='' +tee='' test='' touch='' tr='' @@ -225,15 +263,17 @@ Revision='' Source='' State='' +_a='' +_o='' archobjs='' firstmakefile='' afs='' +afsroot='' baserev='' bin='' binexp='' installbin='' cc='' -gccversion='' ccflags='' cppflags='' ldflags='' @@ -244,6 +284,7 @@ cf_by='' cf_time='' contains='' +cpp_quote='' cpp_stuff='' cpplast='' cppminus='' @@ -261,6 +302,7 @@ d_uname='' d_getopt='' d_gnulibc='' +gnulibc_version='' d_hidnet='' hiddennet='' d_open3='' @@ -289,9 +331,13 @@ signal_t='' d_wifstat='' defeditor='' +gccosandvers='' +gccversion='' h_fcntl='' h_sysfile='' i_fcntl='' +i_malloc='' +i_stdlib='' i_string='' strings='' i_sysfile='' @@ -316,18 +362,26 @@ intsize='' longsize='' shortsize='' +issymlink='' libc='' +libnames='' glibpth='' libpth='' loclibpth='' plibpth='' xlibpth='' libs='' +libscheck='' +libsdirs='' +libsfiles='' +libsfound='' +libspath='' lns='' maildir='' maildirexp='' mailer='' mailfile='' +make_set_make='' installmansrc='' manext='' mansrc='' @@ -361,6 +415,7 @@ patchlevel='' perlpath='' pidtype='' +pkgsrc='' prefix='' prefixexp='' installprivlib='' @@ -397,13 +452,13 @@ startperl='' startsh='' sysman='' +trnl='' uidtype='' nm_opt='' nm_so_opt='' runnm='' usenm='' incpath='' -mips='' mips_type='' usrinc='' utmp='' @@ -411,6 +466,7 @@ voidflags='' CONFIG='' +: Initialize wide constants define='define' undef='undef' smallmach='pdp11 i8086 z8000 i80286 iAPX286' @@ -425,76 +481,28 @@ eunicefix=/etc/unixtovms.exe fi -: list of known cpp symbols, sorted alphabetically -al="AMIX BIT_MSF BSD BSD4_3 BSD_NET2 CMU CRAY DGUX DOLPHIN DPX2" -al="$al GO32 GOULD_PN HP700 I386 I80960 I960 Lynx M68000 M68K MACH" -al="$al MIPSEB MIPSEL MSDOS MTXINU MULTIMAX 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 RES RISC6000 RT Sun386i SVR3 SVR4" -al="$al SYSTYPE_BSD SYSTYPE_SVR4 SYSTYPE_SYSV Tek4132 Tek4300" -al="$al UMAXV USGr4 USGr4_2 UTEK UTS UTek UnicomPBB UnicomPBD Utek" -al="$al VMS Xenix286" -al="$al _AIX _AIX32 _AIX370 _AM29000 _COFF _CRAY _CX_UX _EPI" -al="$al _IBMESA _IBMR2 _M88K _M88KBCS_TARGET" -al="$al _MIPSEB _MIPSEL _M_COFF _M_I86 _M_I86SM _M_SYS3" -al="$al _M_SYS5 _M_SYSIII _M_SYSV _M_UNIX _M_XENIX _NLS _PGC_ _R3000" -al="$al _SYSTYPE_BSD _SYSTYPE_BSD43 _SYSTYPE_SVR4" -al="$al _SYSTYPE_SYSV _SYSV3 _U370 _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__ __PGC__ __PWB __STDC__" -al="$al __SVR4_2__ __UMAXV__" -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 __hp_osf __i286 __i286__ __i386 __i386__" -al="$al __i486 __i486__ __i860 __i860__ __ibmesa __ksr1__ __linux__" -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__ __uxpm__ __uxps__ __vax __vax__" -al="$al _host_mips _mips _unix" -al="$al a29k aegis aix aixpc alliant alpha am29000 amiga ansi ardent" -al="$al apollo ardent att386 att3b" -al="$al bsd bsd43 bsd4_2 bsd4_3 bsd4_4 bsdi bull" -al="$al cadmus clipper concurrent convex cray ctix" -al="$al dmert encore gcos gcx gimpel gould" -al="$al hbullx20 hcx host_mips hp200 hp300 hp700 hp800" -al="$al hp9000 hp9000s300 hp9000s400 hp9000s500" -al="$al hp9000s700 hp9000s800 hp9k8 hppa hpux" -al="$al i186 i286 i386 i486 i8086" -al="$al i80960 i860 iAPX286 ibm ibm032 ibmrt interdata is68k" -al="$al ksr1 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 scs sequent sgi sinix sony sony_news" -al="$al sonyrisc sparc sparclite spectrum stardent stratos" -al="$al sun sun3 sun386 svr4 sysV68 sysV88" -al="$al titan tower tower32 tower32_200 tower32_600 tower32_700" -al="$al tower32_800 tower32_850 tss u370 u3b u3b2 u3b20 u3b200" -al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms" -al="$al xenix z8000" +: Set executable suffix now -- needed before hints available +if test -f "/libs/version.library"; then + : Amiga OS + _exe="" +elif test -f "/system/gnu_library/bin/ar.pm"; then + : Stratus VOS + _exe=".pm" +elif test -n "$DJGPP"; then + : DOS DJGPP + _exe=".exe" +elif test -d c:/. ; then + : OS/2 or cygwin + _exe=".exe" +else + : All other UNIX systems + _exe="" +fi -: No trailing extension on UNIX executables -_exe='' +ccname='' +ccversion='' : Extra object files, if any, needed on this platform. archobjs='' -gccversion='' : Possible local include directories to search. : Set locincpth to "" in a hint file to defeat local include searches. locincpth="/usr/local/include /opt/local/include /usr/gnu/include" @@ -505,18 +513,18 @@ i_sysselct='' i_whoami='' +libnames='' : change the next line if compiling for Xenix/286 on Xenix/386 xlibpth='/usr/lib/386 /lib/386' - : Possible local library directories to search. loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" : general looking path for locating libraries -glibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large" -glibpth="$glibpth /lib /usr/lib $xlibpth" -glibpth="$glibpth /lib/large /usr/lib/small /lib/small" +glibpth="/lib /usr/lib $xlibpth" glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" +test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" +test -f /shlib/libc.so && glibpth="/shlib $glibpth" : Private path used by Configure to find libraries. Its value : is prepended to libpth. This variable takes care of special @@ -525,6 +533,9 @@ : default library list libswanted='' +: should be set by hint files if needed +libscheck='' +usesocks='' : full support for void wanted by default defvoidused=15 @@ -549,10 +560,13 @@ done for xxx in $try; do if test -f "$xxx"; then - sh="$xxx"; + sh="$xxx" break + elif test -f "$xxx$_exe"; then + sh="$xxx" + break elif test -f "$xxx.exe"; then - sh="$xxx"; + sh="$xxx" break fi done @@ -561,7 +575,7 @@ esac case "$sh" in -'') cat <<EOM >&2 +'') cat >&2 <<EOM $me: Fatal Error: I can't find a Bourne Shell anywhere. Usually it's in /bin/sh. How did you even get this far? @@ -577,18 +591,30 @@ shsharp=true spitshell=cat xcat=/bin/cat - test -f $xcat || xcat=/usr/bin/cat - echo "#!$xcat" >try - $eunicefix try - chmod +x try - ./try > today + test -f $xcat$_exe || xcat=/usr/bin/cat + if test ! -f $xcat$_exe; then + for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do + if test -f $p/cat$_exe; then + xcat=$p/cat + break + fi + done + if test ! -f $xcat$_exe; then + echo "Can't find cat anywhere!" + exit 1 + fi + fi + echo "#!$xcat" >sharp + $eunicefix sharp + chmod +x sharp + ./sharp > today 2>/dev/null if test -s today; then sharpbang='#!' else - echo "#! $xcat" > try - $eunicefix try - chmod +x try - ./try > today + echo "#! $xcat" > sharp + $eunicefix sharp + chmod +x sharp + ./sharp > today 2>/dev/null if test -s today; then sharpbang='#! ' else @@ -608,33 +634,58 @@ echo "I presume that if # doesn't work, #! won't work either!" sharpbang=': use ' fi -rm -f try today +rm -f sharp today : figure out how to guarantee sh startup case "$startsh" in '') startsh=${sharpbang}${sh} ;; *) esac -cat >try <<EOSS +cat >sharp <<EOSS $startsh set abc test "$?abc" != 1 EOSS -chmod +x try -$eunicefix try -if ./try; then +chmod +x sharp +$eunicefix sharp +if ./sharp; then : echo "Yup, it does." else echo "Hmm... '$startsh' does not guarantee sh startup..." echo "You may have to fix up the shell scripts to make sure $sh runs them." fi -rm -f try +rm -f sharp +: Save command line options in file UU/cmdline.opt for later use in +: generating config.sh. +cat > cmdline.opt <<EOSH +: Configure command line arguments. +config_arg0='$0' +config_args='$*' +config_argc=$# +EOSH +argn=1 +args_exp='' +args_sep='' +for arg in "$@"; do + cat >>cmdline.opt <<EOSH +config_arg$argn='$arg' +EOSH + cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt +$arg +EOC + arg_exp=`cat cmdl.opt` + args_exp="$args_exp$args_sep'$arg_exp'" + argn=`expr $argn + 1` + args_sep=' ' +done +rm -f cmdl.opt + : produce awk script to parse command line options cat >options.awk <<'EOF' BEGIN { - optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification + optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification len = length(optstr); for (i = 1; i <= len; i++) { @@ -694,7 +745,7 @@ extractsh='' override='' knowitall='' -rm -f optdef.sh +rm -f optdef.sh posthint.sh cat >optdef.sh <<EOS $startsh EOS @@ -748,8 +799,58 @@ esac shift ;; - -V) echo "$me generated by metaconfig 3.0 PL70." >&2 - exit 0;; + -A) + shift + xxx='' + yyy="$1" + zzz='' + uuu=undef + case "$yyy" in + *=*) zzz=`echo "$yyy"|sed 's!=.*!!'` + case "$zzz" in + *:*) zzz='' ;; + *) xxx=append + zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'` + yyy=`echo "$yyy"|sed 's!=.*!!'` ;; + esac + ;; + esac + case "$xxx" in + '') case "$yyy" in + *:*) xxx=`echo "$yyy"|sed 's!:.*!!'` + yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` + zzz=`echo "$yyy"|sed 's!^[^=]*=!!'` + yyy=`echo "$yyy"|sed 's!=.*!!'` ;; + *) xxx=`echo "$yyy"|sed 's!:.*!!'` + yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;; + esac + ;; + esac + case "$xxx" in + append) + echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;; + clear) + echo "$yyy=''" >> posthint.sh ;; + define) + case "$zzz" in + '') zzz=define ;; + esac + echo "$yyy='$zzz'" >> posthint.sh ;; + eval) + echo "eval \"$yyy=$zzz\"" >> posthint.sh ;; + prepend) + echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;; + undef) + case "$zzz" in + '') zzz="$uuu" ;; + esac + echo "$yyy=$zzz" >> posthint.sh ;; + *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;; + esac + shift + ;; + -V) echo "$me generated by metaconfig 3.5 PL0." >&2 + exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; *) break;; @@ -760,7 +861,7 @@ true) cat >&2 <<EOM Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value] - [-U symbol] [-U symbol=] + [-U symbol] [-U symbol=] [-A command: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. @@ -777,6 +878,16 @@ -U : undefine symbol: -U symbol symbol gets the value 'undef' -U symbol= symbol gets completely empty + -A : manipulate symbol after the platform specific hints have been applied: + -A symbol=value append " "value to symbol + -A append:symbol=value append value to symbol + -A define:symbol=value define symbol to have value + -A clear:symbol define symbol to be '' + -A define:symbol define symbol to be 'define' + -A eval:symbol=value define symbol to be eval of value + -A prepend:symbol=value prepend value to symbol + -A undef:symbol define symbol to be 'undef' + -A undef:symbol= define symbol to be '' -V : print version number and exit (with a zero status). EOM exit 1 @@ -787,10 +898,15 @@ case "$fastread$alldone" in yescont|yesexit) ;; *) - if test ! -t 0; then - echo "Say 'sh Configure', not 'sh <Configure'" - exit 1 - fi + case "$extractsh" in + true) ;; + *) + if test ! -t 0; then + echo "Say 'sh Configure', not 'sh <Configure'" + exit 1 + fi + ;; + esac ;; esac @@ -802,9 +918,11 @@ : run the defines and the undefines, if any, but leave the file out there... touch optdef.sh . ./optdef.sh +: create the posthint manipulation script and leave the file out there... +touch posthint.sh : set package name -package=mailagent +package='mailagent' first=`echo $package | sed -e 's/^\(.\).*/\1/'` last=`echo $package | sed -e 's/^.\(.*\)/\1/'` case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in @@ -812,6 +930,29 @@ *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;; esac +: script used to emulate mkdir -p +cat >mkdirp <<EOS +$startsh +EOS +cat >>mkdirp <<'EOS' +name=$1; +create=""; +while test $name; do + if test ! -d "$name"; then + create="$name $create" + name=`echo $name | sed -e "s|^[^/]*$||"` + name=`echo $name | sed -e "s|\(.*\)/.*|\1|"` + else + name="" + fi +done +for file in $create; do + mkdir $file +done +EOS +chmod +x mkdirp +$eunicefix mkdirp + : Some greps do not return status, grrr. echo "grimblepritz" >grimble if grep blurfldyick grimble >/dev/null 2>&1 ; then @@ -833,153 +974,31 @@ chmod +x contains esac -: first determine how to suppress newline on echo command -echo " " -echo "Checking echo to see how to suppress newlines..." -(echo "hi there\c" ; echo " ") >.echotmp -if $contains c .echotmp >/dev/null 2>&1 ; then - echo "...using -n." - n='-n' - c='' -else - cat <<'EOM' -...using \c -EOM - n='' - c='\c' -fi -echo $n "The star should be here-->$c" -echo '*' -rm -f .echotmp - -: compute the number of columns on the terminal for proper question formatting -case "$COLUMNS" in -'') COLUMNS='80';; -esac - -: set up the echo used in my read -myecho="case \"\$xxxm\" in -'') echo $n \"\$rp $c\" >&4;; -*) case \"\$rp\" in - '') echo $n \"[\$xxxm] $c\";; - *) - if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then - echo \"\$rp\" >&4 - echo $n \"[\$xxxm] $c\" >&4 - else - echo $n \"\$rp [\$xxxm] $c\" >&4 - fi - ;; - esac;; -esac" - -: now set up to do reads with possible shell escape and default assignment -cat <<EOSC >myread -$startsh -xxxm=\$dflt -$myecho -ans='!' -case "\$fastread" in -yes) case "\$dflt" in - '') ;; - *) ans=''; - case "\$silent-\$rp" in - true-) ;; - *) echo " " >&4;; - esac;; - esac;; -*) case "\$silent" in - true) case "\$rp" in - '') ans='';; - esac;; - esac;; -esac -while expr "X\$ans" : "X!" >/dev/null; do - read answ - set x \$xxxm - shift - aok=''; eval "ans=\\"\$answ\\"" && aok=y - case "\$answ" in - "!") - sh 1>&4 - echo " " - $myecho - ;; - !*) - set x \`expr "X\$ans" : "X!\(.*\)\$"\` - shift - sh 1>&4 -c "\$*" - echo " " - $myecho - ;; - "\$ans") - case "\$ans" in - \\&*) - set x \`expr "X\$ans" : "X&\(.*\)\$"\` - shift - case "\$1" in - -d) - fastread=yes - echo "(OK, I'll run with -d after this question.)" >&4 - ;; - -*) - echo "*** Sorry, \$1 not supported yet." >&4 - ;; - esac - $myecho - ans=! - ;; - esac;; - *) - case "\$aok" in - y) - echo "*** Substitution done -- please confirm." - xxxm="\$ans" - ans=\`echo $n "\$ans$c" | tr '\012' ' '\` - xxxm="\$ans" - ans=! - ;; - *) - echo "*** Error -- try again." - ans=! - ;; - esac - $myecho - ;; - esac - case "\$ans\$xxxm\$nostick" in - '') - ans=! - $myecho - ;; - esac -done -case "\$ans" in -'') ans="\$xxxm";; -esac -EOSC - : Find the path to the source tree case "$src" in -'') src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;; +'') case "$0" in + */*) + src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` + ;; + *) src='.';; + esac;; esac case "$src" in -'') - src=. - rsrc=.. +'') src=/ + rsrc=/ ;; -/*) rsrc="$src/..";; -*) rsrc="../$src";; +/*) rsrc="$src";; +*) rsrc="../$src";; esac if test -f $rsrc/Configure && \ - $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1 + $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1 then : found it, so we are ok. else rsrc='' for src in . .. ../.. ../../.. ../../../..; do if test -f ../$src/Configure && \ - $contains "^package=$package" ../$src/Configure >/dev/null 2>&1 + $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1 then rsrc=../$src break @@ -988,63 +1007,43 @@ fi case "$rsrc" in '') - echo " " - dflt= - rp="Directory where sources for $package are located?" - . ./myread - src="$ans" - rsrc="$src" - if test -f $rsrc/Configure && \ - $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1 - then - echo "Ok, I've found them under $src" - else - echo "Sorry, I can't seem to be able to locate $package sources." >&4 - exit 1 - fi + cat <<EOM >&4 + +Sorry, I can't seem to locate the source dir for $package. Please start +Configure with an explicit path -- i.e. /some/path/Configure. + +EOM + exit 1 ;; -../.) ;; +../.) rsrc='..';; *) echo " " - echo "Sources for $package found in $src" >&4 + echo "Sources for $package found in \"$src\"." >&4 ;; esac : script used to extract .SH files with variable substitutions -cat >extract <<'EOS' +cat >extract <<EOS CONFIG=true +SRC="$src" +EOS +cat >>extract <<'EOS' echo "Doing variable substitutions on .SH files..." -if test -f $src/MANIFEST; then - set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'` +if test -f "$SRC/MANIFEST"; then + set x `awk '{print $1}' <$SRC/MANIFEST | grep '\.SH'` else echo "(Looking for .SH files under the source directory.)" - set x `(cd $src; find . -name "*.SH" -print)` + set x `(cd "$SRC"; find . -name "*.SH" -print)` fi shift case $# in -0) set x `(cd $src; echo *.SH)`; shift;; +0) set x `(cd "$SRC"; echo *.SH)`; shift;; esac -if test ! -f $src/$1; then +if test ! -f "$SRC/$1"; then shift fi -mkdir_p=' -name=$1; -create=""; -while test $name; do - if test ! -d "$name"; then - create="$name $create"; - name=`echo $name | sed -e "s|^[^/]*$||"`; - name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`; - else - name=""; - fi; -done; -for file in $create; do - mkdir $file; -done -' for file in $*; do - case "$src" in + case "$SRC" in ".") case "$file" in */*) @@ -1062,20 +1061,19 @@ */*) dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` - (set x $dir; shift; eval $mkdir_p) - sh <$src/$dir/$file + ./mkdirp $dir + sh <"$SRC/$dir/$file" ;; *) - sh <$src/$file + sh <"$SRC/$file" ;; esac ;; esac done -if test -f $src/config_h.SH; then +if test -f "$SRC/config_h.SH"; then if test ! -f config.h; then - : oops, they left it out of MANIFEST, probably, so do it anyway. - . $src/config_h.SH + sh <"$SRC/config_h.SH" fi fi EOS @@ -1088,19 +1086,17 @@ *) exec 1>&4;; esac case "$config_sh" in - '') config_sh='config.sh'; config="$rsrc/config.sh";; - /*) config="$config_sh";; - *) config="$rsrc/$config_sh";; + '') config_sh='config.sh';; esac echo " " echo "Fetching answers from $config_sh..." - . $config + cd .. + . $config_sh test "$override" && . ./optdef.sh echo " " - cd .. . UU/extract rm -rf UU - echo "Done." + echo "Extraction done." exit 0 ;; esac @@ -1112,15 +1108,36 @@ trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15 +: first determine how to suppress newline on echo command +echo " " +echo "Checking echo to see how to suppress newlines..." +(echo "hi there\c" ; echo " ") >.echotmp +if $contains c .echotmp >/dev/null 2>&1 ; then + echo "...using -n." + n='-n' + c='' +else + cat <<'EOM' +...using \c +EOM + n='' + c='\c' +fi +echo $n "The star should be here-->$c" +echo '*' +rm -f .echotmp + : Now test for existence of everything in MANIFEST echo " " -if test -f $rsrc/MANIFEST; then +if test -f "$rsrc/MANIFEST"; then echo "First let's make sure your kit is complete. Checking..." >&4 - awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50 + awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \ + (split -l 50 2>/dev/null || split -50) rm -f missing tmppwd=`pwd` for filelist in x??; do - (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing) + (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \ + >/dev/null 2>>"$tmppwd/missing") done if test -s missing; then cat missing >&4 @@ -1154,6 +1171,144 @@ fi rm -f missing x?? +: Find the appropriate value for a newline for tr +echo " " +if test -n "$DJGPP"; then + trnl='\012' +fi +if test X"$trnl" = X; then + case "`echo foo | tr '\n' x 2>/dev/null`" in + foox) trnl='\n' ;; + esac +fi +if test X"$trnl" = X; then + case "`echo foo | tr '\012' x 2>/dev/null`" in + foox) trnl='\012' ;; + esac +fi +if test X"$trnl" = X; then + case "`echo foo | tr '\r\n' xy 2>/dev/null`" in + fooxy) trnl='\n\r' ;; + esac +fi +if test X"$trnl" = X; then + cat <<EOM >&2 + +$me: Fatal Error: cannot figure out how to translate newlines with 'tr'. + +EOM + exit 1 +else + echo "We'll use '$trnl' to transliterate a newline." +fi + +: compute the number of columns on the terminal for proper question formatting +case "$COLUMNS" in +'') COLUMNS='80';; +esac + +: set up the echo used in my read +myecho="case \"\$xxxm\" in +'') echo $n \"\$rp $c\" >&4;; +*) case \"\$rp\" in + '') echo $n \"[\$xxxm] $c\";; + *) + if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then + echo \"\$rp\" >&4 + echo $n \"[\$xxxm] $c\" >&4 + else + echo $n \"\$rp [\$xxxm] $c\" >&4 + fi + ;; + esac;; +esac" + +: now set up to do reads with possible shell escape and default assignment +cat <<EOSC >myread +$startsh +xxxm=\$dflt +$myecho +ans='!' +case "\$fastread" in +yes) case "\$dflt" in + '') ;; + *) ans=''; + case "\$silent-\$rp" in + true-) ;; + *) echo " " >&4;; + esac;; + esac;; +*) case "\$silent" in + true) case "\$rp" in + '') ans='';; + esac;; + esac;; +esac +while expr "X\$ans" : "X!" >/dev/null; do + read answ + set x \$xxxm + shift + aok=''; eval "ans=\\"\$answ\\"" && aok=y + case "\$answ" in + "!") + sh 1>&4 + echo " " + $myecho + ;; + !*) + set x \`expr "X\$ans" : "X!\(.*\)\$"\` + shift + sh 1>&4 -c "\$*" + echo " " + $myecho + ;; + "\$ans") + case "\$ans" in + \\&*) + set x \`expr "X\$ans" : "X&\(.*\)\$"\` + shift + case "\$1" in + -d) + fastread=yes + echo "(OK, I'll run with -d after this question.)" >&4 + ;; + -*) + echo "*** Sorry, \$1 not supported yet." >&4 + ;; + esac + $myecho + ans=! + ;; + esac;; + *) + case "\$aok" in + y) + echo "*** Substitution done -- please confirm." + xxxm="\$ans" + ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\` + xxxm="\$ans" + ans=! + ;; + *) + echo "*** Error -- try again." + ans=! + ;; + esac + $myecho + ;; + esac + case "\$ans\$xxxm\$nostick" in + '') + ans=! + $myecho + ;; + esac +done +case "\$ans" in +'') ans="\$xxxm";; +esac +EOSC + : create .config dir to save info across Configure sessions test -d ../.config || mkdir ../.config cat >../.config/README <<EOF @@ -1215,7 +1370,7 @@ the questions and use the computed defaults (or the previous answers if there was already a config.sh file). Type 'Configure -h' for a list of options. You may also start interactively and then answer '& -d' at any prompt to turn -on the non-interactive behaviour for the remaining of the execution. +on the non-interactive behaviour for the remainder of the execution. EOH . ./myread @@ -1246,6 +1401,24 @@ esac fi +: script used to emit important warnings +cat >warn <<EOS +$startsh +if test \$# -gt 0; then + echo "\$@" >msg +else + cat >msg +fi +echo "*** WARNING:" >&4 +sed -e 's/^/*** /' <msg >&4 +echo "*** " >&4 +cat msg >>config.msg +echo " " >>config.msg +rm -f msg +EOS +chmod +x warn +$eunicefix warn + : find out where common programs are echo " " echo "Locating common programs..." >&4 @@ -1273,9 +1446,16 @@ if test -f \$thisthing; then echo \$thisthing exit 0 + elif test -f \$thisthing$_exe; then + echo \$thisthing + exit 0 elif test -f \$dir/\$thing.exe; then - : on Eunice apparently - echo \$dir/\$thing + if test -n "$DJGPP"; then + echo \$dir/\$thing.exe + else + : on Eunice apparently + echo \$dir/\$thing + fi exit 0 fi ;; @@ -1293,6 +1473,7 @@ chmod chown comm +cp echo expr grep @@ -1307,13 +1488,16 @@ uniq " trylist=" -Mcc +ar cpp date +egrep inews line ln mail +make +nm nroff perl rmail @@ -1333,14 +1517,14 @@ if test -f "$xxx"; then : ok else - echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 + ./warn "no $xxx -- ignoring your setting for $file." xxx=`./loc $file $file $pth` fi ;; '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac - eval $file=$xxx + eval $file=$xxx$_exe eval _$file=$xxx case "$xxx" in /*) @@ -1366,14 +1550,14 @@ if test -f "$xxx"; then : ok else - echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 + ./warn "no $xxx -- ignoring your setting for $file." xxx=`./loc $file $file $pth` fi ;; '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac - eval $file=$xxx + eval $file=$xxx$_exe eval _$file=$xxx case "$xxx" in /*) @@ -1392,14 +1576,39 @@ egrep) echo "Substituting grep for egrep." egrep=$grep + _egrep=$_grep ;; esac case "$ln" in ln) echo "Substituting cp for ln." ln=$cp + _ln=$_cp ;; esac +case "$make" in +make) + case "$gmake" in + gmake) + echo "I can't find make or gmake, and my life depends on it." >&4 + echo "Go find a public domain implementation or fix your PATH setting!" >&4 + exit 1 + ;; + esac + ;; +esac +case "$gmake" in +gmake) ;; +*) # We can't have osname yet. + if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS + # Assume that gmake, if found, is definitely GNU make + # and prefer it over the system make. + echo "Substituting gmake for make." + make=$gmake + _make=$_gmake + fi + ;; +esac case "$test" in test) echo "Hopefully test is built into your sh." @@ -1443,10 +1652,106 @@ ;; esac +: generate the trygcc script for later perusal +cat <<EOS >trygcc +$startsh +EOS +cat <<'EOSC' >>trygcc +case "$cc" in +'') ;; +*) $rm -f try try.* + $cat >try.c <<EOM +int main(int argc, char *argv[]) { + (void) argc; + (void) argv; + return 0; +} +EOM + if $cc -o try $ccflags $ldflags try.c; then + : + else + echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 + despair=yes + trygcc=yes + case "$cc" in + *gcc*) trygcc=no ;; + esac + case "`$cc -v -c try.c 2>&1`" in + *gcc*) trygcc=no ;; + esac + if $test X"$trygcc" = Xyes; then + if gcc -o try -c try.c; then + echo " " + echo "You seem to have a working gcc, though." >&4 + rp="Would you like to use it?" + dflt=y + if $test -f myread; then + . ./myread + else + if $test -f UU/myread; then + . ./UU/myread + else + echo "Cannot find myread, sorry. Aborting." >&2 + exit 1 + fi + fi + case "$ans" in + [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no; + $cat *.cbu >checktmp 2>/dev/null + if $contains ccflags checktmp >/dev/null; then + ./warn <<EOM +Any previous setting of the C compiler flags has been lost. +It may be necessary to pass -Dcc=gcc to Configure right away. +EOM + fi;; + esac + fi + fi + fi + $rm -f try try.* + ;; +esac +EOSC + +: generate the checkcc script for later perusal +cat <<EOS >checkcc +$startsh +EOS +cat <<'EOSC' >>checkcc +case "$cc" in +'') ;; +*) $rm -f try try.* + $cat >try.c <<EOM +int main(int argc, char *argv[]) { + (void) argc; + (void) argv; + return 0; +} +EOM + if $cc -o try $ccflags $ldflags try.c; then + : + else + if $test X"$despair" = Xyes; then + echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 + fi + $cat >&4 <<EOM +You need to find a working C compiler. +Either (purchase and) install the C compiler supplied by your OS vendor, +or for a free C compiler try http://gcc.gnu.org/ +I cannot continue any further, aborting. +EOM + exit 1 + fi + $rm -f try try.* + ;; +esac +EOSC + : determine whether symbolic links are supported echo " " $touch blurfl -if $ln -s blurfl sym > /dev/null 2>&1 ; then +$rm -f sym +if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then echo "Symbolic links are supported." >&4 lns="$ln -s" else @@ -1455,45 +1760,497 @@ fi $rm -f blurfl sym +: determine whether symbolic links are supported +echo " " +case "$lns" in +*"ln"*" -s") + echo "Checking how to test for symbolic links..." >&4 + $lns blurfl sym + if $test "X$issymlink" = X; then + case "$newsh" in + '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;; + *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;; + esac + if test $? = 0; then + issymlink="test -h" + else + echo "Your builtin 'test -h' may be broken." >&4 + case "$test" in + /*) ;; + *) pth=`echo $PATH | sed -e "s/$p_/ /g"` + for p in $pth + do + if test -f "$p/$test"; then + test="$p/$test" + break + fi + done + ;; + esac + case "$test" in + /*) + echo "Trying external '$test -h'." >&4 + issymlink="$test -h" + if $test ! -h sym >/dev/null 2>&1; then + echo "External '$test -h' is broken, too." >&4 + issymlink='' + fi + ;; + *) issymlink='' ;; + esac + fi + fi + if $test "X$issymlink" = X; then + if $test -L sym 2>/dev/null; then + issymlink="$test -L" + echo "The builtin '$test -L' worked." >&4 + fi + fi + if $test "X$issymlink" != X; then + echo "You can test for symbolic links with '$issymlink'." >&4 + else + echo "I do not know how you can test for symbolic links." >&4 + fi + $rm -f blurfl sym + ;; +*) echo "No symbolic links, so not testing for their testing..." >&4 + ;; +esac + +: define absolute package source directory +case "$src" in +/*) pkgsrc=$src;; +*) pkgsrc=`cd $rsrc; pwd`;; +esac + +: Duplicate the tree with symbolic links if -Dmksymlinks was supplied +case "$mksymlinks" in +$define|true|[yY]*) + echo " " + case "$src" in + ''|'.') echo "Cannot create symlinks in the original directory." >&4 + exit 1 + ;; + *) case "$lns:$issymlink" in + *"ln"*" -s:"*"test -"?) + echo "Creating the symbolic links..." >&4 + echo "(First creating the subdirectories...)" >&4 + cd .. + awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | \ + sort -u | while true + do + read dir + test -z "$dir" && break + ./UU/mkdirp $dir 2>/dev/null + if test -d $dir; then + : ok + else + echo "Failed to create '$dir'. Aborting." >&4 + exit 1 + fi + done + echo "(Now creating the symlinks...)" >&4 + awk '{print $1}' $src/MANIFEST | while true; do + read filename + test -z "$filename" && break + if test -f $filename; then + if $issymlink $filename; then + rm -f $filename + fi + fi + if test -f $filename; then + echo "$filename already exists, not symlinking." + else + ln -s $pkgsrc/$filename $filename + fi + done + echo "(Checking current directory...)" >&4 + cd UU + awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \ + (split -l 50 2>/dev/null || split -50) + rm -f missing + tmppwd=`pwd` + for filelist in x??; do + (cd ..; ls `cat "$tmppwd/$filelist"` \ + >/dev/null 2>>"$tmppwd/missing") + done + if test -s missing; then + echo "Failed duplication of source tree. Aborting." >&4 + exit 1 + fi + ;; + *) echo "(I cannot figure out how to do symbolic links, ignoring!)" >&4 + ;; + esac + ;; + esac + ;; +esac + : see whether [:lower:] and [:upper:] are supported character classes echo " " -up='[A-Z]' -low='[a-z]' -case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in +case "`echo AbyZ | LC_ALL=C $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in ABYZ) echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 up='[:upper:]' low='[:lower:]' ;; +*) # There is a discontinuity in EBCDIC between 'I' and 'J' + # (0xc9 and 0xd1), therefore that is a nice testing point. + if test "X$up" = X -o "X$low" = X; then + case "`echo IJ | LC_ALL=C $tr '[I-J]' '[i-j]' 2>/dev/null`" in + ij) up='[A-Z]' + low='[a-z]' + ;; + esac + fi + if test "X$up" = X -o "X$low" = X; then + case "`echo IJ | LC_ALL=C $tr I-J i-j 2>/dev/null`" in + ij) up='A-Z' + low='a-z' + ;; + esac + fi + if test "X$up" = X -o "X$low" = X; then + case "`echo IJ | od -x 2>/dev/null`" in + *C9D1*|*c9d1*) + echo "Hey, this might be EBCDIC." >&4 + if test "X$up" = X -o "X$low" = X; then + case "`echo IJ | \ + LC_ALL=C $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in + ij) up='[A-IJ-RS-Z]' + low='[a-ij-rs-z]' + ;; + esac + fi + if test "X$up" = X -o "X$low" = X; then + case "`echo IJ | LC_ALL=C $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in + ij) up='A-IJ-RS-Z' + low='a-ij-rs-z' + ;; + esac + fi + ;; + esac + fi +esac +case "`echo IJ | LC_ALL=C $tr \"$up\" \"$low\" 2>/dev/null`" in +ij) + echo "Using $up and $low to convert case." >&4 + ;; *) - echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4 - ;; + echo "I don't know how to translate letters from upper to lower case." >&4 + echo "Your tr is not acting any way I know of." >&4 + exit 1 + ;; esac : set up the translation script tr, must be called with ./tr of course cat >tr <<EOSC $startsh case "\$1\$2" in -'[A-Z][a-z]') exec $tr '$up' '$low';; -'[a-z][A-Z]') exec $tr '$low' '$up';; +'[A-Z][a-z]') LC_ALL=C exec $tr '$up' '$low';; +'[a-z][A-Z]') LC_ALL=C exec $tr '$low' '$up';; esac -exec $tr "\$@" +LC_ALL=C exec $tr "\$@" EOSC chmod +x tr $eunicefix tr +: setup for possible cross-compilation +run='' +to=: +from=: +usecrosscompile='undef' +targetarch='' +case "$usecrosscompile" in +$define|true|[yY]*) + echo "Cross-compilation is not supported for this package." >&4 + exit 1 + ;; +esac + +: Determine the name of the machine +myuname=`$uname -a 2>/dev/null` +$test -z "$myuname" && myuname=`hostname 2>/dev/null` +myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ + ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` +newmyuname="$myuname" +$test -f "$uname$_exe" && has_uname=y + +: Guessing of the OS name -- half the following guesses are probably wrong... +: If you have better tests or hints, please send them to the metaconfig +: authors and to Rap...@po... +$test -f /irix && osname=irix +$test -f /xenix && osname=sco_xenix +$test -f /dynix && osname=dynix +$test -f /dnix && osname=dnix +$test -f /lynx.os && osname=lynxos +$test -f /unicos && osname=unicos && osvers=`$uname -r` +$test -f /unicosmk && osname=unicosmk && osvers=`$uname -r` +$test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` +$test -f /bin/mips && /bin/mips && osname=mips +$test -d /NextApps && set X `hostinfo | $grep 'NeXT Mach.*:' | \ + $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 +$test -d /usr/apollo/bin && osname=apollo +$test -f /etc/saf/_sactab && osname=svr4 +$test -d /usr/include/minix && osname=minix +$test -f /system/gnu_library/bin/ar.pm && osname=vos +if $test -d /MachTen -o -d /MachTen_Folder; then + osname=machten + if $test -x /sbin/version; then + osvers=`/sbin/version | $awk '{print $2}' | + $sed -e 's/[A-Za-z]$//'` + elif $test -x /usr/etc/version; then + osvers=`/usr/etc/version | $awk '{print $2}' | + $sed -e 's/[A-Za-z]$//'` + else + osvers="$2.$3" + fi +fi +$test -f /sys/posix.dll && + $test -f /usr/bin/what && + set X `/usr/bin/what /sys/posix.dll` && + $test "$3" = UWIN && + osname=uwin && + osvers="$5" +if $test "X$has_uname" != X; then + set X $myuname + shift + case "$5" in + fps*) osname=fps ;; + mips*) + case "$4" in + umips) osname=umips ;; + *) osname=mips ;; + esac;; + [23]100) osname=mips ;; + next*) osname=next ;; + i386*) + tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'` + if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then + osname='sco' + osvers=$tmp + elif $test -f /etc/kconfig; then + osname=isc + if $test "$lns" = "$ln -s"; then + osvers=4 + elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then + osvers=3 + elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then + osvers=2 + fi + fi + tmp='' + ;; + pc*) + if $test -n "$DJGPP"; then + osname=dos + osvers=djgpp + fi + ;; + esac + case "$1" in + aix) osname=aix + tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` + case "$tmp" in + 'not found') osvers="$4"."$3" ;; + '<3240'|'<>3240') osvers=3.2.0 ;; + '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; + '=3250'|'>3250') osvers=3.2.5 ;; + *) osvers=$tmp;; + esac + ;; + bsd386) osname=bsd386 + osvers=`$uname -r` + ;; + cygwin*) osname=cygwin + osvers="$3" + ;; + *dc.osx) osname=dcosx + osvers="$3" + ;; + dnix) osname=dnix + osvers="$3" + ;; + domainos) osname=apollo + osvers="$3" + ;; + dgux) osname=dgux + osvers="$3" + ;; + dynixptx*) osname=dynixptx + osvers=`echo "$4"|sed 's/^v//'` + ;; + freebsd) osname=freebsd + osvers="$3" ;; + genix) osname=genix ;; + hp*) osname=hpux + osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'` + ;; + irix*) osname=irix + case "$3" in + 4*) osvers=4 ;; + 5*) osvers=5 ;; + *) osvers="$3" ;; + esac + ;; + linux) osname=linux + case "$3" in + *) osvers="$3" ;; + esac + ;; + MiNT) osname=mint + ;; + netbsd*) osname=netbsd + osvers="$3" + ;; + news-os) osvers="$3" + case "$3" in + 4*) osname=newsos4 ;; + *) osname=newsos ;; + esac + ;; + next*) osname=next ;; + nonstop-ux) osname=nonstopux ;; + openbsd) osname=openbsd + osvers="$3" + ;; + POSIX-BC | posix-bc ) osname=posix-bc + osvers="$3" + ;; + powerux | power_ux | powermax_os | powermaxos | \ + powerunix | power_unix) osname=powerux + osvers="$3" + ;; + qnx) osname=qnx + osvers="$4" + ;; + solaris) osname=solaris + case "$3" in + 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; + *) osvers="$3" ;; + esac + ;; + sunos) osname=sunos + case "$3" in + 5*) osname=solaris + osvers=`echo $3 | $sed 's/^5/2/g'` ;; + *) osvers="$3" ;; + esac + ;; + titanos) osname=titanos + case "$3" in + 1*) osvers=1 ;; + 2*) osvers=2 ;; + 3*) osvers=3 ;; + 4*) osvers=4 ;; + *) osvers="$3" ;; + esac + ;; + ultrix) osname=ultrix + osvers="$3" + ;; + osf1|mls+) case "$5" in + alpha) + osname=dec_osf + osvers=`sizer -v | awk '{print $3}' | \ + ./tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'` + case "$osvers" in + [1-9].[0-9]*) ;; + *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;; + esac + ;; + hp*) osname=hp_osf1 ;; + mips) osname=mips_osf1 ;; + esac + ;; + unixware) osname=svr5 + osvers="$4" + ;; + uts) osname=uts + osvers="$3" + ;; + vos) osvers="$3" + ;; + $2) case "$osname" in + *isc*) ;; + *freebsd*) ;; + svr*) + : svr4.x or possibly later + case "svr$3" in + ${osname}*) + osname=svr$3 + osvers=$4 + ;; + esac + case "$osname" in + svr4.0) + : Check for ESIX + if $test -f /stand/boot ; then + eval `$grep '^INITPROG=[a-z/0-9]*$' /stand/boot` + if $test -n "$INITPROG" -a -f "$INITPROG"; then + isesix=`strings -a $INITPROG | \ + $grep 'ESIX SYSTEM V/386 Release 4.0'` + if $test -n "$isesix"; then + osname=esix4 + fi + fi + fi + ;; + esac + ;; + *) if $test -f /etc/systemid; then + osname=sco + set `echo $3 | $sed 's/\./ /g'` $4 + if $test -f $src/hints/sco_$1_$2_$3.sh; then + osvers=$1.$2.$3 + elif $test -f $src/hints/sco_$1_$2.sh; then + osvers=$1.$2 + elif $test -f $src/hints/sco_$1.sh; then + osvers=$1 + fi + else + case "$osname" in + '') : Still unknown. Probably a generic Sys V. + osname="sysv" + osvers="$3" + ;; + esac + fi + ;; + esac + ;; + *) case "$osname" in + '') : Still unknown. Probably a generic BSD. + osname="$1" + osvers="$3" + ;; + esac + ;; + esac +else + if $test -f /vmunix -a -f $src/hints/news_os.sh; then + (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1 + if $contains news-os UU/kernel.what >/dev/null 2>&1; then + osname=news_os + fi + $rm -f UU/kernel.what + elif $test -d c:/.; then + set X $myuname + osname=os2 + osvers="$5" + fi +fi + : Try to determine whether config.sh was made on this system case "$config_sh" in '') -myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1` -myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ - ./tr '[A-Z]' '[a-z]' | tr '\012' ' '` -newmyuname="$myuname" dflt=n case "$knowitall" in '') if test -f ../config.sh; then if $contains myuname= ../config.sh >/dev/null 2>&1; then - eval "`grep myuname= ../config.sh`" + eval "`$grep myuname= ../config.sh`" fi if test "X$myuname" = "X$newmyuname"; then dflt=y @@ -1503,18 +2260,21 @@ *) dflt=y;; esac -: Get old answers, if there is a config file out there +: Get old answers from config file if it was generated on the same system hint=default -hintfile='' -if test -f ../config.sh; then +if $test -f ../config.sh; then echo " " rp="I see a config.sh file. Shall I use it to set the defaults?" . ./myread case "$ans" in - n*|N*) echo "OK, I'll ignore it.";; + n*|N*) echo "OK, I'll ignore it." + mv ../config.sh ../config.sh.old + myuname="$newmyuname" + ;; *) echo "Fetching default answers from your old config.sh file..." >&4 tmp_n="$n" tmp_c="$c" + tmp_sh="$sh" . ../config.sh cp ../config.sh . n="$tmp_n" @@ -1529,6 +2289,7 @@ echo "Fetching default answers from $config_sh..." >&4 tmp_n="$n" tmp_c="$c" + tmp_sh="$sh" cd .. cp $config_sh config.sh 2>/dev/null chmod +w config.sh @@ -1540,16 +2301,76 @@ hint=previous ;; esac -test "$override" && . ./optdef.sh -myuname="$newmyuname" +case "$sh" in +'') sh="$tmp_sh" ;; +esac +$test "$override" && . ./optdef.sh : Restore computed paths for file in $loclist $trylist; do eval $file="\$_$file" done +. ./checkcc +case "$targetarch" in +'') ;; +*) hostarch=$osname + osname=`echo $targetarch|sed 's,^[^-]*-,,'` + osvers='' + ;; +esac + +: Process their -A options +. ./posthint.sh + +: Ask them to confirm the OS name +cat << EOM + +Configure uses the operating system name and version to set some defaults. +The default value is probably right if the name rings a bell. Otherwise, +since spelling matters for me, either accept the default or answer "none" +to leave it blank. + +EOM +case "$osname" in + ''|' ') + case "$hintfile" in + ''|' '|none) dflt=none ;; + *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;; + esac + ;; + *) dflt="$osname" ;; +esac +rp="Operating system name?" +. ./myread +case "$ans" in +none) osname='' ;; +*) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;; +esac +echo " " +case "$osvers" in + ''|' ') + case "$hintfile" in + ''|' '|none) dflt=none ;; + *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'` + dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'` + case "$dflt" in + ''|' ') dflt=none ;; + esac + ;; + esac + ;; + *) dflt="$osvers" ;; +esac +rp="Operating system version?" +. ./myread +case "$ans" in +none) osvers='' ;; +*) osvers="$ans" ;; +esac + : who configured the system -cf_time=`$date 2>&1` +cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` cf_by=`(logname) 2>/dev/null` case "$cf_by" in "") @@ -1639,10 +2460,15 @@ nopath_ok='' orig_rp="$rp" orig_dflt="$dflt" +case "$gfpth" in +'') gfpth='.' ;; +esac case "$fn" in *\(*) - expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok + : getfile will accept an answer from the comma-separated list + : enclosed in parentheses even if it does not meet other criteria. + expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok fn=`echo $fn | sed 's/(.*)//'` ;; esac @@ -1741,6 +2567,7 @@ true) case "$ansexp" in /*) value="$ansexp" ;; + [a-zA-Z]:/*) value="$ansexp" ;; *) redo=true case "$already" in @@ -1765,18 +2592,40 @@ '') case "$type" in File) - if test -f "$ansexp"; then - type='' - elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1 - then - echo "($value is not a plain file, but that's ok.)" - type='' - fi + for fp in $gfpth; do + if test "X$fp" = X.; then + pf="$ansexp" + else + pf="$fp/$ansexp" + fi + if test -f "$pf"; then + type='' + elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1 + then + echo "($value is not a plain file, but that's ok.)" + type='' + fi + if test X"$type" = X; then + value="$pf" + break + fi + done ;; Directory) - if test -d "$ansexp"; then - type='' - fi + for fp in $gfpth; do + if test "X$fp" = X.; then + dir="$ans" + direxp="$ansexp" + else + dir="$fp/$ansexp" + direxp="$fp/$ansexp" + fi + if test -d "$direxp"; then + type='' + value="$dir" + break + fi + done ;; Locate) if test -d "$ansexp"; then @@ -1830,6 +2679,7 @@ rp="$orig_rp" dflt="$orig_dflt" rm -f getfile.ok +test "X$gfpthkeep" != Xy && gfpth="" EOSC : determine root of directory hierarchy where package will be installed. @@ -1895,12 +2745,18 @@ esac;; esac' +: allow them to override the AFS root +case "$afsroot" in +'') afsroot=/afs ;; +*) afsroot=$afsroot ;; +esac + : is AFS running? echo " " case "$afs" in $define|true) afs=true ;; $undef|false) afs=false ;; -*) if test -d /afs; then +*) if $test -d $afsroot; then afs=true else afs=false @@ -1949,7 +2805,8 @@ echo " " case "$sysman" in '') - syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1' + syspath='/usr/share/man/man1 /usr/man/man1' + syspath="$syspath /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" @@ -1986,9 +2843,10 @@ echo "If you don't want the manual sources installed, answer 'none'." case "$mansrc" in '') - lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1" - lookpath="$lookpath $prefixexp/man/l_man/man1" + lookpath="$prefixexp/share/man/man1 $prefixexp/man/man1" + lookpath="$lookpath $prefixexp/man/u_man/man1 $prefixexp/man/l_man/man1" lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl" + lookpath="$lookpath /usr/share/man/man1 /usr/local/share/man/man1" lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1" lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" lookpath="$lookpath /usr/man/man.L" @@ -2161,148 +3019,22 @@ . ./getfile perlpath="$ans" -: see what memory models we can support -case "$models" in -'') - $cat >pdp11.c <<'EOP' -main() { -#ifdef pdp11 - exit(0); -#else - exit(1); -#endif -} -EOP - cc -o pdp11 pdp11.c >/dev/null 2>&1 - if ./pdp11 2>/dev/null; then - dflt='unsplit split' - else - tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge` - case "$tans" in - X) dflt='none';; - *) if $test -d /lib/small || $test -d /usr/lib/small; then - dflt='small' - else - dflt='' - fi - if $test -d /lib/medium || $test -d /usr/lib/medium; then - dflt="$dflt medium" - fi - if $test -d /lib/large || $test -d /usr/lib/large; then - dflt="$dflt large" - fi - if $test -d /lib/huge || $test -d /usr/lib/huge; then - dflt="$dflt huge" - fi - esac - fi;; -*) dflt="$models";; +: Determine the C compiler to be used +echo " " +case "$cc" in +'') dflt=cc;; +*) dflt="$cc";; esac -$cat <<EOM - -Some systems have different model sizes. On most systems they are called -small, medium, large, and huge. On the PDP11 they are called unsplit and -split. If your system doesn't support different memory models, say "none". -If you wish to force everything to one memory model, say "none" here and -put the appropriate flags later when it asks you for other cc and ld flags. -Venix systems may wish to put "none" and let the compiler figure things out. -(In the following question multiple model names should be space separated.) - -EOM -rp="Which memory models are supported?" +rp="Use which C compiler?" . ./myread -models="$ans" +cc="$ans" -case "$models" in -none) - small='' - medium='' - large='' - huge='' - unsplit='' - split='' - ;; -*split) - case "$split" in - '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \ - $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then - dflt='-i' - else - dflt='none' - fi;; - *) dflt="$split";; - esac - rp="What flag indicates separate I and D space?" - . ./myread - tans="$ans" - case "$tans" in - none) tans='';; - esac - split="$tans" - unsplit='';; -*large*|*small*|*medium*|*huge*) - case "$models" in - *large*) - case "$large" in - '') dflt='-Ml';; - *) dflt="$large";; - esac - rp="What flag indicates large model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - large="$tans";; - *) large='';; - esac - case "$models" in - *huge*) case "$huge" in - '') dflt='-Mh';; - *) dflt="$huge";; - esac - rp="What flag indicates huge model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - huge="$tans";; - *) huge="$large";; - esac - case "$models" in - *medium*) case "$medium" in - '') dflt='-Mm';; - *) dflt="$medium";; - esac - rp="What flag indicates medium model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - medium="$tans";; - *) medium="$large";; - esac - case "$models" in - *small*) case "$small" in - '') dflt='none';; - *) dflt="$small";; - esac - rp="What flag indicates small model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - small="$tans";; - *) small='';; - esac - ;; -*) - echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4 - ;; -esac +: See whether they have no cc but they do have gcc +. ./trygcc +if $test -f cc.cbu; then + . ./cc.cbu +fi +. ./checkcc : make some quick guesses about what we are up against echo " " @@ -2315,13 +3047,19 @@ echo exit 1 >xenix echo exit 1 >venix echo exit 1 >os2 +echo exit 1 >gnu +echo exit 1 >linux +echo exit 1 >dos d_bsd="$undef" +d_linux="$undef" +d_dos="$undef" +d_os2="$undef" $cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 then echo "Looks kind of like an OSF/1 system, but we'll see..." echo exit 0 >osf1 -elif test `echo abc | tr a-z A-Z` = Abc ; then +elif test `echo abc | $tr a-z A-Z` = Abc ; then xxx=`./loc addbib blurfl $pth` if $test -f $xxx; then echo "Looks kind of like a USG system with BSD features, but we'll see..." @@ -2339,6 +3077,17 @@ echo "Looks kind of like a BSD system, but we'll see..." d_bsd="$define" echo exit 0 >bsd +elif + $rm --version 2>/dev/null >foo; + $contains "Free Software Foundation" foo >/dev/null +then + xxx=`uname` + echo exit 0 >gnu + echo "Looks kind of like a GNU/$xxx system, but we'll see..." + if $test X$xxx = XLinux; then + d_linux="$define" + echo exit 0 >linux + fi else echo "Looks kind of like a Version 7 system, but we'll see..." echo exit 0 >v7 @@ -2364,9 +3113,21 @@ *) $cat <<'EOI' I have the feeling something is not exactly right, however...don't tell me... +EOI + if test -n "$DJGPP"; then + case "X${MACHTYPE:-nonesuchmach}" in + cygwin) echo "hah!... you're running under Cygwin!";; + *) echo "got it... you're running DOS with DJGPP!";; + esac + echo exit 0 >dos + d_dos="$define" + else + $cat <<'EOI' lemme think...does HAL ring a bell?...no, of course, you're only running OS/2! EOI - echo exit 0 >os2 + echo exit 0 >os2 + d_os2="$define" + fi ;; esac if test -f /xenix; then @@ -2391,55 +3152,14 @@ echo "Nor is it Venix..." fi fi -chmod +x bsd usg v7 osf1 eunice xenix venix os2 -$eunicefix bsd usg v7 osf1 eunice xenix venix os2 +chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux +$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux $rm -f foo -: see if we need a special compiler +: Check whether they have gcc in any guise. echo " " -if ./usg; then - case "$cc" in - '') case "$Mcc" in - /*) dflt='Mcc';; - *) case "$large" in - -M*) dflt='cc';; - *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then - if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then - dflt='cc' - else - dflt='cc -M' - fi - else - dflt='cc' - fi;; - esac;; - esac;; - *) dflt="$cc";; - esac - $cat <<'EOM' -On some systems the default C compiler will not resolve multiple global -references that happen to have the same name. On some such systems the "Mcc" -command may be used to force these to be resolved. On other systems a "cc -M" -command is required. (Note that the -M flag on other systems indicates a -memory model to use!) If you have the Gnu C compiler, you might wish to use -that instead. - -EOM - rp="What command will force resolution on this system?" - . ./myread - cc="$ans" -else - case "$cc" in - '') dflt=cc;; - *) dflt="$cc";; - esac - rp="Use which C compiler?" - . ./myread - cc="$ans" -fi -echo " " echo "Checking for GNU cc in disguise and/or its version number..." >&4 -$cat >gccvers.c <<EOM +$cat >try.c <<EOM #include <stdio.h> int main() { #ifdef __GNUC__ @@ -2452,11 +3172,13 @@ exit(0); } EOM -if $cc -o gccvers gccvers.c >/dev/null 2>&1; then - gccversion=`./gccvers` +if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then + gccversion=`$run ./try` case "$gccversion" in '') echo "You are not using GNU cc." ;; - *) echo "You are using GNU cc $gccversion." ;; + *) echo "You are using GNU cc $gccversion." + ccname=gcc + ;; esac else echo " " @@ -2469,11 +3191,58 @@ ;; esac fi -$rm -f gccvers* +$rm -f try try.* case "$gccversion" in 1*) cpp=`./loc gcc-cpp $cpp $pth` ;; esac +case "$gccversion" in +'') gccosandvers='' ;; +*) gccshortvers=`echo "$gccversion"|sed 's/ .*//'` + gccosandvers=`$cc -v 2>&1 | \ + $grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"` + gccshortvers='' + case "$gccosandvers" in + $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr + $osname$osvers) ;; # looking good + $osname*) cat <<EOM >&4 +*** WHOA THERE!!! *** + + Your gcc has not been compiled for the exact release of + your operating system ($gccosandvers versus $osname$osvers). + + In general it is a good idea to keep gcc synchronized with + the operating system because otherwise serious problems + may ensue when trying to compile software, like Perl. + + I'm trying to be optimistic here, though, and will continue. + If later during the configuration and build icky compilation + problems appear (headerfile conflicts being the most commo... [truncated message content] |
From: <rma...@us...> - 2008-05-28 08:00:31
|
Revision: 5 http://mailagent.svn.sourceforge.net/mailagent/?rev=5&view=rev Author: rmanfredi Date: 2008-05-28 01:00:09 -0700 (Wed, 28 May 2008) Log Message: ----------- Reset CDPATH to avoid pdksh's emission of the chosen dir on "cd". Modified Paths: -------------- trunk/mailagent/install.SH Modified: trunk/mailagent/install.SH =================================================================== --- trunk/mailagent/install.SH 2008-01-17 10:04:24 UTC (rev 4) +++ trunk/mailagent/install.SH 2008-05-28 08:00:09 UTC (rev 5) @@ -52,6 +52,8 @@ uid="" gid="" +CDPATH="" + # simulates mkdir -p mkdir_p=' name=$1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2008-01-17 10:05:19
|
Revision: 4 http://mailagent.svn.sourceforge.net/mailagent/?rev=4&view=rev Author: rmanfredi Date: 2008-01-17 02:04:24 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Changes required to have filter compile on recent Linux. Modified Paths: -------------- trunk/mailagent/agent/filter/io.c trunk/mailagent/agent/filter/lock.c trunk/mailagent/agent/filter/logfile.c trunk/mailagent/agent/filter/main.c Modified: trunk/mailagent/agent/filter/io.c =================================================================== --- trunk/mailagent/agent/filter/io.c 2008-01-17 09:58:33 UTC (rev 3) +++ trunk/mailagent/agent/filter/io.c 2008-01-17 10:04:24 UTC (rev 4) @@ -217,7 +217,6 @@ private int queued = 0; /* True when mail queued safely */ private struct mail mail; /* Where mail is expected to lie */ -extern int errno; /* System call error status */ extern char *malloc(); /* Memory allocation */ extern char *realloc(); /* Re-allocation of memory pool */ extern char *logname(); /* User's login name */ Modified: trunk/mailagent/agent/filter/lock.c =================================================================== --- trunk/mailagent/agent/filter/lock.c 2008-01-17 09:58:33 UTC (rev 3) +++ trunk/mailagent/agent/filter/lock.c 2008-01-17 10:04:24 UTC (rev 4) @@ -72,7 +72,6 @@ private char lockfile[MAX_STRING]; /* Location of main filter lock file */ private int locked = 0; /* Did we lock successfully? */ -extern int errno; /* System error status */ extern Time_t time(); /* Current time */ public int filter_lock(dir) Modified: trunk/mailagent/agent/filter/logfile.c =================================================================== --- trunk/mailagent/agent/filter/logfile.c 2008-01-17 09:58:33 UTC (rev 3) +++ trunk/mailagent/agent/filter/logfile.c 2008-01-17 10:04:24 UTC (rev 4) @@ -45,6 +45,7 @@ #include "config.h" #include "portable.h" #include <stdio.h> +#include <errno.h> #include <sys/types.h> #ifdef I_TIME Modified: trunk/mailagent/agent/filter/main.c =================================================================== --- trunk/mailagent/agent/filter/main.c 2008-01-17 09:58:33 UTC (rev 3) +++ trunk/mailagent/agent/filter/main.c 2008-01-17 10:04:24 UTC (rev 4) @@ -78,7 +78,6 @@ private void no_setid(); /* Option not allowed when running set[ug]id */ extern void env_home(); /* Only for tests */ -extern int errno; public void main(argc, argv, envp) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2008-01-17 10:03:21
|
Revision: 3 http://mailagent.svn.sourceforge.net/mailagent/?rev=3&view=rev Author: rmanfredi Date: 2008-01-17 01:58:33 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Removed use of $* which is no longer supported by perl 5.10. Modified Paths: -------------- trunk/mailagent/agent/pl/actions.pl trunk/mailagent/agent/pl/analyze.pl trunk/mailagent/agent/pl/matching.pl trunk/mailagent/agent/pl/parse.pl trunk/mailagent/agent/pl/q.pl trunk/mailagent/agent/pl/read_conf.pl trunk/mailagent/bin/perload Modified: trunk/mailagent/agent/pl/actions.pl =================================================================== --- trunk/mailagent/agent/pl/actions.pl 2006-11-04 11:46:52 UTC (rev 2) +++ trunk/mailagent/agent/pl/actions.pl 2008-01-17 09:58:33 UTC (rev 3) @@ -863,6 +863,7 @@ /^Return-Receipt-To:/i || # Sendmail's acknowledgment /^Received:/i || # We want to remove received /^Precedence:/i || + /^X-Complaints-To:/i || # INN2 does not like this field /^Errors-To:/i # Error report redirection ) { $last_was_header = 1; # Mark we discarded the line @@ -1628,6 +1629,9 @@ &add_log("WARNING cannot chdir to $cf'home: $!") if $loglvl > 5; } + $script =~ s/^\s*~/$cf'home/; # ~ substitution + $script =~ s/\b~/$cf'home/g; # ~ substitution as first letter in word + # Set up the @ARGV array, by parsing the $script variable with &shellwords. # Note that the @ARGV array is held in the main package, but since the # mailagent makes no use of it at this point, there is no need to save its Modified: trunk/mailagent/agent/pl/analyze.pl =================================================================== --- trunk/mailagent/agent/pl/analyze.pl 2006-11-04 11:46:52 UTC (rev 2) +++ trunk/mailagent/agent/pl/analyze.pl 2008-01-17 09:58:33 UTC (rev 3) @@ -108,15 +108,12 @@ local(@filter) = split(/\n/, $header); # Look for each X-Filter local($address) = &email_addr; # Our e-mail address local($done) = 0; # Already processed ? - local($*) = 0; local($_); foreach (@filter) { # Maybe we'll find ourselves if (/mailagent.*for (\S+)/) { # Mark left by us ? $done = 1 if $1 eq $address; # Yes, we did that - $* = 1; # Remove that X-Filter line, LEAVE will add one anyway - $Header{'Head'} =~ s/^X-Filter:\s*mailagent.*for $address\n//; - $* = 0; + $Header{'Head'} =~ s/^X-Filter:\s*mailagent.*for $address\n//m; last; } } Modified: trunk/mailagent/agent/pl/matching.pl =================================================================== --- trunk/mailagent/agent/pl/matching.pl 2006-11-04 11:46:52 UTC (rev 2) +++ trunk/mailagent/agent/pl/matching.pl 2008-01-17 09:58:33 UTC (rev 3) @@ -363,15 +363,14 @@ } else { $buffer = $Header{$selector}; } - $* = 1; # Multi-line matching is attempted - @matched = eval '($buffer =~ ' . $pattern . ');'; + # Ensure multi-line matching by adding trailing "m" option to pattern + @matched = eval '($buffer =~ ' . $pattern . 'm);'; # If buffer is empty, we have to recheck the pattern in a non array context # to see if there is a match. Otherwise, /(.*)/ does not seem to match an # empty string as it returns an empty string in $matched[0]... - $matched[0] = eval '$buffer =~ ' . $pattern if $buffer eq ''; + $matched[0] = eval '$buffer =~ ' . $pattern . 'm' if $buffer eq ''; &eval_error; # Make sure eval worked &update_backref(*matched); # Record non-null backreferences - $* = 0; $matched[0]; # Return matching status } Modified: trunk/mailagent/agent/pl/parse.pl =================================================================== --- trunk/mailagent/agent/pl/parse.pl 2006-11-04 11:46:52 UTC (rev 2) +++ trunk/mailagent/agent/pl/parse.pl 2008-01-17 09:58:33 UTC (rev 3) @@ -232,12 +232,10 @@ # There is usually one Apparently-To line per address. Remove all new lines # in the header line and replace them with ','. Likewise for To: and Cc:. # although it is far less likely to occur. - local($*) = 1; foreach $field ('Apparently-To', 'To', 'Cc') { - $Header{$field} =~ s/\n/,/g; # Remove new-lines - $Header{$field} =~ s/,$/\n/; # Restore last new-line + $Header{$field} =~ s/\n/,/gm; # Remove new-lines + $Header{$field} =~ s/,$/\n/m; # Restore last new-line } - $* = 0; # If no To: field, then maybe there is an Apparently-To: instead. If so, # make them identical. Otherwise, assume the mail was directed to the user. Modified: trunk/mailagent/agent/pl/q.pl =================================================================== --- trunk/mailagent/agent/pl/q.pl 2006-11-04 11:46:52 UTC (rev 2) +++ trunk/mailagent/agent/pl/q.pl 2008-01-17 09:58:33 UTC (rev 3) @@ -15,8 +15,7 @@ # Quotation removal routine sub q { local($_) = @_; - local($*) = 1; - s/^://g; + s/^://gm; $_; } Modified: trunk/mailagent/agent/pl/read_conf.pl =================================================================== --- trunk/mailagent/agent/pl/read_conf.pl 2006-11-04 11:46:52 UTC (rev 2) +++ trunk/mailagent/agent/pl/read_conf.pl 2008-01-17 09:58:33 UTC (rev 3) @@ -111,13 +111,12 @@ if ($@ ne '') { # Parsing error detected local($error) = $@; # Logged error - local($*) = 1; $error = (split(/\n/, $error))[0]; # Keep only first line # Dump error message on stderr, as well as faulty configuration file. # The original is restored out of the perl form to avoid surprise. - $eval =~ s/^\$.* =~ s\|~\|.*\n//g; # Remove added ~ substitutions - $eval =~ s/^\$//g; # Remove leading '$' - $eval =~ s/ = "(.*)";/: $1/g; # Keep only variable value + $eval =~ s/^\$.* =~ s\|~\|.*\n//gm; # Remove added ~ substitutions + $eval =~ s/^\$//gm; # Remove leading '$' + $eval =~ s/ = "(.*)";/: $1/gm; # Keep only variable value chop($eval); print STDERR <<EOM; **** Syntax error in configuration: Modified: trunk/mailagent/bin/perload =================================================================== --- trunk/mailagent/bin/perload 2006-11-04 11:46:52 UTC (rev 2) +++ trunk/mailagent/bin/perload 2008-01-17 09:58:33 UTC (rev 3) @@ -273,8 +273,7 @@ : unless seek(main'DATA, $pos, 0); : local($/) = "\n}"; : local($body) = scalar(<main'DATA>); -: local($*) = 1; -: die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/; +: die "End of file found while loading $_[0].\n" unless $body =~ /^\}$/m; EOC if ($opt_t) { print &q(<<'EOC'); @@ -460,8 +459,7 @@ sub q { local($_) = @_; - local($*) = 1; - s/^://g; + s/^://gm; $_; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2006-11-04 11:48:40
|
Revision: 2 http://svn.sourceforge.net/mailagent/?rev=2&view=rev Author: rmanfredi Date: 2006-11-04 03:46:52 -0800 (Sat, 04 Nov 2006) Log Message: ----------- Added configuration instructions for INN2. Made sure newsgate reads only from stdin, as the other arguments passed on the command line must be ignored with INN2. Modified Paths: -------------- trunk/mailagent/misc/news/README trunk/mailagent/misc/news/ml.map trunk/mailagent/misc/news/newsgate Property Changed: ---------------- trunk/mailagent/misc/news/README trunk/mailagent/misc/news/ml.map trunk/mailagent/misc/news/newsgate trunk/mailagent/misc/news/rules Modified: trunk/mailagent/misc/news/README =================================================================== --- trunk/mailagent/misc/news/README 2006-08-24 13:24:12 UTC (rev 1) +++ trunk/mailagent/misc/news/README 2006-11-04 11:46:52 UTC (rev 2) @@ -37,6 +37,28 @@ -odb delivery in background -oi a single "." is not the end of a message +---------------------------------------------------------------------- + +Here are sample configurations for INN and INN2. This configuration +gateways the groups in the ml.* hierearchy to the newsgate program, +which will then dispatch to the proper addresses, as defined in the +/etc/news/ml.map file. + +The INN and INN2 configurations are made via /etc/news/newsfeeds. + +INN newsfeeds configuration: + +ml-gateway!:!*,ml.*/!local\ + :Tp:/usr/local/bin/newsgate -log /var/log/news/newsgate.log + +INN2 newsfeeds configuration (fo...@ex... will be ingored): + +ml-gateway!:!*:W*,Tp:\ + sm %s | /usr/local/bin/newsgate -log /var/log/news/newsgate.log * +f...@ex...:ml.*/!local:Tm:ml-gateway! + +---------------------------------------------------------------------- + Have fun! Raphael Manfredi <Rap...@po...> Property changes on: trunk/mailagent/misc/news/README ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Modified: trunk/mailagent/misc/news/ml.map =================================================================== --- trunk/mailagent/misc/news/ml.map 2006-08-24 13:24:12 UTC (rev 1) +++ trunk/mailagent/misc/news/ml.map 2006-11-04 11:46:52 UTC (rev 2) @@ -1,5 +1,5 @@ # -# $Id: ml.map,v 3.0.1.2 2001/03/13 13:16:30 ram Exp ram $ +# $Id$ # # $Log: ml.map,v $ # Revision 3.0.1.2 2001/03/13 13:16:30 ram @@ -24,6 +24,12 @@ # # (the leading !* entry is to remove all ME: default settings) # +# For INN2, add those lines to /etc/news/newsfeeds: +# +# ml-gateway!:!*:W*,Tp:\ +# sm %s | /usr/bin/newsgate -log /var/log/news/newsgate.log * +# fo...@ex...:ml.*/!local:Tm:ml-gateway! +# # You must have sendmail correctly configured on the machine you're using # newsgate for this to work. The "ml" prefix here is just my convention # for mail-lists that I feed to my local news server. @@ -33,7 +39,6 @@ ml.softs.amanda.users ama...@am... ml.softs.suck su...@3w... ml.debian.fr deb...@li... -ml.linux.abit lin...@ge... ml.linux.kernel lin...@vg... ml.lang.perl.porters per...@pe... Property changes on: trunk/mailagent/misc/news/ml.map ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Modified: trunk/mailagent/misc/news/newsgate =================================================================== --- trunk/mailagent/misc/news/newsgate 2006-08-24 13:24:12 UTC (rev 1) +++ trunk/mailagent/misc/news/newsgate 2006-11-04 11:46:52 UTC (rev 2) @@ -3,7 +3,7 @@ if $running_under_some_shell; # -# $Id: newsgate,v 3.0.1.2 2001/03/13 13:17:03 ram Exp ram $ +# $Id$ # # Copyright (c) 1990-2006, Raphael Manfredi # @@ -101,7 +101,7 @@ my %header; my $field; -while (<>) { +while (<STDIN>) { last if /^$/; if ( /^Path:/i || @@ -211,7 +211,7 @@ print MAILER $header; print MAILER "In-Reply-To: $in_reply_to\n" if length $in_reply_to; print MAILER "X-Mailer: $me $VERSION at $cname\n\n"; # To prevent loops -while (<>) { +while (<STDIN>) { print MAILER; } close MAILER; Property changes on: trunk/mailagent/misc/news/newsgate ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Property changes on: trunk/mailagent/misc/news/rules ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |