25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-27 15:02:14 +01:00

Add --enable-pubsub_ng option

This commit is contained in:
Evgeniy Khramtsov 2013-05-02 18:29:40 +10:00
parent 042172eae1
commit eda360914e
4 changed files with 49 additions and 8 deletions

View File

@ -99,7 +99,7 @@ clean:
distclean: clean distclean: clean
rm -f config.status rm -f config.status
rm -f config.log rm -f config.log
rm -f config.rebar rm -f rebar.config.script
rm -rf deps rm -rf deps
rm -f Makefile rm -f Makefile
rm -rf rel/files rm -rf rel/files

16
configure vendored
View File

@ -561,6 +561,7 @@ ac_default_prefix=/
ac_subst_vars='LTLIBOBJS ac_subst_vars='LTLIBOBJS
LIBOBJS LIBOBJS
INSTALLUSER INSTALLUSER
pubsub_ng
debug debug
iconv iconv
json json
@ -646,6 +647,7 @@ enable_riak
enable_json enable_json
enable_iconv enable_iconv
enable_debug enable_debug
enable_pubsub_ng
enable_user enable_user
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
@ -1290,6 +1292,7 @@ Optional Features:
--enable-json enable JSON support for mod_bosh (default: no) --enable-json enable JSON support for mod_bosh (default: no)
--enable-iconv enable iconv support (default: no) --enable-iconv enable iconv support (default: no)
--enable-debug enable debug information (default: yes) --enable-debug enable debug information (default: yes)
--enable-pubsub_ng enable PubSub NG (default: no)
--enable-user[[[=USER]]] --enable-user[[[=USER]]]
allow this system user to start ejabberd (default: allow this system user to start ejabberd (default:
no) no)
@ -2629,6 +2632,19 @@ fi
# Check whether --enable-pubsub_ng was given.
if test "${enable_pubsub_ng+set}" = set; then :
enableval=$enable_pubsub_ng; case "${enableval}" in
yes) pubsub_ng=true ;;
no) pubsub_ng=false ;;
*) as_fn_error $? "bad value ${enableval} for --enable-pubsub_ng" "$LINENO" 5 ;;
esac
else
pubsub_ng=false
fi
ac_config_files="$ac_config_files Makefile rebar.config.script src/ejabberd.app.src rel/reltool.config" ac_config_files="$ac_config_files Makefile rebar.config.script src/ejabberd.app.src rel/reltool.config"

View File

@ -183,6 +183,15 @@ AC_ARG_ENABLE(debug,
esac],[debug=true]) esac],[debug=true])
AC_SUBST(debug) AC_SUBST(debug)
AC_ARG_ENABLE(pubsub_ng,
[AC_HELP_STRING([--enable-pubsub_ng], [enable PubSub NG (default: no)])],
[case "${enableval}" in
yes) pubsub_ng=true ;;
no) pubsub_ng=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pubsub_ng) ;;
esac],[pubsub_ng=false])
AC_SUBST(pubsub_ng)
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
rebar.config.script rebar.config.script
src/ejabberd.app.src src/ejabberd.app.src

View File

@ -14,6 +14,8 @@ Cfg = [%% Macros
{nif, @nif@}, {nif, @nif@},
{db_type, @db_type@}, {db_type, @db_type@},
{debug, @debug@}, {debug, @debug@},
{hipe, @hipe@},
{pubsub_ng, @pubsub_ng@},
%% Dependencies %% Dependencies
{mysql, @mysql@}, {mysql, @mysql@},
@ -49,12 +51,23 @@ DebugInfo = case lists:keysearch(debug, 1, Cfg) of
[] []
end, end,
Head = [{erl_opts, [{i, "include"}, HiPE = case lists:keysearch(hipe, 1, Cfg) of
{value, {hipe, true}} ->
[native];
_ ->
[]
end,
Includes = [{i, "include"},
{i, filename:join(["deps", "logger", "include"])}, {i, filename:join(["deps", "logger", "include"])},
{i, filename:join(["deps", "xml", "include"])}] {i, filename:join(["deps", "xml", "include"])}],
++ Macros ++ DebugInfo},
{src_dirs, [asn1, src]}, SrcDirs = lists:foldl(
{sub_dirs, ["rel"]}], fun({pubsub_ng, true}, Acc) ->
[mod_pubsub_ng|Acc];
(_, Acc) ->
Acc
end, [], Cfg),
Deps = [{logger, ".*", {git, "git://github.com/processone/p1_logger"}}, Deps = [{logger, ".*", {git, "git://github.com/processone/p1_logger"}},
{tls, ".*", {git, "git://github.com/processone/tls"}}, {tls, ".*", {git, "git://github.com/processone/tls"}},
@ -85,7 +98,10 @@ CfgDeps = lists:flatmap(
[] []
end, Cfg), end, Cfg),
Head ++ [{deps, Deps ++ CfgDeps}]. [{erl_opts, Includes ++ Macros ++ HiPE ++ DebugInfo},
{src_dirs, [asn1, src | SrcDirs]},
{sub_dirs, ["rel"]},
{deps, Deps ++ CfgDeps}].
%% Local Variables: %% Local Variables:
%% mode: erlang %% mode: erlang