]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - m4/package_aiodev.m4
xfsprogs: build: remove home-baked long/ptr size detection
[thirdparty/xfsprogs-dev.git] / m4 / package_aiodev.m4
1 #
2 # Check if we have a libaio.h installed
3 #
4 AC_DEFUN([AC_PACKAGE_WANT_AIO],
5 [ AC_CHECK_HEADERS(libaio.h, [ have_aio=true ], [ have_aio=false ])
6 AC_SUBST(have_aio)
7 ])
8
9 #
10 # Check if we have an aio.h installed
11 #
12 AC_DEFUN([AC_PACKAGE_NEED_AIO_H],
13 [ AC_CHECK_HEADERS(aio.h)
14 if test $ac_cv_header_aio_h = no; then
15 echo
16 echo 'FATAL ERROR: could not find a valid <aio.h> header.'
17 exit 1
18 fi
19 ])
20
21 #
22 # Check if we have the lio_listio routine in either libc/librt
23 #
24 AC_DEFUN([AC_PACKAGE_NEED_LIO_LISTIO],
25 [ AC_CHECK_FUNCS(lio_listio)
26 if test $ac_cv_func_lio_listio = yes; then
27 librt=""
28 else
29 AC_CHECK_LIB(rt, lio_listio,, [
30 echo
31 echo 'FATAL ERROR: could not find a library with lio_listio.'
32 exit 1],[-lpthread])
33 librt="-lrt"
34 fi
35 AC_SUBST(librt)
36 ])
37