Commit b357b6d2 authored by nobody's avatar nobody

This commit was manufactured by cvs2svn to create branch 'isc'.

parent da5e6982
ISC was initially written and designed by Peter Eriksson
<pen@lysator.liu.se>. Per Cederqvist <ceder@lysator.liu.se> has made
some improvements and is currently acting as maintainer.
This diff is collapsed.
1998-07-06 Per Cederqvist <ceder@lysator.liu.se>
Release preparations.
* NEWS: Updated.
* README: Updated.
* RELEASING: New file.
* README.DEVO: New file.
Include isc_wait.o in the built library.
* src/Makefile.am (libisc_a_SOURCES): Added isc_wait.c.
Improved portability.
* src/isc_wait.c: Check TIME_WITH_SYS_TIME.
* src/isc_socket.c: Check TIME_WITH_SYS_TIME.
* src/isc_event.c: Check TIME_WITH_SYS_TIME.
Ported to Solaris 2.7 Beta/gcc 2.8.1.
* src/isc_udp.c: Include <unistd.h>.
(isc_udp_read_fn): Now static. Flag unused arguments.
(isc_udp_destroy_fn): Likewise.
(isc_udp_write_fn): Now static.
(isc_mkudpaddress): Likewise. Don't pass potentially negative
characters to isdigit.
* src/isc_tcp.c: Include <unistd.h>.
(isc_tcp_accept_fn): Now static. Flag unused arguments.
(isc_tcp_destroy_fn): Likewise.
(isc_mktcpaddress): Now static. Don't pass potentially negative
characters to isdigit.
* src/isc_session.c: Include <unistd.h>.
(isc_default_read_fn): Flag unused arguments.
(isc_default_write_fn): Flag unused arguments.
(isc_default_close_fn): Flag unused arguments.
(isc_file_destroy_fn): Flag unused arguments.
* src/isc_alloc.c (isc_realloc): Code simplified.
(isc_free): Code simplified.
* src/unused.h: New file (taken from cmod).
Added automake/autoconf support.
* AUTHORS: New file.
* Makefile.am: New file.
* NEWS: New file.
* acinclude.m4: New file.
* configure.in: New file.
* demo/Makefile.am: New file.
* demo/README: New file.
* doc/Makefile.am: New file.
* man/Makefile.am: New file.
* src/Makefile.am: New file.
* man/Makefile: This file is now generated by configure. Don't
store it under version control.
* src/Makefile: Likewise.
* demo/Makefile: Likewise.
* build/stddef.h: File removed.
* build/gmkdep: File removed.
1998-06-21 Per Cederqvist <ceder@lysator.liu.se>
Incorporated all relevant improvements made to ISC in
the committed sources of lyskomd as of 1998-06-21. Edited details
follows.
Include file improvements.
* src/isc_event.c: Include <sys/select.h>, <unistd.h> and
<string.h> for increased portability.
* src/printf.c: Check HAVE_STRING_H and HAVE_STDLIB_H before
including those files. Don't forward-declare memchr.
Ignore attempts to look up the NULL host name.
* src/isc_socket.c (isc_gethostname): Return NULL if given a NULL
IscAddress.
1998-05-07 Per Cederqvist <ceder@lysator.liu.se>
Incorporated all relevant improvements made to ISC in
kom++-0.7.post.2. Edited details follows.
Avoid including more files than necessary.
* src/isc.h: Don't include any include files.
* src/isc_abort.c: Don't declare system functions. Fixed include
statements.
* src/isc_alloc.c: Likewise.
* src/isc_event.c: Likewise.
* src/isc_message.c: Likewise.
* src/isc_output.c: Likewise.
* src/isc_session.c: Likewise.
* src/isc_socket.c: Likewise.
* src/isc_stdout.c: Likewise.
* src/isc_tcp.c: Likewise.
* src/isc_udp.c: Likewise.
* src/isc_handler.c: Fixed include statements.
* src/isc_master: Likewise.
* src/isc_queue.c: Likewise.
Added the ability to wait until a connection attempt (initiated by
this process) either fails or succeeds.
* src/isc.h: (isc_wait): Prototype added.
* src/isc_wait.c: New file, containing isc_wait.
Only support isc_printf and isc_vprintf if ISC_PRINTF_SUPPORT if
defined. These functions may lead to bad use of the buffers.
* src/isc.h: (isc_vprintf, isc_printf): Only declare if
ISC_PRINTF_SUPPORT is defined. Fail to compile if
ISC_PRINTF_SUPPORT is defined but HAVE_STDARG_H isn't.
* src/isc_stdout.c (send_scb, send_putc, isc_vprintf, isc_printf):
Only defined if ISC_PRINTF_SUPPORT is defined.
Make sure that isc_getnextevent only returns a single
ISC_EVENT_LOGOUT message when a session logs out.
* src/isc.h: (IscSessionState): New state: ISC_STATE_CLOSING2.
* src/isc_event.c (isc_getnextevent): There is now only one
ISC_EVENT_LOGOUT message per session. Set the state to
ISC_STATE_CLOSING2 when generating an ISC_EVENT_LOGOUT message.
* src/isc_output.c (isc_flush): Treat ISC_STATE_CLOSING2 as
ISC_STATE_CLOSING.
(isc_oflush): Likewise.
Portability fixes.
* src/isc_alloc.c (isc_mallocfn, isc_reallocfn, isc_freefn):
Removed lame casts.
Make sure that isc_malloc returns a block that is aligned on a
"long" boundary.
* src/isc_alloc.c (isc_malloc, isc_free, isc_realloc): Portablilty
fix: Align data on a "long" boundary, not only an "int" boundary.
Typo fix.
* src/isc_event.c (isc_getnextevent): Fixed a spelling error in a
comment.
Make sure that errors are reported to the proper session.
* src/isc_event.c (isc_getnextevent): event->session was sometimes
set erronously if an error occured in select() or if a timeout
occured.
Use O_NONBLOCK instead of the now obsolete name FNDELAY.
* src/isc_session.c (isc_openfd): Use O_NONBLOCK instead of FNDELAY.
* src/isc_tcp.c (isc_createtcp): Use O_NONBLOCK instead of FNDELAY.
* src/isc_udp.c (isc_createudp): Use O_NONBLOCK instead of FNDELAY.
Avoid warnings by adding a dubious cast.
* src/isc_socket.c (isc_gethostname): Cast argument to
gethostbyaddr to a char* to avoid a warning.
Portability fix: Renamed _printf to UCB_printf.
* src/isc_stdout.c (isc_printf, isc_vprintf): Call UCB_printf
instead of _printf.
* src/printf.c (UCB_printf): Renamed _printf to UCB_printf (to avoid
conflicts on HPUX).
Don't use obsolete setsockopt interfaces.
* src/isc_tcp.c (isc_createtcp): Fixed calls to setsockopt with
SO_LINGER and SO_REUSEADDR arguments. The old-style style
previously used should no longer be necessary on modern operating
systems, and in fact it no longer works everywere.
* src/isc_udp.c (isc_createudp): Fixed calls to setsockopt with
SO_LINGER and SO_REUSEADDR arguments. The old-style style
previously used should no longer be necessary on modern operating
systems, and in fact it no longer works everywere.
If an attempt to bind failed with EADDRINUSE all the retries
would automatically fail.
* src/isc_tcp.c (isc_listentcp): Clear errno on each loop in the
retry loop.
Include the licensing conditions used by this package.
* COPYING: New file.
1998-04-03 Per Cederqvist <ceder@signum.se>
Port to glibc 2, where errno is a macro.
* isc.h (IscSession::isc_errno): New name for former struct member
errno. All users updated.
1996-07-24 Per Cederqvist <ceder@lysator.liu.se>
ISC_EVENT_LOGIN events now return the listening session in the
event, so that it can be used to easily determine which kind of
connection that was made. 66.7 % of the code was contributed by
<linus@lysator.liu.se>.
* src/isc.h (IscEvent): New field: listen_session.
* src/isc_event.c (isc_getnextevent): Fill in listen_session when
an ISC_EVENT_LOGIN event is created. Set it to NULL in all other
cases.
1996-07-23 Per Cederqvist <ceder@lysator.liu.se>
* Imported ISC version 0.98.3.
Basic Installation
==================
These are generic installation instructions.
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 awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
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.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
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. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--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.
# ISC - networking library
# Copyright (C) 1998 by Peter Eriksson and Per Cederqvist of the
# Lysator Academic Computer Association.
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
## Process this file with automake to produce Makefile.in
SUBDIRS = src man doc demo
AUTOMAKE_OPTIONS = gnu
RM = rm -f
EXTRA_DIST = .cvsignore
News in release 0.99 (release date: 1998-07-06):
* Uses autoconf and automake for easy integration in other packages.
* All improvements made to ISC in lyskom-server and kom++ have been
merged back in the isc distribution.
* When isc_getnextevent returns a ISC_EVENT_LOGIN event, the event now
contains a pointer to the listening session in the new field
listen_session.
* Don't use the symbol "errno" as a struct tag.
* Some other bug fixes, style improvements and code conservation (to
avoid bit decay).
* Ported to architectures where some data must be aligned on a "long"
boundary (and "int" is shorter than "long").
* Previously, isc_getnextevent would return repeated ISC_EVENT_LOGOUT
events until the corresponding session was destroyed. Now, only a
single ISC_EVENT_LOGOUT event will be returned.
* The library is normally compiled without the functions isc_printf
and isc_vprintf. They are not as portable as the rest of the
library, and use of them may result in poor performance. Use the
--enable-isc-printf argument to configure to include those functions
in the library.
* The new function isc_wait makes it possible to wait until an
initiated connection attempt (to a remote server) either succeeds or
fails.
* isc.h no longer includes any header files.
News in release 0.98.3 and earlier versions:
* Unknown.
dnl ISC - networking library
dnl Copyright (C) 1998 by Peter Eriksson and Per Cederqvist of the
dnl Lysator Academic Computer Association.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
dnl
dnl Check if an option is acceptable to the C compiler in use.
dnl (This is taken verbatim from cmod 1.0. Please don't make even a
dnl tiny change to it unless you change the name of all variables!
dnl See the cmod source code for more information.)
dnl
AC_DEFUN(CMOD_COMPILER_CC_ACCEPTS,
[cmod_safe=`echo "cmod_cv_compiler_${CC}_accepts_$1" | tr '+./=\055' 'X____'`
AC_MSG_CHECKING([whether ${CC} accepts $1])
AC_CACHE_VAL($cmod_safe,
[[cmod_oldflags=$CFLAGS
CFLAGS="$CFLAGS $1"]
AC_TRY_LINK(,,
[eval "$cmod_safe=yes"],
[eval "$cmod_safe=no"])
[CFLAGS=$cmod_oldflags]])dnl
AC_MSG_RESULT([`eval echo '$'$cmod_safe`])
if test `eval echo '$'$cmod_safe` = yes; then
CFLAGS="$CFLAGS $1"
fi])dnl
dnl
dnl Another frozen defun.
dnl
AC_DEFUN(CMOD_C_ATTRIBUTE_UNUSED,
[AC_MSG_CHECKING([whether $CC understands __attribute__((unused))])
AC_CACHE_VAL([cmod_cv_c_attribute_unused_understood],
AC_TRY_COMPILE(,[int i __attribute__((unused));],
[cmod_cv_c_attribute_unused_understood=yes],
[cmod_cv_c_attribute_unused_understood=no]))
AC_MSG_RESULT($cmod_cv_c_attribute_unused_understood)
[if test $cmod_cv_c_attribute_unused_understood = yes ; then]
AC_DEFINE(HAVE_ATTRIBUTE_UNUSED)
[fi]])dnl
dnl ISC - networking library
dnl Copyright (C) 1998 by Peter Eriksson and Per Cederqvist of the
dnl Lysator Academic Computer Association.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
dnl Process this file with autoconf to produce a configure script.
AC_REVISION($Revision: 1.1 $)dnl
AC_INIT(src/isc_master.c)
AM_INIT_AUTOMAKE(isc, 0.99)
AC_ARG_ENABLE([isc-printf],
[ --enable-isc-printf include isc_printf support (non-portable)])
[if test "$enable_isc_printf" = yes
then]
AC_DEFINE(ISC_PRINTF_SUPPORT)
[ LIBOBJS="printf.o $LIBOBJS"
fi]
AC_SUBST(LIBOBJS)
dnl Checks for programs.
AC_PROG_CC
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h stdarg.h stddef.h string.h sys/select.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AM_C_PROTOTYPES
AC_HEADER_TIME
AC_C_CONST
AC_TYPE_SIZE_T
CMOD_C_ATTRIBUTE_UNUSED
[if test -n "$GCC"; then
CFLAGS="$CFLAGS -Wall -W -Wtraditional -Wshadow -Wpointer-arith"]
CMOD_COMPILER_CC_ACCEPTS([-Wbad-function-cast])
CMOD_COMPILER_CC_ACCEPTS([-Wcast-qual])
CMOD_COMPILER_CC_ACCEPTS([-Wcast-align])
CMOD_COMPILER_CC_ACCEPTS([-Wwrite-strings])
CMOD_COMPILER_CC_ACCEPTS([-Waggregate-return])
CMOD_COMPILER_CC_ACCEPTS([-Wstrict-prototypes])
CMOD_COMPILER_CC_ACCEPTS([-Wmissing-prototypes])
CMOD_COMPILER_CC_ACCEPTS([-Wmissing-declarations])
CMOD_COMPILER_CC_ACCEPTS([-Wnested-externs])
CMOD_COMPILER_CC_ACCEPTS([-pipe])
[fi]
AC_OUTPUT(Makefile src/Makefile man/Makefile doc/Makefile demo/Makefile)
EXTRA_DIST = mux.c mux.h tcp.c udp.c
INCDIRS=-I$(HOME)/include
LIBDIRS=-L$(HOME)/lib
SOURCES=tcp.c udp.c
CFLAGS= -g $(LIBDIRS) $(INCDIRS)
CC=gcc
tcp: tcp.c $(HOME)/include/isc.h $(HOME)/lib/libisc.a
gcc $(CFLAGS) -o tcp tcp.c -lisc -lansi
udp: udp.c $(HOME)/include/isc.h $(HOME)/lib/libisc.a
gcc $(CFLAGS) -o udp udp.c -lisc -lansi
clean:
rm -f *~ *.o a.out core tcp udp \#*\#
depend:
gmkdep $(INCDIRS) $(SOURCES)
# DO NOT DELETE THIS LINE -- mkdep uses it.
This directory contains very old demo programs. They probably do not work.
Please don't use these as example programs for how to use ISC.
EXTRA_DIST = MANUAL.sv .cvsignore
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"