On Sun, Jun 06, 2021 at 08:26:08PM +0530, Abhay Raj Singh wrote:
Yes you'll need to detect liburing using a configure test like this.
AC_ARG_WITH([liburing],
[AS_HELP_STRING([--without-liburing],
[disable use of liburing i.e. io_uring for asynchronus io
@<:@default=check@:>@])],
[],
[with_liburing=check])
AS_IF([test "$with_liburing" != "no"],[
PKG_CHECK_MODULES([LIBURING], [liburing], [
AC_SUBST([LIBURING_CFLAGS])
AC_SUBST([LIBURING_LIBS])
AC_DEFINE([HAVE_LIBURING],[1],[liburing found at compile time.])
], [
AC_MSG_WARN([liburing not found, io_uring support disabled.])
])
])
AM_CONDITIONAL([HAVE_LIBURING], [test "x$LIBURING_LIBS" != "x"])
Looks reasonable to me.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org