root / config / gr_check_createfilemapping.m4 @ f896ce03
History | View | Annotate | Download (1.9 kB)
| 1 | 5d69a524 | jcorgan | dnl |
|---|---|---|---|
| 2 | 5d69a524 | jcorgan | dnl Copyright 2005 Free Software Foundation, Inc. |
| 3 | 5d69a524 | jcorgan | dnl |
| 4 | 5d69a524 | jcorgan | dnl This file is part of GNU Radio |
| 5 | 5d69a524 | jcorgan | dnl |
| 6 | 5d69a524 | jcorgan | dnl GNU Radio is free software; you can redistribute it and/or modify |
| 7 | 5d69a524 | jcorgan | dnl it under the terms of the GNU General Public License as published by |
| 8 | 937b719d | eb | dnl the Free Software Foundation; either version 3, or (at your option) |
| 9 | 5d69a524 | jcorgan | dnl any later version. |
| 10 | 5d69a524 | jcorgan | dnl |
| 11 | 5d69a524 | jcorgan | dnl GNU Radio is distributed in the hope that it will be useful, |
| 12 | 5d69a524 | jcorgan | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | 5d69a524 | jcorgan | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | 5d69a524 | jcorgan | dnl GNU General Public License for more details. |
| 15 | 5d69a524 | jcorgan | dnl |
| 16 | 5d69a524 | jcorgan | dnl You should have received a copy of the GNU General Public License |
| 17 | 5d69a524 | jcorgan | dnl along with GNU Radio; see the file COPYING. If not, write to |
| 18 | 86f5c924 | eb | dnl the Free Software Foundation, Inc., 51 Franklin Street, |
| 19 | 86f5c924 | eb | dnl Boston, MA 02110-1301, USA. |
| 20 | 5d69a524 | jcorgan | |
| 21 | 5d69a524 | jcorgan | dnl AC_DEFUN([GR_CHECK_CREATEFILEMAPPING], |
| 22 | 5d69a524 | jcorgan | dnl [ |
| 23 | 5d69a524 | jcorgan | dnl AC_CHECK_FUNCS([CreateFileMapping]) |
| 24 | 5d69a524 | jcorgan | dnl ]) |
| 25 | 5d69a524 | jcorgan | |
| 26 | 5d69a524 | jcorgan | AC_DEFUN([GR_CHECK_CREATEFILEMAPPING],[ |
| 27 | 5d69a524 | jcorgan | AC_MSG_CHECKING([for CreateFileMapping function]) |
| 28 | 9e22f254 | Tom Rondeau | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
| 29 | 5d69a524 | jcorgan | #include <windows.h> |
| 30 | 5d69a524 | jcorgan | int main (int argc, char **argv) |
| 31 | 5d69a524 | jcorgan | {
|
| 32 | 5d69a524 | jcorgan | HANDLE handle; |
| 33 | 5d69a524 | jcorgan | int size; |
| 34 | 5d69a524 | jcorgan | char seg_name[[1024]]; |
| 35 | 5d69a524 | jcorgan | handle = CreateFileMapping( |
| 36 | 5d69a524 | jcorgan | INVALID_HANDLE_VALUE, // use paging file |
| 37 | 5d69a524 | jcorgan | NULL, // default security |
| 38 | 5d69a524 | jcorgan | PAGE_READWRITE, // read/write access |
| 39 | 5d69a524 | jcorgan | 0, // max. object size |
| 40 | 5d69a524 | jcorgan | size, // buffer size |
| 41 | 5d69a524 | jcorgan | seg_name); // name of mapping object |
| 42 | 5d69a524 | jcorgan | return 0; |
| 43 | 5d69a524 | jcorgan | } |
| 44 | 9e22f254 | Tom Rondeau | ])],[HAVE_CREATEFILEMAPPING=yes |
| 45 | 9e22f254 | Tom Rondeau | AC_DEFINE([HAVE_CREATEFILEMAPPING],[1], |
| 46 | 9e22f254 | Tom Rondeau | [Define if you have the CreateFilemapping function(win32).])], |
| 47 | 5d69a524 | jcorgan | [HAVE_CREATEFILEMAPPING=no]) |
| 48 | 5d69a524 | jcorgan | |
| 49 | 9e22f254 | Tom Rondeau | AC_MSG_RESULT([$HAVE_CREATEFILEMAPPING]) |
| 50 | 9e22f254 | Tom Rondeau | AM_CONDITIONAL([HAVE_CREATEFILEMAPPING], [test x$HAVE_CREATEFILEMAPPING = xyes]) |
| 51 | 5d69a524 | jcorgan | ]) |
| 52 | 5d69a524 | jcorgan |