+++ /dev/null
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for clock_gettime
-#--------------------------------------------------------------------
-
-AC_DEFUN([PANDORA_CLOCK_GETTIME],[
- AC_SEARCH_LIBS([clock_gettime],[rt])
- AS_IF([test "x${ac_cv_search_clock_gettime}" != "xno"],[
- AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have a working clock_gettime function])
- ])
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for a working fdatasync call
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([PANDORA_WORKING_FDATASYNC],[
- AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[
- AC_LANG_PUSH(C++)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <unistd.h>
- ]],[[
-fdatasync(4);
- ]])],
- [ac_cv_func_fdatasync=yes],
- [ac_cv_func_fdatasync=no])
- AC_LANG_POP()
- ])
- AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"],
- [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])])
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for GCC Atomic Support
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([PANDORA_HAVE_GCC_ATOMICS],[
-
- AC_CACHE_CHECK(
- [whether the compiler provides atomic builtins],
- [ac_cv_gcc_atomic_builtins],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([],[[
- int foo= -10; int bar= 10;
- if (!__sync_fetch_and_add(&foo, bar) || foo)
- return -1;
- bar= __sync_lock_test_and_set(&foo, bar);
- if (bar || foo != 10)
- return -1;
- bar= __sync_val_compare_and_swap(&bar, foo, 15);
- if (bar)
- return -1;
- return 0;
- ]])],
- [ac_cv_gcc_atomic_builtins=yes],
- [ac_cv_gcc_atomic_builtins=no])])
-
- AS_IF([test "x$ac_cv_gcc_atomic_builtins" = "xyes"],[
- AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
- [Define to 1 if compiler provides atomic builtins.])
- ])
-
-])
+++ /dev/null
-dnl Copyright (C) 2011 Andrew Hutchings
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libaio
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBAIO],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- AC_CHECK_HEADERS(libaio.h)
- AC_LIB_HAVE_LINKFLAGS(aio,,
- [
- #include <libaio.h>
- ],
- [
- int aio_cmd= IO_CMD_PREAD;
- ])
-
- AM_CONDITIONAL(HAVE_LIBAIO, [test "x${ac_cv_libaio}" = "xyes"])
-
- AS_IF([test "x${ac_cv_libaio}" = "xyes"],[
- AC_DEFINE([LINUX_NATIVE_AIO], [1], [Enabel libaio support in InnoDB])
- ])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBAIO],[
-
- AC_ARG_ENABLE([libaio],
- [AS_HELP_STRING([--disable-libaio],
- [Build with libaio support @<:@default=on@:>@])],
- [ac_enable_libaio="$enableval"],
- [ac_enable_libaio="yes"])
-
- _PANDORA_SEARCH_LIBAIO
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBAIO],[
- AC_REQUIRE([_PANDORA_HAVE_LIBAIO])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBAIO],[
- ac_enable_libaio="yes"
- _PANDORA_SEARCH_LIBAIO
- AS_IF([test "x$ac_cv_header_libaio_h" = "xno"],[
- 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.])
- ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBAIO],[
- AC_REQUIRE([_PANDORA_REQUIRE_LIBAIO])
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBAVAHI],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libavahi
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libavahi],
- [AS_HELP_STRING([--disable-libavahi],
- [Build with libavahi support @<:@default=on@:>@])],
- [ac_enable_libavahi="$enableval"],
- [ac_enable_libavahi="yes"])
-
- AS_IF([test "x$ac_enable_libavahi" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(avahi-client,avahi-common,[
- #include <avahi-client/client.h>
- #include <avahi-common/simple-watch.h>
- ],[
- AvahiSimplePoll *simple_poll= avahi_simple_poll_new();
- ])
- ],[
- ac_cv_libavahi="no"
- ])
-
- AM_CONDITIONAL(HAVE_LIBAVAHI, [test "x${ac_cv_libavahi}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBAVAHI],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
- AS_IF([test "x${ac_cv_libavahi}" = "xno"],
- AC_MSG_ERROR([libavahi is required for ${PACKAGE}]))
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBHAILDB],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libhaildb
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libhaildb],
- [AS_HELP_STRING([--disable-libhaildb],
- [Build with libhaildb support @<:@default=on@:>@])],
- [ac_enable_libhaildb="$enableval"],
- [ac_enable_libhaildb="yes"])
-
-
- AS_IF([test "x$ac_enable_libhaildb" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(haildb,,[
- #include <haildb.h>
- ],[
- ib_update_table_statistics(NULL);
- ])
- AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[
- AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h])
- ])
- ],[
- ac_cv_libhaildb="no"
- ])
- AM_CONDITIONAL(HAVE_LIBHAILDB, [test "x${ac_cv_libhaildb}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBHAILDB],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBHAILDB])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBHAILDB],[
- AC_REQUIRE([PANDORA_HAVE_LIBHAILDB])
- AS_IF([test "x${ac_cv_libhaildb}" = "xno"],
- AC_MSG_ERROR([libhaildb 2.3.2 or later is required for ${PACKAGE}]))
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libpcre
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- AC_LIB_HAVE_LINKFLAGS(pcre,,
- [#include <pcre.h>],
- [
- pcre *re= NULL;
- pcre_version();
- ])
- AS_IF([test "x$ac_cv_libpcre" = "xno"],
- [
- unset ac_cv_libpcre
- unset HAVE_LIBPCRE
- unset LIBPCRE
- unset LIBPCRE_PREFIX
- unset LTLIBPCRE
- AC_LIB_HAVE_LINKFLAGS(pcre,,
- [#include <pcre/pcre.h>],
- [
- pcre *re= NULL;
- pcre_version();
- ])
- AS_IF([test "x$ac_cv_libpcre" = "xyes"], [
- ac_cv_pcre_location="<pcre/pcre.h>"
- ])
- ],[
- ac_cv_pcre_location="<pcre.h>"
- ])
-
- AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[
-
- AC_ARG_ENABLE([libpcre],
- [AS_HELP_STRING([--disable-libpcre],
- [Build with libpcre support @<:@default=on@:>@])],
- [ac_enable_libpcre="$enableval"],
- [ac_enable_libpcre="yes"])
-
- _PANDORA_SEARCH_LIBPCRE
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBPCRE],[
- AC_REQUIRE([_PANDORA_HAVE_LIBPCRE])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[
- ac_enable_libpcre="yes"
- _PANDORA_SEARCH_LIBPCRE
-
- AS_IF([test x$ac_cv_libpcre = xno],[
- AC_MSG_ERROR([libpcre is required for ${PACKAGE}. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.])
- ],[
- AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}],
- [Location of pcre header])
- ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[
- AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE])
-])