7
7
AC_REQUIRE([AC_LIB_PREFIX])
9
9
dnl --------------------------------------------------------------------
10
dnl Check for libinnodb
10
dnl Check for libhaildb or libinnodb
11
11
dnl --------------------------------------------------------------------
13
13
AC_ARG_ENABLE([libinnodb],
16
16
[ac_enable_libinnodb="$enableval"],
17
17
[ac_enable_libinnodb="yes"])
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,,[
24
25
ib_api_version(void);
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}
32
AC_LIB_HAVE_LINKFLAGS(innodb,,[
33
#include <embedded_innodb-1.0/innodb.h>
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}
27
46
ac_cv_libinnodb="no"
48
AC_SUBST([INNODB_LIBS])
31
50
AC_CACHE_CHECK([if libinnodb is recent enough],
32
51
[ac_cv_recent_innodb_h],[
34
LIBS="${LIBS} ${LTLIBINNODB}"
53
LIBS="${LIBS} ${INNODB_LIBS}"
36
55
[AC_LANG_PROGRAM([[
37
#include <embedded_innodb-1.0/innodb.h>
59
# include <embedded_innodb-1.0/innodb.h>
39
62
/* Make sure we have the two-arg version */
40
63
ib_table_drop(NULL, "nothing");
53
AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"])
76
AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_have_innodb}" = "xyes"])
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}]))