Generate enabled_backends in ejabberd.app instead of configure (#3549)

Passing a list of atoms in vars.config.in (introduced in 3c16f214)
breaks rebar2 in "make rel"
pull/3554/head
Badlop 2 years ago
parent 8b78d27f30
commit 14c8e1226f

@ -283,17 +283,6 @@ case "`uname`" in
;;
esac
enabled_backends=""
for backend in odbc mysql pgsql sqlite redis mssql; do
if eval test x\${$backend} = xtrue; then
if test "x$enabled_backends" = "x"; then
enabled_backends=$backend
else
enabled_backends="$enabled_backends, $backend"
fi
fi
done
AC_SUBST(roster_gateway_workaround)
AC_SUBST(new_sql_schema)
AC_SUBST(full_xml)
@ -317,6 +306,5 @@ AC_SUBST(system_deps)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(enabled_backends)
AC_OUTPUT

@ -1,8 +1,10 @@
Vars = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.config"])) of
{ok, Terms} ->
Backends = [mssql, mysql, odbc, pgsql, redis, sqlite],
EBs = lists:filter(fun(Backend) -> lists:member({Backend, true}, Terms) end, Backends),
[lists:keyfind(description, 1, Terms),
lists:keyfind(vsn, 1, Terms),
{env, [lists:keyfind(enabled_backends, 1, Terms)]}
{env, [{enabled_backends, EBs}]}
];
_Err ->
[]

@ -46,7 +46,6 @@
%% Variables for overlay template files
{description, "@PACKAGE_NAME@"}.
{enabled_backends, [@enabled_backends@]}.
%% Platform-specific installation paths
{release, true}.

Loading…
Cancel
Save