From 141a4cd467601dd85890341c26bc3dcac544b5ae Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Sat, 4 Sep 1999 07:26:22 +0000 Subject: [PATCH] 1999-08-16 Kaveh R. Ghazi * acgeneral.m4 (AC_CHECK_TYPE): Add optional third argument INCLUDES, which specifies the headers in which to search for the type in question. Also, pass a "description" argument to AC_DEFINE_UNQUOTED. * acconfig.h (mode_t, off_t, pid_t, size_t): Remove definitions. * autoconf.texi (AC_CHECK_TYPE): Document optional third argument. --- acconfig.h | 12 ------------ acgeneral.m4 | 9 +++++---- autoconf.texi | 5 +++-- doc/autoconf.texi | 5 +++-- lib/autoconf/general.m4 | 9 +++++---- 5 files changed, 16 insertions(+), 24 deletions(-) diff --git a/acconfig.h b/acconfig.h index ea6988fd..fdcbec25 100644 --- a/acconfig.h +++ b/acconfig.h @@ -150,9 +150,6 @@ /* Define if on MINIX. */ #undef _MINIX -/* Define to `int' if doesn't define. */ -#undef mode_t - /* Define if you don't have , but have . */ #undef NDIR @@ -172,12 +169,6 @@ /* Define if your Fortran 77 compiler doesn't accept -c and -o together. */ #undef F77_NO_MINUS_C_MINUS_O -/* Define to `long' if doesn't define. */ -#undef off_t - -/* Define to `int' if doesn't define. */ -#undef pid_t - /* Define if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE @@ -205,9 +196,6 @@ before release 3. */ #undef SETVBUF_REVERSED -/* Define to `unsigned' if doesn't define. */ -#undef size_t - /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. diff --git a/acgeneral.m4 b/acgeneral.m4 index 8ef41145..8761896b 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1987,7 +1987,7 @@ undefine([AC_CV_NAME])dnl dnl ### Checking for typedefs -dnl AC_CHECK_TYPE(TYPE, DEFAULT) +dnl AC_CHECK_TYPE(TYPE, DEFAULT [, INCLUDES]) AC_DEFUN(AC_CHECK_TYPE, [AC_REQUIRE([AC_HEADER_STDC])dnl AC_MSG_CHECKING(for $1) @@ -1995,16 +1995,17 @@ AC_CACHE_VAL(ac_cv_type_$1, [AC_EGREP_CPP(dnl changequote(<<,>>)dnl <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include +changequote([,]), ifelse([$3],,[#include #if STDC_HEADERS #include #include -#endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl +#endif],[$3]) +, eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - AC_DEFINE_UNQUOTED($1, $2) + AC_DEFINE_UNQUOTED($1, $2, [Define to \`$2' if does not define.]) fi ]) diff --git a/autoconf.texi b/autoconf.texi index 21d4c4e3..d34deffd 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -2685,12 +2685,13 @@ If @code{uid_t} is not defined, define @code{uid_t} to be @code{int} and This macro is used to check for typedefs not covered by the particular test macros. -@defmac AC_CHECK_TYPE (@var{type}, @var{default}) +@defmac AC_CHECK_TYPE (@var{type}, @var{default} @r{[}, @var{includes}@r{]}) @maindex CHECK_TYPE If the type @var{type} is not defined in @file{sys/types.h}, or @file{stdlib.h} or @file{stddef.h} if they exist, define it to be the C (or C++) builtin type @var{default}; e.g., @samp{short} or -@samp{unsigned}. +@samp{unsigned}. The default header files to search can be replaced +by supplying the optional argument @var{includes}. @end defmac @node C Compiler Characteristics, Fortran 77 Compiler Characteristics, Typedefs, Existing Tests diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 21d4c4e3..d34deffd 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2685,12 +2685,13 @@ If @code{uid_t} is not defined, define @code{uid_t} to be @code{int} and This macro is used to check for typedefs not covered by the particular test macros. -@defmac AC_CHECK_TYPE (@var{type}, @var{default}) +@defmac AC_CHECK_TYPE (@var{type}, @var{default} @r{[}, @var{includes}@r{]}) @maindex CHECK_TYPE If the type @var{type} is not defined in @file{sys/types.h}, or @file{stdlib.h} or @file{stddef.h} if they exist, define it to be the C (or C++) builtin type @var{default}; e.g., @samp{short} or -@samp{unsigned}. +@samp{unsigned}. The default header files to search can be replaced +by supplying the optional argument @var{includes}. @end defmac @node C Compiler Characteristics, Fortran 77 Compiler Characteristics, Typedefs, Existing Tests diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 8ef41145..8761896b 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1987,7 +1987,7 @@ undefine([AC_CV_NAME])dnl dnl ### Checking for typedefs -dnl AC_CHECK_TYPE(TYPE, DEFAULT) +dnl AC_CHECK_TYPE(TYPE, DEFAULT [, INCLUDES]) AC_DEFUN(AC_CHECK_TYPE, [AC_REQUIRE([AC_HEADER_STDC])dnl AC_MSG_CHECKING(for $1) @@ -1995,16 +1995,17 @@ AC_CACHE_VAL(ac_cv_type_$1, [AC_EGREP_CPP(dnl changequote(<<,>>)dnl <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include +changequote([,]), ifelse([$3],,[#include #if STDC_HEADERS #include #include -#endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl +#endif],[$3]) +, eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - AC_DEFINE_UNQUOTED($1, $2) + AC_DEFINE_UNQUOTED($1, $2, [Define to \`$2' if does not define.]) fi ]) -- 2.47.2