From 05231aeef0accf8a2c63c0a061d53a8391caa4e6 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Fri, 7 Jan 2011 11:12:22 +0200 Subject: [PATCH] Fix Bug#59327 Fix autoconf usage for innodb_plugin AC_CHECK_FUNCS(f1 f2 f3, ACTION_IF_PRESENT) ACTION_IF_PRESENT is executed if any of f1, f2 or f3 is present. Fix this misusage, we want the action to be executed if all of the functions are present. --- storage/innodb_plugin/plug.in | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in index b2af11295bc..fa793647b1f 100644 --- a/storage/innodb_plugin/plug.in +++ b/storage/innodb_plugin/plug.in @@ -139,16 +139,20 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ ) AC_MSG_CHECKING(whether Solaris libc atomic functions are available) - # either define HAVE_IB_SOLARIS_ATOMICS or not - AC_CHECK_FUNCS(atomic_cas_ulong \ - atomic_cas_32 \ - atomic_cas_64 \ - atomic_add_long_nv \ - atomic_swap_uchar, - - AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], - [Define to 1 if Solaris libc atomic functions \ - are available]) + # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following + # functions are present. + AC_CHECK_FUNC(atomic_add_long_nv, + AC_CHECK_FUNC(atomic_cas_32, + AC_CHECK_FUNC(atomic_cas_64, + AC_CHECK_FUNC(atomic_cas_ulong, + AC_CHECK_FUNC(atomic_swap_uchar, + AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], + [Define to 1 if Solaris libc atomic functions are available] + ) + ) + ) + ) + ) ) AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)