~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_have_libinnodb.m4

  • Committer: Monty Taylor
  • Date: 2010-08-06 23:03:18 UTC
  • mto: (1666.4.9 rplugin-innobase)
  • mto: This revision was merged to the branch mainline in revision 1712.
  • Revision ID: mordred@inaugust.com-20100806230318-6lj8jrx1xrqcxhm4
Updated pandora-build files to version 0.145

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
  AC_REQUIRE([AC_LIB_PREFIX])
8
8
 
9
9
  dnl --------------------------------------------------------------------
10
 
  dnl  Check for libinnodb
 
10
  dnl  Check for libhaildb or libinnodb
11
11
  dnl --------------------------------------------------------------------
12
12
 
13
13
  AC_ARG_ENABLE([libinnodb],
16
16
    [ac_enable_libinnodb="$enableval"],
17
17
    [ac_enable_libinnodb="yes"])
18
18
 
 
19
 
19
20
  AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[
20
 
    AC_LIB_HAVE_LINKFLAGS(innodb,,[
21
 
      #include <embedded_innodb-1.0/innodb.h>
 
21
    AC_LIB_HAVE_LINKFLAGS(haildb,,[
 
22
      #include <haildb.h>
22
23
    ],[
23
24
      ib_u64_t
24
25
      ib_api_version(void);
25
26
    ])
 
27
    AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[
 
28
      AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h])
 
29
      INNODB_LIBS=${LTLIBHAILDB}
 
30
      ac_cv_have_innodb=yes
 
31
    ],[
 
32
      AC_LIB_HAVE_LINKFLAGS(innodb,,[
 
33
        #include <embedded_innodb-1.0/innodb.h>
 
34
      ],[
 
35
        ib_u64_t
 
36
        ib_api_version(void);
 
37
      ])
 
38
      AS_IF([test "x{ac_cv_libinnodb}" = "xyes"],[
 
39
        AC_DEFINE([HAVE_INNODB_H],[1],[Do we have innodb.h])
 
40
        INNODB_LIBS=${LTLIBINNODB}
 
41
        ac_cv_have_innodb=yes
 
42
      ])
 
43
    ])
26
44
  ],[
 
45
    ac_cv_libhaildb="no"
27
46
    ac_cv_libinnodb="no"
28
47
  ])
29
 
 
 
48
  AC_SUBST([INNODB_LIBS])
30
49
 
31
50
  AC_CACHE_CHECK([if libinnodb is recent enough],
32
51
    [ac_cv_recent_innodb_h],[
33
52
      save_LIBS=${LIBS}
34
 
      LIBS="${LIBS} ${LTLIBINNODB}"
 
53
      LIBS="${LIBS} ${INNODB_LIBS}"
35
54
      AC_LINK_IFELSE(
36
55
          [AC_LANG_PROGRAM([[
37
 
      #include <embedded_innodb-1.0/innodb.h>
 
56
#ifdef HAVE_HAILDB_H
 
57
# include <haildb.h>
 
58
#else
 
59
# include <embedded_innodb-1.0/innodb.h>
 
60
#endif
38
61
        ]],[[
39
62
      /* Make sure we have the two-arg version */
40
63
      ib_table_drop(NULL, "nothing");
50
73
    ac_cv_libinnodb=no
51
74
  ])
52
75
        
53
 
  AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"])
 
76
  AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_have_innodb}" = "xyes"])
54
77
])
55
78
 
56
79
AC_DEFUN([PANDORA_HAVE_LIBINNODB],[
60
83
AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[
61
84
  AC_REQUIRE([PANDORA_HAVE_LIBINNODB])
62
85
  AS_IF([test "x${ac_cv_libinnodb}" = "xno"],
63
 
      AC_MSG_ERROR([libinnodb is required for ${PACKAGE}]))
 
86
      AC_MSG_ERROR([libhaildb or libinnodb is required for ${PACKAGE}]))
64
87
])