… | |
… | |
2 | pthread_create, |
2 | pthread_create, |
3 | [pthread pthreads pthreadVC2], |
3 | [pthread pthreads pthreadVC2], |
4 | , |
4 | , |
5 | [AC_MSG_ERROR(pthread functions not found)] |
5 | [AC_MSG_ERROR(pthread functions not found)] |
6 | ) |
6 | ) |
|
|
7 | |
|
|
8 | AC_CACHE_CHECK(for utimes, ac_cv_utimes, [AC_LINK_IFELSE([[ |
|
|
9 | #include <sys/types.h> |
|
|
10 | #include <sys/time.h> |
|
|
11 | #include <utime.h> |
|
|
12 | struct timeval tv[2]; |
|
|
13 | int res; |
|
|
14 | int main (void) |
|
|
15 | { |
|
|
16 | res = utimes ("/", tv); |
|
|
17 | return 0; |
|
|
18 | } |
|
|
19 | ]],ac_cv_utimes=yes,ac_cv_utimes=no)]) |
|
|
20 | test $ac_cv_utimes = yes && AC_DEFINE(HAVE_UTIMES, 1, utimes(2) is available) |
7 | |
21 | |
8 | AC_CACHE_CHECK(for futimes, ac_cv_futimes, [AC_LINK_IFELSE([[ |
22 | AC_CACHE_CHECK(for futimes, ac_cv_futimes, [AC_LINK_IFELSE([[ |
9 | #include <sys/types.h> |
23 | #include <sys/types.h> |
10 | #include <sys/time.h> |
24 | #include <sys/time.h> |
11 | #include <utime.h> |
25 | #include <utime.h> |
… | |
… | |
103 | return 0; |
117 | return 0; |
104 | } |
118 | } |
105 | ],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)]) |
119 | ],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)]) |
106 | test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available) |
120 | test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available) |
107 | |
121 | |
|
|
122 | dnl ############################################################################# |
|
|
123 | dnl # these checks exist for the benefit of IO::AIO |
|
|
124 | |
|
|
125 | dnl at least uclibc defines _POSIX_ADVISORY_INFO without *any* of the required |
|
|
126 | dnl functionality actually being present. ugh. |
|
|
127 | AC_CACHE_CHECK(for posix_madvise, ac_cv_posix_madvise, [AC_LINK_IFELSE([ |
|
|
128 | #include <sys/mman.h> |
|
|
129 | int main (void) |
|
|
130 | { |
|
|
131 | int res = posix_madvise ((void *)0, (size_t)0, POSIX_MADV_NORMAL); |
|
|
132 | int a = POSIX_MADV_SEQUENTIAL; |
|
|
133 | int b = POSIX_MADV_RANDOM; |
|
|
134 | int c = POSIX_MADV_WILLNEED; |
|
|
135 | int d = POSIX_MADV_DONTNEED; |
|
|
136 | return 0; |
|
|
137 | } |
|
|
138 | ],ac_cv_posix_madvise=yes,ac_cv_posix_madvise=no)]) |
|
|
139 | test $ac_cv_posix_madvise = yes && AC_DEFINE(HAVE_POSIX_MADVISE, 1, posix_madvise(2) is available) |
|
|
140 | |
|
|
141 | AC_CACHE_CHECK(for posix_fadvise, ac_cv_posix_fadvise, [AC_LINK_IFELSE([ |
|
|
142 | #define _XOPEN_SOURCE 600 |
|
|
143 | #include <fcntl.h> |
|
|
144 | int main (void) |
|
|
145 | { |
|
|
146 | int res = posix_fadvise ((int)0, (off_t)0, (off_t)0, POSIX_FADV_NORMAL); |
|
|
147 | int a = POSIX_FADV_SEQUENTIAL; |
|
|
148 | int b = POSIX_FADV_NOREUSE; |
|
|
149 | int c = POSIX_FADV_RANDOM; |
|
|
150 | int d = POSIX_FADV_WILLNEED; |
|
|
151 | int e = POSIX_FADV_DONTNEED; |
|
|
152 | return 0; |
|
|
153 | } |
|
|
154 | ],ac_cv_posix_fadvise=yes,ac_cv_posix_fadvise=no)]) |
|
|
155 | test $ac_cv_posix_fadvise = yes && AC_DEFINE(HAVE_POSIX_FADVISE, 1, posix_fadvise(2) is available) |
|
|
156 | |