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,9 +1,19 @@
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> 2008-01-13 Badlop <badlop@process-one.net>
* src/ejabberdctl.template: Instead of using the Erlang kernel * src/ejabberdctl.template: Instead of using the Erlang kernel
variable 'inetrc', use the ERL_INETRC environment variable that is variable 'inetrc', use the ERL_INETRC environment variable that is
available since Erlang/OTP R10B-5. available since Erlang/OTP R10B-5.
2008-01-12 Christophe Romain <christophe.romain@process-one.net> 2008-01-12 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: set_subscription fix (EJAB-494) * src/mod_pubsub/mod_pubsub.erl: set_subscription fix (EJAB-494)
@ -45,14 +55,14 @@
* src/web/ejabberd_web_admin.erl: Uniformize ejabberd name in the * src/web/ejabberd_web_admin.erl: Uniformize ejabberd name in the
text using the Latex command text using the Latex command
* src/mod_muc/mod_muc_room.erl: Resend 'continue' elements in muc * src/mod_muc/mod_muc_room.erl: Resend 'continue' elements in muc
room invitations (EJAB-490) room invitations (EJAB-490)
* src/ejabberdctl.template: Create logs_dir if doesn't exist. New * src/ejabberdctl.template: Create logs_dir if doesn't exist. New
parameters --config, --ctl-config, --logs, --spool. Crash dump parameters --config, --ctl-config, --logs, --spool. Crash dump
renamed to erl_crash_DATETIME.dump. renamed to erl_crash_DATETIME.dump.
* src/ejabberdctl.template: Backport improvements from binary * src/ejabberdctl.template: Backport improvements from binary
installer (EJAB-488): options are simple values; enable Kernel installer (EJAB-488): options are simple values; enable Kernel
Poll by default, set SMP to auto, set max ports to 32000, max Poll by default, set SMP to auto, set max ports to 32000, max
@ -65,7 +75,7 @@
* doc/guide.tex: Likewise * doc/guide.tex: Likewise
2007-12-31 Badlop <badlop@process-one.net> 2007-12-31 Badlop <badlop@process-one.net>
* src/msgs/ca.msg: Updated (thanks to Vicent Alberola Canet) * src/msgs/ca.msg: Updated (thanks to Vicent Alberola Canet)
2007-12-29 Alexey Shchepin <alexey@process-one.net> 2007-12-29 Alexey Shchepin <alexey@process-one.net>
@ -212,7 +222,7 @@
* src/mod_muc/mod_muc_log.erl: Add handling of kicks 321, 322, 332 * src/mod_muc/mod_muc_log.erl: Add handling of kicks 321, 322, 332
* doc/guide.tex: Document mod_privacy_odbc * doc/guide.tex: Document mod_privacy_odbc
* doc/Makefile: Support for conditional inclusion of documentation * doc/Makefile: Support for conditional inclusion of documentation
from contributed modules from contributed modules
* doc/guide.tex: Likewise * doc/guide.tex: Likewise
@ -284,7 +294,7 @@
new ones on top. Each string must be in a single line (to new ones on top. Each string must be in a single line (to
facilitate the automatic removal of unused strings). Last four facilitate the automatic removal of unused strings). Last four
lines report file format for Emacs and Vim. lines report file format for Emacs and Vim.
* contrib/extract_translations/prepare-translation.sh: New * contrib/extract_translations/prepare-translation.sh: New
features: extract all translations, include explanation for features: extract all translations, include explanation for
translators in the file, remove unused strings from file, include translators in the file, remove unused strings from file, include
@ -303,7 +313,7 @@
* src/mod_pubsub/mod_pubsub.erl: presence handler bugfix * src/mod_pubsub/mod_pubsub.erl: presence handler bugfix
* src/mod_pubsub/node_default.erl: Allow send last item on presence * src/mod_pubsub/node_default.erl: Allow send last item on presence
2007-12-12 Badlop <badlop@process-one.net> 2007-12-12 Badlop <badlop@process-one.net>
* src/msgs/it.msg: Updated (thanks to Luca Brivio) * src/msgs/it.msg: Updated (thanks to Luca Brivio)

View File

@ -12,6 +12,8 @@ ERLANG_CFLAGS= @ERLANG_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@ EXPAT_LIBS = @EXPAT_LIBS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
ERLC_FLAGS += @ERLANG_SSL39@
ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
@ -46,7 +48,7 @@ ERLBEHAVS = cyrsasl.erl gen_mod.erl p1_fsm.erl
SOURCES = $(ERLBEHAVS) $(wildcard *.erl) SOURCES = $(ERLBEHAVS) $(wildcard *.erl)
BEAMS = $(SOURCES:.erl=.beam) BEAMS = $(SOURCES:.erl=.beam)
DESTDIR = DESTDIR =
EJABBERDDIR = $(DESTDIR)@prefix@/var/lib/ejabberd EJABBERDDIR = $(DESTDIR)@prefix@/var/lib/ejabberd
BEAMDIR = $(EJABBERDDIR)/ebin BEAMDIR = $(EJABBERDDIR)/ebin
@ -144,4 +146,3 @@ Makefile: Makefile.in
dialyzer: $(BEAMS) dialyzer: $(BEAMS)
@dialyzer -c . @dialyzer -c .

42
src/aclocal.m4 vendored
View File

@ -8,7 +8,7 @@ AC_DEFUN(AM_WITH_EXPAT,
EXPAT_CFLAGS="-I$with_expat/include" EXPAT_CFLAGS="-I$with_expat/include"
EXPAT_LIBS="-L$with_expat/lib" EXPAT_LIBS="-L$with_expat/lib"
fi fi
AC_CHECK_LIB(expat, XML_ParserCreate, AC_CHECK_LIB(expat, XML_ParserCreate,
[ EXPAT_LIBS="$EXPAT_LIBS -lexpat" [ EXPAT_LIBS="$EXPAT_LIBS -lexpat"
expat_found=yes ], expat_found=yes ],
@ -42,7 +42,7 @@ AC_DEFUN(AM_WITH_ZLIB,
ZLIB_CFLAGS="-I$with_zlib/include" ZLIB_CFLAGS="-I$with_zlib/include"
ZLIB_LIBS="-L$with_zlib/lib" ZLIB_LIBS="-L$with_zlib/lib"
fi fi
AC_CHECK_LIB(z, gzgets, AC_CHECK_LIB(z, gzgets,
[ ZLIB_LIBS="$ZLIB_LIBS -lz" [ ZLIB_LIBS="$ZLIB_LIBS -lz"
zlib_found=yes ], zlib_found=yes ],
@ -76,7 +76,7 @@ AC_DEFUN(AM_WITH_PAM,
PAM_CFLAGS="-I$with_pam/include" PAM_CFLAGS="-I$with_pam/include"
PAM_LIBS="-L$with_pam/lib" PAM_LIBS="-L$with_pam/lib"
fi fi
AC_CHECK_LIB(pam, pam_start, AC_CHECK_LIB(pam, pam_start,
[ PAM_LIBS="$PAM_LIBS -lpam" [ PAM_LIBS="$PAM_LIBS -lpam"
pam_found=yes ], pam_found=yes ],
@ -106,26 +106,33 @@ AC_DEFUN(AM_WITH_ERLANG,
AC_PATH_TOOL(ERLC, erlc, , $with_erlang:$with_erlang/bin:$PATH) AC_PATH_TOOL(ERLC, erlc, , $with_erlang:$with_erlang/bin:$PATH)
AC_PATH_TOOL(ERL, erl, , $with_erlang:$with_erlang/bin:$PATH) AC_PATH_TOOL(ERL, erl, , $with_erlang:$with_erlang/bin:$PATH)
if test "z$ERLC" = "z" || test "z$ERL" = "z"; then if test "z$ERLC" = "z" || test "z$ERL" = "z"; then
AC_MSG_ERROR([erlang not found]) AC_MSG_ERROR([erlang not found])
fi fi
cat >>conftest.erl <<_EOF cat >>conftest.erl <<_EOF
-module(conftest). -module(conftest).
-author('alexey@sevcom.net'). -author('alexey@sevcom.net').
-export([[start/0]]). -export([[start/0]]).
-include_lib("ssl/include/ssl_pkix.hrl").
start() -> start() ->
EIDirS = code:lib_dir("erl_interface") ++ "\n", EIDirS = code:lib_dir("erl_interface") ++ "\n",
EILibS = libpath("erl_interface") ++ "\n", EILibS = libpath("erl_interface") ++ "\n",
RootDirS = code:root_dir() ++ "\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(). halt().
-[ifdef]('id-pkix').
ssldef() -> "-DSSL39\n".
-else.
ssldef() -> "\n".
-endif.
%% 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),
@ -154,33 +161,36 @@ libpath(App) ->
%% ({error, enoent}): %% ({error, enoent}):
_Error -> code:lib_dir("erl_interface") ++ "/lib" _Error -> code:lib_dir("erl_interface") ++ "/lib"
end. end.
_EOF _EOF
if ! $ERLC conftest.erl; then if ! $ERLC conftest.erl; then
AC_MSG_ERROR([could not compile sample program]) AC_MSG_ERROR([could not compile sample program])
fi fi
if ! $ERL -s conftest -noshell; then if ! $ERL -s conftest -noshell; then
AC_MSG_ERROR([could not run sample program]) AC_MSG_ERROR([could not run sample program])
fi fi
if ! test -f conftest.out; then if ! test -f conftest.out; then
AC_MSG_ERROR([erlang program was not properly executed, (conftest.out was not produced)]) AC_MSG_ERROR([erlang program was not properly executed, (conftest.out was not produced)])
fi fi
# First line # First line
ERLANG_EI_DIR=`cat conftest.out | head -n 1` ERLANG_EI_DIR=`cat conftest.out | head -n 1`
# 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_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
# End line
ERLANG_DIR=`cat conftest.out | tail -n 1` ERLANG_DIR=`cat conftest.out | tail -n 1`
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include" ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include"
ERLANG_LIBS="-L$ERLANG_EI_LIB -lerl_interface -lei" ERLANG_LIBS="-L$ERLANG_EI_LIB -lerl_interface -lei"
AC_SUBST(ERLANG_CFLAGS) AC_SUBST(ERLANG_CFLAGS)
AC_SUBST(ERLANG_LIBS) AC_SUBST(ERLANG_LIBS)
AC_SUBST(ERLANG_SSL39)
AC_SUBST(ERLC) AC_SUBST(ERLC)
AC_SUBST(ERL) AC_SUBST(ERL)
]) ])
@ -262,7 +272,7 @@ AC_DEFUN([AM_ICONV],
CFLAGS="$am_save_CFLAGS") CFLAGS="$am_save_CFLAGS")
LIBS="$am_save_LIBS" LIBS="$am_save_LIBS"
fi fi
]) ])
if test "$am_cv_func_iconv" = yes; then if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])

25
src/configure vendored
View File

@ -663,6 +663,7 @@ ERLC
ERL ERL
ERLANG_CFLAGS ERLANG_CFLAGS
ERLANG_LIBS ERLANG_LIBS
ERLANG_SSL39
LIBICONV LIBICONV
CPP CPP
GREP GREP
@ -2924,14 +2925,21 @@ echo "$as_me: error: erlang not found" >&2;}
-author('alexey@sevcom.net'). -author('alexey@sevcom.net').
-export([start/0]). -export([start/0]).
-include_lib("ssl/include/ssl_pkix.hrl").
start() -> start() ->
EIDirS = code:lib_dir("erl_interface") ++ "\n", EIDirS = code:lib_dir("erl_interface") ++ "\n",
EILibS = libpath("erl_interface") ++ "\n", EILibS = libpath("erl_interface") ++ "\n",
RootDirS = code:root_dir() ++ "\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(). halt().
-ifdef('id-pkix').
ssldef() -> "-DSSL39\n".
-else.
ssldef() -> "\n".
-endif.
%% 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),
@ -2986,6 +2994,8 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was
# 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_SSL39=`cat conftest.out | head -n 3 | tail -n 1`
# End line
ERLANG_DIR=`cat conftest.out | tail -n 1` ERLANG_DIR=`cat conftest.out | tail -n 1`
ERLANG_CFLAGS="-I$ERLANG_EI_DIR/include -I$ERLANG_DIR/usr/include" 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 #locating iconv
@ -6530,6 +6541,7 @@ ERLC!$ERLC$ac_delim
ERL!$ERL$ac_delim ERL!$ERL$ac_delim
ERLANG_CFLAGS!$ERLANG_CFLAGS$ac_delim ERLANG_CFLAGS!$ERLANG_CFLAGS$ac_delim
ERLANG_LIBS!$ERLANG_LIBS$ac_delim ERLANG_LIBS!$ERLANG_LIBS$ac_delim
ERLANG_SSL39!$ERLANG_SSL39$ac_delim
LIBICONV!$LIBICONV$ac_delim LIBICONV!$LIBICONV$ac_delim
CPP!$CPP$ac_delim CPP!$CPP$ac_delim
GREP!$GREP$ac_delim GREP!$GREP$ac_delim
@ -6571,7 +6583,7 @@ SSL_CFLAGS!$SSL_CFLAGS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF _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 break
elif $ac_last_try; then elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 { { 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; } $ac_cs_success || { (exit 1); exit 1; }
fi 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_CHECK_HEADER(krb5.h,,)
AC_OUTPUT 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("ejabberd.hrl").
-include("jlib.hrl"). -include("jlib.hrl").
-ifdef(SSL39).
-include_lib("ssl/include/ssl_pkix.hrl").
-else.
-include_lib("ssl/include/PKIX1Explicit88.hrl"). -include_lib("ssl/include/PKIX1Explicit88.hrl").
-include_lib("ssl/include/PKIX1Implicit88.hrl"). -include_lib("ssl/include/PKIX1Implicit88.hrl").
-endif.
-include("XmppAddr.hrl"). -include("XmppAddr.hrl").
-define(DICT, dict). -define(DICT, dict).