From d41139ae20e9eff838fcf129196a09b0efe219d9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 6 Nov 2019 12:06:45 +0100 Subject: [PATCH] build: Support cross building. * configure.ac: Add AC_CANONICAL_HOST to get host. * Makefile.am (.scm.go): Set it as target. --- Makefile.am | 2 +- configure.ac | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index fd2f191..ea4061a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,7 +39,7 @@ $(guile_install_go_files): install-nobase_modDATA GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat SUFFIXES = .scm .go .scm.go: - $(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<" + $(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE_TOOLS) compile --target="$(host)" $(GUILE_WARNINGS) -o "$@" "$<" moddir=$(guilemoduledir) godir=$(guileobjectdir) diff --git a/configure.ac b/configure.ac index 5114d4d..ed3eba0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,7 @@ AC_INIT([8sync], [0.4.2], [cwebber@dustycloud.org]) +AC_CANONICAL_HOST + GUILE_PKG([3.0 2.2]) guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION" guileobjectdir="${libdir}/guile/$GUILE_EFFECTIVE_VERSION/site-ccache" -- 2.31.1