Skip to content

Commit 46d5f2f

Browse files
committed
rust: Skip building in VPATH
Cargo does not play nicely with VPATH (at least, that's what my quick google search found: rust-lang/cargo#5457 (comment)). Easiest is to just disable it when we detect a VPATH build.
1 parent b8c07f9 commit 46d5f2f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

configure.ac

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,11 +942,16 @@ EOF
942942
])
943943

944944
dnl For developing plugins in Rust, optional.
945+
dnl Rust does not play nicely with VPATH builds
945946
AC_CHECK_PROG([CARGO],[cargo],[cargo],[no])
946947
AC_ARG_ENABLE([rust],
947948
[AS_HELP_STRING([--disable-rust], [disable Rust plugin])],
948949
[],
949-
[enable_rust=yes])
950+
[if test "x$(realpath $srcdir)" = "x$(realpath .)"; then
951+
enable_rust=yes
952+
else
953+
enable_rust=no
954+
fi])
950955
AM_CONDITIONAL([HAVE_RUST],
951956
[test "x$CARGO" != "xno" && test "x$enable_rust" != "xno"])
952957

0 commit comments

Comments
 (0)