aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-10-05 17:17:48 +0100
committerChristopher Baines <mail@cbaines.net>2020-10-05 17:17:48 +0100
commit8980f39bafb3e59d6de17e7b311df4932e5b5182 (patch)
tree14d7e358778008993b9e801735012d69eb588fe7
parentcbc6e1b03512443a03d66414c426adb8470b5f2b (diff)
downloadprometheus-8980f39bafb3e59d6de17e7b311df4932e5b5182.tar
prometheus-8980f39bafb3e59d6de17e7b311df4932e5b5182.tar.gz
Allow for cross-compilation
-rw-r--r--configure.ac5
-rw-r--r--guile.am2
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 197a687..a45a1cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,11 @@ if test "x$GUILD" = "x"; then
AC_MSG_ERROR(['guild' binary not found; please check your guile 3 installation.])
fi
+if test "$cross_compiling" != no; then
+ GUILE_TARGET="--target=$host_alias"
+ AC_SUBST([GUILE_TARGET])
+fi
+
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
diff --git a/guile.am b/guile.am
index 1036225..743bdea 100644
--- a/guile.am
+++ b/guile.am
@@ -18,4 +18,4 @@ CLEANFILES = $(GOBJECTS)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
SUFFIXES = .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 "$@" "$<"