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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines