Skip to content

Commit cc1e140

Browse files
committed
search for CreateDefaultPlatform with 2nd arg, closes #301
1 parent 4aeecdc commit cc1e140

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

config.m4

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,34 @@ if test "$PHP_V8JS" != "no"; then
8787
CPPFLAGS="$CPPFLAGS -I$V8_DIR/include -std=$ac_cv_v8_cstd"
8888
LDFLAGS="$LDFLAGS -L$V8_DIR/$PHP_LIBDIR"
8989

90+
AC_MSG_CHECKING([for libv8_libplatform])
9091
AC_DEFUN([V8_CHECK_LINK], [
91-
AC_MSG_CHECKING([for libv8_libplatform])
9292
save_LIBS="$LIBS"
9393
LIBS="$LIBS $1 -lv8_libplatform -lv8"
9494
AC_LINK_IFELSE([AC_LANG_PROGRAM([
9595
namespace v8 {
9696
namespace platform {
97-
void* CreateDefaultPlatform(int thread_pool_size = 0);
97+
enum class IdleTaskSupport { kDisabled, kEnabled };
98+
void* CreateDefaultPlatform($2);
9899
}
99100
}
100101
], [ v8::platform::CreateDefaultPlatform(); ])], [
101102
dnl libv8_libplatform.so found
102103
AC_MSG_RESULT(found)
103104
V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"
104-
$2
105-
], [ $3 ])
105+
$3
106+
], [ $4 ])
106107
LIBS="$save_LIBS"
107108
])
108109

109-
V8_CHECK_LINK([], [], [
110-
V8_CHECK_LINK([-lv8_libbase], [], [ AC_MSG_ERROR([could not find libv8_libplatform library]) ])
110+
V8_CHECK_LINK([], [int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled], [], [
111+
V8_CHECK_LINK([], [int thread_pool_size = 0], [], [
112+
V8_CHECK_LINK([-lv8_libbase], [int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled], [], [
113+
V8_CHECK_LINK([-lv8_libbase], [int thread_pool_size = 0], [], [
114+
AC_MSG_ERROR([could not find libv8_libplatform library])
115+
])
116+
])
117+
])
111118
])
112119

113120

0 commit comments

Comments
 (0)