Support cross-compilation

Julien LepillerSun Nov 14 20:10:11+0100 2021

ba88205

Support cross-compilation

configure.ac

1010
GUILE_PROGS
1111
GUILE_SITE_DIR
1212
13+
if test "$cross_compiling" != no; then
14+
   GUILE_TARGET="--target=$host_alias"
15+
   AC_SUBST([GUILE_TARGET])
16+
fi
17+
1318
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
1419
AC_CONFIG_FILES(Makefile)
1520
AC_PROG_AWK

guile.am

1919
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
2020
SUFFIXES = .scm .go
2121
.scm.go:
22-
	$(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
22+
	$(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILD) compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<"