~drizzle-trunk/drizzle/development

2370.2.2 by Henrik Ingo
js_eval() : Working execution of JavaScript code with the v8 engine.
1
dnl  Copyright (C) 2009 Sun Microsystems, Inc.
2
dnl This file is free software; Sun Microsystems, Inc.
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
5
6
#--------------------------------------------------------------------
7
# Check for libv8
8
#--------------------------------------------------------------------
9
10
11
AC_DEFUN([_PANDORA_SEARCH_LIBV8],[
12
  AC_REQUIRE([AC_LIB_PREFIX])
13
14
  # v8 is written in C++, need to use g++ for test link below
15
  AC_LANG_CPLUSPLUS
16
17
  AC_LIB_HAVE_LINKFLAGS(v8, pthread,
18
  [
19
    #include <v8.h>
20
  ],[
21
    v8::HandleScope handle_scope;
22
  ]) 
23
24
  AM_CONDITIONAL(HAVE_LIBV8, [test "x${ac_cv_libv8}" = "xyes"])
25
])
26
27
AC_DEFUN([_PANDORA_HAVE_LIBV8],[
28
  AC_ARG_ENABLE([libv8],
29
    [AS_HELP_STRING([--disable-libv8],
30
      [Build with libv8 support @<:@default=on@:>@])],
31
    [ac_enable_libv8="$enableval"],
32
    [ac_enable_libv8="yes"])
33
34
  _PANDORA_SEARCH_LIBV8
35
])
36
37
38
AC_DEFUN([PANDORA_HAVE_LIBV8],[
39
  AC_REQUIRE([_PANDORA_HAVE_LIBV8])
40
])
41
42
AC_DEFUN([_PANDORA_REQUIRE_LIBV8],[
43
  ac_enable_libv8="yes"
44
  _PANDORA_SEARCH_LIBV8
45
46
  AS_IF([test x$ac_cv_libv8 = xno],[
47
    PANDORA_MSG_ERROR([libv8 is required for ${PACKAGE}. On Debian this can be found in libv8-dev. On RedHat this can be found in libv8-devel.])
48
  ])
49
])
50
51
AC_DEFUN([PANDORA_REQUIRE_LIBV8],[
52
  AC_REQUIRE([_PANDORA_REQUIRE_LIBV8])
53
])