Allow for cross-compilation

This commit is contained in:
Christopher Baines 2020-10-05 17:17:48 +01:00
parent cbc6e1b035
commit 8980f39baf
2 changed files with 6 additions and 1 deletions

View file

@ -8,6 +8,11 @@ if test "x$GUILD" = "x"; then
AC_MSG_ERROR(['guild' binary not found; please check your guile 3 installation.]) AC_MSG_ERROR(['guild' binary not found; please check your guile 3 installation.])
fi fi
if test "$cross_compiling" != no; then
GUILE_TARGET="--target=$host_alias"
AC_SUBST([GUILE_TARGET])
fi
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])

View file

@ -18,4 +18,4 @@ CLEANFILES = $(GOBJECTS)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
SUFFIXES = .scm .go SUFFIXES = .scm .go
.scm.go: .scm.go:
$(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<" $(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILD) compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<"