]> granicus.if.org Git - sudo/commitdiff
use AC_SYS_POSIX_TERMIOS instead of rolling our own
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Dec 2001 15:57:03 +0000 (15:57 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Dec 2001 15:57:03 +0000 (15:57 +0000)
config.h.in
configure.in

index 17d724f48b78233fd15336601b02a5350e53d34a..83e5d5a3b253819cea160d4ff33044413949f53d 100644 (file)
 #undef HAVE_TERMIO_H
 
 /* Define if you have the <termios.h> header file and tcgetattr(3).  */
-#ifdef HAVE_TCGETATTR
 #undef HAVE_TERMIOS_H
-#endif /* HAVE_TCGETATTR */
 
 /* Define if you have the <sys/sockio.h> header file.  */
 #undef HAVE_SYS_SOCKIO_H
index 6e21f55d05f5d859f9e57f798195bf9403eec10b..b257404a9aefa17e335c9a0a272e7807cab2c9e1 100644 (file)
@@ -1516,8 +1516,12 @@ AC_HEADER_DIRENT
 AC_CHECK_HEADERS(malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h)
 dnl ultrix termio/termios are broken
 if test "$OS" != "ultrix"; then
-    AC_CHECK_HEADERS(termio.h)
-    AC_CHECK_HEADERS(termios.h, AC_CHECK_FUNCS(tcgetattr))
+    AC_SYS_POSIX_TERMIOS
+    if test "$ac_cv_sys_posix_termios" = "yes"; then
+       AC_DEFINE(HAVE_TERMIOS_H)
+    else
+       AC_CHECK_HEADERS(termio.h)
+    fi
 fi
 if test "$with_logincap" = "yes"; then
     AC_CHECK_HEADERS(login_cap.h)