3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic License,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
11 ?RCS: $Log: i_termio.U,v $
12 ?RCS: Revision 3.0.1.4 1994/10/29 16:20:54 ram
13 ?RCS: patch36: call ./usg and ./Cppsym explicitly instead of relying on PATH
15 ?RCS: Revision 3.0.1.3 1994/08/29 16:26:38 ram
16 ?RCS: patch32: don't include all three I_* symbols in config.h
17 ?RCS: patch32: (had forgotten to undo this part last time)
19 ?RCS: Revision 3.0.1.2 1994/05/13 15:25:03 ram
20 ?RCS: patch27: undone ADO's fix in previous patch since it was useless
22 ?RCS: Revision 3.0.1.1 1994/05/06 15:05:23 ram
23 ?RCS: patch23: now include all three defines in config.h (ADO)
25 ?RCS: Revision 3.0 1993/08/18 12:08:44 ram
26 ?RCS: Baseline for dist 3.0 netwide release.
28 ?MAKE:i_termio i_sgtty i_termios: test Inlibc Cppsym Guess Setvar Findhdr Warn
29 ?MAKE: -pick add $@ %<
31 ?S: This variable conditionally defines the I_TERMIO symbol, which
32 ?S: indicates to the C program that it should include <termio.h> rather
36 ?S: This variable conditionally defines the I_TERMIOS symbol, which
37 ?S: indicates to the C program that the POSIX <termios.h> file is
41 ?S: This variable conditionally defines the I_SGTTY symbol, which
42 ?S: indicates to the C program that it should include <sgtty.h> rather
46 ?C: This symbol, if defined, indicates that the program should include
47 ?C: <termio.h> rather than <sgtty.h>. There are also differences in
48 ?C: the ioctl() calls that depend on the value of this symbol.
51 ?C: This symbol, if defined, indicates that the program should include
52 ?C: the POSIX termios.h rather than sgtty.h or termio.h.
53 ?C: There are also differences in the ioctl() calls that depend on the
54 ?C: value of this symbol.
57 ?C: This symbol, if defined, indicates that the program should include
58 ?C: <sgtty.h> rather than <termio.h>. There are also differences in
59 ?C: the ioctl() calls that depend on the value of this symbol.
61 ?H:#$i_termio I_TERMIO /**/
62 ?H:#$i_termios I_TERMIOS /**/
63 ?H:#$i_sgtty I_SGTTY /**/
66 ?LINT:set i_termio i_sgtty i_termios
67 : see if this is a termio system
71 ?X: Prefer POSIX-approved termios.h over all else
72 if $test `./findhdr termios.h`; then
73 set tcsetattr i_termios
79 "$define") echo "You have POSIX termios.h... good!" >&4;;
80 *) if ./Cppsym pyr; then
81 case "`/bin/universe`" in
82 ucb) if $test `./findhdr sgtty.h`; then
84 echo "<sgtty.h> found." >&4
86 echo "System is pyramid with BSD universe."
87 ./warn "<sgtty.h> not found--you could have problems."
89 *) if $test `./findhdr termio.h`; then
91 echo "<termio.h> found." >&4
93 echo "System is pyramid with USG universe."
94 ./warn "<termio.h> not found--you could have problems."
97 ?X: Start with USG to avoid problems if both usg/bsd was guessed
99 if $test `./findhdr termio.h`; then
100 echo "<termio.h> found." >&4
102 elif $test `./findhdr sgtty.h`; then
103 echo "<sgtty.h> found." >&4
106 ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!"
109 if $test `./findhdr sgtty.h`; then
110 echo "<sgtty.h> found." >&4
112 elif $test `./findhdr termio.h`; then
113 echo "<termio.h> found." >&4
116 ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!"
120 set i_termio; eval $setvar
121 val=$val2; set i_sgtty; eval $setvar
122 val=$val3; set i_termios; eval $setvar