X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=833b6d33464b378382fbcdb8d7acca9f49fccb73;hp=2851f54d951a983c2c2467b7188989b0b30eabea;hb=53b6c9794fcf64a53b4b51ab992af723b84f1aa5;hpb=34fbdab48d2399e8d11a6f40353ba00d2edf9151 diff --git a/configure b/configure index 2851f54d..833b6d33 100755 --- a/configure +++ b/configure @@ -793,6 +793,25 @@ EOF fi echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise" +########################################## +# clockid_t probe +clockid_t="no" +cat > $TMPC << EOF +#include +#include +#include +int main(int argc, char **argv) +{ + clockid_t cid; + memset(&cid, 0, sizeof(cid)); + return clock_gettime(cid, NULL); +} +EOF +if compile_prog "" "$LIBS" "clockid_t"; then + clockid_t="yes" +fi +echo "clockid_t $clockid_t" + ########################################## # gettimeofday() probe gettimeofday="no" @@ -1315,6 +1334,32 @@ if test "$disable_rbd" != "yes" && compile_prog "" "-lrbd -lrados" "rbd"; then fi echo "Rados Block Device engine $rbd" +########################################## +# check for rbd_poll +rbd_poll="no" +if test "$rbd" = "yes"; then +cat > $TMPC << EOF +#include +#include + +int main(int argc, char **argv) +{ + rbd_image_t image; + rbd_completion_t comp; + + int fd = eventfd(0, EFD_NONBLOCK); + rbd_set_image_notification(image, fd, EVENT_TYPE_EVENTFD); + rbd_poll_io_events(image, comp, 1); + + return 0; +} +EOF +if compile_prog "" "-lrbd -lrados" "rbd"; then + rbd_poll="yes" +fi +echo "rbd_poll $rbd_poll" +fi + ########################################## # check for rbd_invaidate_cache() rbd_inval="no" @@ -1602,6 +1647,11 @@ echo "getmntent $getmntent" ########################################## # Check whether we have getmntinfo +# These are originally added for BSDs, but may also work +# on other operating systems with getmntinfo(3). + +# getmntinfo(3) for FreeBSD/DragonFlyBSD/OpenBSD. +# Note that NetBSD needs -Werror to catch warning as error. getmntinfo="no" cat > $TMPC << EOF #include @@ -1609,15 +1659,32 @@ cat > $TMPC << EOF #include int main(int argc, char **argv) { - struct statfs st; + struct statfs *st; return getmntinfo(&st, MNT_NOWAIT); } EOF -if compile_prog "" "" "getmntinfo"; then +if compile_prog "-Werror" "" "getmntinfo"; then getmntinfo="yes" fi echo "getmntinfo $getmntinfo" +# getmntinfo(3) for NetBSD. +getmntinfo_statvfs="no" +cat > $TMPC << EOF +#include +#include +int main(int argc, char **argv) +{ + struct statvfs *st; + return getmntinfo(&st, MNT_NOWAIT); +} +EOF +# Skip the test if the one with statfs arg is detected. +if test "$getmntinfo" != "yes" && compile_prog "-Werror" "" "getmntinfo_statvfs"; then + getmntinfo_statvfs="yes" + echo "getmntinfo_statvfs $getmntinfo_statvfs" +fi + ########################################## # Check whether we have _Static_assert static_assert="no" @@ -1722,6 +1789,9 @@ fi if test "$clock_monotonic_precise" = "yes" ; then output_sym "CONFIG_CLOCK_MONOTONIC_PRECISE" fi +if test "$clockid_t" = "yes"; then + output_sym "CONFIG_CLOCKID_T" +fi if test "$gettimeofday" = "yes" ; then output_sym "CONFIG_GETTIMEOFDAY" fi @@ -1809,6 +1879,9 @@ fi if test "$rbd" = "yes" ; then output_sym "CONFIG_RBD" fi +if test "$rbd_poll" = "yes" ; then + output_sym "CONFIG_RBD_POLL" +fi if test "$rbd_inval" = "yes" ; then output_sym "CONFIG_RBD_INVAL" fi @@ -1861,6 +1934,9 @@ fi if test "$getmntinfo" = "yes" ; then output_sym "CONFIG_GETMNTINFO" fi +if test "$getmntinfo_statvfs" = "yes" ; then + output_sym "CONFIG_GETMNTINFO_STATVFS" +fi if test "$static_assert" = "yes" ; then output_sym "CONFIG_STATIC_ASSERT" fi