From d17b03d4d4525103f1995441045eae4c2c73355d Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sat, 30 Jan 2016 16:46:56 +0100 Subject: Don't assume `tcdrain` and `ctermid` exist always This follows the scheme suggested in #24 This fixes #55 --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 24ea3a5..f883624 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,19 @@ AC_CHECK_DECLS([fdatasync],[AC_CHECK_FUNCS([fdatasync])]) AC_CHECK_FUNCS([posix_fadvise posix_fallocate]) +# Some termios(3) functions known to be missing sometimes (see also #55) +AC_CHECK_DECLS([tcdrain],[AC_DEFINE([HAVE_TCDRAIN],[1],[Define to 1 if you have the `tcdrain' function.])],[],[AC_INCLUDES_DEFAULT +#ifdef HAVE_TERMIOS_H +#include +#endif +]) + +AC_CHECK_DECLS([ctermid],[AC_DEFINE([HAVE_CTERMID],[1],[Define to 1 if you have the `ctermid' function.])],[],[AC_INCLUDES_DEFAULT +#ifdef HAVE_TERMIOS_H +#include +#endif +]) + # Avoid adding rt if absent or unneeded # shm_open needs -lrt on linux AC_SEARCH_LIBS(shm_open, rt, [AC_CHECK_FUNCS([shm_open shm_unlink])]) -- cgit v1.2.3