Module: sip-router Branch: master Commit: 558dea003f05078699fb41d66d51d2999b2d7cf2 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=558dea00...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sun Oct 2 13:38:17 2011 +0200
app_lua: test for lua5.1 with pkg-config
- the lua lib name for pkg-config can be lua5.1 on some distros - reported and troubleshooting by Jon Bonilla, affecting Debian Wheezy
---
modules/app_lua/Makefile | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/app_lua/Makefile b/modules/app_lua/Makefile index 1a8d753..11e29a8 100644 --- a/modules/app_lua/Makefile +++ b/modules/app_lua/Makefile @@ -22,7 +22,12 @@ ifeq ($(BUILDER),) LIBS= -llua5.1 endif else - LUALIBS = $(shell pkg-config --silence-errors --libs lua) + LUANAME=lua + LUALIBS = $(shell pkg-config --silence-errors --libs ${LUANAME}) + ifeq ($(LUALIBS),) + LUANAME=lua5.1 + LUALIBS = $(shell pkg-config --silence-errors --libs ${LUANAME}) + endif ifeq ($(LUALIBS),) LUA51 = $(shell ls /usr/lib/liblua* | grep liblua5.1) ifeq ($(LUA51),) @@ -33,8 +38,8 @@ ifeq ($(BUILDER),) LIBS= -llua5.1 endif else - DEFS+= $(shell pkg-config --cflags lua) - LIBS = $(shell pkg-config --libs lua) + DEFS+= $(shell pkg-config --cflags ${LUANAME}) + LIBS = $(shell pkg-config --libs ${LUANAME}) endif endif else