---
configure.ac | 2 +-
golang/Makefile.am | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4e2bc65..9abec95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1530,7 +1530,7 @@ AS_IF([test "x$enable_golang" != "xno"],[
AC_CHECK_PROG([GOLANG],[go],[go],[no])
AS_IF([test "x$GOLANG" != "xno"],[
AC_MSG_CHECKING([if $GOLANG is usable])
- AS_IF([$GOLANG run golang/config-test.go 2>&AS_MESSAGE_LOG_FD],[
+ AS_IF([$GOLANG run $srcdir/golang/config-test.go 2>&AS_MESSAGE_LOG_FD],[
AC_MSG_RESULT([yes])
# Substitute some golang environment.
diff --git a/golang/Makefile.am b/golang/Makefile.am
index a7dd1b2..a60c9ba 100644
--- a/golang/Makefile.am
+++ b/golang/Makefile.am
@@ -44,6 +44,7 @@ golangpkg_DATA = \
pkg/$(GOOS)_$(GOARCH)/$(pkg).a
pkg/$(GOOS)_$(GOARCH)/$(pkg).a: src/$(pkg)/guestfs.go
+ -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/src $(builddir)/src
$(top_builddir)/run $(GOLANG) install $(pkg)
golangsrc_DATA = $(source_files)
@@ -57,4 +58,5 @@ endif
CLEANFILES = *~ src/$(pkg)/*~
clean-local:
+ -[ $(srcdir) != $(builddir) ] && rm -rf $(builddir)/src
rm -rf pkg
--
1.8.5.1