--- at-3.1.8.orig/debian/changelog +++ at-3.1.8/debian/changelog @@ -0,0 +1,276 @@ +at (3.1.8-10.2) stable; urgency=high + + * Another NMU by the Security Team + * This time the bugfix will propagate properly since y.tab.c y.tab.h + lex.yy.c are auto-removed in the build target this time. These files + should not be contained in the original tarball in the first place, + btw. + + -- Martin Schulze Fri, 18 Jan 2002 09:42:21 +0100 + +at (3.1.8-10.1) stable; urgency=high + + * Security upload + * Removed superflous free() which caused a segv + * Check for the return value of mktime() + + -- Martin Schulze Sat, 12 Jan 2002 16:22:42 +0100 + +at (3.1.8-10) frozen unstable; urgency=high + + * Suidunregister /usr/bin (closes: Bug#59421). + * Rewrote perm.c to correctly deal with single character pw_name and + incomplete last lines in at.{allow,deny}. Thanks to + Sotiris.Vassilopoulos@betatech.gr for pointing this out. + * Included patch by Florian Zumbiehl adding some + read-only variables to no_export. + * SIGCHLD handler now correctly loops on a non-blocking waitpid. + Hopefully this gets rid of zombies even on SMP systems + (closes: Bug#60549). + * Changed AC_FUNC_GETLOADAVG to AC_REPLACE_FUNCS(getloadavg) in + configure.in since it introduces a spurious depencency on libelfg0 + whenever that package is installed on the build machine. + (closes: Bug#61295). + * configure.in: rewrote directory tests such that configure fails due to + a missing SPOOLDIR only when --with-jobdir or --with-atspool doesn't + specify an explicit path. + + -- Siggy Brentrup Mon, 3 Apr 2000 13:56:47 +0200 + +at (3.1.8-9) frozen unstable; urgency=low, closes=53715 56047 56607 55560 55514 + + * Added SIGCHLD handler to release zombies (closes 53715 56047 56607) + * Changed dependency to mail-transport-agent only since /usr/bin/mail + doesn't grok the Subject: line. (closes 55560) + * Fixed postinst to suidregister /usr/bin/at (closes 55514) + + -- Siggy Brentrup Sun, 30 Jan 2000 22:00:46 +0100 + +at (3.1.8-8) unstable; urgency=low + + * New maintainer (according to Joey this is an upstream job too :) + * Upgrade to standards version 3.1.1.1 + + -- Siggy Brentrup Tue, 11 Jan 2000 10:08:06 +0100 + +at (3.1.8-7.1) unstable; urgency=low + + * Non-maintainer release, with permission. + * Corrected patch for Bug#39527 so that it doesn't ignore all pending jobs. + (closes: #49708, #49739, #50984). + + -- Richard Braakman Thu, 25 Nov 1999 23:32:43 +0100 + +at (3.1.8-7) unstable; urgency=low, closes=38293 25070 39527 38293 43032 38962 42469 + + * Changed load average to run to 1.5 (closes: Bug#38293) + * Unignored SIGCHLD (closes: Bug#25070) + * Applied patch from Zack Weinberg that keeps + atd from spinning the disk (closes: Bug#39527) + * Added support for arguments to /etc/init.d/atd (closes: Bug#38293) + * Reworked the date parser so it will recognize 2345 and 102900 + properly, 12900 as well (closes: Bug#43032, Bug#38962) + * Corrected weekday parser (closes: Bug#42469) + * Corrected path in atrun(8). + + -- Martin Schulze Thu, 28 Oct 1999 00:05:52 +0200 + +at (3.1.8-6) unstable; urgency=low, closes=34919 36628 36650 + + * Added text -x atd to init.d file (closes: Bug#34919) + * Added parsetest target to Makefile.in to provide a test program + * Hax0red the date/time parser so it parses the date properly, + especially when specifying a year (closes: Bug#36628) + * Added -M (don't send mail at all) feature to at client and at server + (closes: Bug#36650) + + -- Martin Schulze Sun, 23 May 1999 18:15:33 +0200 + +at (3.1.8-5) unstable; urgency=low, closes=30796 29843 + + * Added proper support for time specified with AM/pm. Thanks to Julian + Gilbey (closes: Bug#30796) + * Added more system accounts to at.deny file (closes: Bug#29843) + + -- Martin Schulze Sun, 3 Jan 1999 17:02:56 +0100 + +at (3.1.8-4) unstable; urgency=low, closes=27414 19272 24943 11633 17131 27872 26917 25227 23141 21528 18181 + + * Applied OpenBSD/buflen patch provided by Topi Miettinen + (closes: Bug#27414) + * Corrected at_allow(5) manpage (closes: Bug#24943) + * Moved /bin/sh warning in front of input stream (closes: Bug#11633) + * Added prototype for yylex() and yyerror() (closes: Bug#17131) + * Corrected recognition of weekdays (closes: Bug#27872, Bug#26917, Bug#18181) + * Reformatted some "SEE ALSO" section. + * Adjusted Usage output of atq according to code and manpage. `-v' is + not supported anymore. (closes: Bug#25227, Bug#21528) + * Re-added support for atq displaying the owner of the atjob. I dunno + if the author would accept it if he would appear again, though. + (closes: Bug#23141) + * Removed preinst + * Documented problem with NFS-mounted spool directories (Bug#13603 and + Bug#13605) + + -- Martin Schulze Sat, 24 Oct 1998 12:59:08 +0200 + +at (3.1.8-3) unstable; urgency=low, closes=19272 14529 15812 16429 16581 25981 25982 + + * New maintainer + * Updated Standards-Version + * Rewrote rules file + * Fixed manpages + * Renamed copyright (closes: Bug#14529, fixes: Bug#16429) + * Fixed misspelled files in /usr/doc/at (fixes: Bug#16429) + * Adjusted copyright file + * Added /etc/init.d/atd as conffile + * Completed init.d script + * Aded --with-jobdir and --with-atspool so it builds on systems where it + isn't installed as well (closes: Bug#15812) + * Corrected location of sendmail (closes: Bug#16429) + * Fixed preinst (closes: Bug#16581) + + -- Martin Schulze Fri, 23 Oct 1998 20:54:46 +0200 + +at (3.1.8-2.1.1) unstable; urgency=low + + * Non maintainer upload. + config.{guess,sub} changed to recognize a Arm architecture. + + -- Turbo Fredriksson Thu, 20 Aug 1998 04:48:23 -0400 + +at (3.1.8-2.1) frozen unstable; urgency=low + + * Non-maintainer upload. + * Provides correct name of copyright file, fixing important bug + #19272 + + -- John Goerzen Sat, 18 Apr 1998 23:59:28 -0500 + +at (3.1.8-2) unstable; urgency=medium + * libc6 version + * (as in -1) Fix date parsing bug with 'next monday' where the current day + * is Mondy + * Fix date parsing bug with February + * Misc. manpage changes + -- Thomas Koenig Mon, 29 Sep 1997 17:21:40 +0200 + +at (3.1.8-1) stable; urgency=low + * ../at_3.1.7-6_i386.deb + * + * libc5 version + * Fix date parsing bug with 'next monday' where the current day is monday + * Fix date parsing bug with February + * Misc. manpage changes + -- Thomas Koenig Sun, 28 Sep 1997 21:33:44 +0200 + +at (3.1.7-6) unstable; urgency=high + * ../at_3.1.7-4_i386.deb + * + * libc6 version + * should fix installation bugs + -- Thomas Koenig Mon, 22 Sep 1997 20:26:05 +0200 + +at (3.1.7-5) stable; urgency=low + * ../at_3.1.7-5_i386.deb + * + * libc5 version + * Make runlevel detection more robust + -- Thomas Koenig Mon, 22 Sep 1997 15:48:55 +0200 + +at (3.1.7-4) unstable; urgency=high + * ../at_3.1.7-4_i386.deb + * + * libc6 version + * removes spurious dependency on libelf + * Start atd if runlevel cannot be determined + -- Thomas Koenig Tue, 15 Sep 1997 14:16:24 +0200 + +at (3.1.7-3) stable; urgency=low + * ../at_3.1.7-3_i386.deb + * + * libc5 version + * removed spurious dependendy on libelf0 + -- Thomas Koenig Tue, 17 Jun 1997 18:01:33 +0200 + +at (3.1.7-2) unstable; urgency=low + * ../at_3.1.7-2_i386.deb + * Recompiled for libc6 (hamm) + -- Thomas Koenig Sat, 14 Jun 1997 21:01:17 +0200 + +at (3.1.7-1) unstable frozen; urgency=medium + * ../at_3.1.7-1_i386.deb + * Make upcase words work + * Start atd if runlevel can't be determined + -- Thomas Koenig Mon, 26 May 1997 10:38:06 +0200 + +at (3.1.6-1) unstable frozen; urgency=medium + * ../at_3.1.6-1_i386.deb + * Fix broken "noon", "teatime" and "midnight" + -- Thomas Koenig Tue, 13 May 1997 14:50:40 +0200 + +at (3.1.5-2) unstable frozen; urgency=high + + * + * ../at_3.1.5-2_i386.deb + * Also check for /etc/suid.conf when calling suidregister + -- Thomas Koenig Wed, 7 May 1997 11:14:49 +0200 + +at (3.1.5-1) unstable frozen; urgency=high + + * ../at_3.1.5-1_i386.deb + * New "upstream" release: Fixes bug #9390 + * Removed "set -e" from prerm in an effort to fix #9311 + * From now on, changelog will be more canonical (#9236) + -- Thomas Koenig Tue, 6 May 1997 19:50:02 +0200 + +at (3.1.4-2) unstable frozen; urgency=low + + * ../at_3.1.4-2_i386.deb + * Start atd in postinst only if runlevel is right (bug #9073) + * Fixed extra space in /etc/init.d/atd (bug #9046) + +at (3.1.4-1) unstable frozen; urgency=low + + * ../at_3.1.4-1_i386.deb + * New "upstream" release + +at (3.1.3-1) unstable frozen; urgency=low + + * ../at_3.1.3-2_i386.deb + * make distclean on debian/rules clean + * depend on mail-transport-agent or mailx + +at (3.1.3-1) unstable frozen; urgency=low + + * ../at_3.1.3-1_i386.deb + * New "upstream release", bug #8716 fixed + +at (3.1.2-2) unstable; urgency=low + + * ../at_3.1.2-2_i386.deb + * adapted aj's /etc/init.d/atd (bug #8501) + * Fix bug #8495 (exit preinst cleanly when no /etc/crontab) + * Fix bug #7936 (for real this time) + +at (3.1.2-1) unstable; urgency=low + + * ../at_3.1.2-1_i386.deb + * Fixed bug #8189 (prerm/postrm failure). + * New "upstream" version. + +at (3.1.1-1) unstable; urgency=low + + * ../at_3.1-1_i386.deb + * Fixed bug #7936 and #7808 + +at (3.0-1) unstable; urgency=low + + * ../at_3.0-1_i386.deb + * Initial Release. + + -- Thomas Koenig Thu, 20 Feb 1997 17:33:12 +0100 + +Local variables: +mode: debian-changelog +End: --- at-3.1.8.orig/debian/conffiles +++ at-3.1.8/debian/conffiles @@ -0,0 +1,2 @@ +/etc/at.deny +/etc/init.d/atd --- at-3.1.8.orig/debian/control +++ at-3.1.8/debian/control @@ -0,0 +1,17 @@ +Source: at +Section: admin +Priority: important +Maintainer: Siggy Brentrup +Standards-Version: 3.1.1.1 + +Package: at +Architecture: any +Depends: ${shlibs:Depends}, mail-transport-agent +Description: Delayed job execution and batch processing + At and batch read shell commands from standard input + storing them as a job to be scheduled for execution in the + future. + . + Use + at to run the job at a specified time + batch to run the job when system load levels permit --- at-3.1.8.orig/debian/copyright +++ at-3.1.8/debian/copyright @@ -0,0 +1,26 @@ +This is the Debian GNU/Linux prepackaged version of the deferred +execution scheduler called at. + +This package was debianized by its author Thomas Koenig +, taken over and re-packaged first by Martin +Schulze and now by Siggy Brentrup . +This may be considered the experimental upstream source. + + Copyright: 1993, 1994, 1995, 1996, 1997 (c) Thomas Koenig + 1993 (c) David Parsons + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- at-3.1.8.orig/debian/postinst +++ at-3.1.8/debian/postinst @@ -0,0 +1,27 @@ +#!/bin/sh +set -e +SEQFILE=/var/spool/cron/atjobs/.SEQ +OLDSEQFILE=$SEQFILE-old + +olddoc=/usr/doc +docdir=/usr/share/doc + +if [ -f $OLDSEQFILE ] +then + mv -f $OLDSEQFILE $SEQFILE +fi +if [ -f /etc/suid.conf -a -x /usr/sbin/suidregister ]; then + suidunregister -s at /usr/bin # Undo bogus suidregister from 3.1.8-8 + suidregister -s at /usr/bin/at root root 4755 +fi +chown daemon.daemon /var/spool/cron/atjobs /var/spool/cron/atspool /var/spool/cron/atjobs/.SEQ +update-rc.d atd defaults 89 > /dev/null + +# Add FSSTND compatability symlink to obsolete /usr/doc +if [ "$1" = "configure" ]; then + if [ -d ${olddoc} -a ! -e ${olddoc}/at -a -d ${docdir}/at ] ; then + ln -sf ../share/doc/at ${olddoc}/at + fi +fi + +/etc/init.d/atd start --- at-3.1.8.orig/debian/postrm +++ at-3.1.8/debian/postrm @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] +then + update-rc.d atd remove >/dev/null; + rm -rf /var/spool/atjobs /var/spool/atspool +fi +if [ -f /etc/suid.conf -a -x /usr/sbin/suidunregister ]; then + suidunregister -s at /usr/bin/at +fi + --- at-3.1.8.orig/debian/preinst +++ at-3.1.8/debian/preinst @@ -0,0 +1,25 @@ +#!/usr/bin/perl -- + +system("/etc/init.d/atd stop") if -x "/etc/init.d/atd"; +$etc='/etc'; +$seqfile='/var/spool/cron/atjobs/.SEQ'; + +$re='\*[^\s]*\s+(\*\s+){3}(\*|\d+)\s+root\s+atrun\s'; + +open(OI,"$etc/crontab") || exit 0; +open(NI,">$etc/crontab.prermnew") || die "Creating new crontab: $!\n"; +while() { + if (m/^$re/o) { $mod++; next; } + print NI || die "Writing new crontab: $!\n"; +} +close(NI) || die "Closing new crontab: $!\n"; +if ($mod) { + rename("$etc/crontab.prermnew","$etc/crontab") || + die "Installing new crontab: $!\n"; # +} else { + unlink("$etc/crontab.prermnew") || die "Aborting new crontab: $!\n"; +} + +# Save the old sequence number, if it's there... +rename($seqfile, $seqfile . "-old"); +exit 0; --- at-3.1.8.orig/debian/prerm +++ at-3.1.8/debian/prerm @@ -0,0 +1,13 @@ +#! /bin/sh + +olddoc=/usr/doc +docdir=/usr/share/doc + +if [ -x /etc/init.d/atd ] +then + /etc/init.d/atd stop +fi +# Remove FSSTND compatibility symlink from obsolete /usr/doc +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L ${olddoc}/at ] ; then + rm -f ${olddoc}/at +fi --- at-3.1.8.orig/debian/rc +++ at-3.1.8/debian/rc @@ -0,0 +1,44 @@ +#! /bin/sh +# +# This file was automatically customized by debmake on Thu, 20 Feb 1997 17:33:12 +0100 +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux by Ian Murdock . +# Modified for Debian by Christoph Lameter . +# Modified for Debian GNU/Linux by Martin Schulze . + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/atd +PIDFILE=/var/run/atd.pid + +# Arguments to atd +# +ARGS="" + +test -x $DAEMON || exit 0 + +case "$1" in + start) + echo -n "Starting deferred execution scheduler: atd" + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS + echo "." + ;; + stop) + echo -n "Stopping deferred execution scheduler: atd" + start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON + echo "." + ;; + reload) + echo "Not implemented." + ;; + force-reload|restart) + sh $0 stop + sh $0 start + ;; + *) + echo "Usage: /etc/init.d/atd {start|stop|restart|force-reload|reload}" + exit 1 + ;; +esac + +exit 0 --- at-3.1.8.orig/debian/rules +++ at-3.1.8/debian/rules @@ -0,0 +1,115 @@ +#! /usr/bin/make -f + +# Copyright 1994-98 joey@infodrom.north.de (Martin Schulze) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 dated June, 1991. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA +SHELL=/bin/bash + +# The name and version of the source +# +source = $(shell grep "^Source: " debian/control|head -1|sed 's/Source: \(.*\)/\1/g') +package = $(shell grep "^Package: " debian/control|head -1|sed 's/Package: \(.*\)/\1/g') +version = $(shell grep "^$(source) " debian/changelog|head -1 |sed 's/.*(\(.*\)\-[^\-]*).*/\1/g') +revision = $(shell grep "^$(source) " debian/changelog|head -1 |sed 's/.*([^\-]*\-\(.*\)).*/\1/g') + +installbin = install -g root -o root -m 755 +installdoc = install -g root -o root -m 644 + +build: + -rm -f y.tab.c y.tab.h lex.yy.c + -test -f config.cache || PATH=/usr/sbin:$${PATH} ./configure --prefix=/usr \ + --with-loadavg_mx=1.5 \ + --with-jobdir=/var/spool/cron/atjobs \ + --with-atspool=/var/spool/cron/atspool + sed 's,/usr/lib/sendmail,/usr/sbin/sendmail,g' \ + < config.h > config.h.new + mv -f config.h.new config.h + $(MAKE) + touch stamp-build + +clean: debclean + rm -f stamp-build + -$(MAKE) distclean + rm -rf *~ TAGS + +debclean: +# Cleans debian binary directories to allow binary creation + rm -rf debian/tmp + rm -f debian/{files,substvars} + +binary-indep: +# Nothing to be done here + +#find debian/tmp/usr/share/doc debian/tmp/usr/share/man -type f | xargs gzip -9 +#find debian/tmp/usr/share/man -type l | xargs rm +#cd debian/tmp/usr/share/man/man1 && ln -s at.1.gz batch.1.gz && ln -s at.1.gz atq.1.gz && ln -s at.1.gz atrm.1.gz +#cd debian/tmp/usr/share/man/man5 && ln -s at_allow.5.gz at_deny.5.gz && rm -f at_deny.5 + +binary-arch: debclean + test -f stamp-build || $(MAKE) -f debian/rules build + $(installbin) -d debian/tmp/DEBIAN + chown -R root.root debian/tmp + chmod -R g-ws debian/tmp + $(installbin) -d debian/tmp/usr/share/doc/$(package) + $(installbin) debian/{preinst,postinst,postrm} debian/tmp/DEBIAN/ + $(installdoc) debian/conffiles debian/tmp/DEBIAN/ + $(installdoc) debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian + # + $(installdoc) ChangeLog debian/tmp/usr/share/doc/$(package)/changelog + $(installdoc) debian/copyright debian/tmp/usr/share/doc/$(package)/ + $(installdoc) README debian/tmp/usr/share/doc/$(package)/readme.txt + gzip -9f debian/tmp/usr/share/doc/$(package)/{changelog{,.Debian},readme.txt} + # + $(MAKE) IROOT=`pwd`/debian/tmp mandir=/usr/share/man docdir=/usr/share/doc install + rm -f debian/tmp/usr/share/doc/at/{Copyright,ChangeLog,README} + rm -f debian/tmp/usr/share/man/man1/{atq,atrm,batch}.1 + rm -f debian/tmp/usr/share/man/man5/at_deny.5 + mv -f debian/tmp/usr/share/man/man5/at_allow.5 debian/tmp/usr/share/man/man5/at.allow.5 + gzip -9 debian/tmp/usr/share/man/man?/* + (cd debian/tmp/usr/share/man/man1 && ln -s at.1.gz atq.1.gz && ln -s at.1.gz atrm.1.gz && ln -s at.1.gz batch.1.gz) + (cd debian/tmp/usr/share/man/man5 && ln -s at.allow.5.gz at.deny.5.gz) + # + $(installbin) -d debian/tmp/etc/init.d + $(installbin) debian/rc debian/tmp/etc/init.d/atd + dpkg-shlibdeps debian/tmp/usr/sbin/atd debian/tmp/usr/bin/at + dpkg-gencontrol -isp + dpkg --build debian/tmp .. + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b' or dsc; false + +dsc: + -test -d debian/tmp && $(MAKE) -f debian/rules clean + if [ ! -f ../$(source)_$(version).orig.tar.gz -a -f ../orig/$(source)_$(version).orig.tar.gz ]; \ + then \ + ln -s orig/$(source)_$(version).orig.tar.gz ../$(source)_$(version).orig.tar.gz; \ + touch /tmp/stamp-$(source)-link; \ + fi; \ + cd .. && dpkg-source -b $(source)-$(version) + if [ -f /tmp/stamp-$(source)-link ]; then \ + rm ../$(source)_$(version).orig.tar.gz /tmp/stamp-$(source)-link; \ + fi + +checkroot: + $(checkdir) + test root = "`whoami`" + +dist: binary dsc + +.PHONY: binary binary-arch binary-indep clean checkroot +# Local variables: +# mode: makefile +# End: --- at-3.1.8.orig/Makefile.in +++ at-3.1.8/Makefile.in @@ -112,7 +112,9 @@ $(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/ cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 $(INSTALL) -g root -o root -m 644 atd.8 $(IROOT)$(man8dir)/ - $(INSTALL) -g root -o root -m 644 atrun.8 $(IROOT)$(man8dir)/ + sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman + $(INSTALL) -g root -o root -m 644 tmpman $(IROOT)$(man8dir)/atrun.8 + rm -f tmpman $(INSTALL) -g root -o root -m 644 at_allow.5 $(IROOT)$(man5dir)/ cd $(IROOT)$(man5dir) && $(LN_S) -f at_allow.5 at_deny.5 $(INSTALL) -g root -o root -m 644 $(DOCS) $(IROOT)$(atdocdir) @@ -131,10 +133,12 @@ clean: rm -f subs.sed *.o *.s at atd core a.out *~ $(CLONES) *.bak stamp-built + rm -f parsetest distclean: clean rm -rf at.1 atd.8 atrun.8 config.cache atrun config.h \ config.status Makefile debian/tmp config.log build + rm -f y.tab.c y.tab.h lex.yy.c checkin: $(DIST) test -d RCS && for a in $(DIST); do ci -l $$a ; done @@ -144,6 +148,9 @@ Filelist.asc: Filelist pgp -sba Filelist + +parsetest: lex.yy.c y.tab.c + $(CC) -o parsetest $(CFLAGS) $(DEFS) -DTEST_PARSER -DNEED_YYWRAP lex.yy.c y.tab.c .depend: $(CSRCS) gcc $(CFLAGS) $(DEFS) -MM $(CSRCS) > .depend --- at-3.1.8.orig/at.1.in +++ at-3.1.8/at.1.in @@ -248,7 +248,11 @@ .br .I @ETCDIR@/at.deny .SH SEE ALSO -cron(1), nice(1), sh(1), umask(2), atd(8) +.BR cron (1), +.BR nice (1), +.BR sh (1), +.BR umask (2), +.BR atd (8). .SH BUGS The correct operation of .B batch --- at-3.1.8.orig/at.c +++ at-3.1.8/at.c @@ -111,7 +111,7 @@ static char rcsid[] = "$Id: at.c,v 1.29 1997/09/28 20:00:16 ig25 Exp $"; char *no_export[] = { - "TERM", "DISPLAY", "_", "SHELLOPTS" + "TERM", "DISPLAY", "_", "SHELLOPTS", "BASH_VERSINFO", "EUID", "GROUPS", "PPID", "UID" }; static int send_mail = 0; @@ -235,6 +235,7 @@ /* Install the signal handler for SIGINT; terminate after removing the * spool file if necessary */ + memset(&act, 0, sizeof act); act.sa_handler = sigc; sigemptyset(&(act.sa_mask)); act.sa_flags = 0; @@ -274,8 +275,8 @@ if ((jobno = nextjob()) == EOF) perr("Cannot generate job number"); - sprintf(ppos, "%c%5lx%8lx", queue, - jobno, (unsigned long) (runtimer / 60)); + (void)snprintf(ppos, sizeof(atfile) - (ppos - atfile), + "%c%5lx%8lx", queue, jobno, (unsigned long) (runtimer / 60)); for (ap = ppos; *ap != '\0'; ap++) if (*ap == ' ') @@ -291,7 +292,7 @@ * bit. Yes, this is a kluge. */ cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR); - if ((fd = creat(atfile, O_WRONLY)) == -1) + if ((fd = open(atfile, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, S_IRUSR)) == -1) perr("Cannot create atjob file %.500s", atfile); if ((fd2 = dup(fd)) < 0) @@ -461,14 +462,6 @@ close(fd2); - /* POSIX.2 allows the shell specified by the user's SHELL environment - variable, the login shell from the user's password database entry, - or /bin/sh to be the command interpreter that processes the at-job. - It also alows a warning diagnostic to be printed. Because of the - possible variance, we always output the diagnostic. */ - - fprintf(stderr, "warning: commands will be executed using /bin/sh\n"); - runtime = localtime(&runtimer); /* We only use the sick POSIX time format if POSIXLY_CORRECT @@ -546,6 +539,7 @@ long jobno; time_t runtimer; char timestr[TIMESIZE]; + struct passwd *pwd; PRIV_START @@ -581,7 +575,10 @@ } else { strftime(timestr, TIMESIZE, TIMEFORMAT_ISO, runtime); } - printf("%ld\t%s %c\n", jobno, timestr, queue); + if ((pwd = getpwuid(buf.st_uid))) + printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name); + else + printf("%ld\t%s %c\n", jobno, timestr, queue); } PRIV_END } @@ -695,7 +692,7 @@ char *pgm; int program = AT; /* our default program */ - char *options = "q:f:mvldVc"; /* default options for at */ + char *options = "q:f:MmvldhVc"; /* default options for at */ int disp_version = 0; time_t timer; struct passwd *pwe; @@ -726,16 +723,20 @@ */ if (strcmp(pgm, "atq") == 0) { program = ATQ; - options = "q:V"; + options = "hq:V"; } else if (strcmp(pgm, "atrm") == 0) { program = ATRM; - options = "V"; + options = "hV"; } /* process whatever options we can process */ opterr = 1; while ((c = getopt(argc, argv, options)) != EOF) switch (c) { + case 'h': + usage(); + exit (0); + case 'v': /* verify time settings */ atverify = 1; break; @@ -744,6 +745,10 @@ send_mail = 1; break; + case 'M': /* don't send mail, even when job failed */ + send_mail = -1; + break; + case 'f': atinput = optarg; break; @@ -753,7 +758,7 @@ usage(); atqueue = queue = *optarg; - if (!(islower(queue) || isupper(queue))) + if (!(islower(queue) || isupper(queue)) & (queue != '=')) usage(); queue_set = 1; @@ -842,6 +847,15 @@ struct tm *tm = localtime(&timer); fprintf(stderr, "%s\n", asctime(tm)); } + + /* POSIX.2 allows the shell specified by the user's SHELL environment + variable, the login shell from the user's password database entry, + or /bin/sh to be the command interpreter that processes the at-job. + It also alows a warning diagnostic to be printed. Because of the + possible variance, we always output the diagnostic. */ + + fprintf(stderr, "warning: commands will be executed using /bin/sh\n"); + writefile(timer, queue); break; --- at-3.1.8.orig/at.deny +++ at-3.1.8/at.deny @@ -1,13 +1,24 @@ -nobody +alias +backup bin daemon -sys +ftp +games +gnats +guest +irc lp -sync mail -news -uucp -games man -guest -ftp +nobody +operator +proxy +qmaild +qmaill +qmailp +qmailq +qmailr +qmails +sync +sys +www-data --- at-3.1.8.orig/at_allow.5 +++ at-3.1.8/at_allow.5 @@ -1,16 +1,16 @@ -.Id $Id: at_allow.5,v 1.1 1997/09/28 20:00:28 ig25 Exp $ -.TH AT_ACCESS 5 "Sep 1997" "" "Linux Programmer's Manual" +.Id $Id: at.allow.5,v 1.1 1997/09/28 20:00:28 ig25 Exp $ +.TH AT.ALLOW 5 "Sep 1997" "" "Linux Programmer's Manual" .SH NAME -at.acess, at.deny \- determine who can submit jobs via at or batch +at.allow, at.deny \- determine who can submit jobs via at or batch .SH DESCRIPTION The -.I /etc/at.access +.I /etc/at.allow and .I /etc/at.deny files determine which user can submit commands for later execution via -.B at(1) +.BR at (1) or -.BR batch(1) . +.BR batch (1) . .PP The format of the files is a list of usernames, one on each line. Whitespace is not permitted. @@ -29,4 +29,8 @@ .I /etc/at.deny is checked. .SH "SEE ALSO" -at(1), atrun(1), cron(1), crontab(1), atd(8) +.BR at (1), +.BR atrun (1), +.BR cron (8), +.BR crontab (1), +.BR atd (8). --- at-3.1.8.orig/atd.8.in +++ at-3.1.8/atd.8.in @@ -46,6 +46,11 @@ is installed as .B @prefix@/sbin/atrun for backward compatibility. +.SH WARNING +.B atd +won't work if its spool directory is mounted via NFS even if +.I no_root_squash +is set. .SH FILES .I @ATJBD@ The directory for storing jobs; this should be mode 700, owner @@ -61,9 +66,15 @@ .B at system. .SH "SEE ALSO" -at(1), atrun(1), cron(1), crontab(1), syslog(3), at_deny(5), at_allow(5) +.BR at (1), +.BR atrun (1), +.BR cron (8), +.BR crontab (1), +.BR syslog (3), +.BR at.deny (5), +.BR at.allow(5). .SH BUGS The functionality of .B atd should be merged into -.BR cron(1) . +.BR cron (8) . --- at-3.1.8.orig/atd.c +++ at-3.1.8/atd.c @@ -22,6 +22,18 @@ #include "config.h" #endif +/* + * /usr/bin/mail aka /usr/bin/mailx require the subject to be + * specified on the command line instead of reading it from stdin like + * /usr/sbin/sendmail does. For now simply disable MAILC and MAILX, + * + * TODO: Remove tests for MAILC and MAILX from configure.in in the + * next upstream version. + */ +#undef MAILC +#undef MAILX + + /* System Headers */ #include @@ -101,6 +113,8 @@ static char rcsid[] = "$Id: atd.c,v 1.28 1997/05/06 08:31:09 ig25 Exp $"; static double load_avg = LOADAVG_MX; static time_t now; +static time_t last_chg; +static int nothing_to_do; unsigned int batch_interval; static int run_as_daemon = 0; @@ -121,6 +135,29 @@ return; } +/* SIGCHLD handler - discards completion status of children */ +RETSIGTYPE +release_zombie(int dummy) +{ + int status; + pid_t pid; + + while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { +#ifdef DEBUG_ZOMBIE + if (WIFEXITED(status)) + syslog(LOG_INFO, "pid %ld exited with status %d.", pid, WEXITSTATUS(status)); + else if (WIFSIGNALED(status)) + syslog(LOG_NOTICE, "pid %ld killed with signal %d.", pid, WTERMSIG(status)); + else if (WIFSTOPPED(status)) + syslog(LOG_NOTICE, "pid %ld stopped with signal %d.", pid, WSTOPSIG(status)); + else + syslog(LOG_WARNING, "pid %ld unknown reason for SIGCHLD", pid); +#endif + } + return; +} + + /* Local functions */ static int @@ -255,6 +292,13 @@ fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC); + /* + * If the spool directory is mounted via NFS `atd' isn't able to + * read from the job file and will bump out here. The file is + * opened as "root" but it is read as "daemon" which fails over + * NFS and works with local file systems. It's not clear where + * the bug is located. -Joey + */ if (fscanf(stream, "#!/bin/sh\n# atrun uid=%d gid=%d\n# mail %8s %d", &nuid, &ngid, mailbuf, &send_mail) != 4) pabort("File %.500s is in wrong format - aborting", @@ -298,6 +342,8 @@ write_string(fd_out, "Subject: Output from your job "); write_string(fd_out, jobbuf); + write_string(fd_out, "\nTo: "); + write_string(fd_out, mailname); write_string(fd_out, "\n\n"); fstat(fd_out, &buf); size = buf.st_size; @@ -359,6 +405,11 @@ */ close(fd_in); close(fd_out); + + /* We inherited the master's SIGCHLD handler, which does a + non-blocking waitpid. So this blocking one will eventually + return with an ECHILD error. + */ waitpid(pid, (int *) NULL, 0); /* Send mail. Unlink the output file after opening it, so it @@ -376,7 +427,7 @@ unlink(newname); free(newname); - if ((buf.st_size != size) || send_mail) { + if (((send_mail != -1) && (buf.st_size != size)) || (send_mail == 1)) { PRIV_START @@ -436,34 +487,51 @@ * atrun. */ - if ((spool = opendir(".")) == NULL) - perr("Cannot read " ATJOB_DIR); - next_job = now + CHECK_INTERVAL; if (next_batch == 0) next_batch = now; + /* To avoid spinning up the disk unnecessarily, stat the directory and + * return immediately if it hasn't changed since the last time we woke + * up. + */ + + if (stat(".", &buf) == -1) + perr("Cannot stat " ATJOB_DIR); + + if (nothing_to_do && buf.st_mtime <= last_chg) + return next_job; + last_chg = buf.st_mtime; + + if ((spool = opendir(".")) == NULL) + perr("Cannot read " ATJOB_DIR); + run_batch = 0; + nothing_to_do = 1; batch_uid = (uid_t) - 1; batch_gid = (gid_t) - 1; while ((dirent = readdir(spool)) != NULL) { - if (stat(dirent->d_name, &buf) != 0) { - /* Chances are a '=' file has been deleted from under us. - * Ignore. - */ - } + /* Avoid the stat if this doesn't look like a job file */ + if (sscanf(dirent->d_name, "%c%5lx%8lx", &queue, &jobno, &ctm) != 3) + continue; - /* We don't want directories or files which at(1) hasn't yet - * marked executable. + /* Chances are a '=' file has been deleted from under us. + * Ignore. */ - if ((!S_ISREG(buf.st_mode)) || !(buf.st_mode & S_IXUSR)) + if (stat(dirent->d_name, &buf) != 0) continue; - if (sscanf(dirent->d_name, "%c%5lx%8lx", &queue, &jobno, &ctm) != 3) + if (!S_ISREG(buf.st_mode)) + continue; + + /* We don't want files which at(1) hasn't yet marked executable. */ + if (!(buf.st_mode & S_IXUSR)) { + nothing_to_do = 0; /* it will probably become executable soon */ continue; + } run_time = (time_t) ctm *60; @@ -493,9 +561,18 @@ lock_name[0] = '='; unlink(lock_name); next_job = now; + nothing_to_do = 0; } continue; } + + /* If we got here, then there are jobs of some kind waiting. + * We could try to be smarter and leave nothing_to_do set if + * we end up processing all the jobs, but that's risky (run_file + * might fail and expect the job to be rescheduled), and it doesn't + * gain us much. */ + nothing_to_do = 0; + /* There's a job for later. Note its execution time if it's * the earlierst so far. */ @@ -540,6 +617,7 @@ } } if (run_batch && (next_batch < next_job)) { + nothing_to_do = 0; next_job = next_batch; } return next_job; @@ -631,6 +709,11 @@ if (optind < argc) pabort("non-option arguments - not allowed"); + sigaction(SIGCHLD, NULL, &act); + act.sa_handler = release_zombie; + act.sa_flags = SA_NOCLDSTOP; + sigaction(SIGCHLD, &act, NULL); + if (!run_as_daemon) { now = time(NULL); run_loop(); @@ -646,10 +729,6 @@ sigaction(SIGHUP, NULL, &act); act.sa_handler = sdummy; sigaction(SIGHUP, &act, NULL); - - sigaction(SIGCHLD, NULL, &act); - act.sa_handler = SIG_IGN; - sigaction(SIGCHLD, &act, NULL); sigaction(SIGTERM, NULL, &act); act.sa_handler = set_term; --- at-3.1.8.orig/atrun.8.in +++ at-3.1.8/atrun.8.in @@ -17,3 +17,8 @@ .I -s option, and is provided for backward compatibility with older installations. +.SH SEE ALSO +.BR at (1), +.BR atd (8). +.SH AUTHOR +At was mostly written by Thomas Koenig, ig25@rz.uni-karlsruhe.de. --- at-3.1.8.orig/batch +++ at-3.1.8/batch @@ -0,0 +1,4 @@ +#! /bin/sh +prefix=/usr +exec_prefix=${prefix} +exec ${exec_prefix}/bin/at -qb now "$@" --- at-3.1.8.orig/config.guess +++ at-3.1.8/config.guess @@ -1,6 +1,6 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -51,35 +51,110 @@ # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:V*:*) - # After 1.2, OSF1 uses "V1.3" for uname -r. - echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` - exit 0 ;; alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo alpha-dec-osf${UNAME_RELEASE} - exit 0 ;; + cat <dummy.s + .globl main + .ent main +main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - Pyramid*:OSx*:*:*) + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; - sun4*:SunOS:5.*:*) + NILE:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) - echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -99,24 +174,86 @@ sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; - mips:*:5*:RISCos) + 2020:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; @@ -127,12 +264,17 @@ echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -150,10 +292,10 @@ *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i[34]86:AIX:*:*) + i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) @@ -198,7 +340,7 @@ echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -216,7 +358,7 @@ case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?[79] ) HP_ARCH=hppa1.1 ;; + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; 9000/8?? ) HP_ARCH=hppa1.0 ;; esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` @@ -264,6 +406,13 @@ hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; @@ -291,17 +440,33 @@ CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; - CRAY*C90:*:*:*) - echo c90-cray-unicos${UNAME_RELEASE} + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; - i[34]86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` @@ -309,36 +474,150 @@ *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin32 + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin32 + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) + # uname on the ARM produces all sorts of strangeness, and we need to + # filter it out. + case "$UNAME_MACHINE" in + arm* | sa110*) UNAME_MACHINE="arm" ;; + esac + # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` - if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then - echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 - elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then - echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 - elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then - echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0 - elif test "${UNAME_MACHINE}" = "alpha" ; then - echo alpha-unknown-linux ; exit 0 - else - # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us - # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout. - test ! -d /usr/lib/ldscripts/. \ - && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0 + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + LIBC="" + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac # Determine whether the default compiler is a.out or elf cat >dummy.c < main(argc, argv) -int argc; -char *argv[]; + int argc; + char *argv[]; { #ifdef __ELF__ - printf ("%s-unknown-linux\n", argv[1]); +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif #else - printf ("%s-unknown-linuxaout\n", argv[1]); + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } @@ -348,30 +627,45 @@ fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. - i[34]86:DYNIX/ptx:4*:*) + i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; - i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*) + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; - i[34]86:*:3.2:*) + i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else - echo ${UNAME_MACHINE}-unknown-sysv32 + echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; Intel:Mach:3*:*) - echo i386-unknown-mach3 + echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 @@ -387,30 +681,36 @@ # "miniframe" echo m68010-convergent-sysv exit 0 ;; - M680[234]0:*:R3V[567]*:*) + M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3 && exit 0 - uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3 && exit 0 ;; + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - uname -p 2>/dev/null | grep 86 >/dev/null \ + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m680[234]0:LynxOS:2.[23]*:*) - echo m68k-lynx-lynxos${UNAME_RELEASE} + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i[34]86:LynxOS:2.[23]*:*) - echo i386-lynx-lynxos${UNAME_RELEASE} + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - TSUNAMI:LynxOS:2.[23]*:*) - echo sparc-lynx-lynxos${UNAME_RELEASE} + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.[23]*:*) - echo rs6000-lynx-lynxos${UNAME_RELEASE} + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 @@ -423,6 +723,32 @@ echo ns32k-sni-sysv fi exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -452,15 +778,6 @@ #endif #endif -#if defined (host_mips) && defined (MIPSEB) -#if defined (SYSTYPE_BSD43) - printf ("mips-mips-riscos4bsd\n"); exit (0); -#endif -#if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos4sysv\n"); exit (0); -#endif -#endif - #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif @@ -475,7 +792,7 @@ #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -492,7 +809,7 @@ #endif #if defined (__386BSD__) - printf ("i386-unknown-bsd\n"); exit (0); + printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) --- at-3.1.8.orig/config.sub +++ at-3.1.8/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. +# can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -41,6 +41,8 @@ # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] @@ -62,11 +64,21 @@ ;; esac -# Separate what the user gave into CPU-COMPANY and OS (if any). -basic_machine=`echo $1 | sed 's/-[^-]*$//'` -if [ $basic_machine != $1 ] -then os=`echo $1 | sed 's/.*-/-/'` -else os=; fi +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also @@ -81,38 +93,43 @@ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) os= basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos @@ -123,35 +140,49 @@ -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; + -psos*) + os=-psos + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ - | arme[lb] | pyramid \ - | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ - | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ - | pdp11 | mips64el | mips64orion | mips64orionel \ - | sparc) + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) basic_machine=$basic_machine-unknown ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ - | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ - | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ - | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-*) + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -178,9 +209,9 @@ amiga | amiga-*) basic_machine=m68k-cbm ;; - amigados) + amigaos | amigados) basic_machine=m68k-cbm - os=-amigados + os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm @@ -190,6 +221,10 @@ basic_machine=m68k-apollo os=-sysv ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; balance) basic_machine=ns32k-sequent os=-dynix @@ -222,6 +257,10 @@ basic_machine=cray2-cray os=-unicos ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; crds | unos) basic_machine=m68k-crds ;; @@ -303,25 +342,28 @@ hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; + hppa-next) + os=-nextstep3 + ;; i370-ibm* | ibm*) basic_machine=i370-ibm os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[345]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[345]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[345]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[345]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; iris | iris4d) @@ -352,6 +394,14 @@ miniframe) basic_machine=m68000-convergent ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -419,21 +469,23 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | p6) - # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium - basic_machine=i586-intel + pentium | p5 | k5 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | k6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc ;; - pentium-* | p5-* | p6-*) - # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium + pentium-* | p5-* | k5-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - k5) - # We don't have specific support for AMD's K5 yet, so just call it a Pentium - basic_machine=i586-amd - ;; - nexen) - # We don't have specific support for Nexgen yet, so just call it a Pentium - basic_machine=i586-nexgen + pentiumpro-* | p6-* | k6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -517,6 +569,12 @@ basic_machine=i386-sequent os=-dynix ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -536,6 +594,9 @@ basic_machine=vax-dec os=-vms ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -563,7 +624,11 @@ # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. mips) - basic_machine=mips-mips + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi ;; romp) basic_machine=romp-ibm @@ -615,6 +680,8 @@ if [ x"$os" != x"" ] then case $os in + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -622,28 +689,37 @@ -solaris) os=-solaris2 ;; - -unixware* | svr4*) + -svr4*) os=-sysv4 ;; + -unixware*) + os=-sysv4.2uw + ;; -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux|'` + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ - | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* ) + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; @@ -668,6 +744,9 @@ -ctix* | -uts*) os=-sysv ;; + -ns2 ) + os=-nextstep2 + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -761,7 +840,7 @@ os=-sysv ;; *-cbm) - os=-amigados + os=-amigaos ;; *-dg) os=-dgux @@ -775,6 +854,9 @@ m88k-omron*) os=-luna ;; + *-next ) + os=-nextstep + ;; *-sequent) os=-ptx ;; @@ -808,6 +890,9 @@ *-masscomp) os=-rtu ;; + f301-fujitsu) + os=-uxpv + ;; *) os=-none ;; @@ -826,9 +911,6 @@ -sunos*) vendor=sun ;; - -lynxos*) - vendor=lynx - ;; -aix*) vendor=ibm ;; @@ -856,8 +938,11 @@ -ptx*) vendor=sequent ;; - -vxworks*) + -vxsim* | -vxworks*) vendor=wrs + ;; + -aux*) + vendor=apple ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` --- at-3.1.8.orig/configure +++ at-3.1.8/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -66,6 +66,7 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -349,7 +350,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -519,9 +520,11 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -568,26 +571,26 @@ # Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:577: checking host system type" >&5 +echo "configure:580: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) - if host_alias=`$ac_config_guess`; then : + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac -host=`$ac_config_sub $host_alias` +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -595,19 +598,19 @@ - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:603: checking for $ac_word" >&5 +echo "configure:605: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -628,16 +631,17 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:632: checking for $ac_word" >&5 +echo "configure:635: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -672,25 +676,61 @@ echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:686: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:680: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:718: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 729 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -704,18 +744,24 @@ ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:714: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:719: checking whether we are using GNU C" >&5 +echo "configure:765: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -724,7 +770,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -735,11 +781,15 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:743: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:793: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -754,16 +804,20 @@ fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi # Find a good install program. We prefer a C program (faster), @@ -773,28 +827,30 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:781: checking for a BSD compatible install" >&5 +echo "configure:836: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -824,10 +880,12 @@ # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:831: checking whether ln -s works" >&5 +echo "configure:889: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -852,15 +910,16 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:856: checking for $ac_word" >&5 +echo "configure:914: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_YACC="$ac_prog" @@ -884,15 +943,16 @@ # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:888: checking for $ac_word" >&5 +echo "configure:947: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_LEX="flex" @@ -917,7 +977,7 @@ *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:921: checking for yywrap in -l$ac_lib" >&5 +echo "configure:981: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -925,7 +985,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -961,7 +1021,7 @@ echo $ac_n "checking Checking for HP-UX -Aa""... $ac_c" 1>&6 -echo "configure:965: checking Checking for HP-UX -Aa" >&5 +echo "configure:1025: checking Checking for HP-UX -Aa" >&5 case "$host" in *-*-hpux*) @@ -976,16 +1036,16 @@ ;; esac echo $ac_n "checking Trying to compile a trivial ANSI C program""... $ac_c" 1>&6 -echo "configure:980: checking Trying to compile a trivial ANSI C program" >&5 +echo "configure:1040: checking Trying to compile a trivial ANSI C program" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: Could not compile and run even a trivial ANSI C program - check CC." 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -1000,16 +1060,16 @@ echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6 -echo "configure:1004: checking __attribute__((noreturn))" >&5 +echo "configure:1064: checking __attribute__((noreturn))" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1026,7 +1086,7 @@ rm -f conftest* echo $ac_n "checking for yywrap in -lfl""... $ac_c" 1>&6 -echo "configure:1030: checking for yywrap in -lfl" >&5 +echo "configure:1090: checking for yywrap in -lfl" >&5 ac_lib_var=`echo fl'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1034,7 +1094,7 @@ ac_save_LIBS="$LIBS" LIBS="-lfl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1083,12 +1143,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1087: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1147: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1096,7 +1156,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1121,7 +1181,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1125: checking for opendir in -ldir" >&5 +echo "configure:1185: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1129,7 +1189,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1162,7 +1222,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1166: checking for opendir in -lx" >&5 +echo "configure:1226: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1170,7 +1230,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1204,7 +1264,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1208: checking how to run the C preprocessor" >&5 +echo "configure:1268: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1219,14 +1279,14 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1236,14 +1296,31 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1256,6 +1333,8 @@ rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -1265,12 +1344,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1269: checking for ANSI C header files" >&5 +echo "configure:1348: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1278,8 +1357,8 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes @@ -1295,7 +1374,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1313,7 +1392,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1334,7 +1413,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1345,7 +1424,7 @@ exit (0); } EOF -if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1369,12 +1448,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1373: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1452: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1390,7 +1469,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1414,18 +1493,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1418: checking for $ac_hdr" >&5 +echo "configure:1497: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -1454,18 +1533,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1458: checking for $ac_hdr" >&5 +echo "configure:1537: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -1492,18 +1571,18 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1496: checking for working const" >&5 +echo "configure:1575: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1567,12 +1646,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1571: checking return type of signal handlers" >&5 +echo "configure:1650: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1589,7 +1668,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1608,12 +1687,12 @@ echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:1612: checking for uid_t in sys/types.h" >&5 +echo "configure:1691: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1642,12 +1721,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:1646: checking for mode_t" >&5 +echo "configure:1725: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1656,7 +1735,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_mode_t=yes else @@ -1675,12 +1754,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1679: checking for off_t" >&5 +echo "configure:1758: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1689,7 +1768,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else @@ -1708,12 +1787,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1712: checking for pid_t" >&5 +echo "configure:1791: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1722,7 +1801,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -1741,12 +1820,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1745: checking for size_t" >&5 +echo "configure:1824: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1755,7 +1834,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else @@ -1774,12 +1853,12 @@ fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1778: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:1857: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1787,7 +1866,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:1791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -1810,12 +1889,12 @@ echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1814: checking for vprintf" >&5 +echo "configure:1893: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1862,12 +1941,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1866: checking for _doprnt" >&5 +echo "configure:1945: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1914,190 +1993,15 @@ fi -ac_have_func=no # yes means we've found a way to get the load average. - -# Some systems with -lutil have (and need) -lkvm as well, some do not. -# On Solaris, -lkvm requires nlist from -lelf, so check that first -# to get the right answer into the cache. -echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6 -echo "configure:1924: checking for elf_begin in -lelf" >&5 -ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lelf $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lelf $LIBS" -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6 -echo "configure:1964: checking for kvm_open in -lkvm" >&5 -ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lkvm $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lkvm $LIBS" -else - echo "$ac_t""no" 1>&6 -fi - -# Check for the 4.4BSD definition of getloadavg. -echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6 -echo "configure:2005: checking for getloadavg in -lutil" >&5 -ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lutil $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes -else - echo "$ac_t""no" 1>&6 -fi - - -if test $ac_have_func = no; then - # There is a commonly available library for RS/6000 AIX. - # Since it is not a standard part of AIX, it might be installed locally. - ac_getloadavg_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" - echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6 -echo "configure:2050: checking for getloadavg in -lgetloadavg" >&5 -ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lgetloadavg $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lgetloadavg $LIBS" -else - echo "$ac_t""no" 1>&6 -LIBS="$ac_getloadavg_LIBS" -fi - -fi - -# Make sure it is really in the library, if we think we found it. for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2096: checking for $ac_func" >&5 +echo "configure:2000: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2141,376 +2045,20 @@ else echo "$ac_t""no" 1>&6 -LIBOBJS="$LIBOBJS ${ac_func}.o" +LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - -if test $ac_cv_func_getloadavg = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_GETLOADAVG 1 -EOF - - ac_have_func=yes -else - # Figure out what our getloadavg.c needs. - ac_have_func=no - ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6 -echo "configure:2162: checking for sys/dg_sys_info.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define DGUX 1 -EOF - - echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6 -echo "configure:2193: checking for dg_sys_info in -ldgc" >&5 -ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldgc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - - - # We cannot check for , because Solaris 2 does not use dwarf (it - # uses stabs), but it is still SVR4. We cannot check for because - # Irix 4.0.5F has the header but not the library. - if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define SVR4 1 -EOF - - fi - - if test $ac_have_func = no; then - ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6 -echo "configure:2257: checking for inq_stats/cpustats.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define UMAX 1 -EOF - - cat >> confdefs.h <<\EOF -#define UMAX4_3 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - - fi - - if test $ac_have_func = no; then - ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6 -echo "configure:2300: checking for sys/cpustats.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_have_func=yes; cat >> confdefs.h <<\EOF -#define UMAX 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - - fi - - if test $ac_have_func = no; then - for ac_hdr in mach/mach.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2341: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - fi - - ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:2381: checking for nlist.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define NLIST_STRUCT 1 -EOF - - echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6 -echo "configure:2412: checking for n_un in struct nlist" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct nlist n; n.n_un.n_name = 0; -; return 0; } -EOF -if { (eval echo configure:2424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_nlist_n_un=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_nlist_n_un=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6 - if test $ac_cv_struct_nlist_n_un = yes; then - cat >> confdefs.h <<\EOF -#define NLIST_NAME_UNION 1 -EOF - - fi - -else - echo "$ac_t""no" 1>&6 -fi -fi # Do not have getloadavg in system libraries. - -# Some definitions of getloadavg require that the program be installed setgid. -echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6 -echo "configure:2451: checking whether getloadavg requires setgid" >&5 -if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 | - egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_func_getloadavg_setgid=yes -else - rm -rf conftest* - ac_cv_func_getloadavg_setgid=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6 -if test $ac_cv_func_getloadavg_setgid = yes; then - NEED_SETGID=true; cat >> confdefs.h <<\EOF -#define GETLOADAVG_PRIVILEGED 1 -EOF - -else - NEED_SETGID=false -fi - -if test $ac_cv_func_getloadavg_setgid = yes; then - echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6 -echo "configure:2487: checking group of /dev/kmem" >&5 -if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # On Solaris, /dev/kmem is a symlink. Get info on the real file. - ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` - # If we got an error (system does not support symlinks), try without -L. - test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` - ac_cv_group_kmem=`echo $ac_ls_output \ - | sed -ne 's/[ ][ ]*/ /g; - s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; - / /s/.* //;p;'` - -fi - -echo "$ac_t""$ac_cv_group_kmem" 1>&6 - KMEM_GROUP=$ac_cv_group_kmem -fi - for ac_func in getcwd mktime strftime setreuid setresuid sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2509: checking for $ac_func" >&5 +echo "configure:2057: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2560,12 +2108,12 @@ for ac_func in waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2564: checking for $ac_func" >&5 +echo "configure:2112: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2614,88 +2162,10 @@ -# Extract the first word of "mailx", so it can be a program name with args. -set dummy mailx; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2621: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MAILX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$MAILX" in - /*) - ac_cv_path_MAILX="$MAILX" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_MAILX="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -MAILX="$ac_cv_path_MAILX" -if test -n "$MAILX"; then - echo "$ac_t""$MAILX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test "$ac_cv_path_MAILX" != "" ; then -cat >> confdefs.h <&6 -echo "configure:2660: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MAILC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$MAILC" in - /*) - ac_cv_path_MAILC="$MAILC" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_MAILC="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -MAILC="$ac_cv_path_MAILC" -if test -n "$MAILC"; then - echo "$ac_t""$MAILC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test "$ac_cv_path_MAILC" != "" ; then -cat >> confdefs.h <&6 -echo "configure:2699: checking for $ac_word" >&5 +echo "configure:2169: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2703,9 +2173,13 @@ /*) ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/usr/lib:/usr/sbin $ac_dummy; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/usr/lib:/usr/sbin " + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_SENDMAIL="$ac_dir/$ac_word" @@ -2734,7 +2208,7 @@ echo $ac_n "checking etcdir""... $ac_c" 1>&6 -echo "configure:2738: checking etcdir" >&5 +echo "configure:2212: checking etcdir" >&5 # Check whether --with-etcdir or --without-etcdir was given. if test "${with_etcdir+set}" = set; then withval="$with_etcdir" @@ -2760,7 +2234,7 @@ echo $ac_n "checking location of pid file""... $ac_c" 1>&6 -echo "configure:2764: checking location of pid file" >&5 +echo "configure:2238: checking location of pid file" >&5 if test -d /var/run ; then cat >> confdefs.h <&6 -echo "configure:2786: checking location of spool directory" >&5 +echo "configure:2260: checking location of spool directory" >&5 if test -d /var/spool/atjobs ; then sp=/var/spool cat >> confdefs.h <<\EOF @@ -2790,7 +2264,7 @@ EOF echo "$ac_t""Using existing /var/spool/at{jobs|run}" 1>&6 -elif test -d /var/spool/cron ; then +elif test -d /var/spool/cron- ; then sp=/var/spool/cron cat >> confdefs.h <<\EOF #define SPOOLDIR "/var/spool/cron" @@ -2805,11 +2279,11 @@ echo "$ac_t""/usr/spool/cron" 1>&6 else - { echo "configure: error: Cannot determine value for spool directory" 1>&2; exit 1; } + echo "$ac_t""not found" 1>&6 fi echo $ac_n "checking jobdir""... $ac_c" 1>&6 -echo "configure:2813: checking jobdir" >&5 +echo "configure:2287: checking jobdir" >&5 # Check whether --with-jobdir or --without-jobdir was given. if test "${with_jobdir+set}" = set; then withval="$with_jobdir" @@ -2818,6 +2292,9 @@ { echo "configure: error: Need JOBDIR." 1>&2; exit 1; } ;; yes) + if test x$sp == x ; then + { echo "configure: error: Need explicit JOBDIR when SPOOLDIR not found." 1>&2; exit 1; } + fi cat >> confdefs.h <&2; exit 1; } + fi cat >> confdefs.h <&6 -echo "configure:2851: checking atspool" >&5 +echo "configure:2331: checking atspool" >&5 # Check whether --with-atspool or --without-atspool was given. if test "${with_atspool+set}" = set; then withval="$with_atspool" @@ -2856,6 +2336,9 @@ { echo "configure: error: Need ATSPOOL." 1>&2; exit 1; } ;; yes) + if test x$sp == x ; then + { echo "configure: error: Need explicit ATSPOOL when SPOOLDIR not found." 1>&2; exit 1; } + fi cat >> confdefs.h <&2; exit 1; } + fi cat >> confdefs.h <&6 -echo "configure:2889: checking default at queue" >&5 +echo "configure:2375: checking default at queue" >&5 # Check whether --with-atqueue or --without-atqueue was given. if test "${with_atqueue+set}" = set; then withval="$with_atqueue" @@ -2924,7 +2410,7 @@ echo $ac_n "checking default batch queue""... $ac_c" 1>&6 -echo "configure:2928: checking default batch queue" >&5 +echo "configure:2414: checking default batch queue" >&5 # Check whether --with-batchqueue or --without-batchqueue was given. if test "${with_batchqueue+set}" = set; then withval="$with_batchqueue" @@ -2963,7 +2449,7 @@ echo $ac_n "checking maximum load average for batch to start jobs""... $ac_c" 1>&6 -echo "configure:2967: checking maximum load average for batch to start jobs" >&5 +echo "configure:2453: checking maximum load average for batch to start jobs" >&5 # Check whether --with-loadavg_mx or --without-loadavg_mx was given. if test "${with_loadavg_mx+set}" = set; then withval="$with_loadavg_mx" @@ -2989,7 +2475,7 @@ echo $ac_n "checking username to run under""... $ac_c" 1>&6 -echo "configure:2993: checking username to run under" >&5 +echo "configure:2479: checking username to run under" >&5 # Check whether --with-daemon_username or --without-daemon_username was given. if test "${with_daemon_username+set}" = set; then withval="$with_daemon_username" @@ -3015,7 +2501,7 @@ echo $ac_n "checking groupname to run under""... $ac_c" 1>&6 -echo "configure:3019: checking groupname to run under" >&5 +echo "configure:2505: checking groupname to run under" >&5 # Check whether --with-daemon_groupname or --without-daemon_groupname was given. if test "${with_daemon_groupname+set}" = set; then withval="$with_daemon_groupname" @@ -3063,7 +2549,7 @@ # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -3130,7 +2616,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -3150,9 +2636,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -3179,6 +2667,7 @@ s%@host_os@%$host_os%g s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g s%@YACC@%$YACC%g @@ -3186,10 +2675,6 @@ s%@LEXLIB@%$LEXLIB%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g -s%@NEED_SETGID@%$NEED_SETGID%g -s%@KMEM_GROUP@%$KMEM_GROUP%g -s%@MAILX@%$MAILX%g -s%@MAILC@%$MAILC%g s%@SENDMAIL@%$SENDMAIL%g s%@MAIL_CMD@%$MAIL_CMD%g s%@ETCDIR@%$ETCDIR%g --- at-3.1.8.orig/configure.in +++ at-3.1.8/configure.in @@ -17,7 +17,6 @@ dnl Checks for programs. -AC_C_CROSS AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S @@ -79,24 +78,12 @@ dnl Checks for library functions. AC_FUNC_VPRINTF -AC_FUNC_GETLOADAVG +AC_REPLACE_FUNCS(getloadavg) AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction) AC_CHECK_FUNCS(waitpid) dnl Checking for programs -AC_PATH_PROG(MAILX, mailx) -if test "$ac_cv_path_MAILX" != "" ; then -AC_DEFINE_UNQUOTED(MAILX,"$ac_cv_path_MAILX") -MAIL_CMD="$ac_cv_path_MAILX" -fi - -AC_PATH_PROG(MAILC, mail) -if test "$ac_cv_path_MAILC" != "" ; then -AC_DEFINE_UNQUOTED(MAILC,"$ac_cv_path_MAILC") -MAIL_CMD="$ac_cv_path_MAILC" -fi - AC_PATH_PROG(SENDMAIL, sendmail, , $PATH:/usr/lib:/usr/sbin ) if test "$ac_cv_path_SENDMAIL" != "" ; then AC_DEFINE_UNQUOTED(SENDMAIL,"$ac_cv_path_SENDMAIL") @@ -152,7 +139,7 @@ AC_DEFINE(SPOOLDIR, "/usr/spool/cron") AC_MSG_RESULT(/usr/spool/cron) else - AC_ERROR(Cannot determine value for spool directory) + AC_MSG_RESULT(not found) fi AC_MSG_CHECKING(jobdir) @@ -163,6 +150,9 @@ AC_MSG_ERROR(Need JOBDIR.) ;; yes) + if test x$sp == x ; then + AC_MSG_ERROR(Need explicit JOBDIR when SPOOLDIR not found.) + fi AC_DEFINE_UNQUOTED(ATJOB_DIR, "$sp/atjobs") AC_MSG_RESULT($ATJOB_DIR) ATJBD="$sp/atjobs" @@ -173,6 +163,9 @@ ATJBD="$withval" ;; esac ], + if test x$sp == x ; then + AC_MSG_ERROR(Need --with-jobdir=PATH when SPOOLDIR not found.) + fi AC_DEFINE_UNQUOTED(ATJOB_DIR, "$sp/atjobs") AC_MSG_RESULT($sp/atjobs) ATJBD="$sp/atjobs" @@ -187,6 +180,9 @@ AC_MSG_ERROR(Need ATSPOOL.) ;; yes) + if test x$sp == x ; then + AC_MSG_ERROR(Need explicit ATSPOOL when SPOOLDIR not found.) + fi AC_DEFINE_UNQUOTED(ATSPOOL_DIR, "$sp/atspool") AC_MSG_RESULT($sp/atspool) ATSPD=$sp/atspool @@ -197,6 +193,9 @@ ATSPD=$withval ;; esac ], + if test x$sp == x ; then + AC_MSG_ERROR(Need --with-atspool=PATH when SPOOLDIR not found.) + fi AC_DEFINE_UNQUOTED(ATSPOOL_DIR, "$sp/atspool") AC_MSG_RESULT($sp/atspool) ATSPD=$sp/atspool --- at-3.1.8.orig/daemon.c +++ at-3.1.8/daemon.c @@ -72,7 +72,7 @@ va_list args; va_start(args, fmt); - vsprintf(buf, fmt, args); + vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); if (daemon_debug) { @@ -90,7 +90,7 @@ va_list args; va_start(args, fmt); - vsprintf(buf, fmt, args); + vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); if (daemon_debug) { @@ -127,6 +127,7 @@ } } old_umask = umask(S_IWGRP | S_IWOTH); + (void) setsid(); PRIV_START --- at-3.1.8.orig/panic.c +++ at-3.1.8/panic.c @@ -41,6 +41,7 @@ /* Local headers */ #include "panic.h" +#include "privs.h" #include "at.h" /* File scope variables */ @@ -72,12 +73,15 @@ va_list args; va_start(args, fmt); - vsprintf(buf, fmt, args); + vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); perror(buf); - if (fcreated) + if (fcreated) { + PRIV_START unlink(atfile); + PRIV_END + } exit(EXIT_FAILURE); } @@ -88,7 +92,7 @@ /* Print usage and exit. */ fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-m] time\n" - " atq [-V] [-q x] [-v]\n" + " atq [-V] [-q x]\n" " atrm [-V] [-q x] job ...\n" " batch [-V] [-f file] [-m]\n"); exit(EXIT_FAILURE); --- at-3.1.8.orig/parsetime.y +++ at-3.1.8/parsetime.y @@ -11,6 +11,9 @@ static int isgmt; static int time_only; +extern int yyerror(char *s); +extern int yylex(); + int add_date(int number, int period); %} @@ -36,26 +39,31 @@ %start timespec %% -timespec : time +timespec : date + | time { time_only = 1; } | time date - | time increment - | time date increment - | time decrement - | time date decrement + | time_or_not inc_or_dec + | time_or_not date inc_or_dec | nowspec ; nowspec : now - | now increment - | now decrement + | now inc_or_dec ; now : NOW + | TOMORROW + { + add_date(1, DAY); + } ; +time_or_not : time + | + time : hr24clock_hr_min | hr24clock_hr_min timezone_name | hr24clock_hour time_sep minute @@ -83,10 +91,11 @@ ; date : month_name day_number + | month_name day_number year_number | month_name day_number ',' year_number | day_of_week { - add_date ((7 + $1 - exectm.tm_wday) %7 + 1, DAY); + add_date ((6 + $1 - exectm.tm_wday) %7 + 1, DAY); } | TODAY | TOMORROW @@ -101,6 +110,9 @@ | month_number '/' day_number '/' year_number ; +inc_or_dec : increment + | decrement + increment : '+' inc_number inc_period { add_date($2, $3); @@ -131,11 +143,55 @@ hr24clock_hr_min: INT { - exectm.tm_min = -1; - exectm.tm_hour = -1; if (strlen($1) == 4) { + exectm.tm_min = -1; + exectm.tm_hour = -1; sscanf($1, "%2d %2d", &exectm.tm_hour, &exectm.tm_min); + } else if (strlen($1) >= 5 && strlen($1) <= 8) { + /* Ok, this is a kluge. I hate design errors... -Joey */ + char shallot[5]; + char *onion; + + onion=$1; + memset (shallot, 0, sizeof (shallot)); + if (strlen($1) == 5 || strlen($1) == 7) { + strncpy (shallot,onion,1); + onion++; + } else { + strncpy (shallot,onion,2); + onion+=2; + } + sscanf(shallot, "%d", &exectm.tm_mon); + + if (exectm.tm_mon < 1 || exectm.tm_mon > 12) { + yyerror("Error in month number"); + YYERROR; + } + exectm.tm_mon--; + + memset (shallot, 0, sizeof (shallot)); + strncpy (shallot,onion,2); + sscanf(shallot, "%d", &exectm.tm_mday); + if (exectm.tm_mday < 0 || exectm.tm_mday > 31) + { + yyerror("Error in day of month"); + YYERROR; + } + + onion+=2; + memset (shallot, 0, sizeof (shallot)); + strncpy (shallot,onion,4); + if ( sscanf(shallot, "%d", &exectm.tm_year) != 1) { + yyerror("Error in year"); + YYERROR; + } + if (exectm.tm_year < 70) { + exectm.tm_year += 100; + } + else if (exectm.tm_year > 1900) { + exectm.tm_year -= 1900; + } } else { sscanf($1, "%d", &exectm.tm_hour); @@ -148,7 +204,7 @@ YYERROR; } if (exectm.tm_hour > 24 || exectm.tm_hour < 0) { - yyerror("Problem in minutes specification"); + yyerror("Problem in hours specification"); YYERROR; } } @@ -181,6 +237,15 @@ ; am_pm : AM + { + if (exectm.tm_hour > 12) { + yyerror("Hour too large for AM"); + YYERROR; + } + else if (exectm.tm_hour == 12) { + exectm.tm_hour = 0; + } + } | PM { if (exectm.tm_hour > 12) { @@ -302,6 +367,8 @@ time_only = 0; if (yyparse() == 0) { exectime = mktime(&exectm); + if (exectime == (time_t)-1) + return 0; if (isgmt) { exectime += timezone; if (daylight) { @@ -319,6 +386,24 @@ } #ifdef TEST_PARSER +/* + +Here are some lines to test: + +./parsetest 7AM Mar 24 2000 +./parsetest 7AM Mar 24 00 +./parsetest 7AM 032400 +./parsetest 7AM 03/24/00 +./parsetest 7AM 24.03.00 +./parsetest 7AM Mar 24 + +./parsetest 03242000 +./parsetest noon 03242000 +./parsetest 5:30 +./parsetest 4pm + 3 days +./parsetest 10am Jul 31 + + */ int main(int argc, char **argv) { @@ -347,6 +432,8 @@ { time_t timeval; timeval = mktime(tm); + if (timeval == (time_t)-1) + timeval = (time_t)0; timeval += numsec; *tm = *localtime(&timeval); } --- at-3.1.8.orig/perm.c +++ at-3.1.8/perm.c @@ -43,7 +43,13 @@ /* Macros */ -#define MAXUSERID 10 +#if defined(DEBUG_PERM_C) +#define ETCDIR "../test/etc" +#undef PRIV_START +#define PRIV_START while(0) +#undef PRIV_END +#define PRIV_END while(0) +#endif /* Structures and unions */ @@ -54,66 +60,87 @@ /* Function declarations */ -static int check_for_user(FILE * fp, const char *name); +static int user_in_file(const char *path, const char *name); /* Local functions */ +/* + */ static int -check_for_user(FILE * fp, const char *name) +user_in_file(const char *path, const char *name) { - char *buffer; - size_t len; - int found = 0; - - len = strlen(name); - buffer = mymalloc(len + 2); - - while (fgets(buffer, len + 2, fp) != NULL) { - if ((strncmp(name, buffer, len) == 0) && - (buffer[len] == '\n')) { - found = 1; - break; - } - } - fclose(fp); - free(buffer); - return found; -} -/* Global functions */ -int -check_permission() -{ - FILE *fp; - uid_t uid = geteuid(); - struct passwd *pentry; + FILE *fp; + char buffer[256]; + int found = 0; + int c = '\n'; + + PRIV_START; + fp = fopen( path, "r"); + PRIV_END; + + if ( fp == NULL ) + return -1; + + + while ( !found && fgets(buffer, sizeof(buffer), fp) != NULL) { + size_t llen = strlen(buffer); - if (uid == 0) - return 1; + c = buffer[llen-1]; - if ((pentry = getpwuid(uid)) == NULL) { - perror("Cannot access user database"); - exit(EXIT_FAILURE); - } - PRIV_START + if (c == '\n') + buffer[llen-1] = '\0'; + while (c != '\n' && c != EOF) + c = fgetc(fp); + + found = (strcmp(buffer, name)==0); + } - fp = fopen(ETCDIR "/at.allow", "r"); + fclose(fp); - PRIV_END + if (c == EOF) { + fprintf(stderr, "%s: incomplete last line.\n", path); + } + + return found; +} - if (fp != NULL) { - return check_for_user(fp, pentry->pw_name); - } else { - PRIV_START +/* Global functions */ +int +check_permission() +{ + uid_t uid = geteuid(); + struct passwd *pentry; + int allow = 0, deny = 1; + + if (uid == 0) + return 1; + + if ((pentry = getpwuid(uid)) == NULL) { + perror("Cannot access user database"); + exit(EXIT_FAILURE); + } + + allow = user_in_file(ETCDIR "/at.allow", pentry->pw_name); + if (allow==0 || allow==1) + return allow; + + /* There was an error while looking for pw_name in at.allow. + * Check at.deny only when at.allow doesn't exist. + */ + + deny = user_in_file(ETCDIR "/at.deny", pentry->pw_name); + return deny == 0; +} - fp = fopen(ETCDIR "/at.deny", "r"); - PRIV_END +#if defined(DEBUG_PERM_C) - if (fp != NULL) { - return !check_for_user(fp, pentry->pw_name); - } - perror("at.deny"); - } - return 0; +int +main(int argc, char *argv[]) +{ + printf("check_permission() ==> %d\n", check_permission()); + return 0; } + +#endif