File: acinclude.m4

package info (click to toggle)
squeak-vm 1%3A4.10.2.2614-4.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 13,284 kB
  • ctags: 15,344
  • sloc: ansic: 75,096; cs: 11,191; objc: 5,494; sh: 3,170; asm: 1,533; cpp: 449; pascal: 372; makefile: 366; awk: 103
file content (35 lines) | stat: -rw-r--r-- 791 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
AC_MSG_CHECKING([for FFI support])

FFI_DIR=${topdir}/platforms/unix/plugins/SqueakFFIPrims

AC_ARG_WITH(ffi,
[  --with-ffi=ffi          use FFI support [default=auto]],
  [with_ffi="$withval"],
  [with_ffi="auto"])

if test "${with_ffi}" != "auto"; then
  ffi_cpu_abi="${with_ffi}"
else
  ffi_cpu_abi=`${FFI_DIR}/ffi-config ${cfgdir} ${FFI_DIR} -cpu-abi`
fi

if test "${ffi_cpu_abi}" != "any-libffi"; then
    AC_MSG_RESULT([${ffi_cpu_abi}])
else
    AC_MSG_RESULT([requires libffi])
    ffi_cpu_abi=any-libffi
    AC_CHECK_HEADER(ffi.h,
	AC_CHECK_LIB(ffi, ffi_call,
	    AC_PLUGIN_USE_LIB(ffi),
	    AC_PLUGIN_DISABLE),
	AC_PLUGIN_DISABLE)
fi

FFI_C=${ffi_cpu_abi}
FFI_S=${ffi_cpu_abi}-asm
FFI_O="${FFI_C}\$o ${FFI_S}\$o"

AC_SUBST(FFI_DIR)
AC_SUBST(FFI_C)
AC_SUBST(FFI_S)
AC_SUBST(FFI_O)