From e4646a6788951d3e5d5598668089c65ff6c5f466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 20 Jun 2008 12:49:39 +0000 Subject: [PATCH] Add exmpp detection. SVN Revision: 1366 --- ChangeLog | 4 ++++ src/Makefile.in | 2 +- src/aclocal.m4 | 11 ++++++++++- src/configure | 15 +++++++++++++-- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 727c47ec3..6386fdbf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-06-20 Jean-Sébastien Pédron + + * src/configure, src/aclocal.m4, src/Makefile.in: Add exmpp detection. + 2008-06-19 Jean-Sébastien Pédron * src/ejabberd_receiver.erl: Replace the use of xml_stream by diff --git a/src/Makefile.in b/src/Makefile.in index 57bb56333..7391a8d9a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -12,7 +12,7 @@ ERLANG_CFLAGS= @ERLANG_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@ -ERLC_FLAGS += @ERLANG_SSL39@ +ERLC_FLAGS += @ERLANG_SSL39@ -I@ERLANG_EXMPP@/include ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj # make debug=true to compile Erlang module with debug informations. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 46020d339..65509eefc 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -123,8 +123,14 @@ AC_DEFUN(AM_WITH_ERLANG, start() -> EIDirS = code:lib_dir("erl_interface") ++ "\n", EILibS = libpath("erl_interface") ++ "\n", + EXMPPDir = code:lib_dir("exmpp"), + case EXMPPDir of + {error, bad_name} -> exit("exmpp not found"); + _ -> ok + end, + EXMPPDirS = EXMPPDir ++ "\n", RootDirS = code:root_dir() ++ "\n", - file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ RootDirS)), + file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ EXMPPDirS ++ RootDirS)), halt(). -[ifdef]('id-pkix'). @@ -182,6 +188,8 @@ _EOF 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` + # Fourth line + ERLANG_EXMPP=`cat conftest.out | head -n 4 | tail -n 1` # End line ERLANG_DIR=`cat conftest.out | tail -n 1` @@ -191,6 +199,7 @@ _EOF AC_SUBST(ERLANG_CFLAGS) AC_SUBST(ERLANG_LIBS) AC_SUBST(ERLANG_SSL39) + AC_SUBST(ERLANG_EXMPP) AC_SUBST(ERLC) AC_SUBST(ERL) ]) diff --git a/src/configure b/src/configure index b874f6cab..573a17ee7 100755 --- a/src/configure +++ b/src/configure @@ -664,6 +664,7 @@ ERL ERLANG_CFLAGS ERLANG_LIBS ERLANG_SSL39 +ERLANG_EXMPP LIBICONV CPP GREP @@ -2930,8 +2931,14 @@ echo "$as_me: error: erlang not found" >&2;} start() -> EIDirS = code:lib_dir("erl_interface") ++ "\n", EILibS = libpath("erl_interface") ++ "\n", + EXMPPDir = code:lib_dir("exmpp"), + case EXMPPDir of + {error, bad_name} -> exit("exmpp not found"); + _ -> ok + end, + EXMPPDirS = EXMPPDir ++ "\n", RootDirS = code:root_dir() ++ "\n", - file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ RootDirS)), + file:write_file("conftest.out", list_to_binary(EIDirS ++ EILibS ++ ssldef() ++ EXMPPDirS ++ RootDirS)), halt(). -ifdef('id-pkix'). @@ -2995,6 +3002,8 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was 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` + # Fourth line + ERLANG_EXMPP=`cat conftest.out | head -n 4 | tail -n 1` # End line ERLANG_DIR=`cat conftest.out | tail -n 1` @@ -3007,6 +3016,7 @@ echo "$as_me: error: erlang program was not properly executed, (conftest.out was + #locating iconv @@ -6542,6 +6552,7 @@ ERL!$ERL$ac_delim ERLANG_CFLAGS!$ERLANG_CFLAGS$ac_delim ERLANG_LIBS!$ERLANG_LIBS$ac_delim ERLANG_SSL39!$ERLANG_SSL39$ac_delim +ERLANG_EXMPP!$ERLANG_EXMPP$ac_delim LIBICONV!$LIBICONV$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim @@ -6583,7 +6594,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` = 89; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5