NEWS.stable: log cherry-pick [bf2664d]->[25ab657] doc: update users.txt
[gnulib.git] / m4 / random_r.m4
index 81ede1f..cbe445d 100644 (file)
@@ -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>