[sr-dev] git:master: modules/app_java: updated Makefile so that it builds on CentOS 6

Peter Dunkley peter.dunkley at crocodile-rcs.com
Thu Oct 24 21:13:38 CEST 2013


Module: sip-router
Branch: master
Commit: 9c765e89ea7647b1e9c5e36eb0b324eec1d92b7d
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9c765e89ea7647b1e9c5e36eb0b324eec1d92b7d

Author: Peter Dunkley <peter.dunkley at crocodilertc.net>
Committer: Peter Dunkley <peter.dunkley at crocodilertc.net>
Date:   Thu Oct 24 20:13:11 2013 +0100

modules/app_java: updated Makefile so that it builds on CentOS 6

---

 modules/app_java/Makefile |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules/app_java/Makefile b/modules/app_java/Makefile
index 943635a..6a95251 100644
--- a/modules/app_java/Makefile
+++ b/modules/app_java/Makefile
@@ -9,7 +9,12 @@ NAME=app_java.so
 
 #DEFS += -DEXTRA_DEBUG
 
-
+DIST = $(shell if [ -f "/etc/redhat-release" ]; then cat /etc/redhat-release | sed "s/.*\([0-9]\)\.[0-9].*/\1/g"; fi)
+ifeq ($(DIST),6)
+JVM_PATH = $(shell dirname `find /usr/lib/jvm/java/ -name "libjvm.so"`)
+DEFS += $(shell pkg-config libgcj-4.4 --cflags)
+LIBS += $(shell pkg-config libgcj-4.4 --cflags) -L$(JVM_PATH) -ljvm
+else
 # for now is hard coded, will resolve this later
 JAVA_HOME ?= /usr/lib/jvm/java-gcj-4.7
 DEFS += $(shell pkg-config libgcj-4.7 --cflags) -I$(JAVA_HOME)/include
@@ -18,6 +23,7 @@ LIBS += $(shell pkg-config libgcj-4.7 --libs) -L$(JAVA_HOME)/lib  -ljvm
 ifeq ($(OS), freebsd)
 LIBS+=-pthread
 endif
+endif
 
 # disable optimisation for segfaults debugging
 INCLUDE += -O0 -g




More information about the sr-dev mailing list