XCOMM -*-Makefile-*-
XCOMM --------------------------------------------------------------------------
XCOMM File:         Imakefile
XCOMM RCS:          $Header: /users/npm/src/winterp/src-server/expect/RCS/Imakefile,v 2.1 1994/06/06 15:43:06 npm Exp $
XCOMM Description:  Imakefile for libexpect.a
XCOMM Author:       Niels Mayer, Don Libes
XCOMM Created:      Fri Nov 24 19:47:38 1989
XCOMM Modified:     
XCOMM Language:     Imake
XCOMM Package:      N/A
XCOMM Status:       X11r6 contrib release
XCOMM
XCOMM libexpect, by Don Libes, National Institute of Standards and Technology
XCOMM WINTERP 2.0 Copyright (C) 1994, Enterprise Integration Technologies Corp. and Niels Mayer.
XCOMM WINTERP 1.15-1.99, Copyright (c) 1993, Niels P. Mayer.
XCOMM WINTERP 1.0-1.14, Copyright (c) 1989-1992 Hewlett-Packard Co. and Niels Mayer.
XCOMM 
XCOMM Permission to use, copy, modify, distribute, and sell this software and its
XCOMM documentation for any purpose is hereby granted without fee, provided that
XCOMM the above copyright notice appear in all copies and that both that
XCOMM copyright notice and this permission notice appear in supporting
XCOMM documentation, and that the name of National Institute of Standards and
XCOMM Technology, Don Libes, Enterprise Integration Technologies, 
XCOMM Hewlett-Packard Company, or Niels Mayer not be used in advertising or
XCOMM publicity pertaining to distribution of the software without specific,
XCOMM written prior permission. National Institute of Standards and Technology,
XCOMM Don Libes, Enterprise Integration Technologies, Hewlett-Packard Company,
XCOMM and Niels Mayer makes no representations about the suitability of this 
XCOMM software for any purpose.  It is provided "as is" without express or
XCOMM implied warranty.
XCOMM 
XCOMM NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY, DON LIBES, ENTERPRISE
XCOMM INTEGRATION TECHNOLOGIES, HEWLETT-PACKARD COMPANY AND NIELS MAYER
XCOMM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
XCOMM WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE NATIONAL
XCOMM INSTITUTE OF STANDARDS AND TECHNOLOGY, DON LIBES, ENTERPRISE INTEGRATION
XCOMM TECHNOLOGIES, HEWLETT-PACKARD COMPANY OR NIELS MAYER BE LIABLE
XCOMM FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
XCOMM RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
XCOMM CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
XCOMM CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
XCOMM
XCOMM See ./winterp/COPYRIGHT for information on contacting the authors.
XCOMM
XCOMM Please e-mail comments, modifications, questions, improvements and
XCOMM bugfixes to the WINTERP mailing list winterp@netcom.com. Please send 
XCOMM mailing list subscribe/unsubscribe notices to winterp-request@netcom.com .
XCOMM 
XCOMM Post XLISP-specific questions/information to the USENET newsgroup
XCOMM comp.lang.lisp.x.
XCOMM
XCOMM --------------------------------------------------------------------------

VERSION = \"3.22.6\"
STTY=\"sane\"

XCOMM -- Depending on the system type, choose a file to do pty interface:
XCOMM -- pty_bsd - BSD
XCOMM -- pty_usg - USG (i.e., SIII through SVR3), SCO
XCOMM -- pty_unicos - Cray Unicos
XCOMM -- pty_sgi3 - Silicon Graphics, 3 or earlier
XCOMM -- pty_sgi - Silicon Graphics (using _getpty)
XCOMM -- pty_svr4 - SVR4
XCOMM -- pty_aix3 - recent versions of AIX (3.1.5 and later)

XCOMM -- Flags to pass to cc (i.e. add to the end of the DEFINES line below).
XCOMM -- Note that setting one will not set others automatically.  Set all that
XCOMM -- are relevant.
XCOMM -- 
XCOMM -- -DPOSIX if you are have POSIX tty support.  (Currently only tested on AIX
XCOMM --	3.x).  
XCOMM -- -DNOWAITPID if your system doesn't have waitpid.  Only really old systems
XCOMM --	lack this.
XCOMM -- -DNO_PID_T if your system doesn't have a typedef for pid_t.  If you don't
XCOMM --	know, try without defining it.  If it compiles, you're ok.
XCOMM -- -DNO_MEMCPY if your system does not have memcpy.  If you don't know, try
XCOMM --	without defining it.  If it compiles, you're ok.
XCOMM -- -DNO_STRING_H if your system does not have /usr/include/string.h.  If you
XCOMM --	don't know, try without defining it.  If it compiles, you're ok.
XCOMM -- -DSYSV3 if you are running SVR3 or later.
XCOMM -- -DSVSV4 if you are running SVR4.  This option does not preclude -DSYSV3.
XCOMM -- -DHPUX if you are running HP-UX.
XCOMM -- -DCRAY=51 or 60, 70, etc, if you are running Cray Unicos 5.1, 6.0, 7.0, etc.
XCOMM -- -DAUX2 if you are running Mac A/UX 2.
XCOMM -- -DUTS if you are on an Amdahl.
XCOMM -- -DMIPS_BSD if you are on a Mips machine using the BSD universe.
XCOMM -- -DSIG_FN_RETURN=int if you are running SunOS-3.X or similar systems that
XCOMM --	define the function argument to signal as int (*func)() rather than
XCOMM --	void (*func)().
XCOMM -- -DREARM_SIG if you are running systems (such as V7, SV, Unicos) where signal
XCOMM --	handlers need to be rearmed after use.
XCOMM -- -D_BSD_SIGNALS if you are on a Silicon Graphics AND want BSD semantics when
XCOMM --	using the expect library.  Otherwise, you are better off just sticking
XCOMM --	with defining REARM_SIG (above).
XCOMM -- -DEXTERN_ERRNO if your system needs "extern int errno" (e.g., MORE/bsd).
XCOMM -- -DTERM=whatever if your system is unhappy with the default terminal struct
XCOMM --	name (termios for SV, and sgttyb for BSD).  Some SV systems (3b2 &
XCOMM --	pre-8.0 HPUX) want "termio".
XCOMM -- -DNOSTDLIB if your system doesn't have /usr/include/stdlib.h.  If you don't
XCOMM --	know, try without.  If you get bad declarations on malloc, then add.

#if (defined(SunArchitecture) && (OSMajorVersion > 4))
 EXPECT_PTY = pty_svr4.c
 DEFINES = -DWINTERP -DREARM_SIG -DSYSV3 -DSVSV4 -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* (defined(SunArchitecture) && (OSMajorVersion > 4)) */

#if (defined(SunArchitecture) && (OSMajorVersion <= 4))
 EXPECT_PTY = pty_bsd.c
 DEFINES = -DWINTERP -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* (defined(SunArchitecture) && (OSMajorVersion <= 4)) */

#ifdef HPArchitecture
 EXPECT_PTY = pty_usg.c
 DEFINES = -DWINTERP -DHPUX -DSYSV3 -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* !defined(HPArchitecture) */

#ifdef SGIArchitecture
#if (OSMajorVersion > 3)
 EXPECT_PTY = pty_sgi.c
 DEFINES = -DWINTERP -DREARM_SIG -DSYSV3 -DSVSV4 -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* !(OSMajorVersion > 3) */
 EXPECT_PTY = pty_sgi3.c
 DEFINES = -DWINTERP -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#endif /* (OSMajorVersion > 3) */
#else /* !defined(SGIArchitecture) */

#ifdef AIXArchitecture
 EXPECT_PTY = pty_aix3.c
 DEFINES = -DWINTERP -DPOSIX -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* !defined(AIXArchitecture) */

#ifdef CrayArchitecture
 EXPECT_PTY = pty_unicos.c
 DEFINES = -DWINTERP -DREARM_SIG -DCRAY=80 -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* !defined(CrayArchitecture) */

#ifdef MipsBsdArchitecture
 EXPECT_PTY = pty_bsd.c
 DEFINES = -DWINTERP -DMIPS_BSD -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* !defined(MipsBsdArchitecture) */

#ifdef MipsSysvArchitecture
 EXPECT_PTY = pty_usg.c
 DEFINES = -DWINTERP -DSYSV3 -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* !defined(MipsSysvArchitecture) */

#if (defined(SVR4Architecture) || SystemV4)
 EXPECT_PTY = pty_svr4.c
 DEFINES = -DWINTERP -DSYSV3 -DSVSV4 -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)
#else /* !(defined(SVR4Architecture) || defined(SystemV4)) */

#if (SystemV)
 EXPECT_PTY = pty_usg.c
 DEFINES = -DWINTERP -DSYSV3 -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)

#else /* DEFAULT: handles Ultrix, OSF1, NeXT, SunOS 4.1.3, etc */

 EXPECT_PTY = pty_bsd.c
 DEFINES = -DWINTERP -DVERSION=$(VERSION) -DDFLT_STTY=$(STTY)

#endif /* defined(SystemV) */
#endif /* (defined(SVR4Architecture) || defined(SystemV4)) */
#endif /* MipsSysvArchitecture */
#endif /* MipsBsdArchitecture */
#endif /* CrayArchitecture */
#endif /* AIXArchitecture */
#endif /* SGIArchitecture */
#endif /* HPArchitecture */
#endif /* (defined(SunArchitecture) && (OSMajorVersion <= 4)) */
#endif /* (defined(SunArchitecture) && (OSMajorVersion > 4)) */

 INCLUDES = -I. 

 HEADERS      = expect.h \
		term.h \
		translate.h

 SRCS         = lib_exp.c \
		lib_string.c \
		$(EXPECT_PTY) \
		lib_debug.c

 OBJS         = $(SRCS:.c=.o)


NormalLibraryTarget(expect,$(OBJS))
DependTarget()
