- Some cosmetic changes.
- Fix to return the last entered touchtone (or sequence) instead the string TOUCHTONE.
This commit is contained in:
parent
edcc46f7a8
commit
0f520aedbb
|
@ -1,13 +1,23 @@
|
|||
|
||||
|
||||
3.0 BETA 1
|
||||
**********
|
||||
|
||||
2.1.99
|
||||
******
|
||||
30-Sep-1998 Michael Herold <michael@abadonna.mayn.de>
|
||||
|
||||
18-Sep-1998
|
||||
* all: Configuration script and Makefiles rewritten.
|
||||
|
||||
o New setup parsing added. vboxgetty now use only one config file
|
||||
named "vboxgetty.conf" who looks like the isdnlog config (see
|
||||
vboxgetty/examples).
|
||||
|
||||
25-Sep-1998 Michael Herold <michael@abadonna.mayn.de>
|
||||
|
||||
* vboxgetty: Section name [vboxgetty-#] renamed to
|
||||
[vboxgetty-phone-#].
|
||||
|
||||
|
||||
18-Sep-1998 Michael Herold <michael@abadonna.mayn.de>
|
||||
|
||||
* vboxgetty: New setup parsing added. vboxgetty now use only one
|
||||
config file named 'vboxgetty.conf' who looks like the isdnlog
|
||||
config (see vboxgetty/examples).
|
||||
|
||||
o userrc.c & userrc.h removed.
|
||||
* vboxgetty: 'userrc.c' and 'userrc.h' removed.
|
||||
|
|
172
vbox3/INSTALL
172
vbox3/INSTALL
|
@ -1,16 +1,168 @@
|
|||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[/usr/local]
|
||||
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||
[same as prefix]
|
||||
--bindir=DIR user executables in DIR [EPREFIX/bin]
|
||||
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
|
||||
--datadir=DIR read-only architecture-independent data in DIR
|
||||
[PREFIX/share]
|
||||
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
||||
--without-regex use GNU rx in lieu of gawk's regex for matching
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
##
|
||||
## $Id: Makefile.am,v 1.4 1998/06/19 12:26:22 michael Exp $
|
||||
## $Id: Makefile.am,v 1.5 1998/11/10 18:36:17 michael Exp $
|
||||
##
|
||||
|
||||
## GNU automake options ##################################################
|
||||
## gnu automake options ###################################################
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
## Other directories #####################################################
|
||||
## other directories to process ###########################################
|
||||
|
||||
SUBDIRS = vboxgetty
|
||||
|
||||
## Clean & Maintenance ###################################################
|
||||
## extra files to distribute ##############################################
|
||||
|
||||
EXTRA_DIST = AUTHORS CHANGES COPYING INSTALL
|
||||
|
||||
## cleanup ################################################################
|
||||
|
||||
CLEANFILES = *~
|
||||
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in config.h.in \
|
||||
|
|
|
@ -1,118 +1,131 @@
|
|||
dnl #------------------------------------------------------------------------#
|
||||
dnl # Test if all needed libraries for vboxgetty are installed. We will end #
|
||||
dnl # the configure script if one is missing! #
|
||||
dnl #------------------------------------------------------------------------#
|
||||
|
||||
AC_DEFUN(VBOX_PACKAGE_TCL,
|
||||
[
|
||||
HAVE_TCL_LIBS="n"
|
||||
HAVE_TCL_INCL="n"
|
||||
HAVE_TCL_PACK="n"
|
||||
LINK_TCL_LIBS=""
|
||||
LINK_TCL_INCL=""
|
||||
|
||||
gnd_use_tcl_lib=""
|
||||
gnd_use_tcl_dir=""
|
||||
|
||||
AC_ARG_WITH(tcllib,
|
||||
[ --with-tcllib=LIB use tcl library LIB to link [tcl]],
|
||||
gnd_use_tcl_lib="${withval}",
|
||||
gnd_use_tcl_lib="`eval echo ${VBOX_TCL:-""}`"
|
||||
)
|
||||
|
||||
AC_ARG_WITH(tcldir,
|
||||
[ --with-tcldir=DIR tcl base directory []],
|
||||
gnd_use_tcl_dir="${withval}"
|
||||
)
|
||||
|
||||
gnd_tcl_inc_dir=""
|
||||
gnd_tcl_lib_dir=""
|
||||
|
||||
if (test "${gnd_use_tcl_dir}" != "")
|
||||
then
|
||||
gnd_tcl_inc_dir="-I${gnd_use_tcl_dir}/include"
|
||||
gnd_tcl_lib_dir="-L${gnd_use_tcl_dir}/lib"
|
||||
fi
|
||||
|
||||
if (test "${gnd_use_tcl_lib}" = "")
|
||||
then
|
||||
gnd_1st_tcl_lib_test="tcl8.1"
|
||||
gnd_2nd_tcl_lib_test="tcl8.0"
|
||||
gnd_3rd_tcl_lib_test="tcl"
|
||||
else
|
||||
gnd_1st_tcl_lib_test="${gnd_use_tcl_lib}"
|
||||
gnd_2nd_tcl_lib_test="tcl8.0"
|
||||
gnd_3rd_tcl_lib_test="tcl"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(m,
|
||||
cos,
|
||||
AC_CHECK_LIB(dl,
|
||||
dlerror,
|
||||
AC_CHECK_LIB(${gnd_1st_tcl_lib_test},
|
||||
Tcl_CreateInterp,
|
||||
LINK_TCL_LIBS="${gnd_tcl_lib_dir} -l${gnd_1st_tcl_lib_test} -lm -ldl",
|
||||
AC_CHECK_LIB(${gnd_2nd_tcl_lib_test},
|
||||
Tcl_CreateInterp,
|
||||
LINK_TCL_LIBS="${gnd_tcl_lib_dir} -l${gnd_2nd_tcl_lib_test} -lm -ldl",
|
||||
AC_CHECK_LIB(${gnd_3rd_tcl_lib_test},
|
||||
Tcl_CreateInterp,
|
||||
LINK_TCL_LIBS="${gnd_tcl_lib_dir} -l${gnd_3rd_tcl_lib_test} -lm -ldl",
|
||||
,
|
||||
${gnd_tcl_lib_dir} -lm -ldl
|
||||
),
|
||||
${gnd_tcl_lib_dir} -lm -ldl
|
||||
),
|
||||
${gnd_tcl_lib_dir} -lm -ldl
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
if (test "${LINK_TCL_LIBS}" != "")
|
||||
then
|
||||
HAVE_TCL_LIBS="y"
|
||||
fi
|
||||
|
||||
dnl #-------------------------------------------#
|
||||
dnl # Check if the compiler find the tcl header #
|
||||
dnl #-------------------------------------------#
|
||||
|
||||
AC_CHECK_HEADER(tcl.h, HAVE_TCL_INCL="y")
|
||||
|
||||
if (test "${HAVE_TCL_INCL}" = "n")
|
||||
then
|
||||
if (test "${gnd_use_tcl_dir}" != "")
|
||||
AC_DEFUN(AC_FIND_FILE,
|
||||
[
|
||||
$3=NO
|
||||
for i in $2;
|
||||
do
|
||||
for j in $1;
|
||||
do
|
||||
if test -r "$i/$j"
|
||||
then
|
||||
AC_MSG_CHECKING("for tcl header in ${gnd_use_tcl_dir}/include")
|
||||
$3=$i
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
])
|
||||
|
||||
if (test -e "${gnd_use_tcl_dir}/include/tcl.h")
|
||||
AC_DEFUN(AC_PATH_PKGLOGDIR,
|
||||
[
|
||||
packagelogdir="`eval echo ${packagelogdir:-/var/log}`"
|
||||
|
||||
AC_ARG_WITH(packagelogdir,
|
||||
[ --with-logdir=DIR where logs should be stored [/var/log]],
|
||||
[ packagelogdir=${withval} ])
|
||||
|
||||
AC_SUBST(packagelogdir)
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PATH_PKGLOCKDIR,
|
||||
[
|
||||
packagelockdir="`eval echo ${packagelockdir:-/var/lock}`"
|
||||
|
||||
AC_ARG_WITH(packagelockdir,
|
||||
[ --with-lockdir=DIR where locks should be stored [/var/lock]],
|
||||
[ packagelockdir=${withval} ])
|
||||
|
||||
AC_SUBST(packagelockdir)
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PATH_PKGPIDDIR,
|
||||
[
|
||||
packagepiddir="`eval echo ${packagepiddir:-/var/run}`"
|
||||
|
||||
AC_ARG_WITH(packagepiddir,
|
||||
[ --with-piddir=DIR where PID's should be stored [/var/run]],
|
||||
[ packagepiddir=${withval} ])
|
||||
|
||||
AC_SUBST(packagepiddir)
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PATH_TCL,
|
||||
[
|
||||
ac_tcl_inc=""
|
||||
ac_tcl_lib=""
|
||||
|
||||
AC_ARG_WITH(tcl-include,
|
||||
[ --with-tcl-include=DIR where the tcl include is installed. ],
|
||||
[ ac_tcl_inc="$withval" ])
|
||||
|
||||
AC_ARG_WITH(tcl-library,
|
||||
[ --with-tcl-library=DIR where the tcl library is installed. ],
|
||||
[ ac_tcl_lib="$withval" ])
|
||||
|
||||
tcl_include=""
|
||||
tcl_library=""
|
||||
|
||||
AC_CHECK_LIB(m, cos,
|
||||
[
|
||||
AC_CHECK_LIB(dl, dlerror,
|
||||
[
|
||||
AC_CHECKING([whether tcl is installed in a standard location...])
|
||||
|
||||
AC_CHECK_LIB(tcl, Tcl_CreateInterp,
|
||||
[ tcl_library="-ltcl -lm -ldl" ],
|
||||
[
|
||||
AC_CHECKING([whether tcl is installed in a special locations...])
|
||||
|
||||
searchstring="$ac_tcl_lib /lib /usr/lib /usr/local/lib /opt/lib /opt/tcl/lib"
|
||||
|
||||
AC_FIND_FILE(libtcl.so, $searchstring, searchresult)
|
||||
|
||||
if (test ! "$searchresult" = "NO")
|
||||
then
|
||||
AC_CHECK_LIB(tcl, Tcl_CreateInterp,
|
||||
[ tcl_library="-L$searchresult -ltcl -lm -ldl" ],
|
||||
,
|
||||
-L$searchresult -lm -ldl)
|
||||
fi
|
||||
],
|
||||
-lm -ldl)
|
||||
])
|
||||
])
|
||||
|
||||
if (test ! "$tcl_library" = "")
|
||||
then
|
||||
AC_CHECK_HEADERS(tcl.h,
|
||||
,
|
||||
[
|
||||
AC_MSG_CHECKING([for tcl.h in a special location])
|
||||
|
||||
searchstring="$ac_tcl_inc /usr/include /usr/local/include /opt/include /opt/tcl/include"
|
||||
|
||||
AC_FIND_FILE(tcl.h, $searchstring, searchresult)
|
||||
|
||||
if (test ! "$searchresult" = "NO")
|
||||
then
|
||||
AC_MSG_RESULT("yes")
|
||||
AC_MSG_RESULT([$searchresult])
|
||||
|
||||
HAVE_TCL_INCL="y"
|
||||
LINK_TCL_INCL="${gnd_tcl_inc_dir}"
|
||||
tcl_include="-I$searchresult"
|
||||
else
|
||||
AC_MSG_RESULT("no")
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
AC_MSG_WARN([***********************************************************])
|
||||
AC_MSG_WARN([* The tcl header file can not be located! *])
|
||||
AC_MSG_WARN([***********************************************************])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
else
|
||||
AC_MSG_WARN([***********************************************************])
|
||||
AC_MSG_WARN([* The tcl library can not be located! *])
|
||||
AC_MSG_WARN([* *])
|
||||
AC_MSG_WARN([* If tcl is installed but no tcl.so exists (but something *])
|
||||
AC_MSG_WARN([* like tcl8.0.so or tcl8.1.so), create a link 'tcl.so' *])
|
||||
AC_MSG_WARN([* that points to your installed tcl library and start *])
|
||||
AC_MSG_WARN([* ./configure again! *])
|
||||
AC_MSG_WARN([***********************************************************])
|
||||
fi
|
||||
|
||||
if (test "${HAVE_TCL_LIBS}" = "y")
|
||||
then
|
||||
if (test "${HAVE_TCL_INCL}" = "y")
|
||||
then
|
||||
HAVE_TCL_PACK="y"
|
||||
fi
|
||||
fi
|
||||
|
||||
if (test "${HAVE_TCL_PACK}" = "n")
|
||||
then
|
||||
AC_MSG_WARN("**")
|
||||
AC_MSG_WARN("** vboxgetty will not compile without TCL installed!")
|
||||
AC_MSG_WARN("**")
|
||||
fi
|
||||
|
||||
AC_SUBST(LINK_TCL_LIBS)
|
||||
AC_SUBST(LINK_TCL_INCL)
|
||||
]
|
||||
)
|
||||
AC_SUBST(tcl_library)
|
||||
AC_SUBST(tcl_include)
|
||||
])
|
||||
|
|
|
@ -0,0 +1,890 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# 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.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
#
|
||||
# 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 system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
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
|
||||
|
||||
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
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.
|
||||
cat <<EOF >dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
|
||||
exit 0 ;;
|
||||
21064:Windows_NT:50:3)
|
||||
echo alpha-dec-winnt3.5
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
exit 0;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
arm32:NetBSD:*:*)
|
||||
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
|
||||
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
echo pyramid-pyramid-sysv3
|
||||
else
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
NILE:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
echo i386-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=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
sun4)
|
||||
echo sparc-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
esac
|
||||
exit 0 ;;
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:Mach:*:*)
|
||||
echo mips-dec-mach_bsd4.3
|
||||
exit 0 ;;
|
||||
RISC*:ULTRIX:*:*)
|
||||
echo mips-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
2020:CLIX:*:*)
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
int main (argc, argv) int argc; char **argv; {
|
||||
#if defined (host_mips) && defined (MIPSEB)
|
||||
#if defined (SYSTYPE_SYSV)
|
||||
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#if defined (SYSTYPE_SVR4)
|
||||
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
|
||||
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy \
|
||||
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
m88k:CX/UX:7*:*)
|
||||
echo m88k-harris-cxux7
|
||||
exit 0 ;;
|
||||
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 -o $UNAME_PROCESSOR = mc88110 ] ; then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
|
||||
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
else
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
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 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
puts("powerpc-ibm-aix3.2.5");
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
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:*:4)
|
||||
if /usr/sbin/lsattr -EHl proc0 | 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=4.${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 NetBSD 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/[3478]??:HP-UX:*:*)
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
|
||||
9000/8?? ) HP_ARCH=hppa1.0 ;;
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <unistd.h>
|
||||
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-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
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 ;;
|
||||
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*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE}
|
||||
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/
|
||||
exit 0 ;;
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin32
|
||||
exit 0 ;;
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin32
|
||||
exit 0 ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
arm* | sa110*) UNAME_MACHINE="arm" ;;
|
||||
esac
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
|
||||
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
|
||||
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
#ifdef __MIPSEL__
|
||||
printf ("%sel-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
|
||||
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
i?86:DYNIX/ptx:4*:*)
|
||||
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.*:*)
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
echo i386-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-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 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
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.*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
|
||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
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:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
echo hppa1.1-stratus-sysv4
|
||||
exit 0 ;;
|
||||
*:*:*:FTX*)
|
||||
# From seanf@swdc.stratus.com.
|
||||
echo i860-stratus-sysv4
|
||||
exit 0 ;;
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#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 <sys/param.h>
|
||||
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`;
|
||||
printf ("%s-next-nextstep%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)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#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-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
|
||||
# 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
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
|
@ -0,0 +1,952 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# 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.
|
||||
|
||||
if [ x$1 = x ]
|
||||
then
|
||||
echo Configuration name missing. 1>&2
|
||||
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
|
||||
echo "or $0 ALIAS" 1>&2
|
||||
echo where ALIAS is a recognized configuration type. 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# First pass through any local machine types.
|
||||
case $1 in
|
||||
*local*)
|
||||
echo $1
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
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
|
||||
linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
;;
|
||||
esac
|
||||
|
||||
### Let's recognize common machines as not being operating systems so
|
||||
### that things like config.sub decstation-3100 work. We also
|
||||
### 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)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco5)
|
||||
os=sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
os=-sco3.2v4
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-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/'`
|
||||
;;
|
||||
-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
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 \
|
||||
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
|
||||
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
|
||||
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
|
||||
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| sparc | sparclet | sparclite | sparc64 | v850)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[34567]86)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
|
||||
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
|
||||
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
|
||||
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
basic_machine=m68000-att
|
||||
;;
|
||||
3b*)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
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-cbm
|
||||
;;
|
||||
amigaos | amigados)
|
||||
basic_machine=m68k-cbm
|
||||
os=-amigaos
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
basic_machine=m68k-apollo
|
||||
os=-sysv
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
;;
|
||||
balance)
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
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 | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[ctj]90-cray)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
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
|
||||
;;
|
||||
fx2800)
|
||||
basic_machine=i860-alliant
|
||||
;;
|
||||
genix)
|
||||
basic_machine=ns32k-ns
|
||||
;;
|
||||
gmicro)
|
||||
basic_machine=tron-gmicro
|
||||
os=-sysv
|
||||
;;
|
||||
h3050r* | hiux*)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
h8300hms)
|
||||
basic_machine=h8300-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
|
||||
;;
|
||||
hp9k2[0-9][0-9] | hp9k31[0-9])
|
||||
basic_machine=m68000-hp
|
||||
;;
|
||||
hp9k3[2-9][0-9])
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[34567]86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[34567]86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[34567]86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
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
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
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
|
||||
;;
|
||||
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
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
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 | nexen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | k6 | 6x86)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | nexen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | k6-* | 6x86-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=rs6000-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/^[^-]*-//'`
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
rm[46]00)
|
||||
basic_machine=mips-siemens
|
||||
;;
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
sh)
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sps7)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv2
|
||||
;;
|
||||
spur)
|
||||
basic_machine=spur-unknown
|
||||
;;
|
||||
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
|
||||
;;
|
||||
symmetry)
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
ultra3)
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
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
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
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.
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
fi
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
basic_machine=orion-highlevel
|
||||
;;
|
||||
orion105)
|
||||
basic_machine=clipper-highlevel
|
||||
;;
|
||||
*)
|
||||
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* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
-osf*)
|
||||
os=-osf
|
||||
;;
|
||||
-utek*)
|
||||
os=-bsd
|
||||
;;
|
||||
-dynix*)
|
||||
os=-bsd
|
||||
;;
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
# 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*)
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-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*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
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
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-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
|
||||
;;
|
||||
f301-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*)
|
||||
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
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-unos*)
|
||||
vendor=crds
|
||||
;;
|
||||
-dgux*)
|
||||
vendor=dg
|
||||
;;
|
||||
-luna*)
|
||||
vendor=omron
|
||||
;;
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
vendor=apple
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
|
@ -1,71 +1,62 @@
|
|||
AC_INIT(vboxgetty/vboxgetty.c)
|
||||
|
||||
AM_INIT_AUTOMAKE(vbox, 2.1.1)
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
## init ###################################################################
|
||||
|
||||
AC_INIT(acinclude.m4)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
AM_INIT_AUTOMAKE(vbox, 3.0B1)
|
||||
|
||||
AC_PREFIX_DEFAULT(/opt/vbox)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
## programs ###############################################################
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_WORKS
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
AC_PROG_RANLIB
|
||||
AM_PROG_INSTALL
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
## libraries ##############################################################
|
||||
|
||||
AC_PATH_TCL
|
||||
|
||||
## headers ################################################################
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
|
||||
AC_CHECK_LIB(c, siginterrupt, AC_DEFINE(HAVE_SIGINTERRUPT))
|
||||
## typedefs ###############################################################
|
||||
|
||||
##AM_WITH_REGEX
|
||||
## structures #############################################################
|
||||
|
||||
dnl #------------------------------------------------------------------------#
|
||||
dnl # Checks for needed external packages: #
|
||||
dnl #------------------------------------------------------------------------#
|
||||
## compiler characteristics ###############################################
|
||||
|
||||
VBOX_PACKAGE_TCL
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
|
||||
dnl #---------------------------------------------------------------------#
|
||||
dnl # The place where log's should be stored #
|
||||
dnl #---------------------------------------------------------------------#
|
||||
## library functions ######################################################
|
||||
|
||||
packagelogdir="`eval echo ${packagelogdir:-"/var/log"}`"
|
||||
AC_CHECK_FUNCS(siginterrupt)
|
||||
|
||||
AC_ARG_WITH(packagelogdir,
|
||||
[ --with-logdir=DIR where logs should be stored [/var/log]],
|
||||
packagelogdir=${withval}
|
||||
)
|
||||
## system services ########################################################
|
||||
|
||||
AC_SUBST(packagelogdir)
|
||||
AC_PATH_PKGLOGDIR
|
||||
AC_PATH_PKGLOCKDIR
|
||||
AC_PATH_PKGPIDDIR
|
||||
|
||||
dnl #---------------------------------------------------------------------#
|
||||
dnl # The place where lock's should be stored #
|
||||
dnl #---------------------------------------------------------------------#
|
||||
## output #################################################################
|
||||
|
||||
packagelockdir="`eval echo ${packagelockdir:-"/var/lock"}`"
|
||||
|
||||
AC_ARG_WITH(packagelockdir,
|
||||
[ --with-lockdir=DIR where locks should be stored [/var/lock]],
|
||||
packagelockdir=${withval}
|
||||
)
|
||||
|
||||
AC_SUBST(packagelockdir)
|
||||
|
||||
dnl #---------------------------------------------------------------------#
|
||||
dnl # The place where pid's should be stored #
|
||||
dnl #---------------------------------------------------------------------#
|
||||
|
||||
packagepiddir="`eval echo ${packagepiddir:-"/var/run"}`"
|
||||
|
||||
AC_ARG_WITH(packagepiddir,
|
||||
[ --with-piddir=DIR where PID's should be stored [/var/run]],
|
||||
packagepiddir=${withval}
|
||||
)
|
||||
|
||||
AC_SUBST(packagepiddir)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AC_OUTPUT(Makefile vboxgetty/Makefile vboxgetty/examples/Makefile vboxgetty/examples/scripts/Makefile)
|
||||
AC_OUTPUT(Makefile \
|
||||
vboxgetty/Makefile \
|
||||
vboxgetty/docs/Makefile \
|
||||
vboxgetty/docs/de/Makefile \
|
||||
vboxgetty/examples/Makefile \
|
||||
vboxgetty/examples/scripts/Makefile)
|
||||
|
|
|
@ -1,32 +1,26 @@
|
|||
##
|
||||
## $Id: Makefile.am,v 1.6 1998/09/18 15:08:55 michael Exp $
|
||||
## $Id: Makefile.am,v 1.7 1998/11/10 18:36:25 michael Exp $
|
||||
##
|
||||
|
||||
## system admin executables to install ####################################
|
||||
## other directories to process ###########################################
|
||||
|
||||
SUBDIRS = examples docs
|
||||
|
||||
## system admin executables to build ######################################
|
||||
|
||||
sbin_PROGRAMS = vboxgetty
|
||||
|
||||
###########################################################################
|
||||
|
||||
packagelogdir = @packagelogdir@
|
||||
packagelockdir = @packagelockdir@
|
||||
packagepiddir = @packagepiddir@
|
||||
|
||||
tclpackagelibs = @LINK_TCL_LIBS@
|
||||
tclpackageinclude = @LINK_TCL_INCL@
|
||||
## vboxgetty ##############################################################
|
||||
|
||||
DEFS += -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"$(pkgdatadir)"' -DLOGDIR='"$(packagelogdir)"' -DLOCKDIR='"$(packagelockdir)"' -DPIDDIR='"$(packagepiddir)"'
|
||||
INCLUDES = $(all_includes) $(tclpackageinclude)
|
||||
|
||||
## vbox low level modem library ###########################################
|
||||
INCLUDES = $(all_includes) $(tcl_include)
|
||||
|
||||
noinst_LIBRARIES = libvboxmodem.a
|
||||
|
||||
libvboxmodem_a_SOURCES = libvboxmodem.c libvboxmodem.h
|
||||
|
||||
## vboxgetty ##############################################################
|
||||
|
||||
vboxgetty_LDADD = $(tclpackagelibs) -L. -lvboxmodem
|
||||
vboxgetty_LDADD = $(tcl_library) -L. -lvboxmodem
|
||||
|
||||
vboxgetty_SOURCES = log.c log.h \
|
||||
modem.c modem.h \
|
||||
|
@ -41,17 +35,11 @@ vboxgetty_SOURCES = log.c log.h \
|
|||
audio.c audio.h \
|
||||
breaklist.c breaklist.h
|
||||
|
||||
## other directories to process ###########################################
|
||||
## extra files to distribute ##############################################
|
||||
|
||||
SUBDIRS = examples
|
||||
EXTRA_DIST = AUTHORS COPYING
|
||||
|
||||
## cleanup ################################################################
|
||||
|
||||
CLEANFILES = *~
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
## Local install routines ################################################
|
||||
|
||||
install-exec-local:
|
||||
$(mkinstalldirs) $(sbindir)
|
||||
$(INSTALL) -s -m 700 vboxgetty $(sbindir)/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: audio.c,v 1.4 1998/09/18 15:08:56 michael Exp $
|
||||
** $Id: audio.c,v 1.5 1998/11/10 18:36:25 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -10,6 +10,7 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/soundcard.h>
|
||||
|
||||
#include "audio.h"
|
||||
|
|
|
@ -1,53 +1,10 @@
|
|||
##
|
||||
## $Id: Makefile.am,v 1.1 1998/09/30 09:51:46 michael Exp $
|
||||
## $Id: Makefile.am,v 1.2 1998/11/10 18:36:47 michael Exp $
|
||||
##
|
||||
|
||||
## other directories to process ###########################################
|
||||
|
||||
SUBDIRS = examples docs
|
||||
|
||||
## configure options ######################################################
|
||||
|
||||
packagelogdir = @packagelogdir@
|
||||
packagelockdir = @packagelockdir@
|
||||
packagepiddir = @packagepiddir@
|
||||
|
||||
tclpackagelibs = @LINK_TCL_LIBS@
|
||||
tclpackageinclude = @LINK_TCL_INCL@
|
||||
|
||||
## system admin executables to build ######################################
|
||||
|
||||
sbin_PROGRAMS = vboxgetty
|
||||
|
||||
INCLUDES = $(all_includes) $(tclpackageinclude)
|
||||
DEFS += -DSYSCONFDIR='"$(sysconfdir)"' -DPKGDATADIR='"$(pkgdatadir)"' -DLOGDIR='"$(packagelogdir)"' -DLOCKDIR='"$(packagelockdir)"' -DPIDDIR='"$(packagepiddir)"'
|
||||
|
||||
## vbox low level modem library ###########################################
|
||||
|
||||
noinst_LIBRARIES = libvboxmodem.a
|
||||
|
||||
libvboxmodem_a_SOURCES = libvboxmodem.c libvboxmodem.h
|
||||
|
||||
## vboxgetty ##############################################################
|
||||
|
||||
vboxgetty_LDADD = $(tclpackagelibs) -L. -lvboxmodem
|
||||
|
||||
vboxgetty_SOURCES = log.c log.h \
|
||||
modem.c modem.h \
|
||||
rc.c rc.h \
|
||||
vboxrc.c vboxrc.h \
|
||||
stringutils.c stringutils.h \
|
||||
tclscript.c tclscript.h \
|
||||
vboxgetty.c vboxgetty.h \
|
||||
voice.c voice.h \
|
||||
control.c control.h \
|
||||
lock.c lock.h \
|
||||
audio.c audio.h \
|
||||
breaklist.c breaklist.h
|
||||
|
||||
## extra files to distribute ##############################################
|
||||
|
||||
EXTRA_DIST = AUTHORS COPYING
|
||||
SUBDIRS = de
|
||||
|
||||
## cleanup ################################################################
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,774 +1,53 @@
|
|||
vboxgetty
|
||||
Michael Herold, michael@isdn4linux.de
|
||||
v3.0, 6. Juli 1998
|
||||
|
||||
Die Dokumentation beschreibt die Installation und Konfiguration von
|
||||
_v_b_o_x_g_e_t_t_y. _v_b_o_x_g_e_t_t_y ist Teil des _v_b_o_x Paketes - einem Anrufbeant
|
||||
worter für _i_s_d_n_4_l_i_n_u_x.
|
||||
______________________________________________________________________
|
||||
Dokumentation ist noch nicht fertig ;-) Das Release ist mehr für Entwickler
|
||||
gedacht, um evtl. bestehende Software anzupassen.
|
||||
|
||||
Inhaltsverzeichnis
|
||||
Kurze Anleitung um einen Benutzer einzurichten:
|
||||
|
||||
1. Copyright
|
||||
$ cd /var/spool
|
||||
$ mkdir vbox
|
||||
$ mkdir vbox/peterlustig
|
||||
$ mkdir vbox/peterlustig/new
|
||||
$ mkdir vbox/peterlustig/msg
|
||||
$ mkdir vbox/peterlustig/tcl
|
||||
|
||||
2. Vorwort
|
||||
In `/var/spool/vbox/peterlustig' die Datei `vboxrc' anlegen (diese Datei
|
||||
fällt in Kürze weg und wird duch vboxcallerid.conf ersetze):
|
||||
|
||||
2.1 Was kann vboxgetty?
|
||||
2.2 Was kann vboxgetty nicht?
|
||||
2.3 Was wird zum Betrieb benötigt?
|
||||
-----schnipp-----
|
||||
[CALLERID]
|
||||
|
||||
3. Neuerungen
|
||||
* default *** Unknown ***
|
||||
|
||||
3.1 Format der Audiodateien
|
||||
3.2 Full Duplex Modus
|
||||
3.3 Touchtones
|
||||
3.4 Mehrere Nummern überwachen
|
||||
3.5 Suspend
|
||||
[DEFAULT]
|
||||
|
||||
4. Installation
|
||||
* * answercall.tcl 90 6 4
|
||||
-----schnapp-----
|
||||
|
||||
4.1 Anpassung an das lokale System
|
||||
4.2 Erzeugen der Programme
|
||||
4.3 Installieren der Programme
|
||||
4.4 Konfiguration von vboxgetty
|
||||
Damit werden alle Anrufe nach 6x klingeln angenommen und es wird 90 Sekunden
|
||||
aufgezeichnet.
|
||||
|
||||
5. Konfiguration
|
||||
Das Format der aufgezeichneten oder abgespielten Dateien ist ulaw! Andere
|
||||
Formate werden nicht mehr unterstützt. Kompression läßt sich mit externen
|
||||
Programmen wie gzip oder einem mp3programm erzeugen.
|
||||
|
||||
5.1 vboxgetty.conf
|
||||
5.2 vboxgetty.user
|
||||
5.3 vboxrc
|
||||
5.3.1 CALLERID
|
||||
5.3.2 Benutzersektionen
|
||||
5.4 Zeitangaben
|
||||
5.5 Tagesangaben
|
||||
Nachrichten können mit "cat </dev/audio >message.ulaw" mittels eines
|
||||
Mikrophons aufgezeichnet werden. Beim umwandeln von anderen Formaten muß
|
||||
nach ulaw mit 8000Hz gewandelt werden.
|
||||
|
||||
6. Tcl
|
||||
Jetzt noch `vboxgetty.conf' anpassen (vboxcallerid.conf wird im Moment noch
|
||||
nicht verarbeitet) und den getty starten:
|
||||
|
||||
6.1 Skripte
|
||||
6.1.1 initmodem.tcl
|
||||
6.1.2 answercall.tcl
|
||||
6.2 Neue Kommandos
|
||||
vboxgetty -d ttyI0 -x FULL
|
||||
|
||||
7. vboxgetty
|
||||
Wer isdnlog installiert hat, kann die Einträge in vboxgetty.conf in die
|
||||
isdn.conf eintragen und vboxgetty.conf als link auf isdn.conf anlegen (ist
|
||||
aber nicht getestet da ich keine isdnlog laufen habe).
|
||||
|
||||
8. mkvboxuserspool
|
||||
vboxd wird es nicht mehr geben, da es genug Programme gibt die Dateien über
|
||||
Netzwerk versenden. Die von vbox aufgezeichneten Nachrichten haben auch
|
||||
keinen Header mehr. Stattdessen wird eine Datei *.vbox angelegt, die Angaben
|
||||
zum Anrufer enthält.
|
||||
|
||||
9. TODO
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
11.. CCooppyyrriigghhtt
|
||||
|
||||
xxx
|
||||
|
||||
22.. VVoorrwwoorrtt
|
||||
|
||||
Das _v_b_o_x-Paket ist eine Erweiterung zu _i_s_d_n_4_l_i_n_u_x und ermöglicht den
|
||||
Betrieb eines _i_s_d_n-Anrufbeantworters.
|
||||
|
||||
Das Hauptprogramm des Paketes ist das Programm _v_b_o_x_g_e_t_t_y, das die
|
||||
Anrufe entgegennimmt, die Ansagen abspielt und die Nachrichten
|
||||
aufzeichnet.
|
||||
|
||||
22..11.. WWaass kkaannnn vvbbooxxggeettttyy??
|
||||
|
||||
Was _v_b_o_x_g_e_t_t_y kann:
|
||||
|
||||
· Sprachanrufe entgegennehmen.
|
||||
|
||||
· Ansagetexte abspielen und/oder Nachrichten aufzeichnen.
|
||||
|
||||
· Touchtones auswerten - mit der eingebauten _T_c_l-Unterstützung sind
|
||||
auch komplexe Voicemailboxen möglich.
|
||||
|
||||
Eben alles was ein normaler Anrufbeantworter auch kann - und noch
|
||||
einiges mehr...
|
||||
|
||||
22..22.. WWaass kkaannnn vvbbooxxggeettttyy nniicchhtt??
|
||||
|
||||
Was _v_b_o_x_g_e_t_t_y nicht kann:
|
||||
|
||||
· Ohne _i_s_d_n_4_l_i_n_u_x betrieben werden. Das _v_b_o_x-Paket ist eine
|
||||
Erweiterung zu _i_s_d_n_4_l_i_n_u_x!
|
||||
|
||||
· Mit einem Voice-Modem betrieben werden.
|
||||
|
||||
· Fax- oder Datenanrufe entgegennehmen. Dazu sind immer noch eigene
|
||||
Programme nötig. _v_b_o_x ist ein reiner Anrufbeantworter!
|
||||
|
||||
22..33.. WWaass wwiirrdd zzuumm BBeettrriieebb bbeennööttiiggtt??
|
||||
|
||||
Damit _v_b_o_x_g_e_t_t_y richtig funktioniert, wird folgendes benötigt:
|
||||
|
||||
· Eine funktionierende und von _L_i_n_u_x unterstützte _i_s_d_n-Karte.
|
||||
|
||||
· Die neuste Version von _i_s_d_n_4_l_i_n_u_x.
|
||||
|
||||
· _L_i_n_u_x Kernel ab Version 2.1.103 mit eingeschaltetem _i_s_d_n_4_l_i_n_u_x und
|
||||
Isdn-Audio-Support.
|
||||
|
||||
· _T_c_l ab Version 8.0.
|
||||
|
||||
Vor der Installation von _v_b_o_x_g_e_t_t_y sollte sichergestellt werden das
|
||||
alle benötigten Komponenten installiert sind und auch funktionieren!
|
||||
|
||||
33.. NNeeuueerruunnggeenn
|
||||
|
||||
Hier eine kurze Aufstellung der Neuerungen und Änderungen seit der
|
||||
Veröffentlichung von _v_b_o_x Version 2.0.0B4/5.
|
||||
|
||||
Bitte lesen Sie sich die folgenden Abschnitte vor der Installation
|
||||
aufmerksam durch, um Unklarheiten und Fehler zu vermeiden!
|
||||
|
||||
33..11.. FFoorrmmaatt ddeerr AAuuddiiooddaatteeiieenn
|
||||
|
||||
Als Format für die Audiodateien wird nur noch _u_l_a_w unterstützt. Die
|
||||
Formate _a_l_a_w, _a_d_p_c_m_-_2, _a_d_p_c_m_-_3 und _a_d_p_c_m_-_4 sind zwar noch in
|
||||
_i_s_d_n_4_l_i_n_u_x enthalten, finden aber in _v_b_o_x_g_e_t_t_y keine Verwendung mehr.
|
||||
|
||||
Das hat mehrere Gründe:
|
||||
|
||||
· Im neu unterstützten _F_u_l_l _D_u_p_l_e_x _M_o_d_u_s (siehe ``Full Duplex
|
||||
Modus'') ist ein wechseln des Formates nicht möglich.
|
||||
|
||||
· Das Format _u_l_a_w bietet die beste Klangqualität da die Daten nicht
|
||||
komprimiert werden.
|
||||
|
||||
· Nachrichten können mit einfachen Kommandos wie ``cat name
|
||||
>/dev/audio'' ausgegeben werden.
|
||||
|
||||
· Die Verwirrung beim Umwandeln der einzelnen Formate entfällt ;-)
|
||||
|
||||
Nachteilig sei hier zu erwähnen, daß dieses Format keine Komprimierung
|
||||
macht, die Dateien also u.U. groß werden können.
|
||||
|
||||
Es besteht allerdings die Möglichkeit, diese Dateien mit externen
|
||||
Programmen komprimieren zu lassen. Das Abspielen von solchen
|
||||
komprimierten Dateien wird von _v_b_o_x_g_e_t_t_y aber zur Zeit noch nicht
|
||||
unterstützt, daß heißt alle Ansagetexte, die von _v_b_o_x_g_e_t_t_y gespielt,
|
||||
werden müssen in unkomprimierter Form vorliegen!
|
||||
|
||||
Der Header der von früheren _v_b_o_x Versionen vor jede Audiodatei gehängt
|
||||
wurde entfällt ab Version 3 komplett. Es werden nur noch die
|
||||
Audiodaten selbst gespeichert. Alle weiteren Informationen (wie z.B.
|
||||
der Name) werden in einer eigenen Datei abgelegt. Diese Dateien - die
|
||||
normalerweise von _v_b_o_x_g_e_t_t_y erzeugt und von _v_b_o_x gelesen werden -
|
||||
enden mit dem Kürzel ``.vbox''.
|
||||
|
||||
Wenn Sie Ihre alten Ansagetexte von _v_b_o_x Version 2 beibehalten
|
||||
möchten, müssen Sie diese zuerst mit dem _v_b_o_x-Konvertierungsprogramm
|
||||
in _u_l_a_w umwandeln und danach den Header entfernen lassen!
|
||||
|
||||
33..22.. FFuullll DDuupplleexx MMoodduuss
|
||||
|
||||
Ab Version 3 arbeitet _v_b_o_x_g_e_t_t_y nur noch im sogenannten _F_u_l_l _D_u_p_l_e_x
|
||||
_M_o_d_u_s, der ein gleichzeitiges Abspielen und Aufzeichnen von
|
||||
Nachrichten zuläßt.
|
||||
|
||||
In diesem Modus ist es dann zum Beispiel möglich, bereits während dem
|
||||
Abspielen des Ansagetextes die Nachricht aufzeichnen zu lassen.
|
||||
|
||||
33..33.. TToouucchhttoonneess
|
||||
|
||||
Touchtones die nur aus einzelnen Zahlen bestehen müssen nicht mehr mit
|
||||
``#'' und ``*'' eingegrenze werden.
|
||||
|
||||
Die Touchtones werden von den _t_c_l-Funktionen jetzt genauso
|
||||
zurückgegeben wie sie eingegeben wurden, d.h. einzelne Touchtones als
|
||||
einzelne Zahlen und eine Touchtonesequenz in ``#*'' eingefasst.
|
||||
|
||||
33..44.. MMeehhrreerree NNuummmmeerrnn üübbeerrwwaacchheenn
|
||||
|
||||
Dank des neuen AT&L-Kommandos in _i_s_d_n_4_l_i_n_u_x ist es jetzt möglich mit
|
||||
einem _v_b_o_x_g_e_t_t_y mehr als eine Nummer anzugeben (mit Wildcards).
|
||||
|
||||
Die Zuweisung welche Nummer für welchen lokalen Benutzer bestimmt ist
|
||||
erfolgt über eine seperate Konfigurationsdatei (siehe
|
||||
``vboxgetty.user''). Dort kann jedem lokalen Benutzer eine (oder
|
||||
mehrere) Nummer zugewiesen werden. Eingehende Anrufe zu dieser Nummer
|
||||
werden dann in den Verzeichnissen des entsprechenden Benutzers
|
||||
gepeichert.
|
||||
|
||||
Das in früheren Versionen verwendete Kommando AT&E funktioniert auch
|
||||
weiterhin, es kann aber nur eine Nummer angegeben werden!
|
||||
|
||||
33..55.. SSuussppeenndd
|
||||
|
||||
Bereits von _v_b_o_x_g_e_t_t_y angenommene Anrufe können wieder zurück auf die
|
||||
Leitung gelegt (Parken) und vom Telefon angenommen werden.
|
||||
|
||||
BBeemmeerrkkuunngg:: Im Moment ist die Nummer zum Parken noch nicht frei
|
||||
wählbar, es wird immer 1 benutzt!
|
||||
|
||||
44.. IInnssttaallllaattiioonn
|
||||
|
||||
Die Installation von _v_b_o_x_g_e_t_t_y unterteilt sich in 4 Schritte:
|
||||
|
||||
· Anpassung an das lokale System
|
||||
|
||||
· Erzeugen der Programme
|
||||
|
||||
· Installieren der Programme
|
||||
|
||||
· Konfiguration von _v_b_o_x_g_e_t_t_y
|
||||
|
||||
44..11.. AAnnppaassssuunngg aann ddaass llookkaallee SSyysstteemm
|
||||
|
||||
Bevor irgend eines der Programme von _v_b_o_x compiliert oder installiert
|
||||
werden kann, muß ``_c_o_n_f_i_g_u_r_e'' aus dem Hauptverzeichnis gestartet
|
||||
werden. Das Skript untersucht Ihr System, prüft ob alle benötigten
|
||||
Komponenten installiert sind und erzeugt einige Dateien die zur
|
||||
Weiterarbeit benötigt werden.
|
||||
|
||||
Das Skript muß nur eeiinnmmaall zu Beginn gestartet werden! Die dort
|
||||
gemachten Einstellungen gelten für aallllee Programme des _v_b_o_x-Pakets!
|
||||
|
||||
Über verschiedene Parameter können Sie Voreinstellungen dieses Skripts
|
||||
ändern. Eine genaue Auflistung aller möglichen Parameter erhalten Sie,
|
||||
wenn Sie in der Shell folgenden Befehl eingeben:
|
||||
|
||||
./configure --help
|
||||
|
||||
Hier eine Beschreibung der wichtigsten Parameter:
|
||||
|
||||
----ssbbiinnddiirr==DDIIRR
|
||||
DIR legt das Verzeichnis fest, in das _v_b_o_x_g_e_t_t_y (und alle
|
||||
weiteren Programme die nur vom Benutzer _r_o_o_t gestartet werden
|
||||
können) installiert werden soll. Voreinstellung ist
|
||||
``/usr/local/sbin''. Dieses Verzeichnis wird in der weiteren
|
||||
Dokumentation mit <<ssbbiinnddiirr>> beschrieben.
|
||||
|
||||
----bbiinnddiirr==DDIIRR
|
||||
DIR legt das Verzeichnis fest, in das _v_b_o_x (und alle weiteren
|
||||
Programme die von jedem Benutzer gestartet werden können)
|
||||
installiert werden soll. Voreinstellung ist ``/usr/local/bin''.
|
||||
Dieses Verzeichnis wird in der weiteren Dokumentation mit
|
||||
<<bbiinnddiirr>> beschrieben.
|
||||
|
||||
----ddaattaaddiirr==DDIIRR
|
||||
DIR gibt das Verzeichnis an, in das die Tcl-Skripte von
|
||||
_v_b_o_x_g_e_t_t_y installiert werden sollen. Dort wird automatisch das
|
||||
Unterverzeichnis ``vbox'' erzeugt. Voreinstellung ist
|
||||
``/usr/local/share''. Dieses Verzeichnis wird in der weiteren
|
||||
Dokumentation mit <<ppkkggddaattaaddiirr>> beschrieben.
|
||||
|
||||
----ssyyssccoonnffddiirr==DDIIRR
|
||||
DIR legt das Verzeichnis fest, in welches die
|
||||
Konfigurationsdateien installiert werden sollen. Voreinstellung
|
||||
ist ``/usr/local/etc''. Dieses Verzeichnis wird in der weiteren
|
||||
Dokumentation mit <<ssyyssccoonnffddiirr>> beschrieben.
|
||||
|
||||
----wwiitthh--llooggddiirr==DDIIRR
|
||||
DIR gibt das Verzeichnis an, in welches die Logdateien der
|
||||
Programme geschrieben werden sollen. Voreinstellung ist
|
||||
``/var/log''. Dieses Verzeichnis wird in der weiteren
|
||||
Dokumentation mit <<llooggddiirr>> beschrieben.
|
||||
|
||||
----wwiitthh--lloocckkddiirr==DDIIRR
|
||||
DIR gibt das Verzeichnis an, in welches die Lockdateien der
|
||||
Programme erzeugt werden sollen. Voreinstellung ist
|
||||
``/var/lock''. Dieses Verzeichnis wird in der weiteren
|
||||
Dokumentation mit <<lloocckkddiirr>> beschrieben.
|
||||
|
||||
----wwiitthh--ppiiddddiirr==DDIIRR
|
||||
DIR gibt das Verzeichnis an, in welches die Prozeßdateien der
|
||||
Programme erzeugt werden sollen. Voreinstellung ist
|
||||
``/var/run''. Dieses Verzeichnis wird in der weiteren
|
||||
Dokumentation mit <<ppiiddddiirr>> beschrieben.
|
||||
|
||||
44..22.. EErrzzeeuuggeenn ddeerr PPrrooggrraammmmee
|
||||
|
||||
Alle Programme des _v_b_o_x-Pakets können mit
|
||||
|
||||
make
|
||||
|
||||
aus dem Hauptverzeichnis erzeugt werden. Um nur einzelne Programme zu
|
||||
erzeugen muß ``_m_a_k_e'' im jeweiligen Verzeichnis aufgerufen werden.
|
||||
|
||||
Wenn Sie z.B. nur _v_b_o_x_g_e_t_t_y erzeugen möchten, wechseln Sie in das
|
||||
Verzeichnis von _v_b_o_x_g_e_t_t_y und startet dort ``_m_a_k_e''.
|
||||
|
||||
44..33.. IInnssttaalllliieerreenn ddeerr PPrrooggrraammmmee
|
||||
|
||||
Alle Programme des _v_b_o_x-Pakets können mit
|
||||
|
||||
make install
|
||||
|
||||
aus dem Hauptverzeichnis installiert werden. Um nur einzelne Programme
|
||||
zu installieren muß ``_m_a_k_e _i_n_s_t_a_l_l'' im jeweiligen Verzeichnis
|
||||
aufgerufen werden.
|
||||
|
||||
Wenn Sie z.B. nur _v_b_o_x_g_e_t_t_y installieren möchten, wechseln Sie in das
|
||||
Verzeichnis von _v_b_o_x_g_e_t_t_y und startet dort ``_m_a_k_e _i_n_s_t_a_l_l''.
|
||||
|
||||
Bevor die Programme installiert werden können, müssen sie mit ``_m_a_k_e''
|
||||
(siehe ``Erzeugen der Programme'') erzeugt werden. Ein ``_m_a_k_e
|
||||
_i_n_s_t_a_l_l'' erzeugt nniicchhtt aallllee Programme!
|
||||
|
||||
Wenn eine Datei die installiert werden soll bereits existiert, wird
|
||||
die alte Datei nniicchhtt überschrieben! Die neue Datei wird stattdessen
|
||||
mit der Endung ``.new'' installiert!
|
||||
|
||||
44..44.. KKoonnffiigguurraattiioonn vvoonn vvbbooxxggeettttyy
|
||||
|
||||
Bevor Sie _v_b_o_x_g_e_t_t_y zum erstenmal nutzen können, müssen erst einige
|
||||
Einstellungen gemacht werden.
|
||||
|
||||
Es werden drei Konfigurationsdateien benutzt:
|
||||
|
||||
vvbbooxxggeettttyy..ccoonnff
|
||||
Mit dieser Datei wird der getty selbst konfiguriert. Hier kann
|
||||
u.A. eingestellt werden welches Device benutzt werden soll und
|
||||
wie es initialisiert wird.
|
||||
|
||||
vvbbooxxggeettttyy..uusseerr
|
||||
Mit dieser Datei wird festgelegt, welche lokale Telefonnummer
|
||||
welchem Benutzer zugewiesen wird.
|
||||
|
||||
vvbbooxxrrcc
|
||||
Diese Datei enthält Einstellungen des jeweiligen Benutzers. Hier
|
||||
wird festgelegt welche Anrufe wann und wie entgegengenommen
|
||||
werden sollen.
|
||||
|
||||
Die jeweils möglichen Einstellungen können Sie unter ``Konfiguration''
|
||||
nachlesen.
|
||||
|
||||
Wie _v_b_o_x_g_e_t_t_y selbst gestartet werden kann, lesen Sie bitte unter
|
||||
``vboxgetty'' nach.
|
||||
|
||||
55.. KKoonnffiigguurraattiioonn
|
||||
|
||||
55..11.. vvbbooxxggeettttyy..ccoonnff
|
||||
|
||||
Die Datei ``_<_s_y_s_c_o_n_f_d_i_r_>_/_v_b_o_x_g_e_t_t_y_._c_o_n_f'' dient zur globalen
|
||||
Einstellung eines _v_b_o_x_g_e_t_t_y.
|
||||
|
||||
Die Einstellungen können wie folgt angegeben werden:
|
||||
|
||||
name = value
|
||||
|
||||
Wobei ``nnaammee'' für die zu setzende Variable und ``vvaalluuee'' für den zu
|
||||
setzenden Wert steht. Vor und nach dem ``='' kann mit Leerzeichen oder
|
||||
Tabulatoren getrennt werden. Kommentare am Ende einer Zeile sind nicht
|
||||
möglich!.
|
||||
|
||||
Leere Zeilen und solche die mit einem ``#'' beginnen werden überlesen.
|
||||
Eine Zeile darf nicht länger als 200 Zeichen werden!
|
||||
|
||||
Für ``nnaammee'' können folgende Schlüsselworte verwendet werden:
|
||||
|
||||
iinniitt
|
||||
Kommando mit dem das Modem initialisiert werden soll.
|
||||
Voreinstellung ist ATZ&B512.
|
||||
|
||||
iinniittnnuummbbeerr
|
||||
Kommando mit dem die Nummern eingestellt werden sollen auf die
|
||||
_v_b_o_x_g_e_t_t_y reagieren soll. Hierzu kann der neue AT-Befehl
|
||||
``AT&L'' verwendet werden. Bei diesem Befehl können mehrere
|
||||
Nummern durch ``;'' getrennt angegeben werden. Zudem sind
|
||||
einfache Musterangaben wie ``*'' und ``?'' möglich. Der in
|
||||
früheren Versionen benutzte Befehl ``AT&E'' kann ebenfalls
|
||||
wieder verwendet werden. Es existiert keine Voreinstellung!
|
||||
|
||||
bbaaddiinniittsseexxiitt
|
||||
Gibt an, nach wievielen fehlerhaften Modeminitalisierungen sich
|
||||
_v_b_o_x_g_e_t_t_y beenden soll. Voreinstellung ist 10 mal.
|
||||
|
||||
ccoommmmaannddttiimmeeoouutt
|
||||
Anzahl Sekunden die maximal auf die Antwort eines Modemkommandos
|
||||
gewartet werden soll. Voreinstellung ist 4 Sekunden.
|
||||
|
||||
eecchhoottiimmeeoouutt
|
||||
Anzahl Sekunden die maximal auf das Echo eines Modemkommandos
|
||||
gewartet werden soll. Voreinstellung ist 4 Sekunden.
|
||||
|
||||
rriinnggttiimmeeoouutt
|
||||
Anzahl der Sekunden die maximal auf einen RING gewartet werden
|
||||
soll. Voreinstellung ist 6 Sekunden.
|
||||
|
||||
aalliivveettiimmeeoouutt
|
||||
Anzahl der Sekunden nach denen überprüft werden soll ob das
|
||||
Modem noch antwortet. Die Überprüfung erfolgt nur, wenn
|
||||
innerhalb dieser Zeit keine Aktivität vom Modem festgestellt
|
||||
wurde. Voreinstellung ist 1800 Sekunden.
|
||||
|
||||
ttoogggglleeddttrrttiimmee
|
||||
Anzahl der Millisekunden die die DTR-Leitung auf Low gelegt
|
||||
werden soll um das Modem aufzulegen. Voreinstellung ist 400
|
||||
Millisekunden.
|
||||
|
||||
ssppoooollddiirr
|
||||
Angabe wo sich die Spoolverzeichnisse der Benutzer befinden.
|
||||
Voreinstellung ist /var/spool/vbox.
|
||||
|
||||
Die Datei ``_v_b_o_x_g_e_t_t_y_._c_o_n_f'' wird von jjeeddeemm _v_b_o_x_g_e_t_t_y eingelesen.
|
||||
|
||||
Nach abarbeitung dieser Datei wird versucht ``_v_b_o_x_g_e_t_t_y_._c_o_n_f_._<_t_t_y_>''
|
||||
zu laden (wobei _<_t_t_y_> für den Namen des von _v_b_o_x_g_e_t_t_y verwendeten
|
||||
tty's steht). Existiert diese Datei, können damit die Einstellungen
|
||||
aus ``_v_b_o_x_g_e_t_t_y_._c_o_n_f'' überschrieben werden!
|
||||
|
||||
Beispiel der Datei ``_v_b_o_x_g_e_t_t_y_._c_o_n_f'':
|
||||
|
||||
# Global vboxgetty configuration. Please take a look at the documentation
|
||||
# to learn how the configuration work!
|
||||
|
||||
init AT&B512
|
||||
spooldir /var/spool/vbox
|
||||
|
||||
Beispiel der Datei ``_v_b_o_x_g_e_t_t_y_._c_o_n_f_._t_t_y_I_0'':
|
||||
|
||||
# vboxgetty configuration for ttyI0. Please take a look at the
|
||||
# documentation to learn how the configuration work!
|
||||
|
||||
initnumber AT&L784711;784712;78471[34];78472?
|
||||
|
||||
55..22.. vvbbooxxggeettttyy..uusseerr
|
||||
|
||||
Ab Version 3 von _v_b_o_x kann ein _v_b_o_x_g_e_t_t_y mittels des Kommandos AT&L
|
||||
mehrere Nummern überwachen (siehe auch ``vboxgetty.conf'').
|
||||
|
||||
Über die Datei ``_<_s_y_s_c_o_n_f_d_i_r_>_/_v_b_o_x_g_e_t_t_y_._u_s_e_r'' wird festgelegt, welche
|
||||
Telefonnummer welchem lokalen Benutzer zugeordnet ist.
|
||||
|
||||
Bei einem eingehenden Anruf wird die angerufene Nummer in dieser Datei
|
||||
gesucht und der Anruf einem lokalen Benutzer zugeordnet. Danach werden
|
||||
die Rechte des _v_b_o_x_g_e_t_t_y auf diesen Benutzer gesetzt und alle weiteren
|
||||
Operationen werden unter diesen Rechten vorgenommen.
|
||||
|
||||
Jede Zuordnung beginnt in einer neuen Zeile und hat folgendes Format:
|
||||
|
||||
number:user:group:umask:space
|
||||
|
||||
Kommentare (mit dem Zeichen ``#'' am Zeilenanfang eingeleitet) und
|
||||
leere Zeilen werden überlesen. Eine einzelne Zeile darf nicht länger
|
||||
als 200 Zeichen werden!
|
||||
|
||||
nnuummbbeerr
|
||||
Hier wird die Telefonnummer definiert, die einem Benutzer
|
||||
zugeordnet werden soll. Es können einfache Muster angegeben
|
||||
werden (siehe _f_n_m_a_t_c_h_(_3_)). Eine Angabe von ``*'' gilt für aallllee
|
||||
Nummern. Das Feld mmuußß angegeben werden!
|
||||
|
||||
uusseerr
|
||||
Lokaler Benutzer dem die Nummer zugeordnet werden soll. Der
|
||||
Benutzer kann namentlich oder als UID (eingeleitet mit einem
|
||||
``#'') angegeben werden. Das Feld mmuußß angegeben werden!
|
||||
|
||||
ggrroouupp
|
||||
Gruppe die für den Benutzer gesetzt werden soll. Die Gruppe kann
|
||||
namentlich oder als GID (eingeleitet mit einem ``#'') angegeben
|
||||
werden. Bei einem leeren Feld wird keine Gruppe gesetzt. Das
|
||||
Feld ist optional und muß nicht angegeben werden.
|
||||
uummaasskk
|
||||
Die Maske die zum anlegen von neuen Dateien oder Verzeichnissen
|
||||
benutzt werden soll. Bei einem leeren Feld wird die Maske
|
||||
(umask) nicht gesetzt. Das Feld ist optional und muß nicht
|
||||
angegeben werden.
|
||||
|
||||
ssppaaccee
|
||||
Freier Platz in Bytes, der auf der Partition auf der sich das
|
||||
_<_s_p_o_o_l_d_i_r_> (siehe ``vboxgetty.conf'') des Benutzers befindet
|
||||
frei sein muß, damit der Anruf angenommen wird. Bei einem leeren
|
||||
Feld oder ``0'' wird keine Überprüfung des freien Platzes
|
||||
gemacht. Das Feld ist optional und muß nicht angegeben werden.
|
||||
|
||||
Ein eingehender Anruf wird nniicchhtt angenommen, wenn die Datei nicht
|
||||
existiert oder der angerufenen Nummer kein Benutzer zugeordnet werden
|
||||
konnte!
|
||||
|
||||
Beispiel der Datei ``_v_b_o_x_g_e_t_t_y_._u_s_e_r'':
|
||||
|
||||
# Number to user mapping. Please read the documentation to learn how this
|
||||
# configuration file work!
|
||||
#
|
||||
# The fields "number" and "user" *must* be set - all others are optional!
|
||||
#
|
||||
# Format: number:user:group:umask:freespace
|
||||
|
||||
784711:peter::0077:2000000
|
||||
784712:willy:firma:0007:2000000
|
||||
78471?:firma:firma:0007:4000000
|
||||
*:#100:#500:0077:
|
||||
|
||||
55..33.. vvbbooxxrrcc
|
||||
|
||||
Die Datei ``_v_b_o_x_r_c'' muß für jeden Benutzer existieren (ansonsten wird
|
||||
der Anruf nicht angenommen) und befindet sich im Spoolverzeichnis des
|
||||
Benutzers (_<_s_p_o_o_l_d_i_r_>_/_<_u_s_e_r_n_a_m_e_>).
|
||||
|
||||
Die Datei setzt sich aus mehreren Sektionen zusammen. Eine Sektion
|
||||
beginnt mit dem Zeichen ``['' gefolgt vom Sekionsnamen und wird mit
|
||||
dem Zeichen ``]'' abgeschlossen. Die Sektion zählt bis zum nächsten
|
||||
Sektionsbeginn oder dem Ende der Datei.
|
||||
|
||||
Leere Zeilen oder solche die mit einem ``#'' beginnen werden
|
||||
überlesen. Eine Zeile darf nicht länger als 200 Zeichen werden!
|
||||
|
||||
Mit dem Kommando ``_m_k_v_b_o_x_u_s_e_r_s_p_o_o_l'' (siehe ``mkvboxuserspool'')
|
||||
können Spoolverzeichnisse für einzelne Benutzer angelegt werden. Der
|
||||
Befehl erzeugt zudem ein Beispiel der Datei ``_v_b_o_x_r_x''. Die Datei wird
|
||||
dabei so angelegt, das jeder Anruf nach 5x Klingeln beantwortet wird.
|
||||
|
||||
Hier ein Beispiel der Datei ``_v_b_o_x_r_c'':
|
||||
|
||||
[CALLERID]
|
||||
|
||||
931784711 - Michael 'Ghandi' Herold
|
||||
93178471? - Nicole Sauvage
|
||||
* * *** Unknown ***
|
||||
|
||||
[Michael 'Ghandi' Herold]
|
||||
* * answercall.tcl 240 4 0
|
||||
|
||||
[Nicole Sauvage]
|
||||
* * answercall.tcl 120 4 0
|
||||
|
||||
[DEFAULT]
|
||||
|
||||
00:00-09:59 * answercall.tcl 120 1 0
|
||||
* * answercall.tcl 90 6 4
|
||||
|
||||
Bevor die Datei ``_v_b_o_x_r_c'' geladen wird, wird nach der Datei
|
||||
``_v_b_o_x_r_c_._<_l_o_c_a_l_p_h_o_n_e_>'' gesucht (_<_l_o_c_a_l_p_h_o_n_e_> entspricht dabei der
|
||||
lokalen Telefonnummer die angerufen wurde).
|
||||
|
||||
Existiert diese Datei, wie sie anstelle von ``_v_b_o_x_r_c'' benutzt!
|
||||
|
||||
Im weiteren werden hier die einzelnen möglichen Sektionen beschrieben.
|
||||
|
||||
55..33..11.. CCAALLLLEERRIIDD
|
||||
|
||||
In der Sektion ``[CALLERID]'' wird festgelegt, welche Nummer welcher
|
||||
Person zugeordnet wird und welche Einstellungen benutzt werden sollen
|
||||
wenn ein Anruf von dieser Person eingeht.
|
||||
|
||||
Einträge in dieser Sektion beginnen jeweils in einer neuen Zeile und
|
||||
werden wie folgt angegeben:
|
||||
|
||||
number section name
|
||||
|
||||
Die einzelnen Angaben müssen mit Leerzeichen oder Tabulator
|
||||
voneinander getrennt werden. Die Felder ``_n_u_m_b_e_r'' und ``_s_e_c_t_i_o_n''
|
||||
dürfen selbst keine Leerzeichen oder Tabulatoren enthalten!
|
||||
|
||||
nnuummbbeerr
|
||||
Nummer der jeweiligen Person. Es können einfache Muster
|
||||
angegeben werden (siehe _f_n_m_a_t_c_h_(_3_)). Die Nummer muß jeweils so
|
||||
angegeben werden wie sie von _i_s_d_n_4_l_i_n_u_x übermittelt wird.
|
||||
|
||||
sseeccttiioonn
|
||||
Name der Benutzersektion die bei einem Anruf dieser Person
|
||||
verwendet werden soll. Wird hier ein ``*'' angegeben, wird die
|
||||
Sektion ``[DEFAULT]'' benutzt; bei einem ``-'' wird ``_n_a_m_e'' als
|
||||
Name der Benutzersektion verwendet. Alle anderen Angaben werden
|
||||
als Name der Benutzersektion gewertet.
|
||||
|
||||
nnaammee
|
||||
Name der jeweiligen Person. Dieser Name wird z.B. in die von
|
||||
_v_b_o_x_g_e_t_t_y erzeugten ``.vbox'' Dateien geschrieben.
|
||||
|
||||
55..33..22.. BBeennuuttzzeerrsseekkttiioonneenn
|
||||
|
||||
Benutzersektionen werden auf die gleiche Art definiert wie die fest
|
||||
von _v_b_o_x_g_e_t_t_y benutzen Sektionen. Sie beginnen mit einem ``['' gefolgt
|
||||
von einem frei wählbaren Namen und werden mit einem ``]''
|
||||
abgeschlossen.
|
||||
|
||||
Einträge in dieser Sektion beginnen jeweils in einer neuen Zeile und
|
||||
werden wie folgt angegeben:
|
||||
|
||||
time day scriptname savetime ringring tollring
|
||||
|
||||
Die einzelnen Angaben müssen mit Leerzeichen oder Tabulator
|
||||
voneinander getrennt werden.
|
||||
|
||||
ttiimmee
|
||||
Zeiten zu denen diese Einstellungen benutzt werden sollen. Das
|
||||
genaue Format einer Zeitangabe kann unter ``Zeitangaben''
|
||||
nachgelesen werden.
|
||||
|
||||
ddaayy
|
||||
Tage an denen diese Einstellungen benutzt werden sollen. Das
|
||||
genaue Format einer Tagesangabe kann unter ``Tagesangaben''
|
||||
nachgelesen werden.
|
||||
|
||||
ssccrriippttnnaammee
|
||||
Name des _T_c_l-Skriptes das zum beantworten dieses Anrufes benutzt
|
||||
werden soll. Pfadangaben im Skriptnamen werden automatisch
|
||||
entfernt. Das Skript wird zuerst im Verzeichnis
|
||||
``_<_s_p_o_o_l_d_i_r_>_/_<_u_s_e_r_n_a_m_e_>_/_t_s_c_r_i_p_t_s'' und danach in
|
||||
``_<_p_k_g_d_a_t_a_d_i_r_>'' gesucht (siehe auch ``answercall.tcl'').
|
||||
|
||||
ssaavveettiimmee
|
||||
Maximale Aufzeichnungszeit in Sekunden. Die Angabe wird dem
|
||||
Skript ``_s_c_r_i_p_t_n_a_m_e'' als Variable übergeben und kann dort
|
||||
benutzt werden.
|
||||
|
||||
rriinnggrriinngg
|
||||
Anzahl der Klingelzeichen nach denen der Anruf beantwortet
|
||||
werden soll. Wird hier 0 angegeben, wird der Anruf ignoriert.
|
||||
|
||||
ttoollllrriinngg
|
||||
Anzahl der Klingelzeichen nach denen der Anruf beantwortet
|
||||
werden soll, wenn im Spoolverzeichnis des jeweiligen Benutzers
|
||||
noch neue Nachrichten liegen. Wenn hier 0 angegeben wird, wird
|
||||
nicht geprüft ob neue Nachrichten vorhanden sind; es gelten dann
|
||||
die Angaben von ``_r_i_n_g_r_i_n_g''.
|
||||
|
||||
55..44.. ZZeeiittaannggaabbeenn
|
||||
|
||||
Einzelne Zeitangaben werden durch Kommata getrennt, Angaben von Start-
|
||||
und Endzeit durch ein Minuszeichen. Die Stundenangaben müssen im
|
||||
24-Stunden-Format - also von 0 Uhr bis 23 Uhr - gemacht werden.
|
||||
|
||||
Die Zeitangaben werden intern immer in Start- und Endzeit umgerechnet,
|
||||
auch dann, wenn nur eine Startzeit angegeben ist.
|
||||
|
||||
Nehmen wir zum Beispiel folgende Zeitangaben:
|
||||
|
||||
20:15-21:14
|
||||
|
||||
Diese Zeit wird intern in 20:15:00-21:14:59 umgerechnet, d.h. Start-
|
||||
und Endzeit sind iinnkklluussiivvee!
|
||||
|
||||
Wenn bei einer Zeitangabe keine Minuten angebenen sind, wird bei der
|
||||
Startzeit 0 Minuten und bei der Endzeit 59 Minuten benutzt. Intern
|
||||
werden die Sekunden - die nicht einstellbar sind - nach dem gleichen
|
||||
Schema behandelt.
|
||||
|
||||
BBeeiissppiieell::
|
||||
|
||||
· 20 - Umrechnung nach 20:00:00-20:59:59
|
||||
|
||||
· 20:15-21:14 - Umrechnung nach 20:15:00-21:14:59
|
||||
|
||||
· 08-11 - Umrechnung nach 08:00:00-11:59:59
|
||||
|
||||
· 12-15:30 - Umrechnung nach 12:00:00-15:30:59
|
||||
|
||||
Eine Zeitzone zählt als zutreffend (match) wenn die aktuelle Zeit
|
||||
größer/gleich der Startzeit uunndd kleiner/gleich der Endzeit ist.
|
||||
|
||||
Ein ``*'' als eeiinnzziiggee Zeitangabe wird als iimmmmeerr behandelt, ein ``-''
|
||||
als eeiinnzziiggee Zeitangabe als nniiee.
|
||||
|
||||
55..55.. TTaaggeessaannggaabbeenn
|
||||
|
||||
Einzelne Tagesangaben werden durch Kommanta getrennt. Eine Angabe von
|
||||
Start- und Ende ist hier nicht möglich.
|
||||
|
||||
Folgende Tageskürzel können angegeben werden:
|
||||
|
||||
· MO, MON - für Montag
|
||||
|
||||
· DI, TUE - für Dienstag
|
||||
|
||||
· MI, WED - für Mittwoch
|
||||
|
||||
· DO, THU - für Donnerstag
|
||||
|
||||
· FR, FRI - für Freitag
|
||||
|
||||
· SA, SAT - für Samstag
|
||||
|
||||
· SO, SUN - für Sonntag
|
||||
|
||||
Eine Angabe von ``*'' als eeiinnzziiggee Tagesangabe heißt iimmmmeerr, ein ``-''
|
||||
als eeiinnzziiggee Tagesangabe nniiee.
|
||||
|
||||
66.. TTccll
|
||||
|
||||
66..11.. SSkkrriippttee
|
||||
|
||||
Seit Version 2 unterstützt _v_b_o_x_g_e_t_t_y die Verwendung von _T_c_l-Skripten,
|
||||
die während der Laufzeit ausgeführt werden können.
|
||||
|
||||
Die Standard-Skripte von _v_b_o_x_g_e_t_t_y befinden sich im Verzeichnis
|
||||
``_<_p_k_g_d_a_t_a_d_i_r_>''.
|
||||
|
||||
66..11..11.. iinniittmmooddeemm..ttccll
|
||||
|
||||
Das Skript ``_i_n_i_t_m_o_d_e_m_._t_c_l'' wird jedesmal gestartet, wenn das Modem
|
||||
initialisiert werden soll.
|
||||
|
||||
Liefert die Ausführung des Skripts einen Fehler zurück, gilt die
|
||||
Initialisierung als Fehlgeschlagen.
|
||||
|
||||
Das Skript wird nur in ``_<_p_k_g_d_a_t_a_d_i_r_>'' gesucht.
|
||||
|
||||
Folgende Variablen werden von _v_b_o_x_g_e_t_t_y definiert und können verwendet
|
||||
werden:
|
||||
|
||||
vvbbxxvv__iinniitt
|
||||
Das in ``_v_b_o_x_g_e_t_t_y_._c_o_n_f'' eingestellte Initkommando ``_i_n_i_t''.
|
||||
|
||||
vvbbxxvv__iinniittnnuummbbeerr
|
||||
Das in ``_v_b_o_x_g_e_t_t_y_._c_o_n_f'' eingestellte Initkommando
|
||||
``_i_n_i_t_n_u_m_b_e_r''.
|
||||
|
||||
AAcchhttuunngg:: Das Skript wird unter rroooott-Rechten ausgeführt und sollte
|
||||
daher nicht von normalen Benutzern änderbar sein!
|
||||
|
||||
66..11..22.. aannsswweerrccaallll..ttccll
|
||||
|
||||
Das Skript ``_a_n_s_w_e_r_c_a_l_l_._t_c_l'' (der Name kann sich je nach ``_v_b_o_x_r_c''
|
||||
ändern) wird aufgerufen, nachdem der eingegangene Anruf beantwortet
|
||||
wurde.
|
||||
|
||||
Das Skript wird zuerst im Verzeichnis
|
||||
``_<_s_p_o_o_l_d_i_r_>_/_<_u_s_e_r_n_a_m_e_>_/_t_s_c_r_i_p_t_s'' und danach in ``_<_p_k_g_d_a_t_a_d_i_r_>''
|
||||
gesucht.
|
||||
|
||||
In diesem Skript werden die Ansagetexte abgespielt, Nachrichten
|
||||
aufgezeichnet und die Touchtones ausgewertet.
|
||||
|
||||
Folgende Variablen werden von _v_b_o_x_g_e_t_t_y definiert und können verwendet
|
||||
werden:
|
||||
|
||||
vvbbxxvv__ssaavveettiimmee
|
||||
Anzahl Sekunden die maximal aufgezeichnet werden soll (aus
|
||||
``_v_b_o_x_r_c'').
|
||||
|
||||
vvbbxxvv__ccaalllleerriidd
|
||||
Die CallerID des aktuellen Anrufers. Wenn die Variable 0
|
||||
enthält, verfügt der Anrufer nicht über eine CallerID.
|
||||
|
||||
vvbbxxvv__ccaalllleerrnnaammee
|
||||
Der Name des aktuellen Anrufers (aus ``_v_b_o_x_r_c'').
|
||||
|
||||
vvbbxxvv__llooccaallpphhoonnee
|
||||
Die lokale Telefonnummer die angerufen wurde.
|
||||
|
||||
vvbbxxvv__uusseerrnnaammee
|
||||
Der Name des aktuellen Benutzers (aus ``_/_e_t_c_/_p_a_s_s_w_d'').
|
||||
|
||||
vvbbxxvv__uusseerrhhoommee
|
||||
Das Spoolverzeichnis des aktuellen Benutzers.
|
||||
|
||||
vvbbxxvv__uusseeddssccrriipptt
|
||||
Der Name unter dem dieses Skript aufgerufen wurde.
|
||||
|
||||
vvbbxxvv__ssaavveeuullaaww
|
||||
Der Name der Datei unter dem die aufgezeichnete Nachricht
|
||||
gespeichert wird.
|
||||
|
||||
vvbbxxvv__ssaavveevvbbooxx
|
||||
Der Name der Datei unter dem Informationen zur aufgezeichneten
|
||||
Nachricht gespeichert werden.
|
||||
|
||||
Das Skript wird unter den Rechten des jeweiligen Benutzers ausgeführt.
|
||||
|
||||
66..22.. NNeeuuee KKoommmmaannddooss
|
||||
|
||||
77.. vvbbooxxggeettttyy
|
||||
|
||||
88.. mmkkvvbbooxxuusseerrssppooooll
|
||||
|
||||
99.. TTOODDOO
|
||||
|
||||
Hinweis zu: - SAFT (http://www.belwue.de/BelWue/software/saft/) - Sox
|
||||
- Rplay - NAS - isdn4linux - i4l FAQ's
|
||||
|
||||
xxx
|
||||
|
||||
Have Fun ;-)
|
||||
|
|
|
@ -1,18 +1,23 @@
|
|||
##
|
||||
## $Id: Makefile.am,v 1.5 1998/09/18 15:01:31 michael Exp $
|
||||
## $Id: Makefile.am,v 1.6 1998/11/10 18:36:59 michael Exp $
|
||||
##
|
||||
|
||||
## Other directories #####################################################
|
||||
|
||||
SUBDIRS = scripts
|
||||
SUBDIRS = scripts
|
||||
|
||||
## Configuration to install ##############################################
|
||||
|
||||
sysconf_DATA = vboxgetty.conf
|
||||
|
||||
EXTRA_DIST = $(sysconf_DATA)
|
||||
EXTRA_DIST = vboxgetty.conf vboxcallerid.conf
|
||||
|
||||
## Clean & Maintenance ###################################################
|
||||
|
||||
CLEANFILES = *~
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
CLEANFILES = *~
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
## Local install routines ################################################
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(sysconfdir)
|
||||
$(INSTALL) -m 664 vboxgetty.conf $(sysconfdir)
|
||||
$(INSTALL) -m 664 callerid.conf $(sysconfdir)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: answercall.tcl,v 1.2 1998/08/31 15:30:54 michael Exp $
|
||||
# $Id: answercall.tcl,v 1.3 1998/11/10 18:37:05 michael Exp $
|
||||
|
||||
#----------------------------------------------------------------------#
|
||||
# This script is called after the call is answered. Here you can do #
|
||||
|
@ -24,8 +24,6 @@
|
|||
# users spool directory and add the touchtone functions! #
|
||||
|
||||
vbox_breaklist c
|
||||
vbox_breaklist a "5"
|
||||
vbox_breaklist a "*123#"
|
||||
|
||||
# Start voice recording and stop audio playback. If you want a #
|
||||
# permanent audio playback, you can start it here. If not, use #
|
||||
|
@ -45,8 +43,6 @@ if {("$result" != "HANGUP") && ("$result" != "SUSPEND")} {
|
|||
# Now the message will be recorded. The script will stop if the #
|
||||
# remote caller hangup or if the call should be suspended. #
|
||||
|
||||
vbox_breaklist r "5"
|
||||
|
||||
set result [vbox_voice w $vbxv_savetime]
|
||||
}
|
||||
|
||||
|
@ -69,7 +65,7 @@ vbox_voice a stop
|
|||
|
||||
#if {([file isfile "$vbxv_saveulaw"]) && ([file isfile "$vbxv_savevbox"])} {
|
||||
#
|
||||
# vbox_log D "Mailing recorded message to \"$vbxv_username\"..."
|
||||
# vbox_log A "Mailing recorded message to \"$vbxv_username\"..."
|
||||
#
|
||||
# exec mutt -s "New vbox message ($vbxv_callername)" -a "$vbxv_saveulaw" $vbxv_username <$vbxv_savevbox
|
||||
#}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: vboxgetty.conf,v 1.3 1998/09/18 15:01:32 michael Exp $
|
||||
# $Id: vboxgetty.conf,v 1.4 1998/11/10 18:37:00 michael Exp $
|
||||
#
|
||||
# Global vboxgetty configuration. Please take a look at the documentation
|
||||
# to learn how the configuration work!
|
||||
|
@ -12,14 +12,14 @@ initnumber = AT&E7840514
|
|||
|
||||
initnumber = AT&E7840513
|
||||
|
||||
[VBOXGETTY-7840513]
|
||||
[VBOXGETTY-PHONE-7840513]
|
||||
|
||||
user = michael
|
||||
group = users
|
||||
umask = 0077
|
||||
hdspace = 5000000
|
||||
|
||||
[VBOXGETTY-7840514]
|
||||
[VBOXGETTY-PHONE-7840514]
|
||||
|
||||
user = nicole
|
||||
group = users
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lock.c,v 1.3 1998/09/18 15:08:59 michael Exp $
|
||||
** $Id: lock.c,v 1.4 1998/11/10 18:36:27 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "lock.h"
|
||||
#include "log.h"
|
||||
#include "stringutils.h"
|
||||
|
||||
/*************************************************************************/
|
||||
/** lock_create(): Erzeugt einen Lock. **/
|
||||
|
@ -84,7 +85,7 @@ int lock_create(unsigned char *name)
|
|||
{
|
||||
if ((lptr = fopen(name, "w")))
|
||||
{
|
||||
fprintf(lptr, "%010ld\n", getpid());
|
||||
fprintf(lptr, "%010d\n", getpid());
|
||||
fclose(lptr);
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: modem.c,v 1.6 1998/09/18 15:09:00 michael Exp $
|
||||
** $Id: modem.c,v 1.7 1998/11/10 18:36:28 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -73,7 +73,11 @@ void modem_set_timeout(int timeout)
|
|||
timeoutstatus = 0;
|
||||
|
||||
signal(SIGALRM, modem_timeout_function);
|
||||
|
||||
#ifdef HAVE_SIGINTERRUPT
|
||||
siginterrupt(SIGALRM, 1);
|
||||
#endif
|
||||
|
||||
alarm(timeout);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: stringutils.c,v 1.5 1998/09/18 15:09:03 michael Exp $
|
||||
** $Id: stringutils.c,v 1.6 1998/11/10 18:36:32 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -8,6 +8,7 @@
|
|||
# include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
@ -40,14 +41,30 @@ void xstrncpy(unsigned char *dest, unsigned char *source, int max)
|
|||
dest[max] = '\0';
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
void xstrncat(unsigned char *dest, unsigned char *source, int max)
|
||||
{
|
||||
if ((max - strlen(dest)) > 0) strncat(dest, source, max - strlen(dest));
|
||||
|
||||
dest[max] = '\0';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/** xstrtol(): **/
|
||||
/*************************************************************************/
|
||||
|
||||
long xstrtol(unsigned char *string, long number)
|
||||
{
|
||||
long back;
|
||||
unsigned char *stop;
|
||||
long back;
|
||||
char *stop;
|
||||
|
||||
if (string)
|
||||
{
|
||||
|
@ -65,8 +82,8 @@ long xstrtol(unsigned char *string, long number)
|
|||
|
||||
long xstrtoo(unsigned char *string, long number)
|
||||
{
|
||||
long back;
|
||||
unsigned char *stop;
|
||||
long back;
|
||||
char *stop;
|
||||
|
||||
if (string)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: stringutils.h,v 1.4 1998/09/18 15:09:04 michael Exp $
|
||||
** $Id: stringutils.h,v 1.5 1998/11/10 18:36:33 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@
|
|||
|
||||
extern unsigned char *xstrtoupper(unsigned char *);
|
||||
extern void xstrncpy(unsigned char *, unsigned char *, int);
|
||||
extern void xstrncat(unsigned char *, unsigned char *, int);
|
||||
extern long xstrtol(unsigned char *, long);
|
||||
extern long xstrtoo(unsigned char *, long);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: tclscript.c,v 1.10 1998/09/18 15:09:04 michael Exp $
|
||||
** $Id: tclscript.c,v 1.11 1998/11/10 18:36:33 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -18,13 +18,13 @@
|
|||
#include "tclscript.h"
|
||||
#include "stringutils.h"
|
||||
#include "breaklist.h"
|
||||
#include "voice.h"
|
||||
|
||||
/** Variables ************************************************************/
|
||||
|
||||
static Tcl_Interp *interpreter = NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
/** Tcl Prototypes *******************************************************/
|
||||
|
||||
int vbox_block(VBOX_TCLFUNC_PROTO);
|
||||
int vbox_log(VBOX_TCLFUNC_PROTO);
|
||||
|
@ -32,17 +32,19 @@ int vbox_modem_command(VBOX_TCLFUNC_PROTO);
|
|||
int vbox_voice(VBOX_TCLFUNC_PROTO);
|
||||
int vbox_breaklist(VBOX_TCLFUNC_PROTO);
|
||||
|
||||
/** Structures ***********************************************************/
|
||||
|
||||
static struct vbox_tcl_function vbox_tcl_functions[] =
|
||||
{
|
||||
{ "exit", vbox_block },
|
||||
{ "vbox_log", vbox_log },
|
||||
{ "vbox_modem_command", vbox_modem_command },
|
||||
{ "vbox_voice" , vbox_voice },
|
||||
{ "vbox_breaklist", vbox_breaklist },
|
||||
{ NULL, NULL }
|
||||
{ "exit" , vbox_block },
|
||||
{ "vbox_log" , vbox_log },
|
||||
{ "vbox_modem_command" , vbox_modem_command },
|
||||
{ "vbox_voice" , vbox_voice },
|
||||
{ "vbox_breaklist" , vbox_breaklist },
|
||||
{ NULL , NULL }
|
||||
};
|
||||
|
||||
/** Prototypes ***********************************************************/
|
||||
|
||||
static int scr_init_functions(void);
|
||||
|
||||
|
@ -50,9 +52,6 @@ static int scr_init_functions(void);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int scr_create_interpreter(void)
|
||||
{
|
||||
log_line(LOG_D, "Initializing tcl interpreter...\n");
|
||||
|
@ -287,6 +286,8 @@ int vbox_voice(VBOX_TCLFUNC)
|
|||
int rc;
|
||||
int i;
|
||||
|
||||
rc = 0;
|
||||
|
||||
if (objc >= 3)
|
||||
{
|
||||
cmd = Tcl_GetStringFromObj(objv[1], NULL);
|
||||
|
@ -309,7 +310,7 @@ int vbox_voice(VBOX_TCLFUNC)
|
|||
break;
|
||||
|
||||
case 1:
|
||||
Tcl_SetResult(intp, "TOUCHTONE", NULL);
|
||||
Tcl_SetResult(intp, voice_touchtone_sequence, NULL);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
@ -348,7 +349,7 @@ int vbox_voice(VBOX_TCLFUNC)
|
|||
break;
|
||||
|
||||
case 1:
|
||||
Tcl_SetResult(intp, "TOUCHTONE", NULL);
|
||||
Tcl_SetResult(intp, voice_touchtone_sequence, NULL);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
@ -437,7 +438,6 @@ int vbox_breaklist(VBOX_TCLFUNC)
|
|||
unsigned char *cmd;
|
||||
unsigned char *arg;
|
||||
int rc;
|
||||
int i;
|
||||
char *rs;
|
||||
|
||||
if (objc == 2)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: vboxgetty.c,v 1.9 1998/09/18 15:09:06 michael Exp $
|
||||
** $Id: vboxgetty.c,v 1.10 1998/11/10 18:36:35 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -457,185 +457,7 @@ static int run_modem_init(void)
|
|||
return(-1);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
** vboxgettyrc_parse(): Liest die Konfiguration des gettys ein. Zu- **
|
||||
** erst wird die globale und dann die des je- **
|
||||
** weiligen tty's eingelesen. **
|
||||
*************************************************************************
|
||||
** => tty Name des benutzten tty's. **
|
||||
** **
|
||||
** <= 0 wenn alles eingelesen werden konnte oder **
|
||||
** -1 bei einem Fehler. **
|
||||
*************************************************************************/
|
||||
|
||||
static int vboxgettyrc_parse(unsigned char *tty)
|
||||
{
|
||||
unsigned char tempsectname[VBOX_MAX_RCLINE_SIZE + 1];
|
||||
|
||||
printstring(temppathname, "%s/vboxgetty.conf", SYSCONFDIR);
|
||||
|
||||
printstring(tempsectname, "vboxgetty-tty");
|
||||
|
||||
if (rc_read(rc_getty_c, temppathname, tempsectname) == -1) return(-1);
|
||||
|
||||
printstring(tempsectname, "vboxgetty-%s", tty);
|
||||
|
||||
if (rc_read(rc_getty_c, temppathname, tempsectname) == -1) return(-1);
|
||||
|
||||
log_line(LOG_D, "Filling unset configuration variables with defaults...\n");
|
||||
|
||||
if (!rc_set_empty(rc_getty_c, "init" , "ATZ&B512" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "badinitsexit" , "10" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "initpause" , "2500" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "commandtimeout" , "4" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "echotimeout" , "4" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "ringtimeout" , "6" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "alivetimeout" , "1800" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "toggledtrtime" , "400" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "spooldir" , "/var/spool/vbox")) return(-1);
|
||||
|
||||
modemsetup.echotimeout = xstrtol(rc_get_entry(rc_getty_c, "echotimeout" ), 4 );
|
||||
modemsetup.commandtimeout = xstrtol(rc_get_entry(rc_getty_c, "commandtimeout"), 4 );
|
||||
modemsetup.ringtimeout = xstrtol(rc_get_entry(rc_getty_c, "ringtimeout" ), 6 );
|
||||
modemsetup.alivetimeout = xstrtol(rc_get_entry(rc_getty_c, "alivetimeout" ), 1800 );
|
||||
modemsetup.toggle_dtr_time = xstrtol(rc_get_entry(rc_getty_c, "toggledtrtime" ), 400 );
|
||||
|
||||
if (!rc_get_entry(rc_getty_c, "initnumber"))
|
||||
{
|
||||
log_line(LOG_E, "Variable \"initnumber\" *must* be set!\n");
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
static int userrc_parse(struct vboxuser *vboxuser, unsigned char *home)
|
||||
{
|
||||
unsigned char tempsectname[VBOX_MAX_RCLINE_SIZE + 1];
|
||||
struct passwd *pwdent;
|
||||
struct group *grpent;
|
||||
unsigned char *varusr;
|
||||
unsigned char *vargrp;
|
||||
unsigned char *varspc;
|
||||
unsigned char *varmsk;
|
||||
int havegroup;
|
||||
|
||||
static struct vboxrc rc_user_c[] =
|
||||
{
|
||||
{ "user" , NULL },
|
||||
{ "group" , NULL },
|
||||
{ "umask" , NULL },
|
||||
{ "hdspace" , NULL },
|
||||
{ NULL , NULL }
|
||||
};
|
||||
|
||||
printstring(temppathname, "%s/vboxgetty.conf", SYSCONFDIR );
|
||||
printstring(tempsectname, "vboxgetty-%s" , vboxuser->localphone);
|
||||
|
||||
if (rc_read(rc_user_c, temppathname, tempsectname) < 0) return(-1);
|
||||
|
||||
varusr = rc_get_entry(rc_user_c, "user" );
|
||||
vargrp = rc_get_entry(rc_user_c, "group" );
|
||||
varspc = rc_get_entry(rc_user_c, "hdspace");
|
||||
varmsk = rc_get_entry(rc_user_c, "umask" );
|
||||
|
||||
if ((!varusr) || (!*varusr))
|
||||
{
|
||||
log_line(LOG_E, "You *must* specify a user name or a user id!\n");
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (*varusr == '#')
|
||||
pwdent = getpwuid((uid_t)xstrtol(&varusr[1], 0));
|
||||
else
|
||||
pwdent = getpwnam(varusr);
|
||||
|
||||
if (!pwdent)
|
||||
{
|
||||
log_line(LOG_E, "Unable to locate \"%s\" in systems passwd list.\n", varusr);
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
vboxuser->uid = pwdent->pw_uid;
|
||||
vboxuser->gid = pwdent->pw_gid;
|
||||
|
||||
if ((strlen(home) + strlen(pwdent->pw_name) + 2) < (PATH_MAX - 100))
|
||||
{
|
||||
xstrncpy(vboxuser->name, pwdent->pw_name, VBOXUSER_USERNAME);
|
||||
|
||||
printstring(vboxuser->home, "%s/%s", home, pwdent->pw_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_line(LOG_E, "Oops! Spool directory name and user name too long!\n");
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if ((vargrp) && (*vargrp))
|
||||
{
|
||||
havegroup = 0;
|
||||
|
||||
setgrent();
|
||||
|
||||
while ((grpent = getgrent()))
|
||||
{
|
||||
if (*vargrp == '#')
|
||||
{
|
||||
if (grpent->gr_gid == (gid_t)xstrtol(&vargrp[1], 0))
|
||||
{
|
||||
vboxuser->gid = grpent->gr_gid;
|
||||
havegroup = 1;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp(grpent->gr_name, vargrp) == 0)
|
||||
{
|
||||
vboxuser->gid = grpent->gr_gid;
|
||||
havegroup = 1;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
endgrent();
|
||||
|
||||
if (!havegroup)
|
||||
{
|
||||
log_line(LOG_E, "Unable to locate \"%s\" in systems group list.\n", vargrp);
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
if (varspc) vboxuser->space = xstrtol(varspc, 0);
|
||||
if (varmsk) vboxuser->umask = xstrtoo(varmsk, 0);
|
||||
|
||||
log_line(LOG_D, "User \"%s\" (%d.%d) will be used...\n", vboxuser->name, vboxuser->uid, vboxuser->gid);
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -891,3 +713,222 @@ static void pid_remove(unsigned char *name)
|
|||
|
||||
remove(name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
** vboxgettyrc_parse(): Reads the gettys ttyI setup. **
|
||||
*************************************************************************
|
||||
** => tty Name of the used ttyI. **
|
||||
** **
|
||||
** On success, 0 is returned. On error, -1 is returned. **
|
||||
*************************************************************************/
|
||||
|
||||
static int vboxgettyrc_parse(unsigned char *tty)
|
||||
{
|
||||
unsigned char tempsectname[VBOX_MAX_RCLINE_SIZE + 1];
|
||||
|
||||
xstrncpy(temppathname, SYSCONFDIR , PATH_MAX);
|
||||
xstrncat(temppathname, "/vboxgetty.conf", PATH_MAX);
|
||||
|
||||
/* First time, the global ttyI settings will be */
|
||||
/* parsed. */
|
||||
|
||||
xstrncpy(tempsectname, "vboxgetty-tty", VBOX_MAX_RCLINE_SIZE);
|
||||
|
||||
if (rc_read(rc_getty_c, temppathname, tempsectname) == -1) return(-1);
|
||||
|
||||
/* Second, the settings for the used ttyI will be */
|
||||
/* parsed. */
|
||||
|
||||
xstrncpy(tempsectname, "vboxgetty-", VBOX_MAX_RCLINE_SIZE);
|
||||
xstrncat(tempsectname, tty , VBOX_MAX_RCLINE_SIZE);
|
||||
|
||||
if (rc_read(rc_getty_c, temppathname, tempsectname) == -1) return(-1);
|
||||
|
||||
/* After this, all unset variables will be filled with */
|
||||
/* the defaults. */
|
||||
|
||||
log_line(LOG_D, "Filling unset configuration variables with defaults...\n");
|
||||
|
||||
if (!rc_set_empty(rc_getty_c, "init" , "ATZ&B512" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "badinitsexit" , "10" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "initpause" , "2500" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "commandtimeout" , "4" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "echotimeout" , "4" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "ringtimeout" , "6" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "alivetimeout" , "1800" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "toggledtrtime" , "400" )) return(-1);
|
||||
if (!rc_set_empty(rc_getty_c, "spooldir" , "/var/spool/vbox")) return(-1);
|
||||
|
||||
modemsetup.echotimeout = xstrtol(rc_get_entry(rc_getty_c, "echotimeout" ), 4 );
|
||||
modemsetup.commandtimeout = xstrtol(rc_get_entry(rc_getty_c, "commandtimeout"), 4 );
|
||||
modemsetup.ringtimeout = xstrtol(rc_get_entry(rc_getty_c, "ringtimeout" ), 6 );
|
||||
modemsetup.alivetimeout = xstrtol(rc_get_entry(rc_getty_c, "alivetimeout" ), 1800 );
|
||||
modemsetup.toggle_dtr_time = xstrtol(rc_get_entry(rc_getty_c, "toggledtrtime" ), 400 );
|
||||
|
||||
if (!rc_get_entry(rc_getty_c, "initnumber"))
|
||||
{
|
||||
log_line(LOG_E, "Variable \"initnumber\" *must* be set!\n");
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
** userrc_parse(): Reads the getty user setup. **
|
||||
*************************************************************************
|
||||
** => vboxuser
|
||||
** => home
|
||||
*************************************************************************/
|
||||
|
||||
static int userrc_parse(struct vboxuser *vboxuser, unsigned char *home)
|
||||
{
|
||||
unsigned char tempsectname[VBOX_MAX_RCLINE_SIZE + 1];
|
||||
struct passwd *pwdent;
|
||||
struct group *grpent;
|
||||
unsigned char *varusr;
|
||||
unsigned char *vargrp;
|
||||
unsigned char *varspc;
|
||||
unsigned char *varmsk;
|
||||
int havegroup;
|
||||
|
||||
static struct vboxrc rc_user_c[] =
|
||||
{
|
||||
{ "user" , NULL },
|
||||
{ "group" , NULL },
|
||||
{ "umask" , NULL },
|
||||
{ "hdspace" , NULL },
|
||||
{ NULL , NULL }
|
||||
};
|
||||
|
||||
xstrncpy(temppathname, SYSCONFDIR , PATH_MAX);
|
||||
xstrncat(temppathname, "/vboxgetty.conf", PATH_MAX);
|
||||
|
||||
xstrncpy(tempsectname, "vboxgetty-phone-" , VBOX_MAX_RCLINE_SIZE);
|
||||
xstrncat(tempsectname, vboxuser->localphone, VBOX_MAX_RCLINE_SIZE);
|
||||
|
||||
if (rc_read(rc_user_c, temppathname, tempsectname) < 0) return(-1);
|
||||
|
||||
varusr = rc_get_entry(rc_user_c, "user" );
|
||||
vargrp = rc_get_entry(rc_user_c, "group" );
|
||||
varspc = rc_get_entry(rc_user_c, "hdspace");
|
||||
varmsk = rc_get_entry(rc_user_c, "umask" );
|
||||
|
||||
vboxuser->uid = 0;
|
||||
vboxuser->gid = 0;
|
||||
vboxuser->space = 0;
|
||||
vboxuser->umask = 0;
|
||||
|
||||
strcpy(vboxuser->home, "");
|
||||
strcpy(vboxuser->name, "");
|
||||
|
||||
if ((!varusr) || (!*varusr))
|
||||
{
|
||||
log_line(LOG_E, "You *must* specify a user name or a user id!\n");
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (*varusr == '#')
|
||||
pwdent = getpwuid((uid_t)xstrtol(&varusr[1], 0));
|
||||
else
|
||||
pwdent = getpwnam(varusr);
|
||||
|
||||
if (!pwdent)
|
||||
{
|
||||
log_line(LOG_E, "Unable to locate \"%s\" in systems passwd list.\n", varusr);
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
vboxuser->uid = pwdent->pw_uid;
|
||||
vboxuser->gid = pwdent->pw_gid;
|
||||
|
||||
if ((strlen(home) + strlen(pwdent->pw_name) + 2) < (PATH_MAX - 100))
|
||||
{
|
||||
xstrncpy(vboxuser->name, pwdent->pw_name, VBOXUSER_USERNAME);
|
||||
|
||||
printstring(vboxuser->home, "%s/%s", home, pwdent->pw_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_line(LOG_E, "Oops! Spool directory name and user name too long!\n");
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if ((vargrp) && (*vargrp))
|
||||
{
|
||||
havegroup = 0;
|
||||
|
||||
setgrent();
|
||||
|
||||
while ((grpent = getgrent()))
|
||||
{
|
||||
if (*vargrp == '#')
|
||||
{
|
||||
if (grpent->gr_gid == (gid_t)xstrtol(&vargrp[1], 0))
|
||||
{
|
||||
vboxuser->gid = grpent->gr_gid;
|
||||
havegroup = 1;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp(grpent->gr_name, vargrp) == 0)
|
||||
{
|
||||
vboxuser->gid = grpent->gr_gid;
|
||||
havegroup = 1;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
endgrent();
|
||||
|
||||
if (!havegroup)
|
||||
{
|
||||
log_line(LOG_E, "Unable to locate \"%s\" in systems group list.\n", vargrp);
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
if (varspc) vboxuser->space = xstrtol(varspc, 0);
|
||||
if (varmsk) vboxuser->umask = xstrtoo(varmsk, 0);
|
||||
|
||||
log_line(LOG_D, "User \"%s\" (%d.%d) [%04o] will be used...\n", vboxuser->name, vboxuser->uid, vboxuser->gid, vboxuser->umask);
|
||||
|
||||
rc_free(rc_user_c);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: vboxrc.c,v 1.3 1998/09/18 15:09:09 michael Exp $
|
||||
** $Id: vboxrc.c,v 1.4 1998/11/10 18:36:36 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -20,9 +20,11 @@
|
|||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include "vboxrc.h"
|
||||
#include "log.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: voice.c,v 1.10 1998/09/18 15:09:10 michael Exp $
|
||||
** $Id: voice.c,v 1.11 1998/11/10 18:36:39 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -50,7 +50,7 @@ static unsigned char voicename_ulaw[PATH_MAX + 1];
|
|||
static unsigned char voicename_vbox[PATH_MAX + 1];
|
||||
static unsigned char voicename_call[PATH_MAX + 1];
|
||||
|
||||
static unsigned char voice_touchtone_sequence[VBOXVOICE_SEQUENCE + 1];
|
||||
unsigned char voice_touchtone_sequence[VBOXVOICE_SEQUENCE + 1];
|
||||
|
||||
/** Prototypes ***********************************************************/
|
||||
|
||||
|
@ -71,8 +71,6 @@ int voice_init(struct vboxuser *vboxuser, struct vboxcall *vboxcall)
|
|||
{
|
||||
unsigned char tempconnect[12];
|
||||
unsigned char msgsavetime[32];
|
||||
unsigned char voicestoppl[2];
|
||||
unsigned char voicestoprc[2];
|
||||
time_t currenttime;
|
||||
char *stop;
|
||||
int rc;
|
||||
|
@ -616,8 +614,6 @@ int voice_save(int save)
|
|||
|
||||
int voice_hear(int mode)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (mode > 0)
|
||||
{
|
||||
if (audiodesc == -1)
|
||||
|
@ -736,7 +732,7 @@ static void voice_create_vboxcall(void)
|
|||
/* CallerID, Name, tty-Device und die aktuelle PID in der */
|
||||
/* Datei speichern. */
|
||||
|
||||
fprintf(call, "%s:%s:%s:ld\n", voicevboxuser->incomingid, voicevboxuser->name, savettydname, getpid());
|
||||
fprintf(call, "%s:%s:%s:%d\n", voicevboxuser->incomingid, voicevboxuser->name, savettydname, getpid());
|
||||
|
||||
fclose(call);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: voice.h,v 1.8 1998/09/18 15:09:12 michael Exp $
|
||||
** $Id: voice.h,v 1.9 1998/11/10 18:36:40 michael Exp $
|
||||
**
|
||||
** Copyright 1996-1998 Michael 'Ghandi' Herold <michael@abadonna.mayn.de>
|
||||
*/
|
||||
|
@ -51,6 +51,10 @@
|
|||
#define VBOXSAVE_CAID 64
|
||||
#define VBOXSAVE_VBOX 6
|
||||
|
||||
/** Variables ************************************************************/
|
||||
|
||||
extern unsigned char voice_touchtone_sequence[VBOXVOICE_SEQUENCE + 1];
|
||||
|
||||
/** Prototypes ***********************************************************/
|
||||
|
||||
extern int voice_init(struct vboxuser *, struct vboxcall *);
|
||||
|
|
Loading…
Reference in New Issue