]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Release Automake from being a substitute to Autoconf.
authorAkim Demaille <akim@epita.fr>
Wed, 2 Aug 2000 17:40:25 +0000 (17:40 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 2 Aug 2000 17:40:25 +0000 (17:40 +0000)
* acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ,
AC_SYS_POSIX_TERMIOS): New macros from both Automake and the
fileutils.

ChangeLog
acspecific.m4
doc/autoconf.texi
lib/autoconf/specific.m4

index e7e930cf4677c79af09dcdaba7a7b02cb8633d18..def808e60736f2265633d06eca3f64179a005c7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-08-02  Akim Demaille  <akim@epita.fr>
+
+       Release Automake from being a substitute to Autoconf.
+
+       * acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
+       _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ,
+       AC_SYS_POSIX_TERMIOS): New macros from both Automake and the
+       fileutils.
+
 2000-08-02  Akim Demaille  <akim@epita.fr>
 
        * aclang.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Recent changes
index ba052231c43bfd5005d2235bd811f3066105c719..815a1e7c8a5519bc869e48f00b742bffcbb8c4e8 100644 (file)
@@ -542,10 +542,60 @@ fi
 ])# AC_HEADER_TIME
 
 
+# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
+# ----------------------------------
+define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
+[AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
+                ac_cv_sys_tiocgwinsz_in_termios_h,
+[AC_EGREP_CPP([yes],
+              [#include <sys/types.h>
+#include <termios.h>
+#ifdef TIOCGWINSZ
+  yes
+#endif
+],
+                ac_cv_sys_tiocgwinsz_in_termios_h=yes)])
+])# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
+
+
+# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
+# ----------------------------------
+define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
+[AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
+                ac_cv_sys_tiocgwinsz_in_sys_ioctl_h,
+[AC_EGREP_CPP([yes],
+              [#include <sys/types.h>
+#include <sys/ioctl.h>
+#ifdef TIOCGWINSZ
+  yes
+#endif
+],
+                ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes)])
+])# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
 
 
-# A few obsolete macros.
+# AC_HEADER_TIOCGWINSZ
+# --------------------
+# Look for a header that defines TIOCGWINSZ.
+# FIXME: Is this the proper name?  Is this the proper implementation?
+# I need more help.
+AC_DEFUN([AC_HEADER_TIOCGWINSZ],
+[AC_REQUIRE([AC_SYS_POSIX_TERMIOS])dnl
+if test $ac_cv_sys_posix_termios = yes; then
+  _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
+fi
+if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
+  _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
+  if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
+    AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1,
+              [Define if `TIOCGWINSZ' requires <sys/ioctl.h>])
+  fi
+fi
+])# AC_HEADER_TIOCGWINSZ
 
+
+# AU::AC_UNISTD_H
+# ---------------
 AU_DEFUN([AC_UNISTD_H],
 [AC_CHECK_HEADERS(unistd.h)])
 
@@ -1109,6 +1159,19 @@ fi
 ])# AC_SYS_RESTARTABLE_SYSCALLS
 
 
+# AC_SYS_POSIX_TERMIOS
+# --------------------
+AC_DEFUN([AC_SYS_POSIX_TERMIOS],
+[AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios,
+[AC_TRY_LINK([#include <sys/types.h>
+#include <unistd.h>
+@%:@include <termios.h>],
+             [/* SunOS 4.0.3 has termios.h but not the library calls.  */
+   tcgetattr(0, 0);],
+             ac_cv_sys_posix_termios=yes,
+             ac_cv_sys_posix_termios=no)])
+])# AC_SYS_POSIX_TERMIOS
+
 
 
 ## --------------------- ##
index 285f243402e2403a7b94dcb1b71c52e6ba581ebd..b80e1a1c242c2453b710f55171aaf099990991b7 100644 (file)
@@ -3385,36 +3385,6 @@ define @code{STAT_MACROS_BROKEN}.  This is the case on Tektronix UTekV,
 Amdahl UTS and Motorola System V/88.
 @end defmac
 
-@defmac AC_HEADER_TIME
-@maindex HEADER_TIME
-@cvindex TIME_WITH_SYS_TIME
-If a program may include both @file{time.h} and @file{sys/time.h},
-define @code{TIME_WITH_SYS_TIME}.  On some older systems,
-@file{sys/time.h} includes @file{time.h}, but @file{time.h} is not
-protected against multiple inclusion, so programs should not explicitly
-include both files.  This macro is useful in programs that use, for
-example, @code{struct timeval} or @code{struct timezone} as well as
-@code{struct tm}.  It is best used in conjunction with
-@code{HAVE_SYS_TIME_H}, which can be checked for using
-@code{AC_CHECK_HEADERS(sys/time.h)}.
-
-@example
-@group
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-@end group
-@end example
-@end defmac
-
-
 
 @defmac AC_HEADER_STDC
 @maindex HEADER_STDC
@@ -3530,6 +3500,58 @@ The way to check if the system supports @sc{posix.1} is:
 @end group
 @end example
 
+@defmac AC_HEADER_TIME
+@maindex HEADER_TIME
+@cvindex TIME_WITH_SYS_TIME
+If a program may include both @file{time.h} and @file{sys/time.h},
+define @code{TIME_WITH_SYS_TIME}.  On some older systems,
+@file{sys/time.h} includes @file{time.h}, but @file{time.h} is not
+protected against multiple inclusion, so programs should not explicitly
+include both files.  This macro is useful in programs that use, for
+example, @code{struct timeval} or @code{struct timezone} as well as
+@code{struct tm}.  It is best used in conjunction with
+@code{HAVE_SYS_TIME_H}, which can be checked for using
+@code{AC_CHECK_HEADERS(sys/time.h)}.
+
+@example
+@group
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+@end group
+@end example
+@end defmac
+
+
+@defmac AC_HEADER_TIOCGWINSZ
+@maindex HEADER_TIOCGWINSZ
+@cvindex GWINSZ_IN_SYS_IOCTL
+@c FIXME: I need clarifications from Jim.
+If the use of @code{TIOCGWINSZ} requires @file{<sys/ioctl.h>}, then
+define @code{GWINSZ_IN_SYS_IOCTL}.  Otherwise @code{TIOCGWINSZ} can be
+found in @file{<termios.h>}.
+
+Use:
+
+@example
+@group
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if GWINSZ_IN_SYS_IOCTL
+# include <sys/ioctl.h>
+#endif
+@end group
+@end example
+@end defmac
 
 @node Generic Headers,  , Particular Headers, Header Files
 @subsection Generic Header Checks
@@ -4431,6 +4453,15 @@ If the system supports file names longer than 14 characters, define
 @code{HAVE_LONG_FILE_NAMES}.
 @end defmac
 
+@defmac AC_SYS_POSIX_TERMIOS
+@maindex SYS_POSIX_TERMIOS
+@cindex POSIX termios headers
+@cindex termios POSIX headers
+Check to see if POSIX termios headers and functions are available on the
+system.  If so, set the shell variable @code{am_cv_sys_posix_termios} to
+@samp{yes}.  If not, set the variable to @samp{no}.
+@end defmac
+
 @defmac AC_SYS_RESTARTABLE_SYSCALLS
 @maindex SYS_RESTARTABLE_SYSCALLS
 @cvindex HAVE_RESTARTABLE_SYSCALLS
index ba052231c43bfd5005d2235bd811f3066105c719..815a1e7c8a5519bc869e48f00b742bffcbb8c4e8 100644 (file)
@@ -542,10 +542,60 @@ fi
 ])# AC_HEADER_TIME
 
 
+# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
+# ----------------------------------
+define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
+[AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
+                ac_cv_sys_tiocgwinsz_in_termios_h,
+[AC_EGREP_CPP([yes],
+              [#include <sys/types.h>
+#include <termios.h>
+#ifdef TIOCGWINSZ
+  yes
+#endif
+],
+                ac_cv_sys_tiocgwinsz_in_termios_h=yes)])
+])# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
+
+
+# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
+# ----------------------------------
+define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
+[AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
+                ac_cv_sys_tiocgwinsz_in_sys_ioctl_h,
+[AC_EGREP_CPP([yes],
+              [#include <sys/types.h>
+#include <sys/ioctl.h>
+#ifdef TIOCGWINSZ
+  yes
+#endif
+],
+                ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes)])
+])# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
 
 
-# A few obsolete macros.
+# AC_HEADER_TIOCGWINSZ
+# --------------------
+# Look for a header that defines TIOCGWINSZ.
+# FIXME: Is this the proper name?  Is this the proper implementation?
+# I need more help.
+AC_DEFUN([AC_HEADER_TIOCGWINSZ],
+[AC_REQUIRE([AC_SYS_POSIX_TERMIOS])dnl
+if test $ac_cv_sys_posix_termios = yes; then
+  _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
+fi
+if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
+  _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
+  if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
+    AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1,
+              [Define if `TIOCGWINSZ' requires <sys/ioctl.h>])
+  fi
+fi
+])# AC_HEADER_TIOCGWINSZ
 
+
+# AU::AC_UNISTD_H
+# ---------------
 AU_DEFUN([AC_UNISTD_H],
 [AC_CHECK_HEADERS(unistd.h)])
 
@@ -1109,6 +1159,19 @@ fi
 ])# AC_SYS_RESTARTABLE_SYSCALLS
 
 
+# AC_SYS_POSIX_TERMIOS
+# --------------------
+AC_DEFUN([AC_SYS_POSIX_TERMIOS],
+[AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios,
+[AC_TRY_LINK([#include <sys/types.h>
+#include <unistd.h>
+@%:@include <termios.h>],
+             [/* SunOS 4.0.3 has termios.h but not the library calls.  */
+   tcgetattr(0, 0);],
+             ac_cv_sys_posix_termios=yes,
+             ac_cv_sys_posix_termios=no)])
+])# AC_SYS_POSIX_TERMIOS
+
 
 
 ## --------------------- ##