From aa21aee14bca90f7180b635aa4744d076ab4fdc8 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 15 Feb 2024 00:34:08 +0100 Subject: [PATCH] configure: If --with-rebar=rebar3 but rebar3 not system-installed, use local one --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index daa1170ea..35ee5fce8 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,7 @@ AC_PATH_TOOL(ERL, erl, , [${extra_erl_path}$PATH]) AC_PATH_TOOL(ERLC, erlc, , [${extra_erl_path}$PATH]) AC_PATH_TOOL(EPMD, epmd, , [${extra_erl_path}$PATH]) +AC_PATH_TOOL(REBAR, rebar, , [${extra_erl_path}$PATH]) AC_PATH_TOOL(REBAR3, rebar3, , [${extra_erl_path}$PATH]) AC_PATH_TOOL(ELIXIR, elixir, , [${extra_erl_path}$PATH]) AC_PATH_TOOL(IEX, iex, , [${extra_erl_path}$PATH]) @@ -58,6 +59,12 @@ if test "$rebar" = unconfigured; then rebar=$MIX fi fi +if test "x$rebar" = "xrebar" -a "x$REBAR" = "x" ; then + rebar="./rebar" +fi +if test "x$rebar" = "xrebar3" -a "x$REBAR3" = "x" ; then + rebar="./rebar3" +fi AC_ERLANG_NEED_ERL AC_ERLANG_NEED_ERLC