Browse Source

app_lua: fix finding lua libs

- if pkg-config fails to find lua libs, use default values
(cherry picked from commit 6e65634bb10568767700d999437ee5194765d6e8)
Daniel-Constantin Mierla 15 years ago
parent
commit
2489d57d6a
1 changed files with 8 additions and 2 deletions
  1. 8 2
      modules/app_lua/Makefile

+ 8 - 2
modules/app_lua/Makefile

@@ -16,8 +16,14 @@ ifeq ($(BUILDER),)
 		DEFS+=-I/usr/include/lua5.1
 		LIBS= -llua5.1
 	else
-		DEFS+ = $(shell pkg-config --cflags lua)
-		LIBS = $(shell pkg-config --libs lua)
+		LUALIBS = $(shell pkg-config --silence-errors --libs lua)
+		ifeq ($(LUALIBS),)
+			DEFS+=-I/usr/include/lua5.1
+			LIBS= -llua5.1
+		else
+			DEFS+ = $(shell pkg-config --cflags lua)
+			LIBS = $(shell pkg-config --libs lua)
+		endif
 	endif
 else
 	DEFS+ = $(shell lua-config --include)