Module: sip-router
Branch: vseva/trusty
Commit: 17c046a498dcbf15d6bb691041800a4938d754a8
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=17c046a…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: Tue Apr 22 11:44:29 2014 +0200
app_java: add libgcj14-dev support
---
modules/app_java/Makefile | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules/app_java/Makefile b/modules/app_java/Makefile
index 68b8f8a..922ff47 100644
--- a/modules/app_java/Makefile
+++ b/modules/app_java/Makefile
@@ -17,8 +17,14 @@ LIBS += $(shell pkg-config libgcj-4.4 --cflags) -L$(JVM_PATH) -ljvm
else
# try to detect JAVA_HOME
JAVA_HOME ?= $(shell readlink -f /usr/bin/javac | sed "s:bin/javac::")
-DEFS += $(shell pkg-config libgcj12 --cflags) -I$(JAVA_HOME)/include
-LIBS += $(shell pkg-config libgcj12 --libs) -L$(JAVA_HOME)/lib -ljvm
+JVER=$(shell pkg-config --libs libgcj14 2>/dev/null)
+ifeq ($(JVER),)
+JLIB=libgcj12
+else
+JLIB=libgcj14
+endif
+DEFS += $(shell pkg-config $(JLIB) --cflags) -I$(JAVA_HOME)/include
+LIBS += $(shell pkg-config $(JLIB) --libs) -L$(JAVA_HOME)/lib -ljvm
ifeq ($(OS), freebsd)
LIBS+=-pthread