version 1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2012/05/29 09:29:44
|
Line 1
|
Line 1
|
# stdlib_h.m4 serial 15 | # stdlib_h.m4 serial 37 |
dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. | dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
Line 7 dnl with or without modifications, as long as this not
|
Line 7 dnl with or without modifications, as long as this not
|
AC_DEFUN([gl_STDLIB_H], |
AC_DEFUN([gl_STDLIB_H], |
[ |
[ |
AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
gl_CHECK_NEXT_HEADERS([stdlib.h]) | gl_NEXT_HEADERS([stdlib.h]) |
AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT]) | |
if test $ac_cv_header_random_h = yes; then | dnl Check for declarations of anything we want to poison if the |
HAVE_RANDOM_H=1 | dnl corresponding gnulib module is not in use, and which is not |
else | dnl guaranteed by C89. |
HAVE_RANDOM_H=0 | gl_WARN_ON_USE_PREPARE([[#include <stdlib.h> |
fi | #if HAVE_SYS_LOADAVG_H |
AC_SUBST([HAVE_RANDOM_H]) | # include <sys/loadavg.h> |
AC_CHECK_TYPES([struct random_data], | #endif |
[], [HAVE_STRUCT_RANDOM_DATA=0], | #if HAVE_RANDOM_H |
[[#include <stdlib.h> | # include <random.h> |
#if HAVE_RANDOM_H | #endif |
# include <random.h> | ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp |
#endif | mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r |
]]) | setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt |
| unsetenv]) |
]) |
]) |
|
|
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], |
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], |
[ |
[ |
dnl Use AC_REQUIRE here, so that the default settings are expanded once only. |
dnl Use AC_REQUIRE here, so that the default settings are expanded once only. |
AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) |
| dnl Define it also as a C macro, for the benefit of the unit tests. |
| gl_MODULE_INDICATOR_FOR_TESTS([$1]) |
]) |
]) |
|
|
AC_DEFUN([gl_STDLIB_H_DEFAULTS], |
AC_DEFUN([gl_STDLIB_H_DEFAULTS], |
[ |
[ |
GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) | GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) |
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) | |
GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) | |
GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) |
GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) |
|
GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) |
|
GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) |
GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) |
GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) |
GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) |
GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) |
|
GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) |
|
GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) |
|
GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) |
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) |
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) |
|
GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) |
|
GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) |
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) |
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) |
|
GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) |
|
GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) |
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) |
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) |
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) |
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) |
|
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) |
|
GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) |
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) |
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) |
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) |
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) |
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) |
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) |
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) |
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) |
GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) |
GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) |
|
GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) |
|
GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) |
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) |
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) |
|
GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) |
dnl Assume proper GNU behavior unless another module says otherwise. |
dnl Assume proper GNU behavior unless another module says otherwise. |
|
HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) |
HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) |
HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) |
HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) | HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) |
| HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) |
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) |
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) |
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX]) | HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) |
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) |
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) |
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) | HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) |
| HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) |
| HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) |
| HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) |
| HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) |
| HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) |
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) |
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) |
|
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) |
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) |
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) |
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) |
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) |
|
HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) |
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) |
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) |
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) |
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) |
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) |
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) |
HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) |
HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) |
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) |
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) |
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) | HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) |
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) | HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) |
| REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) |
| REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) |
| REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) |
| REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) |
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) |
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) |
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) |
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) |
|
REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) |
|
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) |
|
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) |
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) |
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) |
VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV]) | REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) |
| REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) |
]) |
]) |