view m4/random_r.m4 @ 14314:289c9659c1c4

stdlib: don't depend on stdint * lib/stdlib.in.h: Don't include <stdint.h> merely because GNULIB_POSIXCHECK is defined. GNULIB_POSIXCHECK seems to be independent of whether stdint.h is needed. * m4/random_r.m4 (gl_FUNC_RANDOM_R): Check for struct random_data here, instead of ... * m4/stdlib_h.m4 (gl_STDLIB_H): ... here. Applications that need struct random_data should be using the random_r module, not just the stdlib module (which wouldn't make sense: what package needs just struct random_data without also needing random_r?). * modules/stdlib (Depends-on): Remove stdint.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 08 Feb 2011 12:24:48 -0800
parents 97fc9a21a8fb
children 27fdb01a2e2e
line wrap: on
line source

# serial 2
dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
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_FUNC_RANDOM_R],
[
  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])

  AC_CHECK_TYPES([struct random_data],
    [], [HAVE_STRUCT_RANDOM_DATA=0],
    [[#include <stdlib.h>
      #if HAVE_RANDOM_H
      # include <random.h>
      #endif
    ]])

  AC_CHECK_FUNCS([random_r])
  if test $ac_cv_func_random_r = no; then
    HAVE_RANDOM_R=0
    AC_LIBOBJ([random_r])
    gl_PREREQ_RANDOM_R
  fi
])

# Prerequisites of lib/random_r.c.
AC_DEFUN([gl_PREREQ_RANDOM_R], [
  :
])