0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-23 04:51:53 +00:00

fix check for CreateDefaultPlatform, fixes #313

Include libplatform.h, as meanwhile all supported V8 versions have that file.
This commit is contained in:
Stefan Siegl 2017-05-29 21:15:24 +02:00
parent 8fc207a9a6
commit 262707a97b
No known key found for this signature in database
GPG Key ID: 51575950154839CD

View File

@ -94,12 +94,7 @@ if test "$PHP_V8JS" != "no"; then
save_LIBS="$LIBS" save_LIBS="$LIBS"
LIBS="$LIBS $1 -lv8_libplatform -lv8" LIBS="$LIBS $1 -lv8_libplatform -lv8"
AC_LINK_IFELSE([AC_LANG_PROGRAM([ AC_LINK_IFELSE([AC_LANG_PROGRAM([
namespace v8 { #include <libplatform/libplatform.h>
namespace platform {
enum class IdleTaskSupport { kDisabled, kEnabled };
void* CreateDefaultPlatform($2);
}
}
], [ v8::platform::CreateDefaultPlatform(); ])], [ ], [ v8::platform::CreateDefaultPlatform(); ])], [
dnl libv8_libplatform.so found dnl libv8_libplatform.so found
AC_MSG_RESULT(found) AC_MSG_RESULT(found)
@ -109,15 +104,11 @@ if test "$PHP_V8JS" != "no"; then
LIBS="$save_LIBS" LIBS="$save_LIBS"
]) ])
V8_CHECK_LINK([], [int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled], [], [ V8_CHECK_LINK([], [], [], [
V8_CHECK_LINK([], [int thread_pool_size = 0], [], [ V8_CHECK_LINK([-lv8_libbase], [], [], [
V8_CHECK_LINK([-lv8_libbase], [int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled], [], [
V8_CHECK_LINK([-lv8_libbase], [int thread_pool_size = 0], [], [
AC_MSG_ERROR([could not find libv8_libplatform library]) AC_MSG_ERROR([could not find libv8_libplatform library])
]) ])
]) ])
])
])
dnl dnl