summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-06 09:23:22 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-06 08:23:10 +0200
commitd2f6d0ba1e362522438d78374715485daae10919 (patch)
treeab1b8bb9ef8fc845cbb326bd5df18f4965c76f3e /source3/configure.in
parentbbc1b0c9853322da10483f72c020fe0dd83b28fa (diff)
downloadsamba-d2f6d0ba1e362522438d78374715485daae10919.tar.gz
samba-d2f6d0ba1e362522438d78374715485daae10919.tar.bz2
samba-d2f6d0ba1e362522438d78374715485daae10919.zip
build: Rationalise AIO support in configure, ensure on by default
With this change, the define to check for AIO is HAVE_AIO, consistant with other subsystems. It is now also on by default in the autoconf build, as it has been for waf. Andrew Bartlett
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in38
1 files changed, 18 insertions, 20 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 7a9f03a8c5..a11e96b107 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -5339,15 +5339,21 @@ esac
#################################################
# check for AIO support
+with_aio=auto
AC_MSG_CHECKING(whether to support asynchronous io)
AC_ARG_WITH(aio-support,
-[AS_HELP_STRING([--with-aio-support], [Include asynchronous io support (default=no)])],
-[ case "$withval" in
- yes)
+[AS_HELP_STRING([--with-aio-support], [Include asynchronous io support (default=auto)])],
+[ case "$withval" in
+ yes|no)
+ with_aio=$withval
+ ;;
+ esac ])
- AC_MSG_RESULT(yes)
- case "$host_os" in
- *)
+AC_MSG_RESULT($with_aio)
+
+if test x"$with_aio" = x"no"; then
+ AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support should be built in])
+else
AIO_LIBS=$LIBS
no_rt_LIBS=$LIBS
AC_CHECK_LIB(rt,aio_read,[AIO_LIBS="$LIBS -lrt"])
@@ -5362,7 +5368,7 @@ AC_ARG_WITH(aio-support,
samba_cv_HAVE_AIO=yes,samba_cv_HAVE_AIO=no)
LIBS=$aio_LIBS])
if test x"$samba_cv_HAVE_AIO" = x"yes"; then
- AC_DEFINE(WITH_AIO, 1, [Using asynchronous io])
+ AC_DEFINE(HAVE_AIO, 1, [Using asynchronous io])
LIBS=$AIO_LIBS
AC_MSG_CHECKING(for aio_read)
AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
@@ -5405,19 +5411,11 @@ int main() { struct aiocb a; return aio_cancel(1, &a); }])],
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)])
+ else
+ AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support is available])
+ AC_MSG_RESULT(no)
fi
-
- ;;
- esac
- ;;
- *)
- AC_MSG_RESULT(no)
- AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support is available])
- ;;
- esac ],
- AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support should be built in])
- AC_MSG_RESULT(no)
-)
+fi
if test x"$samba_cv_HAVE_AIO" = x"yes"; then
if test x"$samba_cv_msghdr_msg_control" = x"yes" -o \
@@ -5455,7 +5453,7 @@ 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(WITH_AIO, 1, [Using asynchronous io])
+ AC_DEFINE(HAVE_AIO, 1, [Using asynchronous io])
default_shared_modules="$default_shared_modules vfs_aio_linux"
fi
;;