mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Merge branch 'master' of github.com:processone/ejabberd
This commit is contained in:
commit
5ffdfdd95d
15
configure.ac
15
configure.ac
@ -100,10 +100,10 @@ AC_ARG_ENABLE(mssql,
|
||||
esac],[db_type=generic])
|
||||
|
||||
AC_ARG_ENABLE(all,
|
||||
[AC_HELP_STRING([--enable-all], [same as --enable-nif --enable-odbc --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-riak --enable-redis --enable-elixir --enable-iconv --enable-debug --enable-lager --enable-tools (useful for Dialyzer checks, default: no)])],
|
||||
[AC_HELP_STRING([--enable-all], [same as --enable-odbc --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-riak --enable-redis --enable-elixir --enable-iconv --enable-debug --enable-lager --enable-tools (useful for Dialyzer checks, default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) nif=true odbc=true mysql=true pgsql=true sqlite=true pam=true zlib=true riak=true redis=true elixir=true iconv=true debug=true lager=true tools=true ;;
|
||||
no) nif=false odbc=false mysql=false pgsql=false sqlite=false pam=false zlib=false riak=false redis=false elixir=false iconv=false debug=false lager=false tools=false ;;
|
||||
yes) odbc=true mysql=true pgsql=true sqlite=true pam=true zlib=true riak=true redis=true elixir=true iconv=true debug=true lager=true tools=true ;;
|
||||
no) odbc=false mysql=false pgsql=false sqlite=false pam=false zlib=false riak=false redis=false elixir=false iconv=false debug=false lager=false tools=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-all) ;;
|
||||
esac],[])
|
||||
|
||||
@ -115,14 +115,6 @@ AC_ARG_ENABLE(tools,
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;;
|
||||
esac],[if test "x$tools" = "x"; then tools=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(nif,
|
||||
[AC_HELP_STRING([--enable-nif], [replace some functions with C equivalents. Requires Erlang R13B04 or higher (default: no)])],
|
||||
[case "${enableval}" in
|
||||
yes) nif=true ;;
|
||||
no) nif=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-nif) ;;
|
||||
esac],[if test "x$nif" = "x"; then nif=false; fi])
|
||||
|
||||
AC_ARG_ENABLE(odbc,
|
||||
[AC_HELP_STRING([--enable-odbc], [enable pure ODBC support (default: no)])],
|
||||
[case "${enableval}" in
|
||||
@ -249,7 +241,6 @@ fi
|
||||
AC_SUBST(hipe)
|
||||
AC_SUBST(roster_gateway_workaround)
|
||||
AC_SUBST(full_xml)
|
||||
AC_SUBST(nif)
|
||||
AC_SUBST(db_type)
|
||||
AC_SUBST(odbc)
|
||||
AC_SUBST(mysql)
|
||||
|
12
plugins/deps_erl_opts.erl
Normal file
12
plugins/deps_erl_opts.erl
Normal file
@ -0,0 +1,12 @@
|
||||
-module(deps_erl_opts).
|
||||
-export([preprocess/2]).
|
||||
|
||||
preprocess(Config, Dirs) ->
|
||||
ExtraOpts = rebar_config:get(Config, deps_erl_opts, []),
|
||||
Opts = rebar_config:get(Config, erl_opts, []),
|
||||
NewOpts = lists:foldl(fun(Opt, Acc) when is_tuple(Opt) ->
|
||||
lists:keystore(element(1, Opt), 1, Acc, Opt);
|
||||
(Opt, Acc) ->
|
||||
[Opt | lists:delete(Opt, Acc)]
|
||||
end, Opts, ExtraOpts),
|
||||
{ok, rebar_config:set(Config, erl_opts, NewOpts), []}.
|
@ -19,8 +19,6 @@ Cfg = case file:consult("vars.config") of
|
||||
Macros = lists:flatmap(
|
||||
fun({roster_gateway_workaround, true}) ->
|
||||
[{d, 'ROSTER_GATEWAY_WORKAROUND'}];
|
||||
({nif, true}) ->
|
||||
[{d, 'NIF'}];
|
||||
({db_type, mssql}) ->
|
||||
[{d, 'mssql'}];
|
||||
({lager, true}) ->
|
||||
@ -76,9 +74,7 @@ ConfigureCmd = fun(Pkg, Flags) ->
|
||||
end,
|
||||
|
||||
XMLFlags = lists:foldl(
|
||||
fun({nif, true}, Acc) ->
|
||||
Acc ++ " --enable-nif";
|
||||
({full_xml, true}, Acc) ->
|
||||
fun({full_xml, true}, Acc) ->
|
||||
Acc ++ " --enable-full-xml";
|
||||
(_, Acc) ->
|
||||
Acc
|
||||
@ -157,10 +153,10 @@ CfgXrefs = lists:flatmap(
|
||||
|
||||
ElixirConfig = case lists:keysearch(elixir, 1, Cfg) of
|
||||
{value, {elixir, true}} ->
|
||||
[{plugins, [rebar_elixir_compiler, rebar_exunit] },
|
||||
[{plugins, [deps_erl_opts, rebar_elixir_compiler, rebar_exunit] },
|
||||
{lib_dirs, ["deps/elixir/lib"]}];
|
||||
_ ->
|
||||
[]
|
||||
[{plugins, [deps_erl_opts]}]
|
||||
end,
|
||||
|
||||
{ok, Cwd} = file:get_cwd(),
|
||||
@ -181,6 +177,7 @@ AllDeps = case lists:keytake(lager, 1, AllDeps0) of
|
||||
|
||||
Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
|
||||
[{src_dirs, [asn1, src | SrcDirs]}]},
|
||||
{deps_erl_opts, HiPE},
|
||||
{sub_dirs, ["rel"]},
|
||||
{keep_build_info, true},
|
||||
{ct_extra_params, "-ct_hooks cth_surefire "
|
||||
|
@ -9,7 +9,6 @@
|
||||
%% Macros
|
||||
{roster_gateway_workaround, @roster_gateway_workaround@}.
|
||||
{full_xml, @full_xml@}.
|
||||
{nif, @nif@}.
|
||||
{db_type, @db_type@}.
|
||||
{debug, @debug@}.
|
||||
{hipe, @hipe@}.
|
||||
|
Loading…
Reference in New Issue
Block a user