diff options
author | Volker Lendecke <vl@samba.org> | 2012-07-16 12:44:42 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-07-18 15:53:28 -0700 |
commit | 4a9b5cce92d65317fee4583f1ece4af7a3ae9558 (patch) | |
tree | a6327bc09317d2996575c36b88fe62c6232e1aa2 /source3/wscript | |
parent | d948b1bfeec02706e8cd08a4f82c0ce54f99491c (diff) | |
download | samba-4a9b5cce92d65317fee4583f1ece4af7a3ae9558.tar.gz samba-4a9b5cce92d65317fee4583f1ece4af7a3ae9558.tar.bz2 samba-4a9b5cce92d65317fee4583f1ece4af7a3ae9558.zip |
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 <jra@samba.org>
Diffstat (limited to 'source3/wscript')
-rwxr-xr-x | source3/wscript | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source3/wscript b/source3/wscript index be39a6f845..90a4b76570 100755 --- a/source3/wscript +++ b/source3/wscript @@ -374,9 +374,14 @@ return acl_get_perm_np(permset_d, perm); conf.CHECK_CODE('struct aiocb a; return aio_error(&a);', 'HAVE_AIO_ERROR', msg='Checking for aio_error', headers='aio.h', lib='aio rt') conf.CHECK_CODE('struct aiocb a; return aio_cancel(1, &a);', 'HAVE_AIO_CANCEL', msg='Checking for aio_cancel', headers='aio.h', lib='aio rt') conf.CHECK_CODE('struct aiocb a; return aio_suspend(&a, 1, NULL);', 'HAVE_AIO_SUSPEND', msg='Checking for aio_suspend', headers='aio.h', lib='aio rt') - if host_os.rfind('linux') > -1: - conf.CHECK_FUNCS_IN('io_submit', 'aio') - conf.CHECK_CODE(''' + if not conf.CONFIG_SET('HAVE_AIO'): + conf.DEFINE('HAVE_NO_AIO', '1') + else: + conf.DEFINE('HAVE_NO_AIO', '1') + + if host_os.rfind('linux') > -1: + conf.CHECK_FUNCS_IN('io_submit', 'aio') + conf.CHECK_CODE(''' struct io_event ioev; struct iocb *ioc; io_context_t ctx; @@ -397,11 +402,6 @@ io_getevents(ctx, 1, 1, &ioev, &ts); headers='unistd.h stdlib.h sys/types.h fcntl.h sys/eventfd.h libaio.h', lib='aio') - if not conf.CONFIG_SET('HAVE_AIO'): - conf.DEFINE('HAVE_NO_AIO', '1') - else: - conf.DEFINE('HAVE_NO_AIO', '1') - conf.CHECK_CODE(''' struct msghdr msg; union { @@ -1463,14 +1463,16 @@ main() { if conf.CONFIG_SET('HAVE_STATFS_F_FSID'): default_shared_modules.extend(TO_LIST('vfs_fileid')) - if conf.CONFIG_SET('HAVE_AIO') and (conf.CONFIG_SET('HAVE_MSGHDR_MSG_CONTROL') or conf.CONFIG_SET('HAVE_MSGHDR_MSG_ACCTRIGHTS')): + if (conf.CONFIG_SET('HAVE_MSGHDR_MSG_CONTROL') or conf.CONFIG_SET('HAVE_MSGHDR_MSG_ACCTRIGHTS')): default_shared_modules.extend(TO_LIST('vfs_aio_fork')) - if conf.CONFIG_SET('HAVE_AIO') and Options.options.with_pthreadpool: + if Options.options.with_pthreadpool: default_shared_modules.extend(TO_LIST('vfs_aio_pthread')) + + if conf.CONFIG_SET('HAVE_AIO'): default_shared_modules.extend(TO_LIST('vfs_aio_posix')) - if conf.CONFIG_SET('HAVE_AIO') and conf.CONFIG_SET('HAVE_LINUX_KERNEL_AIO'): + if conf.CONFIG_SET('HAVE_LINUX_KERNEL_AIO'): default_shared_modules.extend(TO_LIST('vfs_aio_linux')) if conf.CONFIG_SET('HAVE_LDAP'): |