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.9 by root, Tue Aug 14 11:50:43 2018 UTC vs.
Revision 1.13 by root, Mon Mar 18 23:52: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}
65AC_CHECK_HEADERS([sys/sysmacros.h]) 65AC_CHECK_HEADERS([sys/sysmacros.h])
66 66
67dnl solaris major/minor 67dnl solaris major/minor
68AC_CHECK_HEADERS([sys/mkdev.h]) 68AC_CHECK_HEADERS([sys/mkdev.h])
69 69
70dnl readv / preadv, vmsplice
71AC_CHECK_HEADERS([sys/uio.h])
72
73
70AC_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>
71#include <fcntl.h> 76#include <fcntl.h>
77#include <sys/uio.h>
72int main (void) 78int main (void)
73{ 79{
74 ssize_t res; 80 ssize_t res;
75 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);
76 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);
81test $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)
82 88
83AC_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([[
84#include <fcntl.h> 90#include <fcntl.h>
85#include <unistd.h> 91#include <unistd.h>
92int main (void)
93{
86int res; 94 int res;
87int main (void)
88{
89 res = pipe2 (0, 0); 95 res = pipe2 (0, 0);
90 return 0; 96 return 0;
91} 97}
92]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)]) 98]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)])
93test $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)
94 100
95AC_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([[
96#include <sys/eventfd.h> 102#include <sys/eventfd.h>
103int main (void)
104{
97int res; 105 int res;
98int main (void)
99{
100 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); 106 res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK);
101 return 0; 107 return 0;
102} 108}
103]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)]) 109]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)])
104test $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)
105 111
106AC_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([[
107#include <sys/timerfd.h> 113#include <sys/timerfd.h>
108int res;
109int main (void) 114int main (void)
110{ 115{
111 struct itimerspec its; 116 struct itimerspec its;
117 int res;
112 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK); 118 res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK);
113 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);
114 res = timerfd_gettime (res, &its); 120 res = timerfd_gettime (res, &its);
115 return 0; 121 return 0;
116} 122}
119 125
120AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ 126AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
121#include <unistd.h> 127#include <unistd.h>
122#include <sys/syscall.h> 128#include <sys/syscall.h>
123/*#include <linux/copy.h>*/ 129/*#include <linux/copy.h>*/
130int main (void)
131{
124int res; 132 int res;
125int main (void)
126{
127 /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/ 133 /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/
128 res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0); 134 res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0);
129 return 0; 135 return 0;
130} 136}
131]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)]) 137]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)])
134AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 140AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
135#include "EXTERN.h" 141#include "EXTERN.h"
136#include "perl.h" 142#include "perl.h"
137#include "XSUB.h" 143#include "XSUB.h"
138 144
139int res;
140int main (void) 145int main (void)
141{ 146{
142 return PL_statcache.st_atimensec 147 return PL_statcache.st_atimensec
143 + PL_statcache.st_mtimensec 148 + PL_statcache.st_mtimensec
144 + PL_statcache.st_ctimensec; 149 + PL_statcache.st_ctimensec;
145 return 0;
146} 150}
147]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) 151]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)])
148test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec) 152test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec)
149 153
150AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 154AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
151#include "EXTERN.h" 155#include "EXTERN.h"
152#include "perl.h" 156#include "perl.h"
153#include "XSUB.h" 157#include "XSUB.h"
154 158
155int res;
156int main (void) 159int main (void)
157{ 160{
158 return PL_statcache.st_atim.tv_nsec 161 return PL_statcache.st_atim.tv_nsec
159 + PL_statcache.st_mtim.tv_nsec 162 + PL_statcache.st_mtim.tv_nsec
160 + PL_statcache.st_ctim.tv_nsec; 163 + PL_statcache.st_ctim.tv_nsec;
162]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) 165]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)])
163test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec) 166test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec)
164 167
165# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? 168# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec?
166 169
170AC_CACHE_CHECK(for st_birthtimensec, ac_cv_birthtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
171#include "EXTERN.h"
172#include "perl.h"
173#include "XSUB.h"
174
175int main (void)
176{
177 return PL_statcache.st_birthtime + PL_statcache.st_birthtimensec;
178}
179]])],ac_cv_birthtimensec=yes,ac_cv_birthtimensec=no)])
180test $ac_cv_birthtimensec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMENSEC, 1, birthtime nanosecond access by st_birthtimensec)
181
182AC_CACHE_CHECK(for st_birthtimespec, ac_cv_birthtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
183#include "EXTERN.h"
184#include "perl.h"
185#include "XSUB.h"
186
187int main (void)
188{
189 return PL_statcache.st_birthtim.tv_sec + PL_statcache.st_birthtim.tv_nsec;
190}
191]])],ac_cv_birthtimespec=yes,ac_cv_birthtimespec=no)])
192test $ac_cv_birthtimespec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMESPEC, 1, birthtime nanosecond access by st_birthtimespec)
193
194AC_CACHE_CHECK(for st_gen, ac_cv_st_gen, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
195#include "EXTERN.h"
196#include "perl.h"
197#include "XSUB.h"
198
199int main (void)
200{
201 return PL_statcache.st_gen;
202}
203]])],ac_cv_st_gen=yes,ac_cv_st_gen=no)])
204test $ac_cv_st_gen = yes && AC_DEFINE(HAVE_ST_GEN, 1, stat st_gen member)
205
206AC_CACHE_CHECK(for statx, ac_cv_statx, [AC_LINK_IFELSE([AC_LANG_SOURCE([[
207#include <sys/types.h>
208#include <sys/stat.h>
209#include <unistd.h>
210#include <fcntl.h>
211int res;
212int main (void)
213{
214 struct statx sx;
215 int res;
216 res = statx (AT_FDCWD, ".",
217 AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | AT_STATX_SYNC_AS_STAT | AT_STATX_FORCE_SYNC | AT_STATX_DONT_SYNC,
218 STATX_ALL, &sx);
219 STATX_TYPE; STATX_MODE; STATX_NLINK; STATX_UID; STATX_GID; STATX_ATIME; STATX_MTIME; STATX_CTIME;
220 STATX_INO; STATX_SIZE; STATX_BLOCKS; STATX_BASIC_STATS; STATX_BTIME; STATX_ALL;
221 STATX_ATTR_COMPRESSED; STATX_ATTR_IMMUTABLE; STATX_ATTR_APPEND; STATX_ATTR_NODUMP; STATX_ATTR_ENCRYPTED;
222 return 0;
223}
224]])],ac_cv_statx=yes,ac_cv_statx=no)])
225test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available)
226
167AC_OUTPUT 227AC_OUTPUT
168 228

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines