Jan Stancek | 17dce71 | 2015-07-13 13:58:21 +0200 | [diff] [blame] | 1 | dnl |
| 2 | dnl Copyright (c) Linux Test Project, 2015 |
| 3 | dnl |
| 4 | dnl This program is free software; you can redistribute it and/or modify |
| 5 | dnl it under the terms of the GNU General Public License as published by |
| 6 | dnl the Free Software Foundation; either version 2 of the License, or |
| 7 | dnl (at your option) any later version. |
| 8 | dnl |
| 9 | dnl This program is distributed in the hope that it will be useful, |
| 10 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
| 12 | dnl the GNU General Public License for more details. |
| 13 | dnl |
| 14 | |
| 15 | dnl |
| 16 | dnl LTP_CHECK_LINUXRANDOM |
| 17 | dnl ---------------------------- |
| 18 | dnl |
Xiaoguang Wang | f330cc0 | 2015-07-22 10:40:23 +0800 | [diff] [blame] | 19 | |
| 20 | AC_DEFUN([LTP_CHECK_LINUXRANDOM],[dnl |
| 21 | AC_MSG_CHECKING([for linux/random.h]) |
| 22 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
| 23 | |
| 24 | #include <linux/random.h> |
| 25 | int main(void) { |
| 26 | return 0; |
| 27 | }])],[has_linux_random_h="yes"]) |
| 28 | |
| 29 | if test "x$has_linux_random_h" = xyes; then |
| 30 | AC_DEFINE(HAVE_LINUX_RANDOM_H,1,[Define to 1 if having a valid linux/random.h]) |
| 31 | AC_MSG_RESULT(yes) |
| 32 | else |
| 33 | AC_MSG_RESULT(no) |
| 34 | fi |
| 35 | ]) |