25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Use Mix or Rebar3 by default instead of Rebar2 to compile ejabberd

Use the program specified in option: --with-rebar=/path/to/bin
When none is specified, use the system mix
When Elixir not found, use the system rebar3
When Rebar3 not found, use the rebar3 binary included with ejabberd
This commit is contained in:
Badlop 2023-12-26 19:23:21 +01:00
parent dd5a198222
commit 0d852474be
2 changed files with 22 additions and 4 deletions

View File

@ -89,7 +89,7 @@ Build an OTP Release
Instead of installing ejabberd in the system, you can build an OTP release
that includes all necessary to run ejabberd in a subdirectory:
./configure --with-rebar=rebar3
./configure
make rel
Or, if you have Elixir available and plan to develop Elixir code:

View File

@ -28,18 +28,34 @@ fi
])
AC_ARG_WITH(rebar,
AS_HELP_STRING([--with-rebar=bin],[use the rebar/rebar3/mix binary specified]),
AS_HELP_STRING([--with-rebar=bin],[use as build tool the rebar/rebar3/mix binary specified]),
[if test "$withval" = "yes" -o "$withval" = "no" -o "X$with_rebar" = "X"; then
rebar="rebar"
rebar="rebar3"
else
rebar="$with_rebar"
fi
], [rebar="rebar"])
], [rebar="unconfigured"])
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(REBAR3, rebar3, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(ELIXIR, elixir, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(IEX, iex, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(MIX, mix, , [${extra_erl_path}$PATH])
if test "$rebar" = unconfigured; then
if test "x$ELIXIR" = "x" -o "x$IEX" = "x" -o "x$MIX" = "x"; then
if test "x$REBAR3" = "x"; then
rebar="rebar3"
else
rebar=$REBAR3
fi
else
rebar=$MIX
fi
fi
AC_ERLANG_NEED_ERL
AC_ERLANG_NEED_ERLC
@ -281,6 +297,8 @@ case "`uname`" in
;;
esac
AC_MSG_RESULT([build tool to use (change using --with-rebar): $rebar])
AC_SUBST(roster_gateway_workaround)
AC_SUBST(new_sql_schema)
AC_SUBST(full_xml)