From 602e2175a2dda961c1ba12b0513897aaa8e39869 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Aug 2005 16:49:19 +0000 Subject: r8922: AIO configure fixes from William Jojo for IBM AIX aio. Jeremy (This used to be commit 6e9ad296633ca6cb1fea8a8299514c84232f2da6) --- source3/configure.in | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/configure.in b/source3/configure.in index e343a9f54f..b81e7ce6da 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -4165,6 +4165,7 @@ AC_ARG_WITH(aio-support, [ case "$withval" in yes) + AC_MSG_RESULT(yes) case "$host_os" in *) AC_CHECK_LIB(rt,aio_read,[AIO_LIBS="$ACL_LIBS -lrt"]) @@ -4192,6 +4193,94 @@ samba_cv_HAVE_AIO64=yes,samba_cv_HAVE_AIO64=no) AC_DEFINE(WITH_AIO, 1, [Using asynchronous io]) LIBS="$LIBS -lrt" fi + + if test x"$samba_cv_HAVE_AIO" = x"yes"; then + AC_MSG_CHECKING(for aio_read) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_read(&a); }], +[AC_DEFINE(HAVE_AIO_READ, 1, [Have aio_read]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_write) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_write(&a); }], +[AC_DEFINE(HAVE_AIO_WRITE, 1, [Have aio_write]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_fsync) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_fsync(1, &a); }], +[AC_DEFINE(HAVE_AIO_FSYNC, 1, [Have aio_fsync]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_return) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_return(&a); }], +[AC_DEFINE(HAVE_AIO_RETURN, 1, [Have aio_return]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_error) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_error(&a); }], +[AC_DEFINE(HAVE_AIO_ERROR, 1, [Have aio_error]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_cancel) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_cancel(1, &a); }], +[AC_DEFINE(HAVE_AIO_CANCEL, 1, [Have aio_cancel]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_suspend) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); }], +[AC_DEFINE(HAVE_AIO_SUSPEND, 1, [Have aio_suspend]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + fi + + if test x"$samba_cv_HAVE_AIO64" = x"yes"; then + AC_MSG_CHECKING(for aio_read64) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_read64(&a); }], +[AC_DEFINE(HAVE_AIO_READ64, 1, [Have aio_read64]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_write64) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_write64(&a); }], +[AC_DEFINE(HAVE_AIO_WRITE64, 1, [Have aio_write64]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_fsync64) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_fsync64(1, &a); }], +[AC_DEFINE(HAVE_AIO_FSYNC64, 1, [Have aio_fsync64]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_return64) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_return64(&a); }], +[AC_DEFINE(HAVE_AIO_RETURN64, 1, [Have aio_return64]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_error64) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_error64(&a); }], +[AC_DEFINE(HAVE_AIO_ERROR64, 1, [Have aio_error64]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_cancel64) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_cancel64(1, &a); }], +[AC_DEFINE(HAVE_AIO_CANCEL64, 1, [Have aio_cancel64]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + + AC_MSG_CHECKING(for aio_suspend64) + AC_LINK_IFELSE([#include +int main() { struct aiocb a; return aio_suspend64(&a, 1, NULL); }], +[AC_DEFINE(HAVE_AIO_SUSPEND64, 1, [Have aio_suspend64]) AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + fi ;; esac ;; @@ -4204,9 +4293,6 @@ samba_cv_HAVE_AIO64=yes,samba_cv_HAVE_AIO64=no) AC_MSG_RESULT(no) ) -AC_CHECK_FUNCS(aio_cancel aio_cancel64 aio_error aio_error64 aio_fsync aio_fsync64 aio_read aio_read64) -AC_CHECK_FUNCS(aio_return aio_return64 aio_suspend aio_suspend64 aio_write aio_write64) - ################################################# # check for sendfile support -- cgit