?RCS: $Id: i_termio.U,v 3.0 1993/08/18 12:08:44 ram Exp $ ?RCS: ?RCS: Copyright (c) 1991-1993, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 3.0. ?RCS: ?RCS: $Log: i_termio.U,v $ ?RCS: Revision 3.0 1993/08/18 12:08:44 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?X: ?X: Include all three (possible) definitions in config_h.SH. ?X: There are enough implementations of posix termios.h out there ?X: that do not work well with other system headers or are ?X: incomplete. This makes it easier for the user to back off ?X: and try sgtty.h or i_termio.h instead. ?X: ?MAKE:i_termio i_sgtty i_termios: test Inlibc Cppsym Guess Setvar Findhdr ?MAKE: -pick add $@ %< ?S:i_termio: ?S: This variable conditionally defines the I_TERMIO symbol, which ?S: indicates to the C program that it should include rather ?S: than . ?S:. ?S:i_termios: ?S: This variable conditionally defines the I_TERMIOS symbol, which ?S: indicates to the C program that the POSIX file is ?S: to be included. ?S:. ?S:i_sgtty: ?S: This variable conditionally defines the I_SGTTY symbol, which ?S: indicates to the C program that it should include rather ?S: than . ?S:. ?C:I_TERMIO ~ %<: ?C: This symbol, if defined, indicates that the program should include ?C: rather than . There are also differences in ?C: the ioctl() calls that depend on the value of this symbol. ?C:. ?C:I_TERMIOS ~ %<: ?C: This symbol, if defined, indicates that the program should include ?C: the POSIX termios.h rather than sgtty.h or termio.h. ?C: There are also differences in the ioctl() calls that depend on the ?C: value of this symbol. ?C:. ?C:I_SGTTY ~ %<: ?C: This symbol, if defined, indicates that the program should include ?C: rather than . There are also differences in ?C: the ioctl() calls that depend on the value of this symbol. ?C:. ?H:?%<:#$i_termio I_TERMIO /**/ ?H:?%<:#$i_termios I_TERMIOS /**/ ?H:?%<:#$i_sgtty I_SGTTY /**/ ?H:. ?T:val2 val3 ?LINT:set i_termio i_sgtty i_termios : see if this is a termio system val="$undef" val2="$undef" val3="$undef" ?X: Prefer POSIX-approved termios.h over all else if $test `./findhdr termios.h`; then set tcsetattr i_termios eval $inlibc val3="$i_termios" fi echo " " case "$val3" in "$define") echo "You have POSIX termios.h... good!" >&4;; *) if Cppsym pyr; then case "`/bin/universe`" in ucb) if $test `./findhdr sgtty.h`; then val2="$define" echo " found." >&4 else echo "System is pyramid with BSD universe." echo " not found--you could have problems." >&4 fi;; *) if $test `./findhdr termio.h`; then val="$define" echo " found." >&4 else echo "System is pyramid with USG universe." echo " not found--you could have problems." >&4 fi;; esac ?X: Start with USG to avoid problems if both usg/bsd was guessed elif usg; then if $test `./findhdr termio.h`; then echo " found." >&4 val="$define" elif $test `./findhdr sgtty.h`; then echo " found." >&4 val2="$define" else echo "Neither nor found--you could have problems." >&4 fi else if $test `./findhdr sgtty.h`; then echo " found." >&4 val2="$define" elif $test `./findhdr termio.h`; then echo " found." >&4 val="$define" else echo "Neither nor found--you could have problems." >&4 fi fi;; esac set i_termio; eval $setvar val=$val2; set i_sgtty; eval $setvar val=$val3; set i_termios; eval $setvar