Make iconv dependency optional

This commit is contained in:
Evgeniy Khramtsov 2013-05-01 23:35:01 +10:00
parent eda6b80ece
commit 7bbc98b04c
4 changed files with 33 additions and 1 deletions

View File

@ -14,3 +14,9 @@
{stun, @stun@}.
{riak, @riak@}.
{json, @json@}.
{iconv, @iconv@}.
%% Local Variables:
%% mode: erlang
%% End:
%% vim: set filetype=erlang tabstop=8:

16
configure vendored
View File

@ -561,6 +561,7 @@ ac_default_prefix=/
ac_subst_vars='LTLIBOBJS
LIBOBJS
INSTALLUSER
iconv
json
riak
stun
@ -642,6 +643,7 @@ enable_zlib
enable_stun
enable_riak
enable_json
enable_iconv
enable_user
'
ac_precious_vars='build_alias
@ -1284,6 +1286,7 @@ Optional Features:
--enable-stun enable STUN support (default: no)
--enable-riak enable Riak support (default: no)
--enable-json enable JSON support for mod_bosh (default: no)
--enable-iconv enable iconv support (default: no)
--enable-user[[[=USER]]]
allow this system user to start ejabberd (default:
no)
@ -2597,6 +2600,19 @@ fi
# Check whether --enable-iconv was given.
if test "${enable_iconv+set}" = set; then :
enableval=$enable_iconv; case "${enableval}" in
yes) iconv=true ;;
no) iconv=false ;;
*) as_fn_error $? "bad value ${enableval} for --enable-iconv" "$LINENO" 5 ;;
esac
else
iconv=false
fi
ac_config_files="$ac_config_files Makefile config.rebar src/ejabberd.app.src rel/reltool.config"

View File

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

View File

@ -40,7 +40,6 @@ Deps = [{logger, ".*", {git, "git://github.com/processone/p1_logger"}},
{stringprep, ".*", {git, "git://github.com/processone/stringprep"}},
{ibrowse, ".*", {git, "git://github.com/cmullaparthi/ibrowse"}},
{lhttpc, ".*", {git, "git://github.com/esl/lhttpc"}},
{iconv, ".*", {git, "git://github.com/processone/eiconv"}},
%%{xml, ".*", {git, "git://github.com/processone/xml"}},
{xmlrpc, ".*", {git, "git://github.com/etnt/xmlrpc"}}],
CfgDeps = lists:flatmap(
@ -58,6 +57,8 @@ CfgDeps = lists:flatmap(
[{riakc, ".*", {git, "git://github.com/basho/riak-erlang-client"}}];
({json, true}) ->
[{jiffy, ".*", {git, "git://github.com/davisp/jiffy"}}];
({iconv, true}) ->
[{iconv, ".*", {git, "git://github.com/processone/eiconv"}}];
(_) ->
[]
end, Cfg),