~drizzle-trunk/drizzle/development

641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
1
#
2
# Copyright (c) 2006, 2009, Innobase Oy. All Rights Reserved.
3
# 
4
# This program is free software; you can redistribute it and/or modify it under
5
# the terms of the GNU General Public License as published by the Free Software
6
# Foundation; version 2 of the License.
7
# 
8
# This program is distributed in the hope that it will be useful, but WITHOUT
9
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11
# 
12
# You should have received a copy of the GNU General Public License along with
13
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
14
# Place, Suite 330, Boston, MA 02111-1307 USA
15
#
16
992.1.24 by Monty Taylor
Ported InnoDB to register_plugins.
17
AC_DEFUN([AC_INNODB_ACTIONS],[
18
  AC_REQUIRE([AC_PROG_LEX])
19
  AC_REQUIRE([AC_FUNC_MMAP])
20
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
21
  AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
22
  AC_SUBST(innodb_system_libs)
23
  AC_CHECK_HEADERS(aio.h sched.h)
24
  AC_CHECK_SIZEOF(int, 4)
25
  AC_CHECK_SIZEOF(long, 4)
26
  AC_CHECK_SIZEOF(void*, 4)
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
27
  AC_CHECK_FUNCS(sched_yield fdatasync localtime_r)
641.1.4 by Monty Taylor
Merged in InnoDB changes.
28
  AC_CHECK_FUNCS([uname munmap memchr getpagesize bzero])
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
29
  AC_C_BIGENDIAN
30
  case "$target_os" in
31
         lin*)
907.3.5 by Monty Taylor
Fixed new 64-bit caused solaris warnings.
32
           CFLAGS="$CFLAGS -DUNIV_LINUX";;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
33
         hpux10*)
907.3.5 by Monty Taylor
Fixed new 64-bit caused solaris warnings.
34
           CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
35
         hp*)
907.3.5 by Monty Taylor
Fixed new 64-bit caused solaris warnings.
36
           CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
37
         aix*)
907.3.5 by Monty Taylor
Fixed new 64-bit caused solaris warnings.
38
           CFLAGS="$CFLAGS -DUNIV_AIX";;
933.1.1 by Monty Taylor
Merged in InnoDB Plugin 1.0.3
39
         irix*|osf*|sysv5uw7*|openbsd*)
907.3.5 by Monty Taylor
Fixed new 64-bit caused solaris warnings.
40
           CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
41
	 *solaris*|*SunOS*)
907.3.5 by Monty Taylor
Fixed new 64-bit caused solaris warnings.
42
           CFLAGS="$CFLAGS -DUNIV_SOLARIS";;
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
43
  esac
960.2.21 by Monty Taylor
Moved innodb handler code back to handler/ dir.
44
  INNODB_DYNAMIC_CFLAGS="-DDRIZZLE_DYNAMIC_PLUGIN"
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
45
  case "$target_cpu" in
46
	x86_64)
47
		# The AMD64 ABI forbids absolute addresses in shared libraries
48
		;;
49
	*86)
50
		# Use absolute addresses on IA-32
51
		INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
52
		;;
53
  esac
54
  AC_SUBST(INNODB_DYNAMIC_CFLAGS)
55
  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
56
  AC_TRY_RUN(
57
    [
58
      #include <pthread.h>
59
60
      int main(int argc, char** argv) {
61
        pthread_t       x1;
62
        pthread_t       x2;
63
        pthread_t       x3;
64
65
        __sync_bool_compare_and_swap(&x1, x2, x3);
66
67
        return(0);
68
      }
69
    ],
70
    [
71
      AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1],
72
                [pthread_t can be used by GCC atomic builtins])
73
      AC_MSG_RESULT(yes)
74
    ],
75
    [
76
      AC_MSG_RESULT(no)
77
    ]
78
    )
641.1.2 by Monty Taylor
Imported 1.0.1 with clean - with no changes.
79
  ])
80
992.1.24 by Monty Taylor
Ported InnoDB to register_plugins.
81
AC_INNODB_ACTIONS
641.2.2 by Monty Taylor
InnoDB Plugin 1.0.3
82
# vim: set ft=config: