[wasm] use updated node to run jsvu (#18386)
[mono-project.git] / m4 / apple-target.m4
blob3e5844e1faeb3839b01e9ef03863532c7be3a058
1 # Usage:
2 # AC_MONO_APPLE_TARGET(target-name, action-if-found, action-if-not-found)
4 # Checks whether `target-name` is defined in "TargetConditionals.h"
6 AC_DEFUN([AC_MONO_APPLE_TARGET], [
7         AC_MONO_APPLE_AVAILABLE([$1], [for $1], [$1 == 1], $2, $3)
8 ])
11 # Usage:
12 # AC_MONO_APPLE_AVAILABLE(name, message, conditional, action-if-found, action-if-not-found)
14 # Checks for `conditional` using "TargetConditionals.h" and "AvailabilityMacros.h"
16 AC_DEFUN([AC_MONO_APPLE_AVAILABLE], [
17         # cache the compilation check
18         AC_CACHE_CHECK([$2], [ac_cv_apple_available_[]$1], [
19                 AC_TRY_COMPILE([
20                         #include "TargetConditionals.h"
21                         #include "AvailabilityMacros.h"
22                 ],[
23                         #if !($3)
24                         #error failed
25                         #endif
26                 ], [
27                         ac_cv_apple_available_[]$1=yes
28                 ], [
29                         ac_cv_apple_available_[]$1=no
30                 ])
31         ])
32         # keep the actions out of the cache check because they need to be always executed.
33         if test x$ac_cv_apple_available_[]$1 = xyes; then
34                 $1=yes
35                 [$4]
36         else
37                 $1=no
38                 [$5]
39         fi