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.22 by root, Thu Feb 29 18:02:43 2024 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
73dnl fexecve has always been in the single unix specification
74dnl but some atrocities (like opsnbsd and osx) claim implementing it
75dnl but then not definining it. ugh. garbage. and fexecve would be
76dnl useful for security, but, no, not on openbsd. we'd rather lie
77dnl about it.
78AC_CACHE_CHECK(for fexecve, ac_cv_fexecve, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
79#include <fcntl.h>
80#include <unistd.h>
81int main (void)
82{
83 char *const argv[] = { "foo", "bar", 0 };
84 int res = fexecve (-1, argv, 0);
85 return 0;
86}
87]])],ac_cv_fexecve=yes,ac_cv_fexecve=no)])
88test $ac_cv_fexecve = yes && AC_DEFINE(HAVE_FEXECVE, 1, fexecve(2) is available)
89
90AC_CACHE_CHECK([for siginfo_t], ac_cv_siginfo_t, [AC_LINK_IFELSE([AC_LANG_SOURCE([
91#include <signal.h>
92int main (void)
93{
94 siginfo_t si;
95 si.si_code;
96 si.si_pid;
97 si.si_uid;
98 si.si_value.sival_int;
99 si.si_value.sival_ptr;
100 return 0;
101}
102])],ac_cv_siginfo_t=yes,ac_cv_siginfo_t=no)])
103test $ac_cv_siginfo_t = yes && AC_DEFINE(HAVE_SIGINFO_T, 1, have siginfo_t in signal.h)
104
105AC_CACHE_CHECK([for unix-style syscall interface], ac_cv_syscall, [AC_LINK_IFELSE([AC_LANG_SOURCE([
106#include <unistd.h>
107#include <sys/syscall.h>
108int main (void)
109{
110 long res = syscall (SYS_exit, 0);
111 return 0;
112}
113])],ac_cv_syscall=yes,ac_cv_syscall=no)])
114test $ac_cv_syscall = yes && AC_DEFINE(HAVE_SYSCALL, 1, unix syscall interface)
115
67AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([ 116AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([
117#include <sys/types.h>
68#include <fcntl.h> 118#include <fcntl.h>
119#include <sys/uio.h>
69int main (void) 120int main (void)
70{ 121{
71 ssize_t res; 122 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); 123 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); 124 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) 129test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available)
79 130
80AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 131AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
81#include <fcntl.h> 132#include <fcntl.h>
82#include <unistd.h> 133#include <unistd.h>
134int main (void)
135{
83int res; 136 int res;
84int main (void)
85{
86 res = pipe2 (0, 0); 137 res = pipe2 (0, 0);
87 return 0; 138 return 0;
88} 139}
89]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)]) 140]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)])
90test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available) 141test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available)
91 142
92AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 143AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
93#include <sys/eventfd.h> 144#include <sys/eventfd.h>
145int main (void)
146{
94int res; 147 int res;
95int main (void)
96{
97 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); 148 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK);
98 return 0; 149 return 0;
99} 150}
100]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)]) 151]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)])
101test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available) 152test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available)
102 153
103AC_CACHE_CHECK(for timerfd, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 154AC_CACHE_CHECK(for timerfd_*, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
104#include <sys/timerfd.h> 155#include <sys/timerfd.h>
105int res;
106int main (void) 156int main (void)
107{ 157{
108 struct itimerspec its; 158 struct itimerspec its;
159 int res;
109 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK); 160 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK);
110 res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0); 161 res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0);
111 res = timerfd_gettime (res, &its); 162 res = timerfd_gettime (res, &its);
112 return 0; 163 return 0;
113} 164}
114]])],ac_cv_timerfd=yes,ac_cv_timerfd=no)]) 165]])],ac_cv_timerfd=yes,ac_cv_timerfd=no)])
115test $ac_cv_timerfd = yes && AC_DEFINE(HAVE_TIMERFD, 1, timerfd_*(2) are available) 166test $ac_cv_timerfd = yes && AC_DEFINE(HAVE_TIMERFD, 1, timerfd_*(2) are available)
116 167
117AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 168AC_CACHE_CHECK(for memfd_create, ac_cv_memfd_create, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
118#include <unistd.h>
119#include <sys/syscall.h> 169#include <sys/mman.h>
120/*#include <linux/copy.h>*/
121int res;
122int main (void) 170int main (void)
123{ 171{
124 /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/ 172 int res = memfd_create ("name", MFD_CLOEXEC | MFD_ALLOW_SEALING);
125 res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0);
126 return 0; 173 return 0;
127} 174}
128]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)]) 175]])],ac_cv_memfd_create=yes,ac_cv_memfd_create=no)])
129test $ac_cv_copy_file_range = yes && AC_DEFINE(HAVE_COPY_FILE_RANGE, 1, copy_file_range(2) is available) 176test $ac_cv_memfd_create = yes && AC_DEFINE(HAVE_MEMFD_CREATE, 1, memfd_create(2) is available)
130 177
131AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 178AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
132#include "EXTERN.h" 179#include "EXTERN.h"
133#include "perl.h" 180#include "perl.h"
134#include "XSUB.h" 181#include "XSUB.h"
135 182
136int res;
137int main (void) 183int main (void)
138{ 184{
139 return PL_statcache.st_atimensec 185 return PL_statcache.st_atimensec
140 + PL_statcache.st_mtimensec 186 + PL_statcache.st_mtimensec
141 + PL_statcache.st_ctimensec; 187 + PL_statcache.st_ctimensec;
142 return 0;
143} 188}
144]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) 189]])],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) 190test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec)
146 191
147AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 192AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
148#include "EXTERN.h" 193#include "EXTERN.h"
149#include "perl.h" 194#include "perl.h"
150#include "XSUB.h" 195#include "XSUB.h"
151 196
152int res;
153int main (void) 197int main (void)
154{ 198{
155 return PL_statcache.st_atim.tv_nsec 199 return PL_statcache.st_atim.tv_nsec
156 + PL_statcache.st_mtim.tv_nsec 200 + PL_statcache.st_mtim.tv_nsec
157 + PL_statcache.st_ctim.tv_nsec; 201 + PL_statcache.st_ctim.tv_nsec;
159]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) 203]])],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) 204test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec)
161 205
162# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? 206# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec?
163 207
208AC_CACHE_CHECK(for st_birthtimensec, ac_cv_birthtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
209#include "EXTERN.h"
210#include "perl.h"
211#include "XSUB.h"
212
213int main (void)
214{
215 return PL_statcache.st_birthtime + PL_statcache.st_birthtimensec;
216}
217]])],ac_cv_birthtimensec=yes,ac_cv_birthtimensec=no)])
218test $ac_cv_birthtimensec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMENSEC, 1, birthtime nanosecond access by st_birthtimensec)
219
220AC_CACHE_CHECK(for st_birthtimespec, ac_cv_birthtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
221#include "EXTERN.h"
222#include "perl.h"
223#include "XSUB.h"
224
225int main (void)
226{
227 return PL_statcache.st_birthtim.tv_sec + PL_statcache.st_birthtim.tv_nsec;
228}
229]])],ac_cv_birthtimespec=yes,ac_cv_birthtimespec=no)])
230test $ac_cv_birthtimespec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMESPEC, 1, birthtime nanosecond access by st_birthtimespec)
231
232AC_CACHE_CHECK(for st_gen, ac_cv_st_gen, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
233#include "EXTERN.h"
234#include "perl.h"
235#include "XSUB.h"
236
237int main (void)
238{
239 return PL_statcache.st_gen;
240}
241]])],ac_cv_st_gen=yes,ac_cv_st_gen=no)])
242test $ac_cv_st_gen = yes && AC_DEFINE(HAVE_ST_GEN, 1, stat st_gen member)
243
244AC_CACHE_CHECK(for statx, ac_cv_statx, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
245#include <sys/types.h>
246#include <sys/stat.h>
247#include <unistd.h>
248#include <fcntl.h>
249int res;
250int main (void)
251{
252 struct statx sx;
253 int res;
254 res = statx (AT_FDCWD, ".",
255 AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | AT_STATX_SYNC_AS_STAT | AT_STATX_FORCE_SYNC | AT_STATX_DONT_SYNC,
256 STATX_ALL, &sx);
257 STATX_TYPE; STATX_MODE; STATX_NLINK; STATX_UID; STATX_GID; STATX_ATIME; STATX_MTIME; STATX_CTIME;
258 STATX_INO; STATX_SIZE; STATX_BLOCKS; STATX_BASIC_STATS; STATX_BTIME; STATX_ALL;
259 STATX_ATTR_COMPRESSED; STATX_ATTR_IMMUTABLE; STATX_ATTR_APPEND; STATX_ATTR_NODUMP; STATX_ATTR_ENCRYPTED;
260 return 0;
261}
262]])],ac_cv_statx=yes,ac_cv_statx=no)])
263test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available)
264
265AC_CACHE_CHECK(for accept4, ac_cv_accept4, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
266#include <sys/types.h>
267#include <sys/socket.h>
268int main (void)
269{
270 int res = accept4 (1, (struct sockaddr *)0, (socklen_t)0, SOCK_NONBLOCK | SOCK_CLOEXEC);
271 return 0;
272}
273]])],ac_cv_accept4=yes,ac_cv_accept4=no)])
274test $ac_cv_accept4 = yes && AC_DEFINE(HAVE_ACCEPT4, 1, accept4(2) is available)
275
276AC_CHECK_HEADERS([sys/mount.h])
277AC_CACHE_CHECK(for mount, ac_cv_mount, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
278#include <sys/mount.h>
279int main (void)
280{
281 int res = mount ("path", "path", "fstype", MS_RDONLY, 0);
282 return 0;
283}
284]])],ac_cv_mount=yes,ac_cv_mount=no)])
285test $ac_cv_mount = yes && AC_DEFINE(HAVE_MOUNT, 1, mount is available)
286AC_CACHE_CHECK(for umount, ac_cv_umount, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
287#include <sys/mount.h>
288int main (void)
289{
290 int res = umount ("path");
291 return 0;
292}
293]])],ac_cv_umount=yes,ac_cv_umount=no)])
294test $ac_cv_umount = yes && AC_DEFINE(HAVE_UMOUNT, 1, umount is available)
295AC_CACHE_CHECK(for umount2, ac_cv_umount2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
296#include <sys/mount.h>
297int main (void)
298{
299 int res = umount2 ("path", MNT_FORCE|MNT_DETACH);
300 return 0;
301}
302]])],ac_cv_umount2=yes,ac_cv_umount2=no)])
303test $ac_cv_umount2 = yes && AC_DEFINE(HAVE_UMOUNT2, 1, umount2 is available)
304
164AC_OUTPUT 305AC_OUTPUT
165 306

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines