Fix --disable-jit compilation

* libguile/jit.c: Wrap the whole thing in ENABLE_JIT.
* libguile/threads.c (on_thread_exit):
* libguile/vm.c (scm_call_n):
* libguile/init.c (scm_i_init_guile):
* libguile/vm-engine.c (VM_NAME): Wrap calls into jit.c with ENABLE_JIT.
* configure.ac: Move up AC_CANONICAL_TARGET, as autoconf was complaining
  about it coming after AC_ARG_PROGRAM.
* acinclude.m4 (GUILE_ENABLE_JIT): Fix to honor --enable-jit arg.
This commit is contained in:
Andy Wingo 2018-09-17 09:28:41 +02:00
commit ce9169804e
7 changed files with 27 additions and 8 deletions

View file

@ -581,7 +581,6 @@ AC_DEFUN([GUILE_CONFIG_SCRIPT],[AC_CONFIG_FILES([$1],[chmod +x $1])])
AC_DEFUN([GUILE_ENABLE_JIT], [
JIT_AVAILABLE=no
AC_CANONICAL_TARGET
AC_MSG_CHECKING([if JIT code generation supported for target CPU])
case "$target_cpu" in
i?86|x86_64|amd64) JIT_AVAILABLE=yes ;;
@ -611,12 +610,11 @@ AC_DEFUN([GUILE_ENABLE_JIT], [
[AS_HELP_STRING([--enable-jit[=yes/no/auto]],
[enable just-in-time code generation [default=auto]])])
enable_jit=auto
AC_MSG_CHECKING([whether to enable JIT code generation])
case "$enable_jit" in
y*) enable_jit=yes ;;
n*) enable_jit=no ;;
a*) enable_jit=$JIT_AVAILABLE ;;
case "x$enable_jit" in
xy*) enable_jit=yes ;;
xn*) enable_jit=no ;;
xa* | x) enable_jit=$JIT_AVAILABLE ;;
*) AC_MSG_ERROR(bad value $enable_jit for --enable-jit) ;;
esac
AC_MSG_RESULT($enable_jit)