Add support for setting non-standard baudrates

Support for non-standard baudrate settings will be automatically enabled
if the termios2 interface is detected available. However, to play it
safe, the old and widely supported termios interface will still be used
when setting standard baudrates.
This commit is contained in:
Martin Lund 2017-11-13 12:58:50 +01:00
parent 23bab24890
commit e646c50019
4 changed files with 68 additions and 13 deletions

View file

@ -84,6 +84,10 @@ TIO_CHECK_BAUDRATES(
AC_DEFINE_UNQUOTED([AUTOCONF_BAUDRATE_CASES],[$BAUDRATE_CASES],[Switch cases for detected baud rates])
# Check for interface for setting arbitrary I/O speeds
AC_CHECK_DECL([TCGETS2], [AC_DEFINE([HAVE_TERMIOS2],[1],[Define if termios2 exists.]) have_termios2=yes], , [[#include <asm/termios.h>]])
AM_CONDITIONAL([ADD_SETSPEED2],[test "x$have_termios2" == "xyes"])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([src/bash-completion/tio])