Merge changesets 1150 and 1151 into branch ejabberd-2.0.x:

* src/Makefile.in: Allow compilation with Erlang R12 (EJAB-446)
(thanks to Sergei Golovan and Maxim Treskin). Erlang R12 version is
not supported and not recommended for production servers.
* src/aclocal.m4: Likewise
* src/configure.ac: Likewise
* src/configure: Likewise
* src/ejabberd_s2s_in.erl: Likewise

Small fixes in trunk/ChangeLog.

SVN Revision: 1152
This commit is contained in:
Badlop 2008-01-15 16:09:07 +00:00
parent 228eb9d333
commit 561cf36c81
6 changed files with 82 additions and 27 deletions

View File

@ -1,3 +1,13 @@
2008-01-15 Jérôme Sautret <jerome.sautret@process-one.net>
* src/Makefile.in: Allow compilation with Erlang R12 (EJAB-446)
(thanks to Sergei Golovan and Maxim Treskin). Erlang R12 version is
not supported and not recommended for production servers.
* src/aclocal.m4: Likewise
* src/configure.ac: Likewise
* src/configure: Likewise
* src/ejabberd_s2s_in.erl: Likewise
2008-01-13 Badlop <badlop@process-one.net>
* src/ejabberdctl.template: Instead of using the Erlang kernel

View File

@ -12,6 +12,8 @@ ERLANG_CFLAGS= @ERLANG_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@
ERLANG_LIBS = @ERLANG_LIBS@
ERLC_FLAGS += @ERLANG_SSL39@
ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj
# make debug=true to compile Erlang module with debug informations.
ifdef debug
@ -144,4 +146,3 @@ Makefile: Makefile.in
dialyzer: $(BEAMS)
@dialyzer -c .

12
src/aclocal.m4 vendored
View File

@ -118,14 +118,21 @@ AC_DEFUN(AM_WITH_ERLANG,
-author('alexey@sevcom.net').
-export([[start/0]]).
-include_lib("ssl/include/ssl_pkix.hrl").
start() ->
EIDirS = code:lib_dir("erl_interface") ++ "\n",
EILibS = libpath("erl_interface") ++ "\n",
RootDirS = code:root_dir() ++ "\n",
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ RootDirS)),
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ RootDirS)),
halt().
-[ifdef]('id-pkix').
ssldef() -> "-DSSL39\n".
-else.
ssldef() -> "\n".
-endif.
%% return physical architecture based on OS/Processor
archname() ->
ArchStr = erlang:system_info(system_architecture),
@ -174,6 +181,8 @@ _EOF
# Second line
ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
# Third line
ERLANG_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
# End line
ERLANG_DIR=`cat conftest.out | tail -n 1`
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include"
@ -181,6 +190,7 @@ _EOF
AC_SUBST(ERLANG_CFLAGS)
AC_SUBST(ERLANG_LIBS)
AC_SUBST(ERLANG_SSL39)
AC_SUBST(ERLC)
AC_SUBST(ERL)
])

25
src/configure vendored
View File

@ -663,6 +663,7 @@ ERLC
ERL
ERLANG_CFLAGS
ERLANG_LIBS
ERLANG_SSL39
LIBICONV
CPP
GREP
@ -2924,14 +2925,21 @@ echo "$as_me: error: erlang not found" >&2;}
-author('alexey@sevcom.net').
-export([start/0]).
-include_lib("ssl/include/ssl_pkix.hrl").
start() ->
EIDirS = code:lib_dir("erl_interface") ++ "\n",
EILibS = libpath("erl_interface") ++ "\n",
RootDirS = code:root_dir() ++ "\n",
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ RootDirS)),
file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ RootDirS)),
halt().
-ifdef('id-pkix').
ssldef() -> "-DSSL39\n".
-else.
ssldef() -> "\n".
-endif.
%% return physical architecture based on OS/Processor
archname() ->
ArchStr = erlang:system_info(system_architecture),
@ -2986,6 +2994,8 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was
# Second line
ERLANG_EI_LIB=`cat conftest.out | head -n 2 | tail -n 1`
# Third line
ERLANG_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
# End line
ERLANG_DIR=`cat conftest.out | tail -n 1`
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include"
@ -2996,6 +3006,7 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was
#locating iconv
@ -6530,6 +6541,7 @@ ERLC!$ERLC$ac_delim
ERL!$ERL$ac_delim
ERLANG_CFLAGS!$ERLANG_CFLAGS$ac_delim
ERLANG_LIBS!$ERLANG_LIBS$ac_delim
ERLANG_SSL39!$ERLANG_SSL39$ac_delim
LIBICONV!$LIBICONV$ac_delim
CPP!$CPP$ac_delim
GREP!$GREP$ac_delim
@ -6571,7 +6583,7 @@ SSL_CFLAGS!$SSL_CFLAGS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@ -6898,3 +6910,12 @@ if test "$no_create" != yes; then
$ac_cs_success || { (exit 1); exit 1; }
fi
if test -n "$ERLANG_SSL39" ; then
echo
echo "**************** WARNING ! ********************"
echo "ejabberd will be compiled with Erlang R12."
echo "This version of Erlang is not supported"
echo "and not recommended for production servers"
echo "***********************************************"
fi

View File

@ -120,3 +120,12 @@ fi
AC_CHECK_HEADER(krb5.h,,)
AC_OUTPUT
if test -n "$ERLANG_SSL39" ; then
echo
echo "**************** WARNING ! ********************"
echo "ejabberd will be compiled with Erlang R12."
echo "This version of Erlang is not supported"
echo "and not recommended for production servers"
echo "***********************************************"
fi

View File

@ -48,8 +48,12 @@
-include("ejabberd.hrl").
-include("jlib.hrl").
-ifdef(SSL39).
-include_lib("ssl/include/ssl_pkix.hrl").
-else.
-include_lib("ssl/include/PKIX1Explicit88.hrl").
-include_lib("ssl/include/PKIX1Implicit88.hrl").
-endif.
-include("XmppAddr.hrl").
-define(DICT, dict).