diff --git a/src/Makefile.in b/src/Makefile.in index f03f7fae8..c52744f51 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -26,7 +26,7 @@ else INIT_USER=$(INSTALLUSER) endif -EFLAGS += -pa . +EFLAGS += @ERLANG_SSLVER@ -pa . # make debug=true to compile Erlang module with debug informations. ifdef debug diff --git a/src/acinclude.m4 b/src/acinclude.m4 index e91fee816..8c18b3e42 100644 --- a/src/acinclude.m4 +++ b/src/acinclude.m4 @@ -98,9 +98,17 @@ start() -> end, EXMPPDirS = EXMPPDir ++ "\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(). +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 archname() -> ArchStr = erlang:system_info(system_architecture), @@ -149,7 +157,9 @@ _EOF # Second line ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1` # 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 ERLANG_DIR=`cat conftest.out | tail -n 1` @@ -158,6 +168,7 @@ _EOF AC_SUBST(ERLANG_CFLAGS) AC_SUBST(ERLANG_LIBS) + AC_SUBST(ERLANG_SSLVER) AC_SUBST(ERLANG_EXMPP) AC_SUBST(ERLC) AC_SUBST(ERL)