0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-23 03:51:51 +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

@ -92,31 +92,22 @@ if test "$PHP_V8JS" != "no"; then
AC_MSG_CHECKING([for libv8_libplatform]) AC_MSG_CHECKING([for libv8_libplatform])
AC_DEFUN([V8_CHECK_LINK], [ AC_DEFUN([V8_CHECK_LINK], [
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 { ], [ v8::platform::CreateDefaultPlatform(); ])], [
enum class IdleTaskSupport { kDisabled, kEnabled }; dnl libv8_libplatform.so found
void* CreateDefaultPlatform($2); AC_MSG_RESULT(found)
} V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"
} $3
], [ v8::platform::CreateDefaultPlatform(); ])], [ ], [ $4 ])
dnl libv8_libplatform.so found
AC_MSG_RESULT(found)
V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"
$3
], [ $4 ])
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], [], [ AC_MSG_ERROR([could not find libv8_libplatform library])
V8_CHECK_LINK([-lv8_libbase], [int thread_pool_size = 0], [], [ ])
AC_MSG_ERROR([could not find libv8_libplatform library])
])
])
])
]) ])