diff --git a/CHANGES b/CHANGES
index d5dacfc..ec4ca94 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,33 @@
CHANGES
=======
-version 7.2.6 (Mar 20, 2003):
+version 7.2.7 (Apr 9, 2003):
+ - added test suite ('make test') for basic client/server
+ communication tests
+ - changed configure script to provide better checking of options,
+ hp-ux specifics, and functions
+ - console names are no longer case-sensitive
+ - fixed case-sensitive DNS name comparisons - reported by
+ Peter Chubb via Jorgen Hagg
+
+ - added dmalloc and openssl version numbers to -V output
+ - reordered includes for openssl-0.9.7a compatibility
+ - conserver.rc looks at pidfile to find the master pid - suggested
+ by Petter Reinholdtsen
+ - misplaced code regarding --with-regex - patch by Andreas Wrede
+
+ - added password support for HP-UX trusted systems - immense
+ help by Greg Brown
+ - potential SIGUSR1 bug where cached terminal server availability
+ wasn't being cleared correctly - reported by Dave Stuit
+
+ - server is now more forgiving about errors instead of just
+ giving up and shutting everything down
+ - consoles that have trouble coming up (and are forced down)
+ now log when they come back up - suggested by Dave Stuit
+
+
+version 7.2.6 (Mar 10, 2003):
- the -b conserver option was mostly broken (since 7.2.0)
- changed logging format so that all messages are of a similar
form
@@ -403,5 +429,5 @@ before version 6.05:
and enhancements of various types were applied.
#
-# $Id: CHANGES,v 1.78 2003-03-10 17:45:55-08 bryan Exp $
+# $Id: CHANGES,v 1.82 2003-04-09 07:20:21-07 bryan Exp $
#
diff --git a/FAQ b/FAQ
index 36091bc..d2c8974 100644
--- a/FAQ
+++ b/FAQ
@@ -16,7 +16,9 @@ directed to faq@conserver.com. The FAQ answers the following questions:
7) How do I set up a serial port for no parity?
8) Is "Conserver" a Trademark or Registered Trademark?
9) When I connect to a console, it says it is down. Why?
- 99) Ok, things just don't seem to work. Help?!?
+ 10) Is there a technical reason why --with-maxmemb's default is 16?
+ I've changed mine to 96.
+ 99) OK, things just don't seem to work. Help?!?
1) What is conserver?
@@ -106,7 +108,43 @@ directed to faq@conserver.com. The FAQ answers the following questions:
telnet session), or there was an unseen typo in a path or hostname.
The logfile should show hints of things like this and other issues.
-99) Ok, things just don't seem to work. Help?!?
+10) Is there a technical reason why --with-maxmemb's default is 16?
+ I've changed mine to 96.
+
+ The following is an array of things you need to think about when
+ adjusting --with-maxmemb. It's a bit long, but it's an important
+ question.
+
+ The big reason (and the main reason for conserver spawning multiple
+ processes) is the maximum number of open files a process can have.
+ Each console can have a few file descriptors associated with it
+ (device, logfile, connected users, and listening socket). So, each
+ process will have about ( 2 * consoles + users + 1 ) open files
+ (--with-maxmemb sets the maximum number of consoles per process
+ in the equation). Although most current operating systems allow a
+ large number of open files per process, the general assumption is
+ it's still pretty low.
+
+ You also have the speed of your conserver host vs the rates at which
+ data could be streaming to it. Go back a decade and this was probably
+ more of an issue than today, but it's still something to think about.
+
+ And then you have the problem of delays. If any of the 96 console
+ connections "lock up", it'll delay all activity on the 96 consoles.
+ With 16, there's less of an impact. This can be an issue once the
+ server is up or during startup. Also, with 16 consoles per process,
+ you get a bit more parallelization during startup.
+
+ So, is there any reason not to up the number to 96? No. Assuming you
+ know the risks and weigh things appropriately. If I remember right,
+ I've upped the number to 48 at some sites. But that was mainly to
+ reduce the memory footprint in older versions of the code which had
+ statically allocated buffers. No need to worry about that with the
+ current code. Personally, I wouldn't change from 16 unless there
+ was a really good reason (like wanting to only have one child process
+ for firewall rules or some such reason).
+
+99) OK, things just don't seem to work. Help?!?
Yes, this is a pretty vague question, but here are a few tips that
might help.
@@ -146,5 +184,5 @@ directed to faq@conserver.com. The FAQ answers the following questions:
through the same problem?
#
-# $Id: FAQ,v 1.7 2002-09-22 10:21:06-07 bryan Exp $
+# $Id: FAQ,v 1.8 2003-04-08 14:05:16-07 bryan Exp $
#
diff --git a/INSTALL b/INSTALL
index fd033de..27546e2 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
- INSTALL
- =======
+ INSTALL
+ =======
Upgrading?
@@ -12,40 +12,40 @@ Upgrading?
Version 7.2.4
- - If SSL support is compiled into the code, older versions of
- the client and server are, by default, incompatible because
- encrypted connections are a requirement. Use of the -E flag in
- the client and/or server can work around this (but I discourage
- this - please upgrade the clients and servers instead).
+ - If SSL support is compiled into the code, older versions of
+ the client and server are, by default, incompatible because
+ encrypted connections are a requirement. Use of the -E flag in
+ the client and/or server can work around this (but I discourage
+ this - please upgrade the clients and servers instead).
Version 7.2.0
- - The code related to broadcast messages in the client (-b) has
- changed. If you want the username to come across properly in
- the broadcast message, you'll need to make sure you upgrade
- to the 7.2.0 client.
+ - The code related to broadcast messages in the client (-b) has
+ changed. If you want the username to come across properly in
+ the broadcast message, you'll need to make sure you upgrade
+ to the 7.2.0 client.
Version 7.1.1
- - Both conserver.passwd and conserver.cf file parsing behaves
- the same now. Both use leading whitespace as a continuation
- line indicator - if you have leading whitespace on a line
- (aside from comments) you probably should remove it.
+ - Both conserver.passwd and conserver.cf file parsing behaves
+ the same now. Both use leading whitespace as a continuation
+ line indicator - if you have leading whitespace on a line
+ (aside from comments) you probably should remove it.
Version 7.1.0
- - The client/server protocol has changed. You *MUST* use a
- 7.1.0 client with a 7.1.0 and above server. A 7.1.0 client
- is *not* backward compatible with a pre-7.1.0 server.
+ - The client/server protocol has changed. You *MUST* use a
+ 7.1.0 client with a 7.1.0 and above server. A 7.1.0 client
+ is *not* backward compatible with a pre-7.1.0 server.
- - Some of the flags in the client (-d, -D, and -r) and server
- (-n) have been given new identities to make the client and
- server flags more uniform.
+ - Some of the flags in the client (-d, -D, and -r) and server
+ (-n) have been given new identities to make the client and
+ server flags more uniform.
- - The conserver.passwd file now uses the first username match
- to determine access rights - if you have multiple instances
- of a username in an existing password file, they must be
- combined into one to continue to work.
+ - The conserver.passwd file now uses the first username match
+ to determine access rights - if you have multiple instances
+ of a username in an existing password file, they must be
+ combined into one to continue to work.
Quickie Instructions
@@ -54,6 +54,10 @@ Quickie Instructions
- Run './configure'
+ - Run 'make'
+
+ - Run 'make test'
+
- If all is well, run 'make install'
- Now set up config files, etc. (see below)
@@ -66,30 +70,40 @@ Detailed Instructions
the defaults shown, you're set. If not, here are the conserver
unique options:
- --with-port=PORT Specify port number [conserver]
- --with-base=PORT Base port for secondary channel [0]
- --with-master=MASTER Specify master server hostname [console]
- --with-cffile=CFFILE Specify config filename
- [SYSCONFDIR/conserver.cf]
- --with-pwdfile=PWDFILE Specify password filename
- [SYSCONFDIR/conserver.passwd]
- --with-logfile=LOGFILE Specify log filename [/var/log/conserver]
- --with-pidfile=PIDFILE Specify PID filepath [/var/run/conserver.pid]
- --with-maxmemb=MAXMEMB Specify maximum consoles per process [16]
- --with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
- --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support
- --with-openssl[=PATH] Compile in openssl support
- --with-regex Use regular expressions in conserver.passwd
- --with-pam Enable PAM support
+ --with-64bit Allow 64bit compilation
+ --with-port=PORT Specify port number [conserver]
+ --with-base=PORT Base port for secondary channel [0]
+ --with-master=MASTER Specify master server hostname [console]
+ --with-cffile=CFFILE Specify config filename
+ [SYSCONFDIR/conserver.cf]
+ --with-pwdfile=PWDFILE Specify password filename
+ [SYSCONFDIR/conserver.passwd]
+ --with-logfile=LOGFILE Specify log filename [/var/log/conserver]
+ --with-pidfile=PIDFILE Specify PID filepath [/var/run/conserver.pid]
+ --with-maxmemb=MAXMEMB Specify maximum consoles per process [16]
+ --with-timeout=TIMEOUT Specify connect() timeout in seconds [10]
+ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support
+ --with-openssl[=PATH] Compile in OpenSSL support
+ --with-dmalloc[=PATH] Compile in dmalloc support
+ --with-regex Use regular expressions in conserver.passwd
+ --with-pam Enable PAM support
Not surprisingly, some match the old conserver/cons.h items...here
they are for reference:
- PORT or SERVICE - Socket used to communicate
- HOST - Hostname of console server
- CONFIG - Config file path
- PASSWD_FILE - Password file path
- MAXMEMB - Number of consoles per child process
+ PORT or SERVICE - Socket used to communicate
+ HOST - Hostname of console server
+ CONFIG - Config file path
+ PASSWD_FILE - Password file path
+ MAXMEMB - Number of consoles per child process
+
+ A couple of notes. First, --with-libwrap will add tcp_wrappers
+ lookups to all socket connections in the server. --with-openssl
+ will add encryption between the client and server when you connect
+ to a console. things such as 'console -q', 'console -w', etc. are
+ still unencrypted, as well as connections from conserver to any
+ terminal servers. --with-dmalloc should only be used to do memory
+ allocation debugging and not used in production.
- Run './configure'. This will detect system specific
information. The --prefix option will redirect where things are
@@ -98,6 +112,11 @@ Detailed Instructions
- Now run 'make'. Hopefully things will compile.
+ - To test your binaries, run 'make test'. If there are problems, it
+ should mean something is wrong, but check the output differences
+ to make sure it wasn't a temporary failure. I tried to make the
+ tests generic, but I may have missed something.
+
- Once things build, you can run 'make install'.
- If you'd like to build the autologin application, you'll need to
@@ -108,32 +127,32 @@ Detailed Instructions
configuration files and such.
+ Does your conserver master hostname exist? This is the
- hostname specified with the --with-master option. By default
- the hostname is "console", so make sure it's in DNS, hosts
- files, or whatever.
+ hostname specified with the --with-master option. By default
+ the hostname is "console", so make sure it's in DNS, hosts
+ files, or whatever.
+ If you used a symbolic name for the --with-port option (by
- default it uses "conserver", so the answer would be yes),
- you'll need to enter a definition in your services file
- (directly, via NIS, or whatever). Here's what we use:
+ default it uses "conserver", so the answer would be yes),
+ you'll need to enter a definition in your services file
+ (directly, via NIS, or whatever). Here's what we use:
- console 782/tcp conserver # console server
+ console 782/tcp conserver # console server
- If you used a number, you shouldn't have to worry about this
- step.
+ If you used a number, you shouldn't have to worry about this
+ step.
+ Next, make sure conserver runs during boot. The init script we
- use under Solaris is installed in /etc/conserver.rc.
- Use that or some form of it for your own /etc/init.d script or
- an entry in startup files (/etc/rc, /etc/rc.local, or
- whatever).
+ use under Solaris is installed in /etc/conserver.rc.
+ Use that or some form of it for your own /etc/init.d script or
+ an entry in startup files (/etc/rc, /etc/rc.local, or
+ whatever).
+ Now for the fun stuff. You need to create a conserver.cf and
- conserver.passwd file. Those are defined with the
- --with-cffile and --with-pwdfile settings. If you ever need to
- know what values were compiled into conserver, run 'conserver
- -V'. See the conserver.cf/INSTALL file for instructions on
- setup of these files.
+ conserver.passwd file. Those are defined with the
+ --with-cffile and --with-pwdfile settings. If you ever need to
+ know what values were compiled into conserver, run 'conserver
+ -V'. See the conserver.cf/INSTALL file for instructions on
+ setup of these files.
- That's it! Just start up the console server and enjoy!
@@ -142,36 +161,36 @@ Other Information And Gotchas
- Debian Linux Distribution
- The Debian folks have conserver distributed with the package
- names of conserver-client and conserver-server. They are in
- the distribution "sid" and the "non-free" part (because the
- Ohio State license doesn't explicitly allow for modification to
- the code, even though it's totally implied and the intention of
- the author - I've even got proof in email! Oh well, can't
- blame the Debian folks for being cautious - they've been burned
- before, apparently).
+ The Debian folks have conserver distributed with the package
+ names of conserver-client and conserver-server. They are in
+ the distribution "sid" and the "non-free" part (because the
+ Ohio State license doesn't explicitly allow for modification to
+ the code, even though it's totally implied and the intention of
+ the author - I've even got proof in email! Oh well, can't
+ blame the Debian folks for being cautious - they've been burned
+ before, apparently).
- Potential GCC bug
- Adam Morris reported a problem with
- the following line in console/console.c:
+ Adam Morris reported a problem with
+ the following line in console/console.c:
- if ((in_addr_t) (-1) == pPort->sin_addr.s_addr) {
+ if ((in_addr_t) (-1) == pPort->sin_addr.s_addr) {
- This tickles a GCC bug under HP-UX 11.11 using GCC 3.0.2 in
- 64-bit mode with optimization enabled (-O). The bug could
- possibly be provoked in other combinations as well. His fix is
- to change the line to:
+ This tickles a GCC bug under HP-UX 11.11 using GCC 3.0.2 in
+ 64-bit mode with optimization enabled (-O). The bug could
+ possibly be provoked in other combinations as well. His fix is
+ to change the line to:
- if ((in_addr_t) (-1) == inet_addr(pcToHost)) {
+ if ((in_addr_t) (-1) == inet_addr(pcToHost)) {
- It's also reported that newer versions of the compiler fix the
- issue, so if you happen to have problems with the client
- connecting to servers, you might be tickling this bug and you
- can upgrade the compiler, turn off the optimization, or apply
- this code change.
+ It's also reported that newer versions of the compiler fix the
+ issue, so if you happen to have problems with the client
+ connecting to servers, you might be tickling this bug and you
+ can upgrade the compiler, turn off the optimization, or apply
+ this code change.
#
-# $Id: INSTALL,v 1.25 2002-10-12 20:23:58-07 bryan Exp $
+# $Id: INSTALL,v 1.27 2003-04-09 07:15:27-07 bryan Exp $
#
diff --git a/Makefile.in b/Makefile.in
index 621f4df..0718f94 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -25,6 +25,9 @@ autologin:
autologin.install:
( cd autologin && $(MAKE) install $(MAKE_FLAGS) ) || exit 1;
+test:
+ ( cd test && ./dotest ) || exit 1
+
install:
for n in $(SUBDIRS); do \
( cd $$n && $(MAKE) $@ $(MAKE_FLAGS) ) || exit 1; \
@@ -41,4 +44,4 @@ distclean:
done
rm -f config.cache config.log config.status config.h Makefile
-.PHONY: autologin autologin.install clean distclean install all
+.PHONY: autologin autologin.install clean distclean install all test
diff --git a/compat.h b/compat.h
index 6cbdad5..8c7f8b1 100644
--- a/compat.h
+++ b/compat.h
@@ -45,6 +45,10 @@
# define strrchr rindex
# endif
#endif
+#if !HAVE_STRCASECMP && HAVE_STRICMP
+# define strcasecmp stricmp
+# define strncasecmp strnicmp
+#endif
#ifdef HAVE_UNISTD_H
# include
@@ -169,6 +173,14 @@ extern char *h_errlist[];
# include
#endif
+#ifdef HAVE_HPSECURITY_H
+# include
+#endif
+
+#ifdef HAVE_PROT_H
+# include
+#endif
+
#ifdef HAVE_GETOPT_H
# include
#endif
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..f1657bb
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1363 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-09-03'
+
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner .
+# Please send patches to . Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# This shell variable is my proudest work .. or something. --bje
+
+set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
+(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
+ || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
+dummy=$tmpdir/dummy ;
+files="$dummy.c $dummy.o $dummy.rel $dummy" ;
+trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ rm -f $files ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ;
+unset files'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-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 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ 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.
+ eval $set_cc_for_build
+ cat <$dummy.s
+ .data
+\$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `$dummy` in
+ 0-0)
+ UNAME_MACHINE="alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ 2-1307)
+ UNAME_MACHINE="alphaev68"
+ ;;
+ 3-1307)
+ UNAME_MACHINE="alphaev7"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy && rmdir $tmpdir
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-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 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ 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-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /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 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${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 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #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_FOR_BUILD $dummy.c -o $dummy \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+ rm -f $dummy.c $dummy && rmdir $tmpdir
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ 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 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${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
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *: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.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+ rm -f $dummy.c $dummy && rmdir $tmpdir
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ 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
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+ rm -f $dummy.c $dummy && rmdir $tmpdir
+ fi ;;
+ esac
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+ rm -f $dummy.c $dummy && rmdir $tmpdir
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ 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 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3D:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ #if __GLIBC__ >= 2
+ LIBC=gnu
+ #else
+ LIBC=
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ rm -f $dummy.c && rmdir $tmpdir
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ x86:Interix*:3*)
+ echo i386-pc-interix3
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ 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,/.*$,,'`
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ rm -f $dummy.c && rmdir $tmpdir
+ test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ rm -f $dummy.c && rmdir $tmpdir
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # 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.
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ 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.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit 0 ;;
+ 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|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # 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-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.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:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*: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 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <
+# include
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+rm -f $dummy.c $dummy && rmdir $tmpdir
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 < in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
index f36819e..65abecd 100644
--- a/config.h.in
+++ b/config.h.in
@@ -15,6 +15,9 @@
/* Socket used to communicate */
#undef DEFPORT
+/* Define to 1 if you have the `bigcrypt' function. */
+#undef HAVE_BIGCRYPT
+
/* Define to 1 if you have the header file. */
#undef HAVE_BSM_AUDIT_H
@@ -24,10 +27,10 @@
/* have dmalloc support */
#undef HAVE_DMALLOC
-/* Define if libbsm has `getaudit'. */
+/* Define to 1 if you have the `getaudit' function. */
#undef HAVE_GETAUDIT
-/* Define if libbsm has `getaudit_addr'. */
+/* Define to 1 if you have the `getaudit_addr' function. */
#undef HAVE_GETAUDIT_ADDR
/* Define to 1 if you have the `getdtablesize' function. */
@@ -45,6 +48,9 @@
/* Define to 1 if you have the `getpassphrase' function. */
#undef HAVE_GETPASSPHRASE
+/* Define to 1 if you have the `getprpwnam' function. */
+#undef HAVE_GETPRPWNAM
+
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
@@ -63,15 +69,27 @@
/* Define to 1 if you have the `grantpt' function. */
#undef HAVE_GRANTPT
+/* Define to 1 if you have the header file. */
+#undef HAVE_HPSECURITY_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
/* Defined if in_addr_t exists */
#undef HAVE_IN_ADDR_T
+/* Define to 1 if you have the `iscomsec' function. */
+#undef HAVE_ISCOMSEC
+
/* Define to 1 if you have the `bsm' library (-lbsm). */
#undef HAVE_LIBBSM
+/* Define to 1 if you have the `sec' library (-lsec). */
+#undef HAVE_LIBSEC
+
+/* Define to 1 if you have the `xnet' library (-lxnet). */
+#undef HAVE_LIBXNET
+
/* Define to 1 if you have the `memcmp' function. */
#undef HAVE_MEMCMP
@@ -93,6 +111,9 @@
/* have POSIX regcomp */
#undef HAVE_POSIX_REGCOMP
+/* Define to 1 if you have the header file. */
+#undef HAVE_PROT_H
+
/* Define to 1 if you have the `ptsname' function. */
#undef HAVE_PTSNAME
@@ -138,9 +159,15 @@
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
+/* Define if strcasecmp is available */
+#undef HAVE_STRCASECMP
+
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
+/* Define if stricmp is available */
+#undef HAVE_STRICMP
+
/* Define to 1 if you have the header file. */
#undef HAVE_STRINGS_H
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..1dea9b7
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1470 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-09-05'
+
+# 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.
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to . Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# 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.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit 0;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# 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
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+ 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
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -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 | \
+ -apple | -axis)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ 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-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ 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-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ 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-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+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.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # 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*86 | x86_64)
+ 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.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* \
+ | m32r-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39 | mipstx39el \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i686-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3d)
+ basic_machine=alpha-cray
+ os=-unicos
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic4x | c4x*)
+ basic_machine=tic4x-unknown
+ os=-coff
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ windows32)
+ basic_machine=i386-pc
+ os=-windows32-msvcrt
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# 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.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
+ basic_machine=sh-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+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|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/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[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -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* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto*)
+ os=-nto-qnx
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
index cf17ab5..e9d4b67 100755
--- a/configure
+++ b/configure
@@ -305,7 +305,7 @@ ac_includes_default="\
# include
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MKDIR CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE CPP EGREP CONSLIBS CONSCPPFLAGS CONSLDFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MKDIR PIDFILE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os CONSLIBS CONSCPPFLAGS CONSLDFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -826,6 +826,10 @@ Fine tuning of the installation directories:
_ACEOF
cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
@@ -1258,19 +1262,18 @@ MKDIR="mkdir -p -m 755"
-ac_cv_allow_64bit=no
echo "$as_me:$LINENO: checking whether to allow 64bit compilation" >&5
echo $ECHO_N "checking whether to allow 64bit compilation... $ECHO_C" >&6
# Check whether --with-64bit or --without-64bit was given.
if test "${with_64bit+set}" = set; then
withval="$with_64bit"
- if test "$withval" = yes; then
- ac_cv_allow_64bit=yes
- fi
+ with_64bit=yes
+else
+ with_64bit=no
fi;
-echo "$as_me:$LINENO: result: $ac_cv_allow_64bit" >&5
-echo "${ECHO_T}$ac_cv_allow_64bit" >&6
+echo "$as_me:$LINENO: result: $with_64bit" >&5
+echo "${ECHO_T}$with_64bit" >&6
echo "$as_me:$LINENO: checking for port number specification" >&5
echo $ECHO_N "checking for port number specification... $ECHO_C" >&6
@@ -1278,21 +1281,24 @@ echo $ECHO_N "checking for port number specification... $ECHO_C" >&6
# Check whether --with-port or --without-port was given.
if test "${with_port+set}" = set; then
withval="$with_port"
- if test "$withval" != yes -a "$withval" != no; then
- cat >>confdefs.h <<_ACEOF
-#define DEFPORT "$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: port '$withval'" >&5
-echo "${ECHO_T}port '$withval'" >&6
- else
+ case "$withval" in
+ yes|no)
cat >>confdefs.h <<_ACEOF
#define DEFPORT "conserver"
_ACEOF
echo "$as_me:$LINENO: result: port 'conserver'" >&5
echo "${ECHO_T}port 'conserver'" >&6
- fi
+ ;;
+ *)
+ cat >>confdefs.h <<_ACEOF
+#define DEFPORT "$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: port '$withval'" >&5
+echo "${ECHO_T}port '$withval'" >&6
+ ;;
+ esac
else
cat >>confdefs.h <<_ACEOF
#define DEFPORT "conserver"
@@ -1308,21 +1314,24 @@ echo $ECHO_N "checking for secondary channel base port... $ECHO_C" >&6
# Check whether --with-base or --without-base was given.
if test "${with_base+set}" = set; then
withval="$with_base"
- if test "$withval" != yes -a "$withval" != no; then
- cat >>confdefs.h <<_ACEOF
-#define DEFBASEPORT "$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: port '$withval'" >&5
-echo "${ECHO_T}port '$withval'" >&6
- else
+ case "$withval" in
+ yes|no)
cat >>confdefs.h <<_ACEOF
#define DEFBASEPORT "0"
_ACEOF
echo "$as_me:$LINENO: result: port '0'" >&5
echo "${ECHO_T}port '0'" >&6
- fi
+ ;;
+ *)
+ cat >>confdefs.h <<_ACEOF
+#define DEFBASEPORT "$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: port '$withval'" >&5
+echo "${ECHO_T}port '$withval'" >&6
+ ;;
+ esac
else
cat >>confdefs.h <<_ACEOF
#define DEFBASEPORT "0"
@@ -1338,21 +1347,24 @@ echo $ECHO_N "checking for master conserver hostname... $ECHO_C" >&6
# Check whether --with-master or --without-master was given.
if test "${with_master+set}" = set; then
withval="$with_master"
- if test "$withval" != yes; then
- cat >>confdefs.h <<_ACEOF
-#define MASTERHOST "$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '$withval'" >&5
-echo "${ECHO_T}'$withval'" >&6
- else
+ case "$withval" in
+ yes|no)
cat >>confdefs.h <<_ACEOF
#define MASTERHOST "console"
_ACEOF
echo "$as_me:$LINENO: result: 'console'" >&5
echo "${ECHO_T}'console'" >&6
- fi
+ ;;
+ *)
+ cat >>confdefs.h <<_ACEOF
+#define MASTERHOST "$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: '$withval'" >&5
+echo "${ECHO_T}'$withval'" >&6
+ ;;
+ esac
else
cat >>confdefs.h <<_ACEOF
#define MASTERHOST "console"
@@ -1368,30 +1380,32 @@ echo $ECHO_N "checking for configuration filename... $ECHO_C" >&6
# Check whether --with-cffile or --without-cffile was given.
if test "${with_cffile+set}" = set; then
withval="$with_cffile"
- if test "$withval" != yes; then
- if expr "x$withval" : "x/" > /dev/null 2>&1; then
- cat >>confdefs.h <<_ACEOF
-#define CONFIGFILE "$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '$withval'" >&5
-echo "${ECHO_T}'$withval'" >&6
- else
- cat >>confdefs.h <<_ACEOF
-#define CONFIGFILE SYSCONFDIR "/$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '$sysconfdir/$withval'" >&5
-echo "${ECHO_T}'$sysconfdir/$withval'" >&6
- fi
- else
+ case "$withval" in
+ yes|no)
cat >>confdefs.h <<_ACEOF
#define CONFIGFILE SYSCONFDIR "/conserver.cf"
_ACEOF
echo "$as_me:$LINENO: result: '$sysconfdir/conserver.cf'" >&5
echo "${ECHO_T}'$sysconfdir/conserver.cf'" >&6
- fi
+ ;;
+ [\\/]* | ?:[\\/]* )
+ cat >>confdefs.h <<_ACEOF
+#define CONFIGFILE "$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: '$withval'" >&5
+echo "${ECHO_T}'$withval'" >&6
+ ;;
+ *)
+ cat >>confdefs.h <<_ACEOF
+#define CONFIGFILE SYSCONFDIR "/$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: '$sysconfdir/$withval'" >&5
+echo "${ECHO_T}'$sysconfdir/$withval'" >&6
+ ;;
+ esac
else
cat >>confdefs.h <<_ACEOF
#define CONFIGFILE SYSCONFDIR "/conserver.cf"
@@ -1407,30 +1421,32 @@ echo $ECHO_N "checking for password filename... $ECHO_C" >&6
# Check whether --with-pwdfile or --without-pwdfile was given.
if test "${with_pwdfile+set}" = set; then
withval="$with_pwdfile"
- if test "$withval" != yes; then
- if expr "x$withval" : "x/" > /dev/null 2>&1; then
- cat >>confdefs.h <<_ACEOF
-#define PASSWDFILE "$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '$withval'" >&5
-echo "${ECHO_T}'$withval'" >&6
- else
- cat >>confdefs.h <<_ACEOF
-#define PASSWDFILE SYSCONFDIR "/$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '$sysconfdir/$withval'" >&5
-echo "${ECHO_T}'$sysconfdir/$withval'" >&6
- fi
- else
+ case "$withval" in
+ yes|no)
cat >>confdefs.h <<_ACEOF
#define PASSWDFILE SYSCONFDIR "/conserver.passwd"
_ACEOF
echo "$as_me:$LINENO: result: '$sysconfdir/conserver.passwd'" >&5
echo "${ECHO_T}'$sysconfdir/conserver.passwd'" >&6
- fi
+ ;;
+ [\\/]* | ?:[\\/]* )
+ cat >>confdefs.h <<_ACEOF
+#define PASSWDFILE "$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: '$withval'" >&5
+echo "${ECHO_T}'$withval'" >&6
+ ;;
+ *)
+ cat >>confdefs.h <<_ACEOF
+#define PASSWDFILE SYSCONFDIR "/$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: '$sysconfdir/$withval'" >&5
+echo "${ECHO_T}'$sysconfdir/$withval'" >&6
+ ;;
+ esac
else
cat >>confdefs.h <<_ACEOF
#define PASSWDFILE SYSCONFDIR "/conserver.passwd"
@@ -1446,21 +1462,24 @@ echo $ECHO_N "checking for log filename... $ECHO_C" >&6
# Check whether --with-logfile or --without-logfile was given.
if test "${with_logfile+set}" = set; then
withval="$with_logfile"
- if test "$withval" != yes; then
- cat >>confdefs.h <<_ACEOF
-#define LOGFILEPATH "$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '$withval'" >&5
-echo "${ECHO_T}'$withval'" >&6
- else
+ case "$withval" in
+ yes|no)
cat >>confdefs.h <<_ACEOF
#define LOGFILEPATH "/var/log/conserver"
_ACEOF
echo "$as_me:$LINENO: result: '/var/log/conserver'" >&5
echo "${ECHO_T}'/var/log/conserver'" >&6
- fi
+ ;;
+ *)
+ cat >>confdefs.h <<_ACEOF
+#define LOGFILEPATH "$withval"
+_ACEOF
+
+ echo "$as_me:$LINENO: result: '$withval'" >&5
+echo "${ECHO_T}'$withval'" >&6
+ ;;
+ esac
else
cat >>confdefs.h <<_ACEOF
#define LOGFILEPATH "/var/log/conserver"
@@ -1470,35 +1489,30 @@ _ACEOF
echo "${ECHO_T}'/var/log/conserver'" >&6
fi;
+
echo "$as_me:$LINENO: checking for PID filename" >&5
echo $ECHO_N "checking for PID filename... $ECHO_C" >&6
# Check whether --with-pidfile or --without-pidfile was given.
if test "${with_pidfile+set}" = set; then
withval="$with_pidfile"
- if test "$withval" != yes; then
- cat >>confdefs.h <<_ACEOF
-#define PIDFILE "$withval"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '$withval'" >&5
-echo "${ECHO_T}'$withval'" >&6
- else
- cat >>confdefs.h <<_ACEOF
-#define PIDFILE "/var/run/conserver.pid"
-_ACEOF
-
- echo "$as_me:$LINENO: result: '/var/run/conserver.pid'" >&5
-echo "${ECHO_T}'/var/run/conserver.pid'" >&6
- fi
+ case "$withval" in
+ yes|no)
+ PIDFILE="/var/run/conserver.pid"
+ ;;
+ *)
+ PIDFILE="$withval"
+ ;;
+ esac
else
- cat >>confdefs.h <<_ACEOF
-#define PIDFILE "/var/run/conserver.pid"
+ PIDFILE="/var/run/conserver.pid"
+fi;
+cat >>confdefs.h <<_ACEOF
+#define PIDFILE "$PIDFILE"
_ACEOF
- echo "$as_me:$LINENO: result: '/var/run/conserver.pid'" >&5
-echo "${ECHO_T}'/var/run/conserver.pid'" >&6
-fi;
+echo "$as_me:$LINENO: result: '$PIDFILE'" >&5
+echo "${ECHO_T}'$PIDFILE'" >&6
echo "$as_me:$LINENO: checking for MAXMEMB setting" >&5
echo $ECHO_N "checking for MAXMEMB setting... $ECHO_C" >&6
@@ -1506,21 +1520,34 @@ echo $ECHO_N "checking for MAXMEMB setting... $ECHO_C" >&6
# Check whether --with-maxmemb or --without-maxmemb was given.
if test "${with_maxmemb+set}" = set; then
withval="$with_maxmemb"
- if test "$withval" != yes; then
- cat >>confdefs.h <<_ACEOF
-#define MAXMEMB $withval
-_ACEOF
-
- echo "$as_me:$LINENO: result: $withval" >&5
-echo "${ECHO_T}$withval" >&6
- else
+ case "$withval" in
+ yes|no)
cat >>confdefs.h <<_ACEOF
#define MAXMEMB 16
_ACEOF
echo "$as_me:$LINENO: result: 16" >&5
echo "${ECHO_T}16" >&6
- fi
+ ;;
+ *)
+ if expr "$withval" : '[0-9]*$' >/dev/null 2>&1 &&
+ test "$withval" -gt 0 -a "$withval" -lt 256; then
+ cat >>confdefs.h <<_ACEOF
+#define MAXMEMB $withval
+_ACEOF
+
+ echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6
+ else
+ cat >>confdefs.h <<_ACEOF
+#define MAXMEMB 16
+_ACEOF
+
+ echo "$as_me:$LINENO: result: value out of bounds (0&5
+echo "${ECHO_T}value out of bounds (0&6
+ fi
+ ;;
+ esac
else
cat >>confdefs.h <<_ACEOF
#define MAXMEMB 16
@@ -1536,7 +1563,8 @@ echo $ECHO_N "checking for connect() timeout... $ECHO_C" >&6
# Check whether --with-timeout or --without-timeout was given.
if test "${with_timeout+set}" = set; then
withval="$with_timeout"
- if test "$withval" -gt 0 -o "$withval" -lt 300; then
+ if expr "$withval" : '[0-9]*$' >/dev/null 2>&1 &&
+ test "$withval" -gt 0 -a "$withval" -lt 300; then
cat >>confdefs.h <<_ACEOF
#define CONNECTTIMEOUT $withval
_ACEOF
@@ -1548,8 +1576,8 @@ echo "${ECHO_T}$withval" >&6
#define CONNECTTIMEOUT 10
_ACEOF
- echo "$as_me:$LINENO: result: 10" >&5
-echo "${ECHO_T}10" >&6
+ echo "$as_me:$LINENO: result: value out of bounds (0&5
+echo "${ECHO_T}value out of bounds (0&6
fi
else
cat >>confdefs.h <<_ACEOF
@@ -2516,6 +2544,7 @@ echo "${ECHO_T}no" >&6
fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2758,643 +2787,6 @@ fi
rm -f conftest*
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
- (eval $ac_compiler --version &5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5
- (eval $ac_compiler -v &5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5
- (eval $ac_compiler -V &5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_compiler_gnu=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-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="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include
-#include
-#include
-#include
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- ''\
- '#include ' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-continue
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
@@ -4027,7 +3419,7 @@ _ACEOF
if test "$ac_cv_sizeof_long" -gt 4; then
- if test "$ac_cv_allow_64bit" != "yes"; then
+ if test "$with_64bit" != "yes"; then
{ { echo "$as_me:$LINENO: error: cannot build on >32bit systems (to override use --with-64bit)" >&5
echo "$as_me: error: cannot build on >32bit systems (to override use --with-64bit)" >&2;}
{ (exit 1); exit 1; }; }
@@ -5202,6 +4594,376 @@ fi
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+case "$host" in
+*-*-hpux*)
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
+
+echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
+echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6
+if test "${ac_cv_lib_xnet_t_error+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lxnet $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char t_error ();
+int
+main ()
+{
+t_error ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_xnet_t_error=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_xnet_t_error=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
+echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6
+if test $ac_cv_lib_xnet_t_error = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXNET 1
+_ACEOF
+
+ LIBS="-lxnet $LIBS"
+
+else
+ { { echo "$as_me:$LINENO: error: -lxnet needed on HP-UX" >&5
+echo "$as_me: error: -lxnet needed on HP-UX" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5
+echo $ECHO_N "checking for getspnam in -lsec... $ECHO_C" >&6
+if test "${ac_cv_lib_sec_getspnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsec $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getspnam ();
+int
+main ()
+{
+getspnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sec_getspnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sec_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_getspnam" >&6
+if test $ac_cv_lib_sec_getspnam = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSEC 1
+_ACEOF
+
+ LIBS="-lsec $LIBS"
+
+fi
+
+
+
+for ac_header in hpsecurity.h prot.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+for ac_func in bigcrypt iscomsec getprpwnam
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ ;;
+esac
+
echo "$as_me:$LINENO: checking for library containing socket" >&5
echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
if test "${ac_cv_search_socket+set}" = set; then
@@ -6133,6 +5895,8 @@ else
echo "${ECHO_T}no" >&6
fi;
+echo "$as_me:$LINENO: checking for PAM support" >&5
+echo $ECHO_N "checking for PAM support... $ECHO_C" >&6
# Check whether --with-pam or --without-pam was given.
if test "${with_pam+set}" = set; then
@@ -6343,7 +6107,13 @@ fi
LIBS="$oLIBS"
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi;
@@ -6507,6 +6277,143 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking for strcasecmp" >&5
+echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6
+if test "${ac_cv_func_strcasecmp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char strcasecmp (); below. */
+#include
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strcasecmp ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
+choke me
+#else
+f = strcasecmp;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_strcasecmp=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_strcasecmp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
+echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6
+if test $ac_cv_func_strcasecmp = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRCASECMP 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: checking for stricmp" >&5
+echo $ECHO_N "checking for stricmp... $ECHO_C" >&6
+if test "${ac_cv_func_stricmp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char stricmp (); below. */
+#include
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char stricmp ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_stricmp) || defined (__stub___stricmp)
+choke me
+#else
+f = stricmp;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_stricmp=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_stricmp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_stricmp" >&5
+echo "${ECHO_T}$ac_cv_func_stricmp" >&6
+if test $ac_cv_func_stricmp = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRICMP 1
+_ACEOF
+
+else
+ { { echo "$as_me:$LINENO: error: strcasecmp or stricmp must be available" >&5
+echo "$as_me: error: strcasecmp or stricmp must be available" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
for ac_header in bsm/audit.h
@@ -6681,16 +6588,21 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for getaudit" >&5
-echo $ECHO_N "checking for getaudit... $ECHO_C" >&6
-if test "${ac_cv_func_getaudit+set}" = set; then
+
+
+for ac_func in getaudit getaudit_addr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getaudit (); below. */
+ which can conflict with char $ac_func (); below. */
#include
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -6698,7 +6610,7 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char getaudit ();
+char $ac_func ();
char (*f) ();
int
@@ -6707,10 +6619,10 @@ main ()
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_getaudit) || defined (__stub___getaudit)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = getaudit;
+f = $ac_func;
#endif
;
@@ -6729,94 +6641,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_getaudit=yes
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_func_getaudit=no
+eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getaudit" >&5
-echo "${ECHO_T}$ac_cv_func_getaudit" >&6
-if test $ac_cv_func_getaudit = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETAUDIT 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for getaudit_addr" >&5
-echo $ECHO_N "checking for getaudit_addr... $ECHO_C" >&6
-if test "${ac_cv_func_getaudit_addr+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getaudit_addr (); below. */
-#include
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getaudit_addr ();
-char (*f) ();
-
-int
-main ()
-{
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_getaudit_addr) || defined (__stub___getaudit_addr)
-choke me
-#else
-f = getaudit_addr;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_getaudit_addr=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_func_getaudit_addr=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getaudit_addr" >&5
-echo "${ECHO_T}$ac_cv_func_getaudit_addr" >&6
-if test $ac_cv_func_getaudit_addr = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETAUDIT_ADDR 1
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
+done
ac_config_files="$ac_config_files Makefile conserver/Makefile conserver.cf/Makefile console/Makefile autologin/Makefile"
+ ac_config_files="$ac_config_files conserver/conserver.rc"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -7326,6 +7174,7 @@ do
"conserver.cf/Makefile" ) CONFIG_FILES="$CONFIG_FILES conserver.cf/Makefile" ;;
"console/Makefile" ) CONFIG_FILES="$CONFIG_FILES console/Makefile" ;;
"autologin/Makefile" ) CONFIG_FILES="$CONFIG_FILES autologin/Makefile" ;;
+ "conserver/conserver.rc" ) CONFIG_FILES="$CONFIG_FILES conserver/conserver.rc" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -7409,6 +7258,7 @@ s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@MKDIR@,$MKDIR,;t t
+s,@PIDFILE@,$PIDFILE,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
@@ -7423,6 +7273,14 @@ s,@LN_S@,$LN_S,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
s,@CONSLIBS@,$CONSLIBS,;t t
s,@CONSCPPFLAGS@,$CONSCPPFLAGS,;t t
s,@CONSLDFLAGS@,$CONSLDFLAGS,;t t
@@ -7631,6 +7489,10 @@ s,@INSTALL@,$ac_INSTALL,;t t
rm -f $tmp/out
fi
+ # Run the commands associated with the file.
+ case $ac_file in
+ conserver/conserver.rc ) chmod +x conserver/conserver.rc ;;
+ esac
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
diff --git a/configure.in b/configure.in
index 62e55e9..fc4250e 100644
--- a/configure.in
+++ b/configure.in
@@ -31,138 +31,164 @@ AC_SUBST(MKDIR)
dnl ### Custom settings. ############################################
-ac_cv_allow_64bit=no
AC_MSG_CHECKING(whether to allow 64bit compilation)
AC_ARG_WITH(64bit,
AC_HELP_STRING([--with-64bit],[Allow 64bit compilation]),
- [if test "$withval" = yes; then
- ac_cv_allow_64bit=yes
- fi])
-AC_MSG_RESULT($ac_cv_allow_64bit)
+ [with_64bit=yes], [with_64bit=no])
+AC_MSG_RESULT($with_64bit)
AC_MSG_CHECKING(for port number specification)
AC_ARG_WITH(port,
AC_HELP_STRING([--with-port=PORT],[Specify port number @<:@conserver@:>@]),
- [if test "$withval" != yes -a "$withval" != no; then
- AC_DEFINE_UNQUOTED(DEFPORT, "$withval")
- AC_MSG_RESULT(port '$withval')
- else
+ [case "$withval" in
+ yes|no)
AC_DEFINE_UNQUOTED(DEFPORT, "conserver")
AC_MSG_RESULT(port 'conserver')
- fi],
+ ;;
+ *)
+ AC_DEFINE_UNQUOTED(DEFPORT, "$withval")
+ AC_MSG_RESULT(port '$withval')
+ ;;
+ esac],
[AC_DEFINE_UNQUOTED(DEFPORT, "conserver")
AC_MSG_RESULT(port 'conserver')])
AC_MSG_CHECKING(for secondary channel base port)
AC_ARG_WITH(base,
AC_HELP_STRING([--with-base=PORT], [Base port for secondary channel @<:@0@:>@]),
- [if test "$withval" != yes -a "$withval" != no; then
- AC_DEFINE_UNQUOTED(DEFBASEPORT, "$withval")
- AC_MSG_RESULT(port '$withval')
- else
+ [case "$withval" in
+ yes|no)
AC_DEFINE_UNQUOTED(DEFBASEPORT, "0")
AC_MSG_RESULT(port '0')
- fi],
+ ;;
+ *)
+ AC_DEFINE_UNQUOTED(DEFBASEPORT, "$withval")
+ AC_MSG_RESULT(port '$withval')
+ ;;
+ esac],
[AC_DEFINE_UNQUOTED(DEFBASEPORT, "0")
AC_MSG_RESULT(port '0')])
AC_MSG_CHECKING(for master conserver hostname)
AC_ARG_WITH(master,
AC_HELP_STRING([--with-master=MASTER],[Specify master server hostname @<:@console@:>@]),
- [if test "$withval" != yes; then
- AC_DEFINE_UNQUOTED(MASTERHOST, "$withval")
- AC_MSG_RESULT('$withval')
- else
+ [case "$withval" in
+ yes|no)
AC_DEFINE_UNQUOTED(MASTERHOST, "console")
AC_MSG_RESULT('console')
- fi],
+ ;;
+ *)
+ AC_DEFINE_UNQUOTED(MASTERHOST, "$withval")
+ AC_MSG_RESULT('$withval')
+ ;;
+ esac],
[AC_DEFINE_UNQUOTED(MASTERHOST, "console")
AC_MSG_RESULT('console')])
AC_MSG_CHECKING(for configuration filename)
AC_ARG_WITH(cffile,
AC_HELP_STRING([--with-cffile=CFFILE],[Specify config filename @<:@SYSCONFDIR/conserver.cf@:>@]),
- [if test "$withval" != yes; then
- if expr "x$withval" : "x/" > /dev/null 2>&1; then
- AC_DEFINE_UNQUOTED(CONFIGFILE, ["$withval"])
- AC_MSG_RESULT('$withval')
- else
- AC_DEFINE_UNQUOTED(CONFIGFILE, [SYSCONFDIR "/$withval"])
- AC_MSG_RESULT('$sysconfdir/$withval')
- fi
- else
+ [case "$withval" in
+ yes|no)
AC_DEFINE_UNQUOTED(CONFIGFILE, [SYSCONFDIR "/conserver.cf"])
AC_MSG_RESULT('$sysconfdir/conserver.cf')
- fi],
+ ;;
+ [[\\/]]* | ?:[[\\/]]* )
+ AC_DEFINE_UNQUOTED(CONFIGFILE, ["$withval"])
+ AC_MSG_RESULT('$withval')
+ ;;
+ *)
+ AC_DEFINE_UNQUOTED(CONFIGFILE, [SYSCONFDIR "/$withval"])
+ AC_MSG_RESULT('$sysconfdir/$withval')
+ ;;
+ esac],
[AC_DEFINE_UNQUOTED(CONFIGFILE, [SYSCONFDIR "/conserver.cf"])
AC_MSG_RESULT('$sysconfdir/conserver.cf')])
AC_MSG_CHECKING(for password filename)
AC_ARG_WITH(pwdfile,
AC_HELP_STRING([--with-pwdfile=PWDFILE],[Specify password filename @<:@SYSCONFDIR/conserver.passwd@:>@]),
- [if test "$withval" != yes; then
- if expr "x$withval" : "x/" > /dev/null 2>&1; then
- AC_DEFINE_UNQUOTED(PASSWDFILE, ["$withval"])
- AC_MSG_RESULT('$withval')
- else
- AC_DEFINE_UNQUOTED(PASSWDFILE, [SYSCONFDIR "/$withval"])
- AC_MSG_RESULT('$sysconfdir/$withval')
- fi
- else
+ [case "$withval" in
+ yes|no)
AC_DEFINE_UNQUOTED(PASSWDFILE, [SYSCONFDIR "/conserver.passwd"])
AC_MSG_RESULT('$sysconfdir/conserver.passwd')
- fi],
+ ;;
+ [[\\/]]* | ?:[[\\/]]* )
+ AC_DEFINE_UNQUOTED(PASSWDFILE, ["$withval"])
+ AC_MSG_RESULT('$withval')
+ ;;
+ *)
+ AC_DEFINE_UNQUOTED(PASSWDFILE, [SYSCONFDIR "/$withval"])
+ AC_MSG_RESULT('$sysconfdir/$withval')
+ ;;
+ esac],
[AC_DEFINE_UNQUOTED(PASSWDFILE, [SYSCONFDIR "/conserver.passwd"])
AC_MSG_RESULT('$sysconfdir/conserver.passwd')])
AC_MSG_CHECKING(for log filename)
AC_ARG_WITH(logfile,
AC_HELP_STRING([--with-logfile=LOGFILE],[Specify log filename @<:@/var/log/conserver@:>@]),
- [if test "$withval" != yes; then
- AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval")
- AC_MSG_RESULT('$withval')
- else
+ [case "$withval" in
+ yes|no)
AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/conserver")
AC_MSG_RESULT('/var/log/conserver')
- fi],
+ ;;
+ *)
+ AC_DEFINE_UNQUOTED(LOGFILEPATH, "$withval")
+ AC_MSG_RESULT('$withval')
+ ;;
+ esac],
[AC_DEFINE_UNQUOTED(LOGFILEPATH, "/var/log/conserver")
AC_MSG_RESULT('/var/log/conserver')])
+AC_SUBST(PIDFILE)
AC_MSG_CHECKING(for PID filename)
AC_ARG_WITH(pidfile,
AC_HELP_STRING([--with-pidfile=PIDFILE],[Specify PID filepath @<:@/var/run/conserver.pid@:>@]),
- [if test "$withval" != yes; then
- AC_DEFINE_UNQUOTED(PIDFILE, "$withval")
- AC_MSG_RESULT('$withval')
- else
- AC_DEFINE_UNQUOTED(PIDFILE, "/var/run/conserver.pid")
- AC_MSG_RESULT('/var/run/conserver.pid')
- fi],
- [AC_DEFINE_UNQUOTED(PIDFILE, "/var/run/conserver.pid")
- AC_MSG_RESULT('/var/run/conserver.pid')])
+ [case "$withval" in
+ yes|no)
+ PIDFILE="/var/run/conserver.pid"
+ ;;
+ *)
+ PIDFILE="$withval"
+ ;;
+ esac],
+ [PIDFILE="/var/run/conserver.pid"])
+AC_DEFINE_UNQUOTED(PIDFILE, "$PIDFILE")
+AC_MSG_RESULT('$PIDFILE')
AC_MSG_CHECKING(for MAXMEMB setting)
AC_ARG_WITH(maxmemb,
AC_HELP_STRING([--with-maxmemb=MAXMEMB],[Specify maximum consoles per process @<:@16@:>@]),
- [if test "$withval" != yes; then
- AC_DEFINE_UNQUOTED(MAXMEMB, $withval)
- AC_MSG_RESULT($withval)
- else
+ [case "$withval" in
+ yes|no)
AC_DEFINE_UNQUOTED(MAXMEMB, 16)
AC_MSG_RESULT(16)
- fi],
+ ;;
+ *)
+ if expr "$withval" : '[[0-9]]*$' >/dev/null 2>&1 &&
+ test "$withval" -gt 0 -a "$withval" -lt 256; then
+ AC_DEFINE_UNQUOTED(MAXMEMB, $withval)
+ AC_MSG_RESULT($withval)
+ else
+ AC_DEFINE_UNQUOTED(MAXMEMB, 16)
+ AC_MSG_RESULT([value out of bounds (0@]),
- [if test "$withval" -gt 0 -o "$withval" -lt 300; then
+ [if expr "$withval" : '[[0-9]]*$' >/dev/null 2>&1 &&
+ test "$withval" -gt 0 -a "$withval" -lt 300; then
AC_DEFINE_UNQUOTED(CONNECTTIMEOUT, $withval)
AC_MSG_RESULT($withval)
else
AC_DEFINE_UNQUOTED(CONNECTTIMEOUT, 10)
- AC_MSG_RESULT(10)
+ AC_MSG_RESULT([value out of bounds (032bit systems (to override use --with-64bit)])
else
AC_MSG_WARN([building a 64bit version of conserver - good luck!])
@@ -225,6 +251,19 @@ AC_CHECK_TYPE([socklen_t],[AC_DEFINE(HAVE_SOCKLEN_T,1,
#include ])
+dnl ### Host specific checks. ######################################
+AC_CANONICAL_HOST
+
+case "$host" in
+*-*-hpux*)
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
+ AC_CHECK_LIB(xnet,t_error,,AC_MSG_ERROR([-lxnet needed on HP-UX]))
+ AC_CHECK_LIB(sec,getspnam)
+ AC_CHECK_HEADERS(hpsecurity.h prot.h)
+ AC_CHECK_FUNCS(bigcrypt iscomsec getprpwnam)
+ ;;
+esac
+
dnl ### Check for libraries. #######################################
AC_SEARCH_LIBS(socket,socket)
AC_SEARCH_LIBS(gethostbyname,nsl)
@@ -384,6 +423,7 @@ AC_ARG_WITH(regex,
AC_MSG_RESULT(no)
fi],[AC_MSG_RESULT(no)])
+AC_MSG_CHECKING(for PAM support)
AC_ARG_WITH(pam,
AC_HELP_STRING([--with-pam],
[Enable PAM support]),
@@ -407,21 +447,26 @@ AC_ARG_WITH(pam,
[AC_MSG_RESULT(no)])])],)
LIBS="$oLIBS"
- fi],)
+ else
+ AC_MSG_RESULT(no)
+ fi],[AC_MSG_RESULT(no)])
AC_CHECK_FUNCS(getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent getspnam setlinebuf setvbuf ptsname grantpt unlockpt sigaction setsockopt getdtablesize putenv memset memcpy memcmp sysconf getpassphrase getlogin)
AC_FUNC_SETPGRP
+AC_CHECK_FUNC(strcasecmp,
+ [AC_DEFINE(HAVE_STRCASECMP, 1, [Define if strcasecmp is available])],
+ [AC_CHECK_FUNC(stricmp,
+ [AC_DEFINE(HAVE_STRICMP, 1, [Define if stricmp is available])],
+ [AC_MSG_ERROR([strcasecmp or stricmp must be available])])])
dnl Checks for libbsm functions
AC_CHECK_HEADERS(bsm/audit.h)
AC_CHECK_LIB(bsm, getaudit)
-AC_CHECK_FUNC(getaudit,
- AC_DEFINE(HAVE_GETAUDIT, 1, [Define if libbsm has `getaudit'.]))
-AC_CHECK_FUNC(getaudit_addr,
- AC_DEFINE(HAVE_GETAUDIT_ADDR, 1, [Define if libbsm has `getaudit_addr'.]))
+AC_CHECK_FUNCS(getaudit getaudit_addr)
dnl ### Create output files. #######################################
AC_CONFIG_FILES([Makefile conserver/Makefile conserver.cf/Makefile console/Makefile autologin/Makefile])
+AC_CONFIG_FILES([conserver/conserver.rc], [chmod +x conserver/conserver.rc])
AC_OUTPUT
diff --git a/conserver.cf/conserver.cf.man b/conserver.cf/conserver.cf.man
index 9645b8f..f44c3dc 100644
--- a/conserver.cf/conserver.cf.man
+++ b/conserver.cf/conserver.cf.man
@@ -1,4 +1,4 @@
-.\" $Id: conserver.cf.man,v 1.26 2003-01-08 17:11:55-08 bryan Exp $
+.\" $Id: conserver.cf.man,v 1.27 2003-04-08 13:46:12-07 bryan Exp $
.\" @(#)constab.5 01/06/91 OSU CIS; Thomas A. Fine
.TH CONSERVER.CF 5 "Local"
.SH NAME
@@ -166,8 +166,11 @@ looks for the first match in the config file
for a client's IP address (or network),
or hostname (or domain) if it is able to do a reverse lookup on the IP address,
to determine the level of access to be granted.
-Three levels of access may be specified: ``\fBtrust\fP'', ``\fBallow\fP'',
-and ``\fBrefuse\fP''.
+Three levels of access may be specified: ``\fBtrust\fP'' (access is granted
+without a password), ``\fBallow\fP'' (access is granted with a password),
+and ``\fBrefuse\fP'' (access is not granted). Only the first character of
+the word is important, so you can use any word that begins with
+a ``\fBt\fP'', ``\fBa\fP'', or ``\fBr\fP''.
The access level is followed by a colon and a space-separated list of
addresses or host names.
Any number of any combination of these levels may be specified,
@@ -228,7 +231,7 @@ mentor:/dev/ttyh0@extra.cc.purdue.edu:2400e:&:
# "badhost" are to be rejected, since only the first match
# is used)
#
-trusted: console.cc.purdue.edu 128.210.7.90
+trust: console.cc.purdue.edu 128.210.7.90
refuse: badhost.cc.purdue.edu
allow: cc.purdue.edu stat.cc.purdue.edu
.SH "SEE ALSO"
diff --git a/conserver.html b/conserver.html
index 9f8d0fe..c6fd575 100644
--- a/conserver.html
+++ b/conserver.html
@@ -183,11 +183,11 @@
Downloading
- The current version, released on Mar 20, 2003, is 7.2.6.tar.gz. You can get it via
+
The current version, released on Apr 9, 2003, is 7.2.7.tar.gz. You can get it via
FTP
- or HTTP. See the FTP
+ or HTTP. See the CHANGES file for information on the latest
updates.
@@ -216,27 +216,37 @@
more), please let me know.
- - Solaris 2.5.1 thru 9 (sparc/x86), gcc
+ - AIX 4.3.3/5.1, native cc
- BSDI BSD/OS 3.X, gcc
- - MacOS X
+ - Cygwin (w2k),gcc 2.95.3
+
+ - DEC Tru64 4.0, gcc
+
+ - DEC Tru64 4.0/5.1, native cc
+
+ - FreeBSD 4.2 (x86), gcc
+
+ - HP-UX 10.20, gcc
+
+ - HP-UX 11.10 parisc and ia64, native cc
+
+ - Irix 6.15, native cc
- Linux 2.2.18 (x86), gcc
- Linux 2.4.2 (x86), gcc
- - FreeBSD 4.2 (x86), gcc
+ - Linux ia64, native gcc
- - cygwin (w2k),gcc 2.95.3
+ - Linux RedHat 6.2 and 7.2 (x86), native gcc
- - DEC Tru64 4.0, gcc
+ - MacOS X, native gcc
- - DEC Tru64 4.0/5.1, DEC cc
+ - Solaris 2.5.1 thru 9 (sparc/x86), gcc
- - HP-UX 10.20, gcc
-
- - AIX 4.3.3, AIX cc
+ - Solaris 7/8, native cc
Other Good Information
diff --git a/conserver/Makefile.in b/conserver/Makefile.in
index 82bec93..cc65ced 100644
--- a/conserver/Makefile.in
+++ b/conserver/Makefile.in
@@ -46,7 +46,7 @@ clean:
rm -f *~ *.o $(ALL) core
distclean: clean
- rm -f Makefile
+ rm -f Makefile conserver.rc
install: conserver
$(MKDIR) $(DESTDIR)$(sbindir)
diff --git a/conserver/access.c b/conserver/access.c
index c57e247..0bb65ec 100644
--- a/conserver/access.c
+++ b/conserver/access.c
@@ -1,5 +1,5 @@
/*
- * $Id: access.c,v 5.52 2003-03-08 08:37:24-08 bryan Exp $
+ * $Id: access.c,v 5.53 2003-04-06 05:31:54-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -167,7 +167,7 @@ AccType(addr, hname)
len = strlen(pcName);
while (len >= pACtmp->ilen) {
Debug(1, "AccType(): name=%s", pcName);
- if (0 == strcmp(pcName, pACtmp->pcwho)) {
+ if (0 == strcasecmp(pcName, pACtmp->pcwho)) {
return pACtmp->ctrust;
}
pcName = strchr(pcName, '.');
@@ -257,7 +257,7 @@ FindUniq(pRCAll)
* else add us by returning our node
*/
for (pRC = pRCAll->pRCuniq; (REMOTE *) 0 != pRC; pRC = pRC->pRCuniq) {
- if (0 == strcmp(pRC->rhost.string, pRCAll->rhost.string)) {
+ if (0 == strcasecmp(pRC->rhost.string, pRCAll->rhost.string)) {
return pRCAll->pRCuniq;
}
}
diff --git a/conserver/client.c b/conserver/client.c
index 785f32c..d1f7839 100644
--- a/conserver/client.c
+++ b/conserver/client.c
@@ -1,5 +1,5 @@
/*
- * $Id: client.c,v 5.58 2003-03-09 13:53:40-08 bryan Exp $
+ * $Id: client.c,v 5.60 2003-03-17 08:38:40-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -83,7 +83,7 @@ FindWrite(pCL)
} else {
FileWrite(pCL->fd, "\r\n[attached]\r\n", -1);
}
- TagLogfile(pCL->pCEto, "%s attached", pCL->acid.string);
+ TagLogfileAct(pCL->pCEto, "%s attached", pCL->acid.string);
return pCL;
}
return (CONSCLIENT *) 0;
diff --git a/conserver/consent.c b/conserver/consent.c
index ad7a6a8..5e07085 100644
--- a/conserver/consent.c
+++ b/conserver/consent.c
@@ -1,5 +1,5 @@
/*
- * $Id: consent.c,v 5.101 2003-03-09 15:51:15-08 bryan Exp $
+ * $Id: consent.c,v 5.103 2003-04-06 05:32:20-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -45,6 +45,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -181,10 +182,11 @@ FindParity(pcMode)
*/
static int
#if PROTOTYPES
-TtyDev(CONSENT * pCE)
+TtyDev(CONSENT * pCE, fd_set * pfdSet)
#else
-TtyDev(pCE)
+TtyDev(pCE, pfdSet)
CONSENT *pCE;
+ fd_set *pfdSet;
#endif
{
struct termios termp;
@@ -193,8 +195,10 @@ TtyDev(pCE)
/* here we should fstat for `read-only' checks
*/
if (-1 == fstat(pCE->fdtty, &stPerm)) {
- Error("[%s] fstat(%s(%d)): %s", pCE->server.string,
+ Error("[%s] fstat(%s(%d)): %s: forcing down", pCE->server.string,
pCE->dfile.string, pCE->fdtty, strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
+ return -1;
} else if (0 == (stPerm.st_mode & 0222)) {
/* any device that is read-only we won't write to
*/
@@ -205,8 +209,10 @@ TtyDev(pCE)
* Get terminal attributes
*/
if (-1 == tcgetattr(pCE->fdtty, &termp)) {
- Error("[%s] tcgetattr(%s(%d)): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] tcgetattr(%s(%d)): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
@@ -235,13 +241,17 @@ TtyDev(pCE)
termp.c_cc[VTIME] = 1;
if (-1 == cfsetospeed(&termp, pCE->pbaud->irate)) {
- Error("[%s] cfsetospeed(%s(%d)): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] cfsetospeed(%s(%d)): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
if (-1 == cfsetispeed(&termp, pCE->pbaud->irate)) {
- Error("[%s] cfsetispeed(%s(%d)): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] cfsetispeed(%s(%d)): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
@@ -249,8 +259,10 @@ TtyDev(pCE)
* Set terminal attributes
*/
if (-1 == tcsetattr(pCE->fdtty, TCSADRAIN, &termp)) {
- Error("[%s] tcsetattr(%s(%d),TCSADRAIN): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] tcsetattr(%s(%d),TCSADRAIN): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
# if HAVE_STROPTS_H
@@ -273,10 +285,11 @@ TtyDev(pCE)
*/
static int
#if PROTOTYPES
-TtyDev(CONSENT * pCE)
+TtyDev(CONSENT * pCE, fd_set * pfdSet)
#else
TtyDev(pCE)
CONSENT *pCE;
+ fd_set *pfdSet;
#endif
{
struct sgttyb sty;
@@ -287,8 +300,10 @@ TtyDev(pCE)
/* here we should fstat for `read-only' checks
*/
if (-1 == fstat(pCE->fdtty, &stPerm)) {
- Error("[%s] fstat(%s(%d)): %s", pCE->server.string,
+ Error("[%s] fstat(%s(%d)): %s: forcing down", pCE->server.string,
pCE->dfile.string, pCE->fdtty, strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
+ return -1;
} else if (0 == (stPerm.st_mode & 0222)) {
/* any device that is read-only we won't write to
*/
@@ -296,8 +311,10 @@ TtyDev(pCE)
}
# if defined(TIOCSSOFTCAR)
if (-1 == ioctl(pCE->fdtty, TIOCSSOFTCAR, &fSoftcar)) {
- Error("[%s] ioctl(%s(%d),TIOCSSOFTCAR): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] ioctl(%s(%d),TIOCSSOFTCAR): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
# endif
@@ -305,8 +322,10 @@ TtyDev(pCE)
/* stty 9600 raw cs7
*/
if (-1 == ioctl(pCE->fdtty, TIOCGETP, (char *)&sty)) {
- Error("[%s] ioctl(%s(%d),TIOCGETP): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] ioctl(%s(%d),TIOCGETP): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
sty.sg_flags &= ~(ECHO | CRMOD | pCE->pparity->iclr);
@@ -316,8 +335,10 @@ TtyDev(pCE)
sty.sg_ispeed = pCE->pbaud->irate;
sty.sg_ospeed = pCE->pbaud->irate;
if (-1 == ioctl(pCE->fdtty, TIOCSETP, (char *)&sty)) {
- Error("[%s] ioctl(%s(%d),TIOCSETP): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] ioctl(%s(%d),TIOCSETP): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
@@ -325,8 +346,10 @@ TtyDev(pCE)
* (in cbreak mode we may not need to this... but we do)
*/
if (-1 == ioctl(pCE->fdtty, TIOCGETC, (char *)&m_tchars)) {
- Error("[%s] ioctl(%s(%d),TIOCGETC): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] ioctl(%s(%d),TIOCGETC): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
m_tchars.t_intrc = -1;
@@ -336,13 +359,17 @@ TtyDev(pCE)
m_tchars.t_eofc = -1;
m_tchars.t_brkc = -1;
if (-1 == ioctl(pCE->fdtty, TIOCSETC, (char *)&m_tchars)) {
- Error("[%s] ioctl(%s(%d),TIOCSETC): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] ioctl(%s(%d),TIOCSETC): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
if (-1 == ioctl(pCE->fdtty, TIOCGLTC, (char *)&m_ltchars)) {
- Error("[%s] ioctl(%s(%d),TIOCGLTC): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] ioctl(%s(%d),TIOCGLTC): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
m_ltchars.t_werasc = -1;
@@ -351,8 +378,10 @@ TtyDev(pCE)
m_ltchars.t_suspc = -1;
m_ltchars.t_dsuspc = -1;
if (-1 == ioctl(pCE->fdtty, TIOCSLTC, (char *)&m_ltchars)) {
- Error("[%s] ioctl(%s(%d),TIOCSLTC): %s", pCE->server.string,
- pCE->dfile.string, pCE->fdtty, strerror(errno));
+ Error("[%s] ioctl(%s(%d),TIOCSLTC): %s: forcing down",
+ pCE->server.string, pCE->dfile.string, pCE->fdtty,
+ strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return -1;
}
# if HAVE_STROPTS_H
@@ -452,7 +481,7 @@ VirtDev(pCE)
if (0 != open(pCE->acslave.string, O_RDWR, 0) || 1 != dup(0)) {
Error("[%s] fd sync error", pCE->server.string);
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
# if HAVE_STROPTS_H && !defined(_AIX)
/* SYSVr4 semantics for opening stream ptys (gregf)
@@ -477,7 +506,7 @@ VirtDev(pCE)
{
Error("[%s] ioctl(0,TCGETS): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
n_tio.c_iflag &= ~(IGNCR | IUCLC);
n_tio.c_iflag |= ICRNL | IXON | IXANY;
@@ -504,7 +533,7 @@ VirtDev(pCE)
{
Error("[%s] ioctl(0,TCSETS): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
tcsetpgrp(0, iNewGrp);
@@ -514,7 +543,7 @@ VirtDev(pCE)
if (-1 == ioctl(0, TIOCGETP, (char *)&sty)) {
Error("[%s] ioctl(0,TIOCGETP): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
sty.sg_flags &= ~(CBREAK | TANDEM | pCE->pparity->iclr);
sty.sg_flags |= (ECHO | CRMOD | pCE->pparity->iset);
@@ -525,7 +554,7 @@ VirtDev(pCE)
if (-1 == ioctl(0, TIOCSETP, (char *)&sty)) {
Error("[%s] ioctl(0,TIOCSETP): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
/* stty undef all tty chars
@@ -534,7 +563,7 @@ VirtDev(pCE)
if (-1 == ioctl(0, TIOCGETC, (char *)&m_tchars)) {
Error("[%s] ioctl(0,TIOCGETC): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
m_tchars.t_intrc = '\003';
m_tchars.t_quitc = '\034';
@@ -545,12 +574,12 @@ VirtDev(pCE)
if (-1 == ioctl(0, TIOCSETC, (char *)&m_tchars)) {
Error("[%s] ioctl(0,TIOCSETC): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
if (-1 == ioctl(0, TIOCGLTC, (char *)&m_ltchars)) {
Error("[%s] ioctl(0,TIOCGLTC): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
m_ltchars.t_werasc = '\027';
m_ltchars.t_flushc = '\017';
@@ -560,7 +589,7 @@ VirtDev(pCE)
if (-1 == ioctl(0, TIOCSLTC, (char *)&m_ltchars)) {
Error("[%s] ioctl(0,TIOCSLTC): %s", pCE->server.string,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
/* give us a process group to work in
@@ -603,18 +632,20 @@ VirtDev(pCE)
}
execve(pcShell, ppcArgv, environ);
Error("[%s] execve(): %s", pCE->server.string, strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
+ return -1;
}
/* down a console, virtual or real (ksb)
*/
void
#if PROTOTYPES
-ConsDown(CONSENT * pCE, fd_set * pfdSet)
+ConsDown(CONSENT * pCE, fd_set * pfdSet, short downHard)
#else
-ConsDown(pCE, pfdSet)
+ConsDown(pCE, pfdSet, downHard)
CONSENT *pCE;
fd_set *pfdSet;
+ short downHard;
#endif
{
if (-1 != pCE->ipid) {
@@ -631,18 +662,16 @@ ConsDown(pCE, pfdSet)
}
if ((CONSFILE *) 0 != pCE->fdlog) {
if (pCE->nolog) {
- FilePrint(pCE->fdlog,
- "[-- Console logging restored -- %s]\r\n",
- StrTime(NULL));
+ TagLogfile(pCE, "Console logging restored");
}
- FilePrint(pCE->fdlog, "[-- Console down -- %s]\r\n",
- StrTime(NULL));
+ TagLogfile(pCE, "Console down");
FileClose(&pCE->fdlog);
pCE->fdlog = (CONSFILE *) 0;
}
pCE->fup = 0;
pCE->nolog = 0;
pCE->autoReUp = 0;
+ pCE->downHard = downHard;
}
int
@@ -656,7 +685,7 @@ CheckHostCache(hostname)
struct hostcache *p;
p = hostcachelist;
while (p != NULL) {
- if (0 == strcmp(hostname, p->hostname.string)) {
+ if (0 == strcasecmp(hostname, p->hostname.string)) {
return 1;
}
p = p->next;
@@ -708,20 +737,16 @@ ClearHostCache()
*/
void
#if PROTOTYPES
-ConsInit(CONSENT * pCE, fd_set * pfdSet, int useHostCache)
+ConsInit(CONSENT * pCE, fd_set * pfdSet, short useHostCache)
#else
ConsInit(pCE, pfdSet, useHostCache)
CONSENT *pCE;
fd_set *pfdSet;
- int useHostCache;
+ short useHostCache;
#endif
{
time_t tyme;
-#if PROTOTYPES
- extern int FallBack(STRING *, STRING *);
-#else
- extern int FallBack();
-#endif
+ extern int FallBack PARAMS((STRING *, STRING *));
if (!useHostCache)
ClearHostCache();
@@ -729,7 +754,7 @@ ConsInit(pCE, pfdSet, useHostCache)
/* clean up old stuff
*/
if (pCE->fup) {
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 0);
usleep(500000); /* pause 0.50 sec to let things settle a bit */
ResetMark();
}
@@ -745,17 +770,19 @@ ConsInit(pCE, pfdSet, useHostCache)
if ((CONSFILE *) 0 ==
(pCE->fdlog =
FileOpen(pCE->lfile.string, O_RDWR | O_CREAT | O_APPEND, 0644))) {
- Error("[%s] FileOpen(%s): %s", pCE->server.string,
+ Error("[%s] FileOpen(%s): %s: forcing down", pCE->server.string,
pCE->lfile.string, strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return;
}
- FilePrint(pCE->fdlog, "[-- Console up -- %s]\r\n", StrTime(NULL));
+
+ TagLogfile(pCE, "Console up");
if (0 != pCE->fvirtual) {
if (-1 == (pCE->fdtty = FallBack(&pCE->acslave, &pCE->dfile))) {
- Error("[%s] failed to allocate pseudo-tty: %s",
+ Error("[%s] failed to allocate pseudo-tty: %s: forcing down",
pCE->server.string, strerror(errno));
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
}
} else if (pCE->isNetworkConsole) {
@@ -769,7 +796,7 @@ ConsInit(pCE, pfdSet, useHostCache)
if (CheckHostCache(pCE->networkConsoleHost.string)) {
Error("[%s] cached previous timeout: %s: forcing down",
pCE->server.string, pCE->networkConsoleHost.string);
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
}
usleep(100000); /* Not all terminal servers can keep up */
@@ -785,7 +812,7 @@ ConsInit(pCE, pfdSet, useHostCache)
Error("[%s] gethostbyname(%s): %s: forcing down",
pCE->server.string, pCE->networkConsoleHost.string,
hstrerror(h_errno));
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
}
#if HAVE_MEMCPY
@@ -797,26 +824,33 @@ ConsInit(pCE, pfdSet, useHostCache)
port.sin_port = htons(pCE->networkConsolePort);
if ((pCE->fdtty = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- Error("[%s] socket(AF_INET,SOCK_STREAM): %s",
+ Error("[%s] socket(AF_INET,SOCK_STREAM): %s: forcing down",
pCE->server.string, strerror(errno));
- exit(EX_UNAVAILABLE);
+ ConsDown(pCE, pfdSet, 1);
+ return;
}
if (setsockopt
(pCE->fdtty, SOL_SOCKET, SO_KEEPALIVE, (char *)&one,
sizeof(one)) < 0) {
- Error("[%s] setsockopt(%u,SO_KEEPALIVE): %s",
+ Error("[%s] setsockopt(%u,SO_KEEPALIVE): %s: forcing down",
pCE->server.string, pCE->fdtty, strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
+ return;
}
if ((flags = fcntl(pCE->fdtty, F_GETFL)) >= 0) {
flags |= O_NONBLOCK;
if (fcntl(pCE->fdtty, F_SETFL, flags) < 0) {
- Error("[%s] fcntl(%u,F_SETFL): %s", pCE->server.string,
- pCE->fdtty, strerror(errno));
+ Error("[%s] fcntl(%u,F_SETFL): %s: forcing down",
+ pCE->server.string, pCE->fdtty, strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
+ return;
}
} else {
- Error("[%s] fcntl(%u,F_GETFL): %s", pCE->server.string,
- pCE->fdtty, strerror(errno));
+ Error("[%s] fcntl(%u,F_GETFL): %s: forcing down",
+ pCE->server.string, pCE->fdtty, strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
+ return;
}
if (connect(pCE->fdtty, (struct sockaddr *)&port, sizeof(port)) <
@@ -824,7 +858,7 @@ ConsInit(pCE, pfdSet, useHostCache)
if (errno != EINPROGRESS) {
Error("[%s] connect(%u): %s: forcing down",
pCE->server.string, pCE->fdtty, strerror(errno));
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
}
}
@@ -837,7 +871,7 @@ ConsInit(pCE, pfdSet, useHostCache)
if ((one = select(pCE->fdtty + 1, NULL, &fds, NULL, &tv)) < 0) {
Error("[%s] select(%u): %s: forcing down", pCE->server.string,
pCE->fdtty, strerror(errno));
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
}
@@ -845,7 +879,7 @@ ConsInit(pCE, pfdSet, useHostCache)
AddHostCache(pCE->networkConsoleHost.string);
Error("[%s] connect timeout: forcing down", pCE->server.string,
strerror(errno));
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
} else { /* Response */
socklen_t slen;
@@ -859,13 +893,13 @@ ConsInit(pCE, pfdSet, useHostCache)
&slen) < 0) {
Error("[%s] getsockopt(%u,SO_ERROR): %s: forcing down",
pCE->server.string, pCE->fdtty, strerror(errno));
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
}
if (flags != 0) {
Error("[%s] connect(%u): %s: forcing down",
pCE->server.string, pCE->fdtty, strerror(flags));
- ConsDown(pCE, pfdSet);
+ ConsDown(pCE, pfdSet, 1);
return;
}
}
@@ -880,9 +914,9 @@ ConsInit(pCE, pfdSet, useHostCache)
} else if (-1 ==
(pCE->fdtty =
open(pCE->dfile.string, O_RDWR | O_NDELAY, 0600))) {
- Error("[%s] open(%s): %s", pCE->server.string, pCE->dfile.string,
- strerror(errno));
- ConsDown(pCE, pfdSet);
+ Error("[%s] open(%s): %s: forcing down", pCE->server.string,
+ pCE->dfile.string, strerror(errno));
+ ConsDown(pCE, pfdSet, 1);
return;
}
FD_SET(pCE->fdtty, pfdSet);
@@ -894,7 +928,7 @@ ConsInit(pCE, pfdSet, useHostCache)
} else if (pCE->isNetworkConsole) {
pCE->fup = 1;
} else {
- TtyDev(pCE);
+ TtyDev(pCE, pfdSet);
}
/* If we have marks, adjust the next one so that it's in the future */
@@ -908,4 +942,9 @@ ConsInit(pCE, pfdSet, useHostCache)
(((tyme - pCE->nextMark) / pCE->mark) + 1) * pCE->mark;
}
}
+
+ if (pCE->downHard && pCE->fup) {
+ Msg("[%s] console up", pCE->server.string);
+ pCE->downHard = 0;
+ }
}
diff --git a/conserver/consent.h b/conserver/consent.h
index 45448da..c431416 100644
--- a/conserver/consent.h
+++ b/conserver/consent.h
@@ -1,5 +1,5 @@
/*
- * $Id: consent.h,v 5.35 2003-03-09 15:21:49-08 bryan Exp $
+ * $Id: consent.h,v 5.36 2003-03-17 08:54:53-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -59,8 +59,9 @@ typedef struct consent { /* console information */
PARITY *pparity; /* the parity on this line */
int mark; /* Mark (chime) interval */
long nextMark; /* Next mark (chime) time */
- short breakType; /* break type [1-9] */
- int autoReUp;
+ unsigned short breakType; /* break type [1-9] */
+ unsigned short autoReUp; /* is it coming back up automatically? */
+ unsigned short downHard; /* did it go down unexpectedly? */
/* Used if network console */
int isNetworkConsole;
@@ -80,12 +81,12 @@ typedef struct consent { /* console information */
int fdtty; /* the port to talk to machine on */
int activitylog; /* log attach/detach/bump */
int breaklog; /* log breaks sent */
- short fup; /* we setup this line? */
- short fronly; /* we can only read this console */
+ unsigned short fup; /* we setup this line? */
+ unsigned short fronly; /* we can only read this console */
struct client *pCLon; /* clients on this console */
struct client *pCLwr; /* client that is writting on console */
char acline[132 * 2 + 2]; /* max chars we will call a line */
- short iend; /* length of data stored in acline */
+ int iend; /* length of data stored in acline */
struct consent *pCEnext; /* next console entry */
} CONSENT;
@@ -96,8 +97,9 @@ struct hostcache {
extern PARITY *FindParity PARAMS((char *));
extern BAUD *FindBaud PARAMS((char *));
-extern void ConsInit PARAMS((CONSENT *, fd_set *, int));
-extern void ConsDown PARAMS((CONSENT *, fd_set *));
+extern void ConsInit PARAMS((CONSENT *, fd_set *, short));
+extern void ConsDown PARAMS((CONSENT *, fd_set *, short));
extern int CheckHostCache PARAMS((const char *));
extern void AddHostCache PARAMS((const char *));
extern void ClearHostCache PARAMS((void));
+extern void ClearHostCache PARAMS((void));
diff --git a/conserver/conserver.man b/conserver/conserver.man
index 87c4ab2..679c6ff 100644
--- a/conserver/conserver.man
+++ b/conserver/conserver.man
@@ -1,5 +1,5 @@
.\" @(#)conserver.8 01/06/91 OSU CIS; Thomas A. Fine
-.\" $Id: conserver.man,v 1.29 2003-01-08 17:17:25-08 bryan Exp $
+.\" $Id: conserver.man,v 1.32 2003-04-08 14:05:59-07 bryan Exp $
.TH CONSERVER 8 "Local"
.SH NAME
conserver \- console server daemon
@@ -71,26 +71,26 @@ process that dies. The following signals are propagated by the parent
process to its children.
.TP
SIGTERM
-close all connections and exit.
+Close all connections and exit.
.TP
SIGHUP
-reread the configuration file. new consoles are managed by
+Reread the configuration file. New consoles are managed by
forking off new childen, deleted consoles (and their clients) are dropped,
and changes to consoles are done "in place", resetting the console
-port (bringing it down and up) only when necessary. the console name is
-used to determine when consoles have been added/removed/changed. all
+port (bringing it down and up) only when necessary. The console name is
+used to determine when consoles have been added/removed/changed. All
actions performed by SIGUSR2 are also performed.
.TP
SIGUSR1
-try to connect to any consoles marked as
+Try to connect to any consoles marked as
down. This can come in handy if you had a terminal server (or more)
that wasn't accepting connections at startup and you want
\fBconserver\fP to try to reconnect to all those downed ports.
.TP
SIGUSR2
-all console logfiles are closed and reopened
+Close and reopen all console logfiles
and, if in daemon mode (\fB\-d\fP option),
-the error logfile (see the \fB\-L\fP option). all actions performed by
+the error logfile (see the \fB\-L\fP option). All actions performed by
SIGUSR1 are also performed.
.PP
Slave hosts which have no current
@@ -101,11 +101,23 @@ and output on stdout (or, in daemon mode, to the logfile).
This allows a live operator or an automated log scanner
to find otherwise unseen errors by watching in a single location.
.PP
-\fBConserver\fP must be run as root if it is to bind to a port under 1024
-or if it must read a shadow passwd file for authentication (see
+\fBConserver\fP must be run as root if it is to bind to a port under
+1024 or if it must read protected password files (like shadow passwords)
+for authentication (see
.BR conserver.passwd (5)).
Otherwise, it may be run by any user, with \fB\-p\fP used to specify
a port above 1024.
+.PP
+If encryption has been built into the code (\fB--with-openssl\fP),
+encrypted client connections (without certificate exchanges) happen
+by default. To add certificate exchanges, use the \fB-c\fP option with
+the client and server. For authentication of the certificates to work,
+the signing certificate must be properly trusted, which usually means
+the public portion is in \fIOPENSSL_ROOT\fP\fB/ssl/certs\fP (on both
+the client and server sides). See the sample self-signing certficate
+making script \fBcontrib/maketestcerts\fP for further clues. To allow
+non-encrypted client connections (in addition to encrypted client
+connections), use the \fB-E\fP option.
.SH OPTIONS
.PP
Options may be given as separate arguments (e.g., \fB\-n -d\fP)
@@ -159,9 +171,10 @@ Enable debugging output, sent to stderr. Multiple \fB-D\fP options
increases debug output.
.TP
.B \-E
-If encryption has been built into the code (\fB--with-openssl\fP), encrypted
-client connections are a requirement. This option allows clients to connect
-to consoles over non-encrypted connections.
+If encryption has been built into the code (\fB--with-openssl\fP),
+encrypted client connections are a requirement. This option allows
+non-encrypted clients (as well as encrypted clients) to connect to
+consoles.
.TP
.B \-F
Do not automatically reinitialize failed (unexpectedly closed)
@@ -202,12 +215,6 @@ Normally, a client connecting to a ``downed'' console does just that.
Using this option, the server will automatically attempt to open
(``bring up'') the console when the client connects.
.TP
-.B \-R
-Disable automatic client redirection to other conserver hosts. This
-means informational commands like \fB-w\fP and \fB-i\fP will only show
-the status of the local conserver host and attempts to connect to
-remote consoles will result in an informative message to the user.
-.TP
.BI \-O min
Enable periodic attempts (every \fImin\fP minutes) to open (``bring up'')
all downed consoles (similar to sending a SIGUSR1).
@@ -223,6 +230,12 @@ Read the table of authorized user data from the file \fIpasswd\fP.
The default \fIpasswd\fP may be changed at compile time using the
\fB--with-pwdfile\fP option.
.TP
+.B \-R
+Disable automatic client redirection to other conserver hosts. This
+means informational commands like \fB-w\fP and \fB-i\fP will only show
+the status of the local conserver host and attempts to connect to
+remote consoles will result in an informative message to the user.
+.TP
.B \-u
Send unloved console output to \fBconserver\fP's stdout
(which, in daemon mode, is redirected to the logfile).
diff --git a/conserver/conserver.rc b/conserver/conserver.rc
deleted file mode 100755
index 9bcfbc9..0000000
--- a/conserver/conserver.rc
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# Startup for conserver
-#
-
-PATH=/usr/bin:/usr/local/bin
-
-case "$1" in
- 'start')
- echo "Starting console server daemon"
- conserver -d
- ;;
-
- 'stop')
- master=`ps -ef | grep conserver | awk '$3 == "1"{print $2}'`
- [ "$master" ] && kill -TERM $master
- ;;
-
- 'restart')
- master=`ps -ef | grep conserver | awk '$3 == "1"{print $2}'`
- [ "$master" ] && kill -HUP $master
- ;;
-
- *)
- echo "Usage: $0 { start | stop | restart }"
- ;;
-
-esac
-exit 0
diff --git a/conserver/conserver.rc.in b/conserver/conserver.rc.in
new file mode 100644
index 0000000..77c6fb0
--- /dev/null
+++ b/conserver/conserver.rc.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Startup for conserver
+#
+
+PATH=/usr/bin:/bin:/usr/local/bin
+PIDFILE="@PIDFILE@"
+
+signalmaster() {
+ sig=$1
+ if [ -f "$PIDFILE" ]; then
+ master=`cat "$PIDFILE"`
+ else
+ master=`ps -ef | grep conserver | awk '$3 == "1"{print $2}'`
+ fi
+ [ "$master" ] && kill -$sig $master
+}
+
+case "$1" in
+ 'start')
+ echo "Starting console server daemon"
+ conserver -d
+ ;;
+
+ 'stop')
+ echo "Stopping console server daemon"
+ signalmaster TERM
+ ;;
+
+ 'restart')
+ echo "Restarting console server daemon"
+ signalmaster HUP
+ ;;
+
+ *)
+ echo "Usage: $0 { start | stop | restart }"
+ ;;
+
+esac
+exit 0
diff --git a/conserver/fallback.c b/conserver/fallback.c
index 0270c61..b302be4 100644
--- a/conserver/fallback.c
+++ b/conserver/fallback.c
@@ -1,5 +1,5 @@
/*
- * $Id: fallback.c,v 5.52 2003-03-08 08:38:14-08 bryan Exp $
+ * $Id: fallback.c,v 5.53 2003-03-17 08:27:34-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -90,7 +90,7 @@ GetPseudoTTY(slave, master)
#if HAVE_SIGACTION
sigset_t oldmask, newmask;
#else
- extern RETSIGTYPE FlagReapVirt();
+ extern RETSIGTYPE FlagReapVirt PARAMS((int));
#endif
if (0 > (fd = open("/dev/ptmx", O_RDWR, 0))) {
diff --git a/conserver/group.c b/conserver/group.c
index f196513..55f225d 100644
--- a/conserver/group.c
+++ b/conserver/group.c
@@ -1,5 +1,5 @@
/*
- * $Id: group.c,v 5.209 2003-03-10 17:30:58-08 bryan Exp $
+ * $Id: group.c,v 5.212 2003-04-07 18:47:50-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -72,17 +72,6 @@
#include
#endif
#include
-#if HAVE_POSIX_REGCOMP
-#include
-#endif
-#if HAVE_PAM
-#include
-#endif
-
-#if defined(USE_LIBWRAP)
-#include
-#include
-#endif
#include
#include
@@ -95,6 +84,17 @@
#include
#include
+#if HAVE_POSIX_REGCOMP
+#include
+#endif
+#if HAVE_PAM
+#include
+#endif
+#if defined(USE_LIBWRAP)
+#include
+#include
+#endif
+
/* flags that a signal has occurred */
static sig_atomic_t fSawChldHUP = 0, fSawReUp = 0, fSawMark =
@@ -174,7 +174,7 @@ DisconnectClient(pGE, pCL, message)
}
if (fNoinit && pCEServing->pCLon->pCLnext == (CONSCLIENT *) 0)
- ConsDown(pCEServing, &pGE->rinit);
+ ConsDown(pCEServing, &pGE->rinit, 0);
FD_CLR(FileFDNum(pCL->fd), &pGE->rinit);
FileClose(&pCL->fd);
@@ -185,12 +185,10 @@ DisconnectClient(pGE, pCL, message)
if (pCL->fwr) {
pCL->fwr = 0;
pCL->fwantwr = 0;
- TagLogfile(pCEServing, "%s detached", pCL->acid.string);
+ TagLogfileAct(pCEServing, "%s detached", pCL->acid.string);
if (pCEServing->nolog) {
pCEServing->nolog = 0;
- FilePrint(pCEServing->fdlog,
- "[-- Console logging restored (logout) -- %s]\r\n",
- StrTime(NULL));
+ TagLogfile(pCEServing, "Console logging restored (logout)");
}
pCEServing->pCLwr = FindWrite(pCEServing->pCLon);
}
@@ -286,12 +284,10 @@ DestroyConsent(pGE, pCE)
FD_CLR(FileFDNum(pCL->fd), &pGE->rinit);
FileClose(&pCL->fd);
if (pCL->fwr) {
- TagLogfile(pCE, "%s detached", pCL->acid.string);
+ TagLogfileAct(pCE, "%s detached", pCL->acid.string);
if (pCE->nolog) {
pCE->nolog = 0;
- FilePrint(pCE->fdlog,
- "[-- Console logging restored (logout) -- %s]\r\n",
- StrTime(NULL));
+ TagLogfile(pCE, "Console logging restored (logout)");
}
}
/* mark as unconnected and remove from both
@@ -310,7 +306,7 @@ DestroyConsent(pGE, pCE)
pGE->pCLfree = pCL;
}
- ConsDown(pCE, &pGE->rinit);
+ ConsDown(pCE, &pGE->rinit, 0);
for (ppCE = &(pGE->pCElist); *ppCE != (CONSENT *) 0;
ppCE = &((*ppCE)->pCEnext)) {
@@ -493,6 +489,10 @@ CheckPass(pcUser, pcWord)
#else /* getpw*() */
struct passwd *pwd;
int retval = AUTH_SUCCESS;
+ char *pass;
+#if HAVE_ISCOMSEC && HAVE_GETPRPWNAM
+ struct pr_passwd *prpwd;
+#endif
#if HAVE_GETSPNAM
struct spwd *spwd;
#endif
@@ -501,28 +501,70 @@ CheckPass(pcUser, pcWord)
pcWord = "";
}
if ((pwd = getpwnam(pcUser)) == (struct passwd *)0) {
+ Debug(1, "CheckPass(): getpwnam(%s): %s", pcUser, strerror(errno));
retval = AUTH_NOUSER;
- } else {
-#if HAVE_GETSPNAM
- if ('x' == pwd->pw_passwd[0] && '\000' == pwd->pw_passwd[1]) {
- if ((spwd = getspnam(pwd->pw_name)) == (struct spwd *)0) {
- retval = AUTH_NOUSER;
- } else {
- if ((spwd->sp_pwdp[0] != '\000' || pcWord[0] != '\000') &&
- (strcmp(spwd->sp_pwdp, crypt(pcWord, spwd->sp_pwdp)) !=
- 0)) {
- retval = AUTH_INVALID;
- }
- }
- } else
+ goto finished_pass;
+ }
+ pass = pwd->pw_passwd;
+
+#if HAVE_ISCOMSEC && HAVE_GETPRPWNAM
+ if (iscomsec()) {
+ Debug(1, "CheckPass(): trusted password check");
+ if ((prpwd = getprpwnam(pcUser)) == (struct pr_passwd *)0) {
+ Debug(1, "CheckPass(): getprpwnam(%s): %s", pcUser,
+ strerror(errno));
+ retval = AUTH_NOUSER;
+ goto finished_pass;
+ }
+ pass = prpwd->ufld.fd_encrypt;
+ }
#endif
- if ((pwd->pw_passwd[0] != '\000' || pcWord[0] != '\000') &&
- (strcmp(pwd->pw_passwd, crypt(pcWord, pwd->pw_passwd))
- != 0)) {
+
+#if HAVE_GETSPNAM
+ if ('x' == pass[0] && '\000' == pass[1]) {
+ Debug(1, "CheckPass(): shadow password check");
+ if ((spwd = getspnam(pcUser)) == (struct spwd *)0) {
+ Debug(1, "CheckPass(): getspnam(%s): %s", pcUser,
+ strerror(errno));
+ retval = AUTH_NOUSER;
+ goto finished_pass;
+ }
+ pass = spwd->sp_pwdp;
+ }
+#endif
+
+ if (pass[0] == '\000' && pcWord[0] == '\000') {
+ retval = AUTH_SUCCESS; /* let empty password match */
+ } else {
+ char *encrypted;
+ char *salt;
+
+ if (pass[0] == '\000')
+ salt = "XX";
+ else
+ salt = pass;
+
+#if HAVE_ISCOMSEC && HAVE_BIGCRYPT
+ if (iscomsec())
+ encrypted = bigcrypt(pcWord, salt);
+ else
+#endif
+ encrypted = crypt(pcWord, salt);
+ if ((strcmp(pass, encrypted) != 0)) {
+ Debug(1, "CheckPass(): password check failed (%s)", pass);
retval = AUTH_INVALID;
}
}
+
+ finished_pass:
endpwent();
+#if HAVE_ISCOMSEC && HAVE_GETPRPWNAM
+ if (iscomsec())
+ endprpwent();
+#endif
+#if HAVE_GETSPNAM
+ endspent();
+#endif
return retval;
#endif /* getpw*() */
}
@@ -630,6 +672,8 @@ ReUp(pGE, automatic)
(!fReopenall || ((time(NULL) - lastup) < (fReopenall * 60))))
return;
+ ClearHostCache();
+
for (pCE = pGE->pCElist; pCE != (CONSENT *) 0; pCE = pCE->pCEnext) {
if (pCE->fup || fNoinit || (automatic == 1 && !pCE->autoReUp))
continue;
@@ -691,6 +735,32 @@ TagLogfile(pCE, fmt, va_alist)
const char *fmt;
va_dcl
#endif
+{
+ va_list ap;
+#if PROTOTYPES
+ va_start(ap, fmt);
+#else
+ va_start(ap);
+#endif
+
+ if ((pCE == (CONSENT *) 0) || (pCE->fdlog == (CONSFILE *) 0))
+ return;
+
+ FileWrite(pCE->fdlog, "[-- ", -1);
+ FileVWrite(pCE->fdlog, fmt, ap);
+ FilePrint(pCE->fdlog, " -- %s]\r\n", StrTime(NULL));
+ va_end(ap);
+}
+
+void
+#if PROTOTYPES
+TagLogfileAct(const CONSENT * pCE, const char *fmt, ...)
+#else
+TagLogfileAct(pCE, fmt, va_alist)
+ const CONSENT *pCE;
+ const char *fmt;
+ va_dcl
+#endif
{
va_list ap;
#if PROTOTYPES
@@ -862,7 +932,7 @@ DeUtmp(pGE, sfd)
"[-- Console server shutting down --]\r\n");
for (pCE = pGE->pCElist; pCE != (CONSENT *) 0; pCE = pCE->pCEnext) {
- ConsDown(pCE, &pGE->rinit);
+ ConsDown(pCE, &pGE->rinit, 0);
}
}
@@ -917,13 +987,13 @@ ReapVirt(pGE)
if (pCE->pCLwr != (CONSCLIENT *) 0) {
pCE->pCLwr->fwr = 0;
pCE->pCLwr->fwantwr = 1;
- TagLogfile(pCE, "%s detached", pCE->pCLwr->acid.string);
+ TagLogfileAct(pCE, "%s detached", pCE->pCLwr->acid.string);
pCE->pCLwr = (CONSCLIENT *) 0;
}
if (fNoautoreup &&
!(WIFEXITED(UWbuf) && WEXITSTATUS(UWbuf) == 0)) {
- ConsDown(pCE, &pGE->rinit);
+ ConsDown(pCE, &pGE->rinit, 0);
} else {
/* Try an initial reconnect */
Msg("[%s] automatic reinitialization", pCE->server.string);
@@ -1036,11 +1106,11 @@ CheckPasswd(pCLServing, pw_string)
char *p;
int status;
static STRING *tomatch = (STRING *) 0;
- if (tomatch == (STRING *) 0)
- tomatch = AllocString();
#if HAVE_POSIX_REGCOMP
regex_t re;
#endif
+ if (tomatch == (STRING *) 0)
+ tomatch = AllocString();
BuildString((char *)0, tomatch);
#if HAVE_POSIX_REGCOMP
BuildStringChar('^', tomatch);
@@ -1052,7 +1122,9 @@ CheckPasswd(pCLServing, pw_string)
p = pCLServing->pCEwant->server.string;
while (p != (char *)0) {
#if HAVE_POSIX_REGCOMP
- if (regcomp(&re, tomatch->string, REG_NOSUB)
+ if (regcomp
+ (&re, tomatch->string,
+ REG_NOSUB | REG_ICASE)
!= 0) {
Error
("CheckPasswd(): %s(%d) server name `%s' not a valid regular expression",
@@ -1062,7 +1134,7 @@ CheckPasswd(pCLServing, pw_string)
status = regexec(&re, p, 0, NULL, 0);
regfree(&re);
#else
- status = strcmp(tomatch->string, p);
+ status = strcasecmp(tomatch->string, p);
#endif
if (status == 0) {
Verbose("[%s] user %s authenticated",
@@ -1403,13 +1475,11 @@ DoBreakWork(pCLServing, pCEServing, bt, cleanup)
FileWrite(pCLServing->fd, "sent]\r\n", -1);
if (pCEServing->breaklog) {
if (waszero) {
- FilePrint(pCEServing->fdlog,
- "[-- break #0(%d) sent -- `%s' -- %s]\r\n", bt,
- breakList[bt - 1].string, StrTime(NULL));
+ TagLogfile(pCEServing, "break #0(%d) sent -- `%s'", bt,
+ breakList[bt - 1].string);
} else {
- FilePrint(pCEServing->fdlog,
- "[-- break #%d sent -- `%s' -- %s]\r\n", bt,
- breakList[bt - 1].string, StrTime(NULL));
+ TagLogfile(pCEServing, "break #%d sent -- `%s'", bt,
+ breakList[bt - 1].string);
}
}
}
@@ -1454,7 +1524,7 @@ AttemptSSL(pCL)
fdnum = FileFDNum(pCL->fd);
if (ctx == (SSL_CTX *) 0) {
Error("AttemptSSL(): WTF? The SSL context disappeared?!?!?");
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
if (!(ssl = SSL_new(ctx))) {
Error("AttemptSSL(): SSL_new() failed for client `%s' (fd %d)",
@@ -1748,13 +1818,13 @@ Kiddie(pGE, sfd)
if (pCEServing->pCLwr != (CONSCLIENT *) 0) {
pCEServing->pCLwr->fwr = 0;
pCEServing->pCLwr->fwantwr = 1;
- TagLogfile(pCEServing, "%s detached",
- pCEServing->pCLwr->acid.string);
+ TagLogfileAct(pCEServing, "%s detached",
+ pCEServing->pCLwr->acid.string);
pCEServing->pCLwr = (CONSCLIENT *) 0;
}
if (fNoautoreup) {
- ConsDown(pCEServing, &pGE->rinit);
+ ConsDown(pCEServing, &pGE->rinit, 1);
} else {
/* Try an initial reconnect */
Msg("[%s] automatic reinitialization",
@@ -2015,8 +2085,8 @@ Kiddie(pGE, sfd)
for (pCE = pGE->pCElist; pCE != (CONSENT *) 0;
pCE = pCE->pCEnext) {
if (0 ==
- strcmp(pCLServing->accmd.string,
- pCE->server.string)) {
+ strcasecmp(pCLServing->accmd.string,
+ pCE->server.string)) {
pCLServing->pCEwant = pCE;
BuildString((char *)0, &pCLServing->accmd);
break;
@@ -2026,9 +2096,10 @@ Kiddie(pGE, sfd)
for (pCE = pGE->pCElist; pCE != (CONSENT *) 0;
pCE = pCE->pCEnext) {
if (0 ==
- strncmp(pCLServing->accmd.string,
- pCE->server.string,
- pCLServing->accmd.used - 1)) {
+ strncasecmp(pCLServing->accmd.string,
+ pCE->server.string,
+ pCLServing->accmd.used -
+ 1)) {
pCLServing->pCEwant = pCE;
BuildString((char *)0,
&pCLServing->accmd);
@@ -2100,8 +2171,8 @@ Kiddie(pGE, sfd)
if (pCLServing->fwr) {
pCLServing->fwr = 0;
pCLServing->fwantwr = 0;
- TagLogfile(pCEServing, "%s detached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing, "%s detached",
+ pCLServing->acid.string);
pCEServing->pCLwr =
FindWrite(pCEServing->pCLon);
}
@@ -2150,8 +2221,8 @@ Kiddie(pGE, sfd)
FileWrite(pCLServing->fd, "attached]\r\n", -1);
/* this keeps the ops console neat */
pCEServing->iend = 0;
- TagLogfile(pCEServing, "%s attached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing, "%s attached",
+ pCLServing->acid.string);
} else {
FileWrite(pCLServing->fd, "spy]\r\n", -1);
}
@@ -2203,8 +2274,8 @@ Kiddie(pGE, sfd)
FileWrite(pCLServing->fd,
" -- attached]\r\n", -1);
}
- TagLogfile(pCEServing, "%s attached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing, "%s attached",
+ pCLServing->acid.string);
} else {
FileWrite(pCLServing->fd, " -- spy mode]\r\n",
-1);
@@ -2398,8 +2469,9 @@ Kiddie(pGE, sfd)
FileWrite(pCLServing->fd,
"attached]\r\n", -1);
}
- TagLogfile(pCEServing, "%s attached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing,
+ "%s attached",
+ pCLServing->acid.string);
} else if (pCL == pCLServing) {
if (pCEServing->nolog) {
FileWrite(pCLServing->fd,
@@ -2492,9 +2564,9 @@ Kiddie(pGE, sfd)
pCLServing->fwr = 0;
pCEServing->pCLwr = (CONSCLIENT *) 0;
- TagLogfile(pCEServing, "%s detached",
- pCLServing->acid.string);
- ConsDown(pCEServing, &pGE->rinit);
+ TagLogfileAct(pCEServing, "%s detached",
+ pCLServing->acid.string);
+ ConsDown(pCEServing, &pGE->rinit, 0);
FileWrite(pCLServing->fd, "line down]\r\n",
-1);
@@ -2565,9 +2637,10 @@ Kiddie(pGE, sfd)
FileWrite(pCL->fd,
pCLServing->acid.string, -1);
FileWrite(pCL->fd, "]\r\n", -1);
- TagLogfile(pCEServing, "%s bumped %s",
- pCLServing->acid.string,
- pCL->acid.string);
+ TagLogfileAct(pCEServing,
+ "%s bumped %s",
+ pCLServing->acid.string,
+ pCL->acid.string);
} else {
if (pCEServing->nolog) {
FileWrite(pCLServing->fd,
@@ -2577,8 +2650,9 @@ Kiddie(pGE, sfd)
FileWrite(pCLServing->fd,
"attached]\r\n", -1);
}
- TagLogfile(pCEServing, "%s attached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing,
+ "%s attached",
+ pCLServing->acid.string);
}
pCEServing->pCLwr = pCLServing;
pCLServing->fwr = 1;
@@ -2718,17 +2792,17 @@ Kiddie(pGE, sfd)
if (pCEServing->nolog) {
FileWrite(pCLServing->fd,
"logging off]\r\n", -1);
- FilePrint(pCEServing->fdlog,
- "[-- Console logging disabled by %s -- %s]\r\n",
- pCLServing->acid.string,
- StrTime(NULL));
+ TagLogfile(pCEServing,
+ "Console logging disabled by %s",
+ pCLServing->acid.
+ string);
} else {
FileWrite(pCLServing->fd,
"logging on]\r\n", -1);
- FilePrint(pCEServing->fdlog,
- "[-- Console logging restored by %s -- %s]\r\n",
- pCLServing->acid.string,
- StrTime(NULL));
+ TagLogfile(pCEServing,
+ "Console logging restored by %s",
+ pCLServing->acid.
+ string);
}
} else {
FilePrint(pCLServing->fd,
@@ -2780,13 +2854,15 @@ Kiddie(pGE, sfd)
pCLServing->fwr = 1;
FileWrite(pCLServing->fd,
"up -- attached]\r\n", -1);
- TagLogfile(pCEServing, "%s attached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing,
+ "%s attached",
+ pCLServing->acid.string);
} else if (pCL == pCLServing) {
FileWrite(pCLServing->fd, "up]\r\n",
-1);
- TagLogfile(pCEServing, "%s attached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing,
+ "%s attached",
+ pCLServing->acid.string);
} else {
FilePrint(pCLServing->fd,
"up, %s is attached]\r\n",
@@ -2824,8 +2900,8 @@ Kiddie(pGE, sfd)
break;
}
pCLServing->fwr = 0;
- TagLogfile(pCEServing, "%s detached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing, "%s detached",
+ pCLServing->acid.string);
pCEServing->pCLwr =
FindWrite(pCEServing->pCLon);
FileWrite(pCLServing->fd, "spying]\r\n",
@@ -2914,8 +2990,9 @@ Kiddie(pGE, sfd)
pCLServing->fwr = 0;
pCLServing->fwantwr = 0;
pCEServing->pCLwr = (CONSCLIENT *) 0;
- TagLogfile(pCEServing, "%s detached",
- pCLServing->acid.string);
+ TagLogfileAct(pCEServing,
+ "%s detached",
+ pCLServing->acid.string);
}
break;
@@ -3219,14 +3296,14 @@ Spawn(pGE)
*/
if ((sfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
Error("Spawn(): socket(): %s", strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
#if HAVE_SETSOCKOPT
if (setsockopt
(sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true)) < 0) {
Error("Spawn(): setsockopt(%u,SO_REUSEADDR): %s", sfd,
strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
#endif
@@ -3239,14 +3316,14 @@ Spawn(pGE)
lstn_port.sin_port = htons(bindBasePort + portInc);
} else {
Error("Spawn(): bind(%u): %s", sfd, strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
}
so = sizeof(lstn_port);
if (-1 == getsockname(sfd, (struct sockaddr *)&lstn_port, &so)) {
Error("Spawn(): getsockname(%u): %s", sfd, strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
pGE->port = lstn_port.sin_port;
@@ -3255,7 +3332,7 @@ Spawn(pGE)
switch (pid = fork()) {
case -1:
Error("Spawn(): fork(): %s", strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
default:
close(sfd);
/* hmm...there seems to be a potential linux bug here as well.
@@ -3279,13 +3356,13 @@ Spawn(pGE)
}
if (listen(sfd, SOMAXCONN) < 0) {
Error("Spawn(): listen(%u): %s", sfd, strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
ssocket = FileOpenFD(sfd, simpleSocket);
if ((CONSFILE *) 0 == ssocket) {
Error("Spawn(): FileOpenFD(%u): %s", sfd, strerror(errno));
close(sfd);
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
Kiddie(pGE, ssocket);
@@ -3293,5 +3370,5 @@ Spawn(pGE)
*/
FileClose(&ssocket);
Error("Spawn(): internal flow error");
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
diff --git a/conserver/group.h b/conserver/group.h
index 9a8dcc6..383bf45 100644
--- a/conserver/group.h
+++ b/conserver/group.h
@@ -1,5 +1,5 @@
/*
- * $Id: group.h,v 5.30 2003-03-09 15:21:49-08 bryan Exp $
+ * $Id: group.h,v 5.31 2003-03-17 08:43:20-08 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -56,6 +56,7 @@ typedef struct grpent { /* group info */
extern void Spawn PARAMS((GRPENT *));
extern int CheckPass PARAMS((char *, char *));
extern void TagLogfile PARAMS((const CONSENT *, const char *, ...));
+extern void TagLogfileAct PARAMS((const CONSENT *, const char *, ...));
extern void CleanupBreak PARAMS((short));
extern void DestroyGroup PARAMS((GRPENT *));
extern void DestroyConsent PARAMS((GRPENT *, CONSENT *));
diff --git a/conserver/main.c b/conserver/main.c
index 34dabf5..4083852 100644
--- a/conserver/main.c
+++ b/conserver/main.c
@@ -1,5 +1,5 @@
/*
- * $Id: main.c,v 5.120 2003-03-09 15:20:43-08 bryan Exp $
+ * $Id: main.c,v 5.122 2003-04-06 05:31:13-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -53,6 +53,11 @@
#include
#include
+#if HAVE_OPENSSL
+#include
+#endif
+
+
int fAll = 0, fSoftcar = 0, fNoinit = 0, fVersion = 0, fStrip =
0, fDaemon = 0, fUseLogfile = 0, fReopen = 0, fReopenall =
0, fNoautoreup = 0, fNoredir = 0;
@@ -327,29 +332,29 @@ SetupSSL()
SSL_load_error_strings();
if (!SSL_library_init()) {
Error("SetupSSL(): SSL_library_init() failed");
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
if ((ctx = SSL_CTX_new(SSLv23_method())) == (SSL_CTX *) 0) {
Error("SetupSSL(): SSL_CTX_new() failed");
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
if (SSL_CTX_set_default_verify_paths(ctx) != 1) {
Error
("SetupSSL(): could not load SSL default CA file and/or directory");
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
if (pcCredFile != (char *)0) {
if (SSL_CTX_use_certificate_chain_file(ctx, pcCredFile) != 1) {
Error
("SetupSSL(): could not load SSL certificate from `%s'",
pcCredFile);
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
if (SSL_CTX_use_PrivateKey_file
(ctx, pcCredFile, SSL_FILETYPE_PEM) != 1) {
Error("SetupSSL(): could not SSL private key from `%s'",
pcCredFile);
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
}
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, SSLVerifyCallback);
@@ -364,7 +369,7 @@ SetupSSL()
if (SSL_CTX_set_cipher_list(ctx, "ALL:!LOW:!EXP:!MD5:@STRENGTH") !=
1) {
Error("SetupSSL(): setting SSL cipher list failed");
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
/* might want to turn this back on at some point, but i can't
* see why right now.
@@ -393,7 +398,7 @@ ReopenLogfile()
close(1);
if (1 != open(pcLogfile, O_WRONLY | O_CREAT | O_APPEND, 0644)) {
Error("ReopenLogfile(): open(%s): %s", pcLogfile, strerror(errno));
- exit(EX_TEMPFAIL);
+ Bye(EX_TEMPFAIL);
}
close(2);
dup(1);
@@ -431,7 +436,7 @@ Daemonize()
switch (res = fork()) {
case -1:
Error("Daemonize(): fork(): %s", strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_TEMPFAIL);
case 0:
thepid = getpid();
break;
@@ -619,6 +624,22 @@ Version()
}
}
Msg("options: %s", acA1->string);
+#if HAVE_DMALLOC
+ BuildString((char *)0, acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_MAJOR, acA1);
+ BuildStringChar('.', acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_MINOR, acA1);
+ BuildStringChar('.', acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_PATCH, acA1);
+ if (DMALLOC_VERSION_BETA != 0) {
+ BuildString("-b", acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_BETA, acA1);
+ }
+ Msg("dmalloc version: %s", acA1->string);
+#endif
+#if HAVE_OPENSSL
+ Msg("openssl version: %s", OPENSSL_VERSION_TEXT);
+#endif
Msg("built with `%s'", CONFIGINVOCATION);
if (fVerbose)
@@ -718,12 +739,13 @@ DumpDataStructures()
"DumpDataStructures(): isNetworkConsole=%d, networkConsoleHost=%s",
pCE->isNetworkConsole, pCE->networkConsoleHost.string);
Debug(1,
- "DumpDataStructures(): networkConsolePort=%hu, telnetState=%d, autoReup=%d",
+ "DumpDataStructures(): networkConsolePort=%hu, telnetState=%d, autoReup=%hu",
pCE->networkConsolePort, pCE->telnetState,
pCE->autoReUp);
- Debug(1, "DumpDataStructures(): baud=%s, parity=%c",
- pCE->pbaud->acrate, pCE->pparity->ckey);
+ Debug(1,
+ "DumpDataStructures(): downHard=%hu, baud=%s, parity=%c",
+ pCE->downHard, pCE->pbaud->acrate, pCE->pparity->ckey);
Debug(1,
"DumpDataStructures(): fvirtual=%d, acslave=%s, pccmd=%s, ipid=%lu",
@@ -802,12 +824,12 @@ main(argc, argv)
gethostname(acMyHost, sizeof(acMyHost));
if ((struct hostent *)0 == (hpMe = gethostbyname(acMyHost))) {
Error("gethostbyname(%s): %s", acMyHost, hstrerror(h_errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_TEMPFAIL);
}
if (4 != hpMe->h_length || AF_INET != hpMe->h_addrtype) {
Error("wrong address size (4 != %d) or adress family (%d != %d)",
hpMe->h_length, AF_INET, hpMe->h_addrtype);
- exit(EX_UNAVAILABLE);
+ Bye(EX_TEMPFAIL);
}
#if HAVE_MEMCPY
memcpy(&acMyAddr, hpMe->h_addr, hpMe->h_length);
@@ -832,7 +854,7 @@ main(argc, argv)
break;
default:
Error("unknown access type `%s'", optarg);
- exit(EX_UNAVAILABLE);
+ Bye(EX_USAGE);
}
break;
case 'b':
@@ -910,10 +932,10 @@ main(argc, argv)
break;
case '\?':
Usage(0);
- exit(EX_UNAVAILABLE);
+ Bye(EX_USAGE);
default:
Error("option %c needs a parameter", optopt);
- exit(EX_UNAVAILABLE);
+ Bye(EX_USAGE);
}
}
@@ -928,7 +950,7 @@ main(argc, argv)
close(0);
if (0 != open("/dev/null", O_RDWR, 0644)) {
Error("open(/dev/null): %s", strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSFILE);
}
if (fVersion) {
@@ -985,7 +1007,7 @@ main(argc, argv)
bindAddr = inet_addr(pcAddress);
if (bindAddr == (in_addr_t) (-1)) {
Error("inet_addr(%s): %s", pcAddress, "invalid IP address");
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
acMyAddr.s_addr = bindAddr;
}
@@ -998,7 +1020,7 @@ main(argc, argv)
if (pcPort == NULL) {
Error
("main(): severe error - pcPort is NULL???? how can that be?");
- exit(EX_UNAVAILABLE);
+ Bye(EX_SOFTWARE);
}
/* Look for non-numeric characters */
@@ -1014,7 +1036,7 @@ main(argc, argv)
struct servent *pSE;
if ((struct servent *)0 == (pSE = getservbyname(pcPort, "tcp"))) {
Error("getservbyname(%s): %s", pcPort, strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
} else {
bindPort = ntohs((unsigned short)pSE->s_port);
}
@@ -1034,7 +1056,7 @@ main(argc, argv)
if ((struct servent *)0 ==
(pSE = getservbyname(pcBasePort, "tcp"))) {
Error("getservbyname(%s): %s", pcBasePort, strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
} else {
bindBasePort = ntohs((unsigned short)pSE->s_port);
}
@@ -1044,7 +1066,7 @@ main(argc, argv)
*/
if ((FILE *) 0 == (fpConfig = fopen(pcConfig, "r"))) {
Error("fopen(%s): %s", pcConfig, strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_NOINPUT);
}
ReadCfg(pcConfig, fpConfig);
diff --git a/conserver/master.c b/conserver/master.c
index 0dd4e72..73e3cde 100644
--- a/conserver/master.c
+++ b/conserver/master.c
@@ -1,5 +1,5 @@
/*
- * $Id: master.c,v 5.91 2003-03-10 17:37:04-08 bryan Exp $
+ * $Id: master.c,v 5.94 2003-04-07 18:48:12-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -40,13 +40,6 @@
#include
#include
-#if defined(USE_LIBWRAP)
-#include
-#include
-int allow_severity = LOG_INFO;
-int deny_severity = LOG_WARNING;
-#endif
-
#include
#include
@@ -59,6 +52,12 @@ int deny_severity = LOG_WARNING;
#include
#include
+#if defined(USE_LIBWRAP)
+#include
+#include
+int allow_severity = LOG_INFO;
+int deny_severity = LOG_WARNING;
+#endif
static sig_atomic_t fSawQuit = 0, fSawHUP = 0, fSawUSR2 = 0, fSawUSR1 =
@@ -111,27 +110,30 @@ FixKids()
/* A couple ways to shut down the whole system */
if (WIFEXITED(UWbuf) && (WEXITSTATUS(UWbuf) == EX_UNAVAILABLE)) {
+ Msg("child pid %lu: exit(%d), shutting down",
+ (unsigned long)pGE->pid, WEXITSTATUS(UWbuf));
fSawQuit = 1;
/* So we don't kill something that's dead */
pGE->pid = -1;
- Msg("[%s] exit(%d), shutdown", pGE->pCElist->server.string,
- WEXITSTATUS(UWbuf));
break;
}
if (WIFSIGNALED(UWbuf) && (WTERMSIG(UWbuf) == SIGTERM)) {
+ Msg("child pid %lu: signal(%d), shutting down",
+ (unsigned long)pGE->pid, WTERMSIG(UWbuf));
fSawQuit = 1;
/* So we don't kill something that's dead */
pGE->pid = -1;
- Msg("[%s] signal(%d), shutdown",
- pGE->pCElist->server.string, WTERMSIG(UWbuf));
break;
}
/* If not, then just a simple restart of the child */
if (WIFEXITED(UWbuf))
- Msg("[%s] exit(%d), restarted", WEXITSTATUS(UWbuf));
+ Msg("child pid %lu: exit(%d), restarting", pGE->pid,
+ WEXITSTATUS(UWbuf));
+
if (WIFSIGNALED(UWbuf))
- Msg("[%s] signal(%d), restarted", WTERMSIG(UWbuf));
+ Msg("child pid %lu: signal(%d), restarting", pGE->pid,
+ WTERMSIG(UWbuf));
/* this kid kid is dead, start another
*/
@@ -551,7 +553,7 @@ Master()
-1);
Error("Master(): getsockname(%u): %s",
FileFDNum(csocket), strerror(errno));
- exit(EX_UNAVAILABLE);
+ Bye(EX_OSERR);
}
FilePrint(csocket, "@%s", inet_ntoa(lcl.sin_addr));
iSep = 0;
@@ -594,7 +596,7 @@ Master()
continue;
for (pCE = pGE->pCElist; pCE != (CONSENT *) 0;
pCE = pCE->pCEnext) {
- if (0 != strcmp(pcArgs, pCE->server.string)) {
+ if (0 != strcasecmp(pcArgs, pCE->server.string)) {
continue;
}
prnum = ntohs(pGE->port);
@@ -609,7 +611,7 @@ Master()
*/
if (!fNoredir || (fNoredir && found == 0)) {
for (pRC = pRCList; (REMOTE *) 0 != pRC; pRC = pRC->pRCnext) {
- if (0 != strcmp(pcArgs, pRC->rserver.string)) {
+ if (0 != strcasecmp(pcArgs, pRC->rserver.string)) {
continue;
}
ambiguous = BuildTmpString(pRC->rserver.string);
@@ -625,8 +627,8 @@ Master()
for (pCE = pGE->pCElist; pCE != (CONSENT *) 0;
pCE = pCE->pCEnext) {
if (0 !=
- strncmp(pcArgs, pCE->server.string,
- strlen(pcArgs))) {
+ strncasecmp(pcArgs, pCE->server.string,
+ strlen(pcArgs))) {
continue;
}
prnum = ntohs(pGE->port);
@@ -641,8 +643,8 @@ Master()
for (pRC = pRCList; (REMOTE *) 0 != pRC;
pRC = pRC->pRCnext) {
if (0 !=
- strncmp(pcArgs, pRC->rserver.string,
- strlen(pcArgs))) {
+ strncasecmp(pcArgs, pRC->rserver.string,
+ strlen(pcArgs))) {
continue;
}
ambiguous = BuildTmpString(pRC->rserver.string);
diff --git a/conserver/readcfg.c b/conserver/readcfg.c
index 62a3a34..5f61a0f 100644
--- a/conserver/readcfg.c
+++ b/conserver/readcfg.c
@@ -1,5 +1,5 @@
/*
- * $Id: readcfg.c,v 5.99 2003-03-09 15:20:15-08 bryan Exp $
+ * $Id: readcfg.c,v 5.104 2003-04-07 18:57:55-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -37,6 +37,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -55,6 +56,7 @@
#include
#include
+
GRPENT *pGroups = (GRPENT *) 0;
REMOTE *pRCList = (REMOTE *) 0; /* list of remote consoles we know about */
ACCESS *pACList = (ACCESS *) 0; /* `who do you love' (or trust) */
@@ -455,12 +457,13 @@ ReadCfg(pcFile, fp, master)
* but by the end, if it has anything, it's all empty groups
* in the slave and a mix of real (new) and empty in the master.
*/
+ /* check for dups in the main area */
for (pGEtmp = pGroups; pGEtmp != (GRPENT *) 0;
pGEtmp = pGEtmp->pGEnext) {
for (pCEtmp = pGEtmp->pCElist; pCEtmp != (CONSENT *) 0;
pCEtmp = pCEtmp->pCEnext) {
if (pCEtmp->server.used &&
- strcmp(acStart, pCEtmp->server.string) == 0) {
+ strcasecmp(acStart, pCEtmp->server.string) == 0) {
if (isMaster)
Error("%s(%d) duplicate console name `%s'", pcFile,
iLine, acStart);
@@ -472,12 +475,13 @@ ReadCfg(pcFile, fp, master)
}
if (pCEtmp != (CONSENT *) 0)
continue;
+ /* check for dups in the staged area */
for (pGEtmp = pGEstage; pGEtmp != (GRPENT *) 0;
pGEtmp = pGEtmp->pGEnext) {
for (pCEtmp = pGEtmp->pCElist; pCEtmp != (CONSENT *) 0;
pCEtmp = pCEtmp->pCEnext) {
if (pCEtmp->server.used &&
- strcmp(acStart, pCEtmp->server.string) == 0) {
+ strcasecmp(acStart, pCEtmp->server.string) == 0) {
if (isMaster)
Error("%s(%d) duplicate console name `%s'", pcFile,
iLine, acStart);
@@ -522,6 +526,7 @@ ReadCfg(pcFile, fp, master)
* (contains an '@host' where host is not us)
* if so just add it to a linked list of remote hosts
* I'm sure most sites will never use this code (ksb)
+ * Today, I beg to differ ;-) (bryan)
*/
if ((char *)0 != (pcRem = strchr(pcLine, '@'))) {
struct hostent *hpMe;
@@ -531,15 +536,15 @@ ReadCfg(pcFile, fp, master)
pcRem = PruneSpace(pcRem);
if ((struct hostent *)0 == (hpMe = gethostbyname(pcRem))) {
- Error("ReadCfg(): gethostbyname(%s): %s", pcRem,
- hstrerror(h_errno));
- exit(EX_UNAVAILABLE);
+ Error("%s(%d): gethostbyname(%s): %s", pcFile, iLine,
+ pcRem, hstrerror(h_errno));
+ continue;
}
if (4 != hpMe->h_length || AF_INET != hpMe->h_addrtype) {
Error
("ReadCfg(): wrong address size (4 != %d) or address family (%d != %d)",
hpMe->h_length, AF_INET, hpMe->h_addrtype);
- exit(EX_UNAVAILABLE);
+ continue;
}
if (0 !=
@@ -581,7 +586,7 @@ ReadCfg(pcFile, fp, master)
pGEmatch->pCElist; pCEmatch != (CONSENT *) 0;
ppCE = &pCEmatch->pCEnext, pCEmatch =
pCEmatch->pCEnext) {
- if (0 == strcmp(acStart, pCEmatch->server.string)) {
+ if (0 == strcasecmp(acStart, pCEmatch->server.string)) {
/* extract pCEmatch from the linked list */
*ppCE = pCEmatch->pCEnext;
pGEmatch->imembers--;
@@ -687,13 +692,13 @@ ReadCfg(pcFile, fp, master)
if (bt > 9 || bt < 0) {
Error("%s(%d) bad break spec `%d'", pcFile, iLine, bt);
} else {
- pCE->breakType = (short)bt;
+ pCE->breakType = bt;
Debug(1, "ReadCfg(): breakType set to %d", pCE->breakType);
}
}
pCE->ipid = pCE->fdtty = -1;
- pCE->fup = pCE->autoReUp = 0;
+ pCE->fup = pCE->autoReUp = pCE->downHard = 0;
pCE->pCLon = pCE->pCLwr = (CONSCLIENT *) 0;
pCE->fdlog = (CONSFILE *) 0;
@@ -895,7 +900,7 @@ ReadCfg(pcFile, fp, master)
if (pCE->isNetworkConsole) {
if (pCEmatch->networkConsoleHost.used &&
pCE->networkConsoleHost.used) {
- if (strcmp
+ if (strcasecmp
(pCEmatch->networkConsoleHost.string,
pCE->networkConsoleHost.string) != 0) {
BuildString((char *)0,
@@ -940,12 +945,13 @@ ReadCfg(pcFile, fp, master)
pCEmatch->mark = pCE->mark;
pCEmatch->nextMark = pCE->nextMark;
pCEmatch->breakType = pCE->breakType;
+ pCEmatch->downHard = pCE->downHard;
if (!closeMatch && !isMaster) {
/* fdtty/fup/fronly/acslave/ipid */
SendClientsMsg(pCEmatch,
"[-- Conserver reconfigured - console reset --]\r\n");
- ConsDown(pCEmatch, &pGEtmp->rinit);
+ ConsDown(pCEmatch, &pGEtmp->rinit, 0);
}
/* nuke the temp data structure */
@@ -1006,7 +1012,7 @@ ReadCfg(pcFile, fp, master)
}
if ((char *)0 == (pcNext = strchr(acStart, ':'))) {
Error("%s(%d) missing colon?", pcFile, iLine);
- exit(EX_UNAVAILABLE);
+ continue;
}
do {
@@ -1027,10 +1033,14 @@ ReadCfg(pcFile, fp, master)
cType = 't';
break;
default:
+ cType = ' ';
Error("%s(%d) unknown access key `%s'", pcFile, iLine,
acStart);
- exit(EX_UNAVAILABLE);
+ break;
}
+ if (cType == ' ')
+ continue;
+
while ('\000' != *(pcMach = pcNext)) {
int j, isCIDR = 0;
while ('\000' != *pcNext &&
diff --git a/conserver/util.c b/conserver/util.c
index d7aa4e8..20d0659 100644
--- a/conserver/util.c
+++ b/conserver/util.c
@@ -1,10 +1,11 @@
/*
- * $Id: util.c,v 1.74 2003-03-09 15:20:05-08 bryan Exp $
+ * $Id: util.c,v 1.75 2003-04-06 05:29:35-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
* Maintainer/Enhancer: Bryan Stansell (bryan@conserver.com)
*/
+
#include
#include
@@ -22,6 +23,7 @@
#include
#endif
+
int fVerbose = 0;
int isMultiProc = 0;
char *progname = "conserver package";
diff --git a/conserver/version.h b/conserver/version.h
index 983c6b8..9e07784 100644
--- a/conserver/version.h
+++ b/conserver/version.h
@@ -1,5 +1,5 @@
/*
- * $Id: version.h,v 1.41 2003-03-10 17:37:27-08 bryan Exp $
+ * $Id: version.h,v 1.42 2003-04-08 16:19:19-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -14,4 +14,4 @@
@(#) Copyright 2000 conserver.com.\n\
All rights reserved.\n"
-#define THIS_VERSION "conserver.com version 7.2.6"
+#define THIS_VERSION "conserver.com version 7.2.7"
diff --git a/console/console.c b/console/console.c
index 99b2237..0ed773b 100644
--- a/console/console.c
+++ b/console/console.c
@@ -1,5 +1,5 @@
/*
- * $Id: console.c,v 5.115 2003-03-09 15:19:32-08 bryan Exp $
+ * $Id: console.c,v 5.117 2003-04-06 05:29:24-07 bryan Exp $
*
* Copyright conserver.com, 2000
*
@@ -40,16 +40,18 @@
#include
#include
#include
-#if HAVE_OPENSSL
-#include
-#include
-#endif
#include
#include
#include
+#if HAVE_OPENSSL
+#include
+#include
+#include
+#endif
+
int fReplay = 0, fRaw = 0, fVersion = 0, fStrip = 0;
#if HAVE_OPENSSL
@@ -261,6 +263,9 @@ Version()
static STRING *acA1 = (STRING *) 0;
static STRING *acA2 = (STRING *) 0;
char *optionlist[] = {
+#if HAVE_DMALLOC
+ "dmalloc",
+#endif
#if USE_LIBWRAP
"libwrap",
#endif
@@ -316,6 +321,22 @@ Version()
}
}
Msg("options: %s", acA1->string);
+#if HAVE_DMALLOC
+ BuildString((char *)0, acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_MAJOR, acA1);
+ BuildStringChar('.', acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_MINOR, acA1);
+ BuildStringChar('.', acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_PATCH, acA1);
+ if (DMALLOC_VERSION_BETA != 0) {
+ BuildString("-b", acA1);
+ BuildStringChar('0' + DMALLOC_VERSION_BETA, acA1);
+ }
+ Msg("dmalloc version: %s", acA1->string);
+#endif
+#if HAVE_OPENSSL
+ Msg("openssl version: %s", OPENSSL_VERSION_TEXT);
+#endif
Msg("built with `%s'", CONFIGINVOCATION);
if (fVerbose)
printf(COPYRIGHT);
diff --git a/contrib/maketestcerts b/contrib/maketestcerts
index 25cd1b1..509fb15 100755
--- a/contrib/maketestcerts
+++ b/contrib/maketestcerts
@@ -3,10 +3,10 @@
#
# This is a "simple" script that I've used to create test certificates
# for conserver and it's OpenSSL bits. It's far from perfect...or useful
-# outside of my own purposes. If this helps, cool. In the end I put
-# the rootcert.pem file in my global certs directory, point the server to
-# server.pem and point the client at client.pem. Ugly, yeah, but it's an
-# ok test.
+# outside of my own purposes. If this helps, cool. In the end I put the
+# rootcert.pem file in my global certs directory (OPENSSL_ROOT/ssl/certs),
+# point the server to server.pem and point the client at client.pem.
+# Ugly, yeah, but it's an ok test.
#
[ -f rootreq.pem -a -f rootkey.pem ] || cat < test.out 2>&1
+ else
+ (echo "$1" && sleep 2) | \
+ ../console/console -M 127.0.0.1 -p 7777 shell > test.out 2>&1
+ fi
+ if [ "$record" ]; then
+ echo "recorded"
+ mv test.out results/test$testnum
+ else
+ if [ -f results/test$testnum ]; then
+ if diff -i test.out results/test$testnum >test$testnum.diff 2>&1; then
+ echo "succeded"
+ rm test$testnum.diff
+ else
+ echo "failed (diffs in test$testnum.diff)"
+ exitval=1
+ fi
+ else
+ echo "unknown (not recorded)"
+ fi
+ rm test.out
+ fi
+}
+
+[ ! -f ../conserver/conserver -o ! -f ../console/console ] && \
+ echo 'binaries do not exist - did you run make yet?' && exit 1
+
+trap cleanup 15
+
+if [ "`echo -n`" = "-n" ]; then
+ ECHO="echo"
+ EE="\c"
+else
+ ECHO="echo -n"
+ EE=""
+fi
+
+$ECHO "starting conserver...$EE"
+cp test1.cf c.cf
+../conserver/conserver -M 127.0.0.1 -p 7777 -v -C c.cf \
+ -P test.passwd -m 32 > conserver.log 2>&1 &
+
+pid=$!
+echo "pid $pid"
+
+sleep 3
+
+[ ! -d results ] && mkdir results
+
+dotest EVAL "../console/console -M 127.0.0.1 -p 7777 -u | sed -e 's/[0-9][0-9]*//g' -e 's/[ ][ ]*/ /g'"
+dotest 'c?c.'
+dotest 'cl?c.'
+dotest 'cdc.'
+dotest 'coc.'
+
+echo "moving in second config file"
+cp test2.cf c.cf
+kill -1 $pid
+sleep 3
+
+dotest EVAL "../console/console -M 127.0.0.1 -p 7777 -u | sed -e 's/[0-9][0-9]*//g' -e 's/[ ][ ]*/ /g'"
+dotest 'c?c.'
+dotest 'cl?c.'
+dotest 'cdc.'
+dotest 'coc.'
+
+cleanup
diff --git a/test/results/test1 b/test/results/test1
new file mode 100644
index 0000000..d5b8954
--- /dev/null
+++ b/test/results/test1
@@ -0,0 +1,2 @@
+ shell up
+ shell up
diff --git a/test/results/test10 b/test/results/test10
new file mode 100644
index 0000000..c41b64a
--- /dev/null
+++ b/test/results/test10
@@ -0,0 +1,4 @@
+console: shell is down
+[Enter `^Ec?' for help]
+[up -- attached]
+[disconnect]
diff --git a/test/results/test11 b/test/results/test11
new file mode 100644
index 0000000..fa846ea
--- /dev/null
+++ b/test/results/test11
@@ -0,0 +1,16 @@
+[Enter `^Ec?' for help]
+[help]
+ . disconnect a attach read/write
+ b send broadcast message c toggle flow control
+ d down a console e change escape sequence
+ f force attach read/write g group info
+ i information dump L toggle logging on/off
+ l? break sequence list l0 send break per config file
+ l1-9 send specific break sequence o (re)open the tty and log file
+ p replay the last 60 lines r replay the last 20 lines
+ s spy read only u show host status
+ v show version info w who is on this console
+ x show console baud info z suspend the connection
+ ignore/abort command ? print this message
+ ^R replay the last line \ooo send character by octal code
+[disconnect]
diff --git a/test/results/test12 b/test/results/test12
new file mode 100644
index 0000000..2655985
--- /dev/null
+++ b/test/results/test12
@@ -0,0 +1,8 @@
+[Enter `^Ec?' for help]
+[halt list]
+ 0 `\z'
+ 1 `\z'
+ 2 `\r~^b'
+ 3 `#.reset -x\r'
+ 4 `hiya there\r'
+[disconnect]
diff --git a/test/results/test13 b/test/results/test13
new file mode 100644
index 0000000..e5705ba
--- /dev/null
+++ b/test/results/test13
@@ -0,0 +1,3 @@
+[Enter `^Ec?' for help]
+[line down]
+[disconnect]
diff --git a/test/results/test14 b/test/results/test14
new file mode 100644
index 0000000..c41b64a
--- /dev/null
+++ b/test/results/test14
@@ -0,0 +1,4 @@
+console: shell is down
+[Enter `^Ec?' for help]
+[up -- attached]
+[disconnect]
diff --git a/test/results/test2 b/test/results/test2
new file mode 100644
index 0000000..fa846ea
--- /dev/null
+++ b/test/results/test2
@@ -0,0 +1,16 @@
+[Enter `^Ec?' for help]
+[help]
+ . disconnect a attach read/write
+ b send broadcast message c toggle flow control
+ d down a console e change escape sequence
+ f force attach read/write g group info
+ i information dump L toggle logging on/off
+ l? break sequence list l0 send break per config file
+ l1-9 send specific break sequence o (re)open the tty and log file
+ p replay the last 60 lines r replay the last 20 lines
+ s spy read only u show host status
+ v show version info w who is on this console
+ x show console baud info z suspend the connection
+ ignore/abort command ? print this message
+ ^R replay the last line \ooo send character by octal code
+[disconnect]
diff --git a/test/results/test3 b/test/results/test3
new file mode 100644
index 0000000..8c404ae
--- /dev/null
+++ b/test/results/test3
@@ -0,0 +1,8 @@
+[Enter `^Ec?' for help]
+[halt list]
+ 0 `\z'
+ 1 `\z'
+ 2 `\r~^b'
+ 3 `#.reset -x\r'
+ 5 `\rtest\r'
+[disconnect]
diff --git a/test/results/test4 b/test/results/test4
new file mode 100644
index 0000000..e5705ba
--- /dev/null
+++ b/test/results/test4
@@ -0,0 +1,3 @@
+[Enter `^Ec?' for help]
+[line down]
+[disconnect]
diff --git a/test/results/test5 b/test/results/test5
new file mode 100644
index 0000000..c41b64a
--- /dev/null
+++ b/test/results/test5
@@ -0,0 +1,4 @@
+console: shell is down
+[Enter `^Ec?' for help]
+[up -- attached]
+[disconnect]
diff --git a/test/results/test6 b/test/results/test6
new file mode 100644
index 0000000..3f6c077
--- /dev/null
+++ b/test/results/test6
@@ -0,0 +1,3 @@
+ shellb up
+ shella up
+ shell up
diff --git a/test/results/test7 b/test/results/test7
new file mode 100644
index 0000000..fa846ea
--- /dev/null
+++ b/test/results/test7
@@ -0,0 +1,16 @@
+[Enter `^Ec?' for help]
+[help]
+ . disconnect a attach read/write
+ b send broadcast message c toggle flow control
+ d down a console e change escape sequence
+ f force attach read/write g group info
+ i information dump L toggle logging on/off
+ l? break sequence list l0 send break per config file
+ l1-9 send specific break sequence o (re)open the tty and log file
+ p replay the last 60 lines r replay the last 20 lines
+ s spy read only u show host status
+ v show version info w who is on this console
+ x show console baud info z suspend the connection
+ ignore/abort command ? print this message
+ ^R replay the last line \ooo send character by octal code
+[disconnect]
diff --git a/test/results/test8 b/test/results/test8
new file mode 100644
index 0000000..2655985
--- /dev/null
+++ b/test/results/test8
@@ -0,0 +1,8 @@
+[Enter `^Ec?' for help]
+[halt list]
+ 0 `\z'
+ 1 `\z'
+ 2 `\r~^b'
+ 3 `#.reset -x\r'
+ 4 `hiya there\r'
+[disconnect]
diff --git a/test/results/test9 b/test/results/test9
new file mode 100644
index 0000000..e5705ba
--- /dev/null
+++ b/test/results/test9
@@ -0,0 +1,3 @@
+[Enter `^Ec?' for help]
+[line down]
+[disconnect]
diff --git a/test/test.cf b/test/test.cf
new file mode 100644
index 0000000..7e54cc5
--- /dev/null
+++ b/test/test.cf
@@ -0,0 +1,7 @@
+# test conserver config file
+LOGDIR=.
+BREAK5=\rtest\r
+shell:|:9600p:&.log:5
+shell2:|::shell2.log:2
+%%
+trusted: 127.0.0.1
diff --git a/test/test.passwd b/test/test.passwd
new file mode 100644
index 0000000..e69de29
diff --git a/test/test1.cf b/test/test1.cf
new file mode 100644
index 0000000..7e54cc5
--- /dev/null
+++ b/test/test1.cf
@@ -0,0 +1,7 @@
+# test conserver config file
+LOGDIR=.
+BREAK5=\rtest\r
+shell:|:9600p:&.log:5
+shell2:|::shell2.log:2
+%%
+trusted: 127.0.0.1
diff --git a/test/test2.cf b/test/test2.cf
new file mode 100644
index 0000000..978d406
--- /dev/null
+++ b/test/test2.cf
@@ -0,0 +1,8 @@
+# test conserver config file
+LOGDIR=.
+BREAK4=hiya there\r
+shell:|:9600p:&.log:5
+shella:|::&.log:5
+shellb:|::&.log:
+%%
+trusted: 127.0.0.1