1
dnl Copyright (C) 2011 Andrew Hutchings
2
dnl This file is free software; Sun Microsystems, Inc.
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
6
#--------------------------------------------------------------------
8
#--------------------------------------------------------------------
11
AC_DEFUN([_PANDORA_SEARCH_LIBAIO],[
12
AC_REQUIRE([AC_LIB_PREFIX])
14
AC_CHECK_HEADERS(libaio.h)
15
AC_LIB_HAVE_LINKFLAGS(aio,,
20
int aio_cmd= IO_CMD_PREAD;
23
AM_CONDITIONAL(HAVE_LIBAIO, [test "x${ac_cv_libaio}" = "xyes"])
25
AS_IF([test "x${ac_cv_libaio}" = "xyes"],[
26
AC_DEFINE([LINUX_NATIVE_AIO], [1], [Enabel libaio support in InnoDB])
30
AC_DEFUN([_PANDORA_HAVE_LIBAIO],[
32
AC_ARG_ENABLE([libaio],
33
[AS_HELP_STRING([--disable-libaio],
34
[Build with libaio support @<:@default=on@:>@])],
35
[ac_enable_libaio="$enableval"],
36
[ac_enable_libaio="yes"])
38
_PANDORA_SEARCH_LIBAIO
42
AC_DEFUN([PANDORA_HAVE_LIBAIO],[
43
AC_REQUIRE([_PANDORA_HAVE_LIBAIO])
46
AC_DEFUN([_PANDORA_REQUIRE_LIBAIO],[
47
ac_enable_libaio="yes"
48
_PANDORA_SEARCH_LIBAIO
49
AS_IF([test "x$ac_cv_header_libaio_h" = "xno"],[
50
AC_MSG_ERROR([Couldn't find libaio.h. On Debian this can be found in libaio-dev. On Redhat this can be found in libaio-devel.])
54
AC_DEFUN([PANDORA_REQUIRE_LIBAIO],[
55
AC_REQUIRE([_PANDORA_REQUIRE_LIBAIO])