Parcourir la source

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
Daniel-Constantin Mierla il y a 13 ans
Parent
commit
e8506004db
1 fichiers modifiés avec 16 ajouts et 7 suppressions
  1. 16 7
      modules/app_lua/Makefile

+ 16 - 7
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