[sr-dev] git:master: app_lua: don't use variable for lua version detection

Daniel-Constantin Mierla miconda at gmail.com
Thu May 31 22:24:34 CEST 2012


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu May 31 22:22:19 2012 +0200

app_lua: don't use variable for lua version detection

- trying to see if this makes it work on debian wheezy, as the make
  command is re-exeuting in infinite loop of implicit rule

---

 modules/app_lua/Makefile |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/modules/app_lua/Makefile b/modules/app_lua/Makefile
index 17e975e..7dc9546 100644
--- a/modules/app_lua/Makefile
+++ b/modules/app_lua/Makefile
@@ -20,13 +20,17 @@ ifeq ($(BUILDER),)
 			LIBS= -llua5.1
 		endif
 	else
-		LUANAME=lua
-		LUALIBS = $(shell pkg-config --silence-errors --libs ${LUANAME})
+		LUAVER=XX
+		LUALIBS = $(shell pkg-config --silence-errors --libs lua)
 		ifeq ($(LUALIBS),)
-			LUANAME=lua5.1
-			LUALIBS = $(shell pkg-config --silence-errors --libs ${LUANAME})
+			LUALIBS = $(shell pkg-config --silence-errors --libs lua5.1)
+			ifneq ($(LUALIBS),)
+				LUAVER=51
+			endif
+		else
+			LUAVER=5X
 		endif
-		ifeq ($(LUALIBS),)
+		ifeq ($(LUAVER),XX)
 			LUA51 = $(shell ls /usr/lib/liblua* | grep liblua5.1)
 			ifeq ($(LUA51),)
 				DEFS+=-I/usr/include/lua
@@ -36,8 +40,13 @@ ifeq ($(BUILDER),)
 				LIBS= -llua5.1
 			endif
 		else
-			DEFS+= $(shell pkg-config --cflags ${LUANAME})
-			LIBS = $(shell pkg-config --libs ${LUANAME})
+			ifeq ($(LUAVER),51)
+				DEFS+= $(shell pkg-config --cflags lua5.1)
+				LIBS = $(shell pkg-config --libs lua5.1)
+			else
+				DEFS+= $(shell pkg-config --cflags lua)
+				LIBS = $(shell pkg-config --libs lua)
+			endif
 		endif
 	endif
 else




More information about the sr-dev mailing list