From e508410a79f1b4643bffb9479d3827fbf9e0818a Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Sat, 28 Sep 2013 02:48:59 -0400 Subject: [PATCH] Ensure libv8 is >= 3.17.11 (fixes issue #12). --- README | 2 +- README.md | 2 +- config.m4 | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README b/README index 58b09e7..87a6194 100644 --- a/README +++ b/README @@ -7,7 +7,7 @@ V8js is a PHP extension for Google's V8 Javascript engine Minimum requirements -------------------- -- V8 library version 2.5.8 (trunk) +- V8 library version >= 3.17.11 (trunk) - PHP 5.3.3+ (non-ZTS build preferred) Note: V8 engine is not natively thread safe and this extension diff --git a/README.md b/README.md index 3261934..7b9937c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Minimum requirements V8 is Google's open source Javascript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. V8 implements ECMAScript as specified in ECMA-262, 5th edition. - This extension makes use of V8 isolates to ensure separation between multiple V8Js instances, hence the need for 3.2.4 or above. + This extension makes use of V8 isolates to ensure separation between multiple V8Js instances, hence the need for 3.17.11 or above. (See .) - PHP 5.3.3+ diff --git a/config.m4 b/config.m4 index 6059de0..1e7a30d 100644 --- a/config.m4 +++ b/config.m4 @@ -63,6 +63,10 @@ LDFLAGS=$old_LDFLAGS set $ac_cv_v8_version IFS=$ac_IFS V8_API_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` + if test "$V8_API_VERSION" -lt 3017011 ; then + # see https://github.com/preillyme/v8js/issues/12 + AC_MSG_ERROR([libv8 must be version 3.17.11 or greater]) + fi AC_DEFINE_UNQUOTED([PHP_V8_API_VERSION], $V8_API_VERSION, [ ]) AC_DEFINE_UNQUOTED([PHP_V8_VERSION], "$ac_cv_v8_version", [ ]) fi