mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Port SSLVER detection from 2.1.x, needed for ?PG2 (EJAB-1349)
This commit is contained in:
parent
2aa56cd86e
commit
2ef06678c0
@ -26,7 +26,7 @@ else
|
|||||||
INIT_USER=$(INSTALLUSER)
|
INIT_USER=$(INSTALLUSER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EFLAGS += -pa .
|
EFLAGS += @ERLANG_SSLVER@ -pa .
|
||||||
|
|
||||||
# make debug=true to compile Erlang module with debug informations.
|
# make debug=true to compile Erlang module with debug informations.
|
||||||
ifdef debug
|
ifdef debug
|
||||||
|
@ -98,9 +98,17 @@ start() ->
|
|||||||
end,
|
end,
|
||||||
EXMPPDirS = EXMPPDir ++ "\n",
|
EXMPPDirS = EXMPPDir ++ "\n",
|
||||||
RootDirS = code:root_dir() ++ "\n",
|
RootDirS = code:root_dir() ++ "\n",
|
||||||
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ EXMPPDirS ++ RootDirS)),
|
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ EXMPPDirS ++ RootDirS)),
|
||||||
halt().
|
halt().
|
||||||
|
|
||||||
|
ssldef() ->
|
||||||
|
OTP = (catch erlang:system_info(otp_release)),
|
||||||
|
if
|
||||||
|
OTP >= "R14" -> "-DSSL40\n";
|
||||||
|
OTP >= "R12" -> "-DSSL39\n";
|
||||||
|
true -> "\n"
|
||||||
|
end.
|
||||||
|
|
||||||
%% return physical architecture based on OS/Processor
|
%% return physical architecture based on OS/Processor
|
||||||
archname() ->
|
archname() ->
|
||||||
ArchStr = erlang:system_info(system_architecture),
|
ArchStr = erlang:system_info(system_architecture),
|
||||||
@ -149,7 +157,9 @@ _EOF
|
|||||||
# Second line
|
# Second line
|
||||||
ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
|
ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
|
||||||
# Third line
|
# Third line
|
||||||
ERLANG_EXMPP=`cat conftest.out | head -n 3 | tail -n 1`
|
ERLANG_SSLVER=`cat conftest.out | head -n 3 | tail -n 1`
|
||||||
|
# Fourth line
|
||||||
|
ERLANG_EXMPP=`cat conftest.out | head -n 4 | tail -n 1`
|
||||||
# End line
|
# End line
|
||||||
ERLANG_DIR=`cat conftest.out | tail -n 1`
|
ERLANG_DIR=`cat conftest.out | tail -n 1`
|
||||||
|
|
||||||
@ -158,6 +168,7 @@ _EOF
|
|||||||
|
|
||||||
AC_SUBST(ERLANG_CFLAGS)
|
AC_SUBST(ERLANG_CFLAGS)
|
||||||
AC_SUBST(ERLANG_LIBS)
|
AC_SUBST(ERLANG_LIBS)
|
||||||
|
AC_SUBST(ERLANG_SSLVER)
|
||||||
AC_SUBST(ERLANG_EXMPP)
|
AC_SUBST(ERLANG_EXMPP)
|
||||||
AC_SUBST(ERLC)
|
AC_SUBST(ERLC)
|
||||||
AC_SUBST(ERL)
|
AC_SUBST(ERL)
|
||||||
|
Loading…
Reference in New Issue
Block a user