Module: kamailio
Branch: 5.0
Commit: d3a67fec5eeca80f0feb46422ab3b5ef84016616
URL: 
https://github.com/kamailio/kamailio/commit/d3a67fec5eeca80f0feb46422ab3b5ef84016616

Author: Fabrice Fontaine <fontaine.fabr...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2017-04-04T13:51:14+02:00

erlang: allow user to set ERLANG_xxxDIR

If erl is not installed on the system or can not be used (for example
when cross-compiling), then erlang module will use the values set by the
user in ERLANG_INCDIR and ERLANG_LIBDIR instead of returning en error

Signed-off-by: Fabrice Fontaine <fontaine.fabr...@gmail.com>
(cherry picked from commit 0d83c02f6389bf0adf9cc8afd5e19e2d0e94cd1a)

---

Modified: src/modules/erlang/Makefile

---

Diff:  
https://github.com/kamailio/kamailio/commit/d3a67fec5eeca80f0feb46422ab3b5ef84016616.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d3a67fec5eeca80f0feb46422ab3b5ef84016616.patch

---

diff --git a/src/modules/erlang/Makefile b/src/modules/erlang/Makefile
index e75176c..1886bd0 100644
--- a/src/modules/erlang/Makefile
+++ b/src/modules/erlang/Makefile
@@ -10,9 +10,12 @@ ERLANG=$(shell which erl)
 ifneq ($(ERLANG),)
 ERLANG_LIBDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/lib~n", 
[[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1)
 ERLANG_INCDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/include~n", 
[[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1)
-else
+endif
+
+ifeq ($(ERLANG_LIBDIR)$(ERLANG_INCDIR),)
 $(error Not found Erlang)
 endif
+
 LIBS=-L$(ERLANG_LIBDIR) -lei -lpthread
 
 DEFS+=-I$(ERLANG_INCDIR)


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to