~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/plug.in

  • Committer: Brian Aker
  • Date: 2009-04-17 01:45:33 UTC
  • Revision ID: brian@gaz-20090417014533-exdrtriab9zecqs2
Refactor get_variable to session

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
17
DRIZZLE_STORAGE_ENGINE(innobase,  innodb, [InnoDB Storage Engine],
 
18
        [Transactional Tables using InnoDB], [max,max-no-ndb])
 
19
DRIZZLE_PLUGIN_STATIC(innobase,   [libinnobase.la])
 
20
DRIZZLE_PLUGIN_DYNAMIC(innobase,   [ha_innodb.la])
 
21
DRIZZLE_PLUGIN_MANDATORY(innobase)  dnl Default
 
22
DRIZZLE_PLUGIN_ACTIONS(innobase,  [
 
23
  AC_PROG_LEX
 
24
  AC_FUNC_MMAP
 
25
  AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
 
26
  AC_SUBST(innodb_system_libs)
 
27
  AC_CHECK_HEADERS(aio.h sched.h)
 
28
  AC_CHECK_SIZEOF(int, 4)
 
29
  AC_CHECK_SIZEOF(long, 4)
 
30
  AC_CHECK_SIZEOF(void*, 4)
 
31
  AC_CHECK_FUNCS(sched_yield fdatasync localtime_r)
 
32
  AC_CHECK_FUNCS([uname munmap memchr getpagesize bzero])
 
33
  AC_C_BIGENDIAN
 
34
  case "$target_os" in
 
35
         lin*)
 
36
           CFLAGS="$CFLAGS -DUNIV_LINUX";;
 
37
         hpux10*)
 
38
           CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
 
39
         hp*)
 
40
           CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
 
41
         aix*)
 
42
           CFLAGS="$CFLAGS -DUNIV_AIX";;
 
43
         irix*|osf*|sysv5uw7*|openbsd*)
 
44
           CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
 
45
         *solaris*|*SunOS*)
 
46
           CFLAGS="$CFLAGS -DUNIV_SOLARIS";;
 
47
  esac
 
48
  INNODB_DYNAMIC_CFLAGS="-DDRIZZLE_DYNAMIC_PLUGIN"
 
49
  case "$target_cpu" in
 
50
        x86_64)
 
51
                # The AMD64 ABI forbids absolute addresses in shared libraries
 
52
                ;;
 
53
        *86)
 
54
                # Use absolute addresses on IA-32
 
55
                INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
 
56
                ;;
 
57
  esac
 
58
  AC_SUBST(INNODB_DYNAMIC_CFLAGS)
 
59
  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
 
60
  AC_TRY_RUN(
 
61
    [
 
62
      #include <pthread.h>
 
63
 
 
64
      int main(int argc, char** argv) {
 
65
        pthread_t       x1;
 
66
        pthread_t       x2;
 
67
        pthread_t       x3;
 
68
 
 
69
        __sync_bool_compare_and_swap(&x1, x2, x3);
 
70
 
 
71
        return(0);
 
72
      }
 
73
    ],
 
74
    [
 
75
      AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1],
 
76
                [pthread_t can be used by GCC atomic builtins])
 
77
      AC_MSG_RESULT(yes)
 
78
    ],
 
79
    [
 
80
      AC_MSG_RESULT(no)
 
81
    ]
 
82
    )
 
83
  ])
 
84
 
 
85
# vim: set ft=config: