FS-11732 [mod_kazoo] check otp version for ei_init
This commit is contained in:
parent
049edaa84d
commit
dc8bc06c64
|
@ -75,10 +75,15 @@ then
|
||||||
[AC_MSG_ERROR([ei.h is unusable - are the erlang development headers installed?])]
|
[AC_MSG_ERROR([ei.h is unusable - are the erlang development headers installed?])]
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
ERLANG_MAJOR="`echo "$ERLANG_VER" | sed 's/\([[^.]][[^.]]*\).*/\1/'`"
|
||||||
|
ERLANG_MINOR="`echo "$ERLANG_VER" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`"
|
||||||
ERLANG_LDFLAGS="$ERLANG_LDFLAGS -lei"
|
ERLANG_LDFLAGS="$ERLANG_LDFLAGS -lei"
|
||||||
AC_MSG_NOTICE([Your erlang seems OK, do not forget to enable mod_erlang_event in modules.conf])
|
AC_MSG_NOTICE([Your erlang seems OK, do not forget to enable mod_erlang_event in modules.conf])
|
||||||
AC_SUBST([ERLANG_CFLAGS], [$ERLANG_CFLAGS])
|
AC_SUBST([ERLANG_CFLAGS], [$ERLANG_CFLAGS])
|
||||||
AC_SUBST([ERLANG_LDFLAGS], [$ERLANG_LDFLAGS])
|
AC_SUBST([ERLANG_LDFLAGS], [$ERLANG_LDFLAGS])
|
||||||
|
AC_SUBST([ERLANG_VERSION], [$ERLANG_VER])
|
||||||
|
AC_SUBST([ERLANG_MAJOR], [$ERLANG_MAJOR])
|
||||||
|
AC_SUBST([ERLANG_MINOR], [$ERLANG_MINOR])
|
||||||
AM_CONDITIONAL([HAVE_ERLANG],[true])
|
AM_CONDITIONAL([HAVE_ERLANG],[true])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ mod_kazoo_la_SOURCES += kazoo_ei_config.c kazoo_ei_utils.c kazoo_event_stream.c
|
||||||
mod_kazoo_la_SOURCES += kazoo_fetch_agent.c kazoo_node.c
|
mod_kazoo_la_SOURCES += kazoo_fetch_agent.c kazoo_node.c
|
||||||
mod_kazoo_la_SOURCES += kazoo_endpoints.c
|
mod_kazoo_la_SOURCES += kazoo_endpoints.c
|
||||||
|
|
||||||
mod_kazoo_la_CFLAGS = $(AM_CFLAGS) @ERLANG_CFLAGS@ -D_REENTRANT
|
mod_kazoo_la_CFLAGS = $(AM_CFLAGS) @ERLANG_CFLAGS@ -D_REENTRANT -DERLANG_VERSION=@ERLANG_VERSION@ -DERLANG_MAJOR=@ERLANG_MAJOR@ -DERLANG_MINOR=@ERLANG_MINOR@
|
||||||
mod_kazoo_la_LIBADD = $(KAZOO_DEFS) $(switch_builddir)/libfreeswitch.la
|
mod_kazoo_la_LIBADD = $(KAZOO_DEFS) $(switch_builddir)/libfreeswitch.la
|
||||||
mod_kazoo_la_LDFLAGS = -avoid-version -module -no-undefined -shared @ERLANG_LDFLAGS@
|
mod_kazoo_la_LDFLAGS = -avoid-version -module -no-undefined -shared @ERLANG_LDFLAGS@
|
||||||
|
|
||||||
|
|
|
@ -519,7 +519,9 @@ switch_status_t create_acceptor() {
|
||||||
char ipbuf[48];
|
char ipbuf[48];
|
||||||
const char *ip_addr;
|
const char *ip_addr;
|
||||||
|
|
||||||
|
#if ERLANG_MAJOR >= 10
|
||||||
ei_init();
|
ei_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* if the config has specified an erlang release compatibility then pass that along to the erlang interface */
|
/* if the config has specified an erlang release compatibility then pass that along to the erlang interface */
|
||||||
if (kazoo_globals.ei_compat_rel) {
|
if (kazoo_globals.ei_compat_rel) {
|
||||||
|
|
Loading…
Reference in New Issue