ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/configure.ac
(Generate patch)

Comparing IO-AIO/configure.ac (file contents):
Revision 1.8 by root, Tue Aug 14 11:44:52 2018 UTC vs.
Revision 1.15 by root, Fri Sep 6 22:03:09 2019 UTC

12# for these to work, you need to run autoheader in IO::AIO, not libeio :( 12# for these to work, you need to run autoheader in IO::AIO, not libeio :(
13 13
14AC_CACHE_CHECK(for set/getrlimit, ac_cv_rlimits, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 14AC_CACHE_CHECK(for set/getrlimit, ac_cv_rlimits, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
15#include <sys/time.h> 15#include <sys/time.h>
16#include <sys/resource.h> 16#include <sys/resource.h>
17int res;
18int main (void) 17int main (void)
19{ 18{
20 struct rlimit srl; 19 struct rlimit srl;
20 int res;
21 srl.rlim_cur = srl.rlim_max = RLIM_INFINITY; 21 srl.rlim_cur = srl.rlim_max = RLIM_INFINITY;
22 res = getrlimit (RLIMIT_NOFILE, &srl); 22 res = getrlimit (RLIMIT_NOFILE, &srl);
23 res = setrlimit (RLIMIT_NOFILE, &srl); 23 res = setrlimit (RLIMIT_NOFILE, &srl);
24 return 0; 24 return 0;
25} 25}
62AC_CHECK_HEADERS([linux/fs.h linux/fiemap.h]) 62AC_CHECK_HEADERS([linux/fs.h linux/fiemap.h])
63 63
64dnl glibc major/minor macros 64dnl glibc major/minor macros
65AC_CHECK_HEADERS([sys/sysmacros.h]) 65AC_CHECK_HEADERS([sys/sysmacros.h])
66 66
67dnl solaris major/minor
68AC_CHECK_HEADERS([sys/mkdev.h])
69
70dnl readv / preadv, vmsplice
71AC_CHECK_HEADERS([sys/uio.h])
72
73
67AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([ 74AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([
75#include <sys/types.h>
68#include <fcntl.h> 76#include <fcntl.h>
77#include <sys/uio.h>
69int main (void) 78int main (void)
70{ 79{
71 ssize_t res; 80 ssize_t res;
72 res = splice ((int)0, (loff_t)0, (int)0, (loff_t *)0, (size_t)0, SPLICE_F_MOVE | SPLICE_F_NONBLOCK | SPLICE_F_MORE); 81 res = splice ((int)0, (loff_t)0, (int)0, (loff_t *)0, (size_t)0, SPLICE_F_MOVE | SPLICE_F_NONBLOCK | SPLICE_F_MORE);
73 res = tee ((int)0, (int)0, (size_t)0, SPLICE_F_NONBLOCK); 82 res = tee ((int)0, (int)0, (size_t)0, SPLICE_F_NONBLOCK);
78test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available) 87test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available)
79 88
80AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 89AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
81#include <fcntl.h> 90#include <fcntl.h>
82#include <unistd.h> 91#include <unistd.h>
92int main (void)
93{
83int res; 94 int res;
84int main (void)
85{
86 res = pipe2 (0, 0); 95 res = pipe2 (0, 0);
87 return 0; 96 return 0;
88} 97}
89]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)]) 98]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)])
90test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available) 99test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available)
91 100
92AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 101AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
93#include <sys/eventfd.h> 102#include <sys/eventfd.h>
103int main (void)
104{
94int res; 105 int res;
95int main (void)
96{
97 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); 106 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK);
98 return 0; 107 return 0;
99} 108}
100]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)]) 109]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)])
101test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available) 110test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available)
102 111
103AC_CACHE_CHECK(for timerfd, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 112AC_CACHE_CHECK(for timerfd_*, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
104#include <sys/timerfd.h> 113#include <sys/timerfd.h>
105int res;
106int main (void) 114int main (void)
107{ 115{
108 struct itimerspec its; 116 struct itimerspec its;
117 int res;
109 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK); 118 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK);
110 res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0); 119 res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0);
111 res = timerfd_gettime (res, &its); 120 res = timerfd_gettime (res, &its);
112 return 0; 121 return 0;
113} 122}
114]])],ac_cv_timerfd=yes,ac_cv_timerfd=no)]) 123]])],ac_cv_timerfd=yes,ac_cv_timerfd=no)])
115test $ac_cv_timerfd = yes && AC_DEFINE(HAVE_TIMERFD, 1, timerfd_*(2) are available) 124test $ac_cv_timerfd = yes && AC_DEFINE(HAVE_TIMERFD, 1, timerfd_*(2) are available)
125
126AC_CACHE_CHECK(for memfd_create, ac_cv_memfd_create, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
127#include <sys/mman.h>
128int main (void)
129{
130 int res = memfd_create ("name", MFD_CLOEXEC | MFD_ALLOW_SEALING);
131 return 0;
132}
133]])],ac_cv_memfd_create=yes,ac_cv_memfd_create=no)])
134test $ac_cv_memfd_create = yes && AC_DEFINE(HAVE_MEMFD_CREATE, 1, memfd_create(2) is available)
116 135
117AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 136AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
118#include <unistd.h> 137#include <unistd.h>
119#include <sys/syscall.h> 138#include <sys/syscall.h>
120/*#include <linux/copy.h>*/ 139/*#include <linux/copy.h>*/
140int main (void)
141{
121int res; 142 int res;
122int main (void)
123{
124 /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/ 143 /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/
125 res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0); 144 res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0);
126 return 0; 145 return 0;
127} 146}
128]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)]) 147]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)])
131AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 150AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
132#include "EXTERN.h" 151#include "EXTERN.h"
133#include "perl.h" 152#include "perl.h"
134#include "XSUB.h" 153#include "XSUB.h"
135 154
136int res;
137int main (void) 155int main (void)
138{ 156{
139 return PL_statcache.st_atimensec 157 return PL_statcache.st_atimensec
140 + PL_statcache.st_mtimensec 158 + PL_statcache.st_mtimensec
141 + PL_statcache.st_ctimensec; 159 + PL_statcache.st_ctimensec;
142 return 0;
143} 160}
144]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) 161]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)])
145test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec) 162test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec)
146 163
147AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 164AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
148#include "EXTERN.h" 165#include "EXTERN.h"
149#include "perl.h" 166#include "perl.h"
150#include "XSUB.h" 167#include "XSUB.h"
151 168
152int res;
153int main (void) 169int main (void)
154{ 170{
155 return PL_statcache.st_atim.tv_nsec 171 return PL_statcache.st_atim.tv_nsec
156 + PL_statcache.st_mtim.tv_nsec 172 + PL_statcache.st_mtim.tv_nsec
157 + PL_statcache.st_ctim.tv_nsec; 173 + PL_statcache.st_ctim.tv_nsec;
159]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) 175]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)])
160test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec) 176test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec)
161 177
162# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? 178# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec?
163 179
180AC_CACHE_CHECK(for st_birthtimensec, ac_cv_birthtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
181#include "EXTERN.h"
182#include "perl.h"
183#include "XSUB.h"
184
185int main (void)
186{
187 return PL_statcache.st_birthtime + PL_statcache.st_birthtimensec;
188}
189]])],ac_cv_birthtimensec=yes,ac_cv_birthtimensec=no)])
190test $ac_cv_birthtimensec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMENSEC, 1, birthtime nanosecond access by st_birthtimensec)
191
192AC_CACHE_CHECK(for st_birthtimespec, ac_cv_birthtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
193#include "EXTERN.h"
194#include "perl.h"
195#include "XSUB.h"
196
197int main (void)
198{
199 return PL_statcache.st_birthtim.tv_sec + PL_statcache.st_birthtim.tv_nsec;
200}
201]])],ac_cv_birthtimespec=yes,ac_cv_birthtimespec=no)])
202test $ac_cv_birthtimespec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMESPEC, 1, birthtime nanosecond access by st_birthtimespec)
203
204AC_CACHE_CHECK(for st_gen, ac_cv_st_gen, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
205#include "EXTERN.h"
206#include "perl.h"
207#include "XSUB.h"
208
209int main (void)
210{
211 return PL_statcache.st_gen;
212}
213]])],ac_cv_st_gen=yes,ac_cv_st_gen=no)])
214test $ac_cv_st_gen = yes && AC_DEFINE(HAVE_ST_GEN, 1, stat st_gen member)
215
216AC_CACHE_CHECK(for statx, ac_cv_statx, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
217#include <sys/types.h>
218#include <sys/stat.h>
219#include <unistd.h>
220#include <fcntl.h>
221int res;
222int main (void)
223{
224 struct statx sx;
225 int res;
226 res = statx (AT_FDCWD, ".",
227 AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | AT_STATX_SYNC_AS_STAT | AT_STATX_FORCE_SYNC | AT_STATX_DONT_SYNC,
228 STATX_ALL, &sx);
229 STATX_TYPE; STATX_MODE; STATX_NLINK; STATX_UID; STATX_GID; STATX_ATIME; STATX_MTIME; STATX_CTIME;
230 STATX_INO; STATX_SIZE; STATX_BLOCKS; STATX_BASIC_STATS; STATX_BTIME; STATX_ALL;
231 STATX_ATTR_COMPRESSED; STATX_ATTR_IMMUTABLE; STATX_ATTR_APPEND; STATX_ATTR_NODUMP; STATX_ATTR_ENCRYPTED;
232 return 0;
233}
234]])],ac_cv_statx=yes,ac_cv_statx=no)])
235test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available)
236
237AC_CACHE_CHECK(for accept4, ac_cv_accept4, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
238#include <sys/types.h>
239#include <sys/socket.h>
240int main (void)
241{
242 int res;
243 res = accept4 (1, (struct sockaddr *)0, (socklen_t)0, SOCK_NONBLOCK | SOCK_CLOEXEC);
244 return 0;
245}
246]])],ac_cv_accept4=yes,ac_cv_accept4=no)])
247test $ac_cv_accept4 = yes && AC_DEFINE(HAVE_ACCEPT4, 1, accept4(2) is available)
248
164AC_OUTPUT 249AC_OUTPUT
165 250

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines