From 4a9b5cce92d65317fee4583f1ece4af7a3ae9558 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 16 Jul 2012 12:44:42 +0200 Subject: config: The AIO engine is indepent of HAVE_AIO now Compile the basic aio engine always, it works via libasys/pthreadpool_sync in a sync fashion even if no pthreads are around. Everything else (linux aio, posix aio, aio fork) is now compiled as modules based on specific system capabilities Signed-off-by: Jeremy Allison --- source3/configure.in | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index b5fd8c253e..4d3db00e40 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -5542,20 +5542,19 @@ int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); }])], fi fi -if test x"$samba_cv_HAVE_AIO" = x"yes"; then - if test x"$samba_cv_msghdr_msg_control" = x"yes" -o \ - x"$samba_cv_msghdr_msg_acctright" = x"yes"; then - default_shared_modules="$default_shared_modules vfs_aio_fork" - fi +if test x"$samba_cv_msghdr_msg_control" = x"yes" -o \ + x"$samba_cv_msghdr_msg_acctright" = x"yes"; then + default_shared_modules="$default_shared_modules vfs_aio_fork" +fi # Check for Linux kernel aio support. - case "$host_os" in - *linux*) - AC_CHECK_LIB(aio,io_submit,[AIO_LIBS="$LIBS -laio"]) - AC_CACHE_CHECK([for Linux kernel asynchronous io support],samba_cv_HAVE_LINUX_KERNEL_AIO,[ - aio_LIBS=$LIBS - LIBS=$AIO_LIBS - AC_TRY_LINK([#include +case "$host_os" in +*linux*) + AC_CHECK_LIB(aio,io_submit,[AIO_LIBS="$LIBS -laio"]) + AC_CACHE_CHECK([for Linux kernel asynchronous io support],samba_cv_HAVE_LINUX_KERNEL_AIO,[ + aio_LIBS=$LIBS + LIBS=$AIO_LIBS + AC_TRY_LINK([#include #include #include #include @@ -5577,13 +5576,11 @@ io_submit(ctx, 1, &ioc); io_getevents(ctx, 1, 1, &ioev, &ts);], samba_cv_HAVE_LINUX_KERNEL_AIO=yes,samba_cv_HAVE_LINUX_KERNEL_AIO=no) LIBS=$aio_LIBS]) - if test x"$samba_cv_HAVE_LINUX_KERNEL_AIO" = x"yes"; then - AC_DEFINE(HAVE_AIO, 1, [Using asynchronous io]) - default_shared_modules="$default_shared_modules vfs_aio_linux" - fi - ;; - esac -fi + if test x"$samba_cv_HAVE_LINUX_KERNEL_AIO" = x"yes"; then + default_shared_modules="$default_shared_modules vfs_aio_linux" + fi + ;; +esac if test x"$samba_cv_HAVE_AIO" = x"yes"; then default_shared_modules="$default_shared_modules vfs_aio_posix" -- cgit