2009-01-27 10:29:55 +00:00
|
|
|
# stdlib_h.m4 serial 14
|
|
|
|
dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
|
2007-12-05 21:35:32 +00:00
|
|
|
dnl This file is free software; the Free Software Foundation
|
|
|
|
dnl gives unlimited permission to copy and/or distribute it,
|
|
|
|
dnl with or without modifications, as long as this notice is preserved.
|
|
|
|
|
|
|
|
AC_DEFUN([gl_STDLIB_H],
|
|
|
|
[
|
|
|
|
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
|
|
|
gl_CHECK_NEXT_HEADERS([stdlib.h])
|
2009-01-27 10:29:55 +00:00
|
|
|
AC_CHECK_HEADERS([random.h])
|
|
|
|
if test $ac_cv_header_random_h = yes; then
|
|
|
|
HAVE_RANDOM_H=1
|
|
|
|
else
|
|
|
|
HAVE_RANDOM_H=0
|
|
|
|
fi
|
|
|
|
AC_SUBST([HAVE_RANDOM_H])
|
2008-10-28 17:47:12 +00:00
|
|
|
AC_CHECK_TYPES([struct random_data],
|
|
|
|
[], [HAVE_STRUCT_RANDOM_DATA=0],
|
2009-01-27 10:29:55 +00:00
|
|
|
[[#include <stdlib.h>
|
|
|
|
#if HAVE_RANDOM_H
|
|
|
|
# include <random.h>
|
|
|
|
#endif
|
|
|
|
]])
|
2007-12-05 21:35:32 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
|
|
|
|
[
|
|
|
|
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
|
|
|
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
|
|
|
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
|
|
|
[
|
|
|
|
GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
|
|
|
|
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
|
|
|
|
GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
|
2008-10-28 17:47:12 +00:00
|
|
|
GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
|
|
|
|
GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
|
2007-12-05 21:35:32 +00:00
|
|
|
GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
|
|
|
|
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
|
|
|
|
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
|
|
|
|
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
|
2008-10-28 17:47:12 +00:00
|
|
|
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
|
2008-04-29 19:52:26 +00:00
|
|
|
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
|
2008-01-14 14:07:25 +00:00
|
|
|
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
|
2008-04-29 19:52:26 +00:00
|
|
|
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
|
2008-10-28 17:47:12 +00:00
|
|
|
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
|
|
|
|
GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
|
2008-01-14 14:07:25 +00:00
|
|
|
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
|
2007-12-05 21:35:32 +00:00
|
|
|
dnl Assume proper GNU behavior unless another module says otherwise.
|
2008-10-28 17:47:12 +00:00
|
|
|
HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
|
|
|
|
HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
|
|
|
|
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
|
|
|
|
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
|
|
|
|
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
|
|
|
|
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
|
|
|
|
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
|
|
|
|
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
|
|
|
|
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
|
|
|
|
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
|
|
|
|
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
|
|
|
|
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
|
|
|
|
HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
|
|
|
|
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
|
|
|
|
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
|
|
|
|
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
|
|
|
|
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
|
|
|
|
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
|
|
|
|
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
|
|
|
|
VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV])
|
2007-12-05 21:35:32 +00:00
|
|
|
])
|