summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-08-02 16:49:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:20 -0500
commit602e2175a2dda961c1ba12b0513897aaa8e39869 (patch)
treec9da423c399f86789cc45dd30890027649f9bc18
parent57939971b42b8f0a993e08e92480223b4f412907 (diff)
downloadsamba-602e2175a2dda961c1ba12b0513897aaa8e39869.tar.gz
samba-602e2175a2dda961c1ba12b0513897aaa8e39869.tar.bz2
samba-602e2175a2dda961c1ba12b0513897aaa8e39869.zip
r8922: AIO configure fixes from William Jojo for IBM AIX aio.
Jeremy (This used to be commit 6e9ad296633ca6cb1fea8a8299514c84232f2da6)
-rw-r--r--source3/configure.in92
1 files changed, 89 insertions, 3 deletions
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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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 <aio.h>
+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