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.17 by root, Tue Jul 27 07:58:38 2021 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
73AC_CACHE_CHECK([for siginfo_t], ac_cv_siginfo_t, [AC_LINK_IFELSE([AC_LANG_SOURCE([
74#include <signal.h>
75int main (void)
76{
77 siginfo_t si;
78 si.si_code;
79 si.si_pid;
80 si.si_uid;
81 si.si_value.sival_int;
82 si.si_value.sival_ptr;
83 return 0;
84}
85])],ac_cv_siginfo_t=yes,ac_cv_siginfo_t=no)])
86test $ac_cv_siginfo_t = yes && AC_DEFINE(HAVE_SIGINFO_T, 1, have siginfo_t in signal.h)
87
88AC_CACHE_CHECK([for unix-style syscall interface], ac_cv_syscall, [AC_LINK_IFELSE([AC_LANG_SOURCE([
89#include <unistd.h>
90#include <sys/syscall.h>
91int main (void)
92{
93 long res = syscall (SYS_exit, 0);
94 return 0;
95}
96])],ac_cv_syscall=yes,ac_cv_syscall=no)])
97test $ac_cv_syscall = yes && AC_DEFINE(HAVE_SYSCALL, 1, unix syscall interface)
98
67AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([ 99AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([
100#include <sys/types.h>
68#include <fcntl.h> 101#include <fcntl.h>
102#include <sys/uio.h>
69int main (void) 103int main (void)
70{ 104{
71 ssize_t res; 105 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); 106 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); 107 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) 112test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available)
79 113
80AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 114AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
81#include <fcntl.h> 115#include <fcntl.h>
82#include <unistd.h> 116#include <unistd.h>
117int main (void)
118{
83int res; 119 int res;
84int main (void)
85{
86 res = pipe2 (0, 0); 120 res = pipe2 (0, 0);
87 return 0; 121 return 0;
88} 122}
89]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)]) 123]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)])
90test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available) 124test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available)
91 125
92AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 126AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
93#include <sys/eventfd.h> 127#include <sys/eventfd.h>
128int main (void)
129{
94int res; 130 int res;
95int main (void)
96{
97 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); 131 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK);
98 return 0; 132 return 0;
99} 133}
100]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)]) 134]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)])
101test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available) 135test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available)
102 136
103AC_CACHE_CHECK(for timerfd, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 137AC_CACHE_CHECK(for timerfd_*, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
104#include <sys/timerfd.h> 138#include <sys/timerfd.h>
105int res;
106int main (void) 139int main (void)
107{ 140{
108 struct itimerspec its; 141 struct itimerspec its;
142 int res;
109 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK); 143 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK);
110 res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0); 144 res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0);
111 res = timerfd_gettime (res, &its); 145 res = timerfd_gettime (res, &its);
112 return 0; 146 return 0;
113} 147}
114]])],ac_cv_timerfd=yes,ac_cv_timerfd=no)]) 148]])],ac_cv_timerfd=yes,ac_cv_timerfd=no)])
115test $ac_cv_timerfd = yes && AC_DEFINE(HAVE_TIMERFD, 1, timerfd_*(2) are available) 149test $ac_cv_timerfd = yes && AC_DEFINE(HAVE_TIMERFD, 1, timerfd_*(2) are available)
116 150
151AC_CACHE_CHECK(for memfd_create, ac_cv_memfd_create, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
152#include <sys/mman.h>
153int main (void)
154{
155 int res = memfd_create ("name", MFD_CLOEXEC | MFD_ALLOW_SEALING);
156 return 0;
157}
158]])],ac_cv_memfd_create=yes,ac_cv_memfd_create=no)])
159test $ac_cv_memfd_create = yes && AC_DEFINE(HAVE_MEMFD_CREATE, 1, memfd_create(2) is available)
160
117AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 161AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
118#include <unistd.h> 162#include <unistd.h>
119#include <sys/syscall.h> 163#include <sys/syscall.h>
120/*#include <linux/copy.h>*/ 164/*#include <linux/copy.h>*/
165int main (void)
166{
121int res; 167 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);*/ 168 /*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); 169 res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0);
126 return 0; 170 return 0;
127} 171}
128]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)]) 172]])],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([[ 175AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
132#include "EXTERN.h" 176#include "EXTERN.h"
133#include "perl.h" 177#include "perl.h"
134#include "XSUB.h" 178#include "XSUB.h"
135 179
136int res;
137int main (void) 180int main (void)
138{ 181{
139 return PL_statcache.st_atimensec 182 return PL_statcache.st_atimensec
140 + PL_statcache.st_mtimensec 183 + PL_statcache.st_mtimensec
141 + PL_statcache.st_ctimensec; 184 + PL_statcache.st_ctimensec;
142 return 0;
143} 185}
144]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) 186]])],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) 187test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec)
146 188
147AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 189AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
148#include "EXTERN.h" 190#include "EXTERN.h"
149#include "perl.h" 191#include "perl.h"
150#include "XSUB.h" 192#include "XSUB.h"
151 193
152int res;
153int main (void) 194int main (void)
154{ 195{
155 return PL_statcache.st_atim.tv_nsec 196 return PL_statcache.st_atim.tv_nsec
156 + PL_statcache.st_mtim.tv_nsec 197 + PL_statcache.st_mtim.tv_nsec
157 + PL_statcache.st_ctim.tv_nsec; 198 + PL_statcache.st_ctim.tv_nsec;
159]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) 200]])],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) 201test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec)
161 202
162# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? 203# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec?
163 204
205AC_CACHE_CHECK(for st_birthtimensec, ac_cv_birthtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
206#include "EXTERN.h"
207#include "perl.h"
208#include "XSUB.h"
209
210int main (void)
211{
212 return PL_statcache.st_birthtime + PL_statcache.st_birthtimensec;
213}
214]])],ac_cv_birthtimensec=yes,ac_cv_birthtimensec=no)])
215test $ac_cv_birthtimensec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMENSEC, 1, birthtime nanosecond access by st_birthtimensec)
216
217AC_CACHE_CHECK(for st_birthtimespec, ac_cv_birthtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
218#include "EXTERN.h"
219#include "perl.h"
220#include "XSUB.h"
221
222int main (void)
223{
224 return PL_statcache.st_birthtim.tv_sec + PL_statcache.st_birthtim.tv_nsec;
225}
226]])],ac_cv_birthtimespec=yes,ac_cv_birthtimespec=no)])
227test $ac_cv_birthtimespec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMESPEC, 1, birthtime nanosecond access by st_birthtimespec)
228
229AC_CACHE_CHECK(for st_gen, ac_cv_st_gen, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
230#include "EXTERN.h"
231#include "perl.h"
232#include "XSUB.h"
233
234int main (void)
235{
236 return PL_statcache.st_gen;
237}
238]])],ac_cv_st_gen=yes,ac_cv_st_gen=no)])
239test $ac_cv_st_gen = yes && AC_DEFINE(HAVE_ST_GEN, 1, stat st_gen member)
240
241AC_CACHE_CHECK(for statx, ac_cv_statx, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
242#include <sys/types.h>
243#include <sys/stat.h>
244#include <unistd.h>
245#include <fcntl.h>
246int res;
247int main (void)
248{
249 struct statx sx;
250 int res;
251 res = statx (AT_FDCWD, ".",
252 AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | AT_STATX_SYNC_AS_STAT | AT_STATX_FORCE_SYNC | AT_STATX_DONT_SYNC,
253 STATX_ALL, &sx);
254 STATX_TYPE; STATX_MODE; STATX_NLINK; STATX_UID; STATX_GID; STATX_ATIME; STATX_MTIME; STATX_CTIME;
255 STATX_INO; STATX_SIZE; STATX_BLOCKS; STATX_BASIC_STATS; STATX_BTIME; STATX_ALL;
256 STATX_ATTR_COMPRESSED; STATX_ATTR_IMMUTABLE; STATX_ATTR_APPEND; STATX_ATTR_NODUMP; STATX_ATTR_ENCRYPTED;
257 return 0;
258}
259]])],ac_cv_statx=yes,ac_cv_statx=no)])
260test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available)
261
262AC_CACHE_CHECK(for accept4, ac_cv_accept4, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
263#include <sys/types.h>
264#include <sys/socket.h>
265int main (void)
266{
267 int res;
268 res = accept4 (1, (struct sockaddr *)0, (socklen_t)0, SOCK_NONBLOCK | SOCK_CLOEXEC);
269 return 0;
270}
271]])],ac_cv_accept4=yes,ac_cv_accept4=no)])
272test $ac_cv_accept4 = yes && AC_DEFINE(HAVE_ACCEPT4, 1, accept4(2) is available)
273
164AC_OUTPUT 274AC_OUTPUT
165 275

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines