@@ -92,31 +92,22 @@ if test "$PHP_V8JS" != "no"; then
92
92
AC_MSG_CHECKING ( [ for libv8_libplatform] )
93
93
AC_DEFUN ( [ V8_CHECK_LINK] , [
94
94
save_LIBS="$LIBS"
95
- LIBS="$LIBS $1 -lv8_libplatform -lv8"
96
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [
97
- namespace v8 {
98
- namespace platform {
99
- enum class IdleTaskSupport { kDisabled, kEnabled };
100
- void* CreateDefaultPlatform($2 );
101
- }
102
- }
103
- ] , [ v8::platform::CreateDefaultPlatform(); ] ) ] , [
104
- dnl libv8_libplatform.so found
105
- AC_MSG_RESULT ( found )
106
- V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"
107
- $3
108
- ] , [ $4 ] )
95
+ LIBS="$LIBS $1 -lv8_libplatform -lv8"
96
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [
97
+ #include <libplatform/libplatform.h>
98
+ ] , [ v8::platform::CreateDefaultPlatform(); ] ) ] , [
99
+ dnl libv8_libplatform.so found
100
+ AC_MSG_RESULT ( found )
101
+ V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"
102
+ $3
103
+ ] , [ $4 ] )
109
104
LIBS="$save_LIBS"
110
105
] )
111
106
112
- V8_CHECK_LINK([ ] , [ int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled] , [ ] , [
113
- V8_CHECK_LINK([ ] , [ int thread_pool_size = 0] , [ ] , [
114
- V8_CHECK_LINK([ -lv8_libbase] , [ int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled] , [ ] , [
115
- V8_CHECK_LINK([ -lv8_libbase] , [ int thread_pool_size = 0] , [ ] , [
116
- AC_MSG_ERROR ( [ could not find libv8_libplatform library] )
117
- ] )
118
- ] )
119
- ] )
107
+ V8_CHECK_LINK([ ] , [ ] , [ ] , [
108
+ V8_CHECK_LINK([ -lv8_libbase] , [ ] , [ ] , [
109
+ AC_MSG_ERROR ( [ could not find libv8_libplatform library] )
110
+ ] )
120
111
] )
121
112
122
113
@@ -183,6 +174,23 @@ int main ()
183
174
V8_SEARCH_BLOB([ snapshot_blob.bin] , [ PHP_V8_SNAPSHOT_BLOB_PATH] )
184
175
185
176
177
+ dnl
178
+ dnl Check for v8::ArrayBuffer::Allocator::NewDefaultAllocator
179
+ dnl
180
+ AC_CACHE_CHECK ( [ for v8::ArrayBuffer::Allocator::NewDefaultAllocator] , ac_cv_has_default_allocator , [
181
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [
182
+ #include <v8.h>
183
+ ] , [ v8::ArrayBuffer::Allocator::NewDefaultAllocator(); ] ) ] , [
184
+ ac_cv_has_default_allocator=yes
185
+ ] , [
186
+ ac_cv_has_default_allocator=no
187
+ ] )
188
+ ] )
189
+ if test "x$ac_cv_has_default_allocator" = "xno"; then
190
+ AC_DEFINE ( [ USE_INTERNAL_ALLOCATOR] , [ 1] ,
191
+ [ Define unless v8::ArrayBuffer::Allocator::NewDefaultAllocator is usable.] )
192
+ fi
193
+
186
194
AC_LANG_RESTORE
187
195
LIBS=$old_LIBS
188
196
LDFLAGS="$old_LDFLAGS"
0 commit comments