]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
1999-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
authorBen Elliston <bje+keyword+gnu.7caf74@air.net.au>
Sat, 4 Sep 1999 07:26:22 +0000 (07:26 +0000)
committerBen Elliston <bje+keyword+gnu.7caf74@air.net.au>
Sat, 4 Sep 1999 07:26:22 +0000 (07:26 +0000)
* 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
acgeneral.m4
autoconf.texi
doc/autoconf.texi
lib/autoconf/general.m4

index ea6988fd39c3b5b4419ef6afadba0086350b884e..fdcbec257f53bec6a4d65d41a82c39f7daf9293c 100644 (file)
 /* Define if on MINIX.  */
 #undef _MINIX
 
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef mode_t
-
 /* Define if you don't have <dirent.h>, but have <ndir.h>.  */
 #undef NDIR
 
 /* Define if your Fortran 77 compiler doesn't accept -c and -o together. */
 #undef F77_NO_MINUS_C_MINUS_O
 
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef pid_t
-
 /* Define if the system does not provide POSIX.1 features except
    with this defined.  */
 #undef _POSIX_1_SOURCE
    before release 3.  */
 #undef SETVBUF_REVERSED
 
-/* Define to `unsigned' if <sys/types.h> 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.
index 8ef41145c10bbfc58815578d8595258053031d34..8761896b2d2ae65db52b0a1828e79e0f106a27b5 100644 (file)
@@ -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 <sys/types.h>
+changequote([,]), ifelse([$3],,[#include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
-#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 <sys/types.h> does not define.])
 fi
 ])
 
index 21d4c4e3febe885f4df659bc7220361e4fc5fe33..d34deffde484d60e0aaf6f55c08912481033d135 100644 (file)
@@ -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
index 21d4c4e3febe885f4df659bc7220361e4fc5fe33..d34deffde484d60e0aaf6f55c08912481033d135 100644 (file)
@@ -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
index 8ef41145c10bbfc58815578d8595258053031d34..8761896b2d2ae65db52b0a1828e79e0f106a27b5 100644 (file)
@@ -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 <sys/types.h>
+changequote([,]), ifelse([$3],,[#include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
-#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 <sys/types.h> does not define.])
 fi
 ])