summaryrefslogtreecommitdiff
path: root/m4/random_r.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-02-08 12:27:12 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-02-08 12:28:28 -0800
commit7e50c8f03e02002e7cf66f05844501be136fedd0 (patch)
treefc97569a34f39283fac5857cad15311378e091c1 /m4/random_r.m4
parent4f8c7a6e29f65cb71eca3092f712c71d580ba936 (diff)
downloadgnulib-7e50c8f03e02002e7cf66f05844501be136fedd0.tar.gz
stdlib: improve random_r modularization
Diffstat (limited to 'm4/random_r.m4')
-rw-r--r--m4/random_r.m47
1 files changed, 6 insertions, 1 deletions
diff --git a/m4/random_r.m4 b/m4/random_r.m4
index 81ede1fa09..cbe445d801 100644
--- a/m4/random_r.m4
+++ b/m4/random_r.m4
@@ -1,4 +1,4 @@
-# serial 2
+# serial 3
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,
@@ -8,6 +8,11 @@ AC_DEFUN([gl_FUNC_RANDOM_R],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
+ if test $ac_cv_header_random_h = no; then
+ HAVE_RANDOM_H=0
+ fi
+
AC_CHECK_TYPES([struct random_data],
[], [HAVE_STRUCT_RANDOM_DATA=0],
[[#include <stdlib.h>