diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/autoconf/c.m4 | 6 | ||||
-rw-r--r-- | lib/autoconf/functions.m4 | 53 | ||||
-rw-r--r-- | lib/autoconf/headers.m4 | 3 | ||||
-rw-r--r-- | lib/autoconf/specific.m4 | 6 | ||||
-rw-r--r-- | lib/autoconf/types.m4 | 2 |
5 files changed, 27 insertions, 43 deletions
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 0d2d7ddc..a2d67a4a 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -983,9 +983,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> ])], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=no])], [# It does not; compile a test program. AC_RUN_IFELSE( -[AC_LANG_SOURCE([[int -main () -{ +[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ /* Are we little or big endian? From Harbison&Steele. */ union { @@ -994,7 +992,7 @@ main () } u; u.l = 1; exit (u.c[sizeof (long int) - 1] == 1); -}]])], +]])], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [# try to guess the endianness by grepping values into an object file diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 861183cc..e5a38f52 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -279,7 +279,8 @@ fi AC_CACHE_CHECK([stack direction for C alloca], [ac_cv_c_stack_direction], [AC_RUN_IFELSE([AC_LANG_SOURCE( -[int +[AC_INCLUDES_DEFAULT +int find_stack_direction () { static char *addr = 0; @@ -1387,11 +1388,7 @@ AN_FUNCTION([setpgrp], [AC_FUNC_SETPGRP]) AC_DEFUN([AC_FUNC_SETPGRP], [AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, [AC_RUN_IFELSE( -[AC_LANG_PROGRAM( -[#if HAVE_UNISTD_H -# include <unistd.h> -#endif -], +[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [/* If this system has a BSD-style setpgrp which takes arguments, setpgrp(1, 1) will fail with ESRCH and return -1, in that case exit successfully. */ @@ -1462,7 +1459,10 @@ AC_DEFUN([AC_FUNC_STRTOD], [AC_SUBST(POW_LIB)dnl AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +]AC_INCLUDES_DEFAULT[ +#ifndef strtod double strtod (); +#endif int main() { @@ -1609,7 +1609,7 @@ AC_CACHE_CHECK(whether setvbuf arguments are reversed, # Try running it. AC_RUN_IFELSE( [AC_LANG_PROGRAM( - [[#include <stdio.h>]], + [AC_INCLUDES_DEFAULT], [[/* This call has the arguments reversed. A reversed system may check and see that the address of buf is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ @@ -1699,7 +1699,7 @@ AN_FUNCTION([fork], [AC_FUNC_FORK]) AN_FUNCTION([vfork], [AC_FUNC_FORK]) AC_DEFUN([AC_FUNC_FORK], [AC_REQUIRE([AC_TYPE_PID_T])dnl -AC_CHECK_HEADERS(unistd.h vfork.h) +AC_CHECK_HEADERS(vfork.h) AC_CHECK_FUNCS(fork vfork) if test "x$ac_cv_func_fork" = xyes; then _AC_FUNC_FORK @@ -1742,21 +1742,17 @@ fi # ------------- AC_DEFUN([_AC_FUNC_FORK], [AC_CACHE_CHECK(for working fork, ac_cv_func_fork_works, - [AC_RUN_IFELSE([/* By Ruediger Kuhlmann. */ - #include <sys/types.h> - #if HAVE_UNISTD_H - # include <unistd.h> - #endif - /* Some systems only have a dummy stub for fork() */ - int main () - { - if (fork() < 0) - exit (1); - exit (0); - }], - [ac_cv_func_fork_works=yes], - [ac_cv_func_fork_works=no], - [ac_cv_func_fork_works=cross])])] + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], + [ + /* By Ruediger Kuhlmann. */ + if (fork() < 0) + exit (1); + exit (0); + ])], + [ac_cv_func_fork_works=yes], + [ac_cv_func_fork_works=no], + [ac_cv_func_fork_works=cross])])] )# _AC_FUNC_FORK @@ -1765,14 +1761,8 @@ AC_DEFUN([_AC_FUNC_FORK], AC_DEFUN([_AC_FUNC_VFORK], [AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Thanks to Paul Eggert for this test. */ -#include <stdio.h> -#include <stdlib.h> -#include <sys/types.h> -#include <sys/stat.h> +]AC_INCLUDES_DEFAULT[ #include <sys/wait.h> -#if HAVE_UNISTD_H -# include <unistd.h> -#endif #if HAVE_VFORK_H # include <vfork.h> #endif @@ -1909,10 +1899,9 @@ Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl AC_CACHE_CHECK([for wait3 that fills in rusage], [ac_cv_func_wait3_rusage], [AC_RUN_IFELSE([AC_LANG_SOURCE( -[[#include <sys/types.h> +[AC_INCLUDES_DEFAULT[ #include <sys/time.h> #include <sys/resource.h> -#include <stdio.h> /* HP-UX has wait3 but does not fill in rusage at all. */ int main () diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 4f9b84e2..c17b6501 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -589,6 +589,7 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. AC_RUN_IFELSE([AC_LANG_SOURCE( [[#include <ctype.h> +#include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -608,7 +609,7 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); + exit (2); exit (0); }]])], , ac_cv_header_stdc=no, :) fi]) diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 6e9d9647..6f553fd6 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -255,18 +255,14 @@ old systems that lack `sigaction' and `SA_RESTART'. Don't bother with this macro unless you need to support very old systems like 4.2BSD and SVR3.])dnl AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl -AC_CHECK_HEADERS(unistd.h) AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls, [AC_RUN_IFELSE([AC_LANG_SOURCE( [/* Exit 0 (true) if wait returns something other than -1, i.e. the pid of the child, which means that wait was restarted after getting the signal. */ -#include <sys/types.h> +AC_INCLUDES_DEFAULT #include <signal.h> -#if HAVE_UNISTD_H -# include <unistd.h> -#endif #if HAVE_SYS_WAIT_H # include <sys/wait.h> #endif diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index 34cc528d..85c5fd93 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -253,7 +253,7 @@ AC_DEFUN([AC_TYPE_GETGROUPS], AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups, [AC_RUN_IFELSE([AC_LANG_SOURCE( [[/* Thanks to Mike Rendell for this test. */ -#include <sys/types.h> +]AC_INCLUDES_DEFAULT[ #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) |