Module: sip-router
Branch: 3.1
Commit: 0773c617da635bac1ba8c6d53550d3e57388359d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0773c61…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Mar 29 12:16:13 2011 +0200
app_lua: try to locate liblua for centos
- centos has liblua instead of liblua5.1 and does not provide lua-config
or pkg-config to discover the name of lua library
- in this case use shell to figure out whether is liblua5.1 or liblua
(cherry picked from commit 20d396d9bd190929366e9e493124606aedb087c1)
---
modules/app_lua/Makefile | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/modules/app_lua/Makefile b/modules/app_lua/Makefile
index 89fc8d6..1ba3237 100644
--- a/modules/app_lua/Makefile
+++ b/modules/app_lua/Makefile
@@ -13,13 +13,25 @@ BUILDER = $(shell which lua-config)
ifeq ($(BUILDER),)
BUILDER = $(shell which pkg-config)
ifeq ($(BUILDER),)
- DEFS+=-I/usr/include/lua5.1
- LIBS= -llua5.1
+ LUA51 = $(shell ls /usr/lib/liblua* | grep 5.1)
+ ifeq ($(LUA51),)
+ DEFS+=-I/usr/include/lua
+ LIBS= -llua
+ else
+ DEFS+=-I/usr/include/lua5.1
+ LIBS= -llua5.1
+ endif
else
LUALIBS = $(shell pkg-config --silence-errors --libs lua)
ifeq ($(LUALIBS),)
- DEFS+=-I/usr/include/lua5.1
- LIBS= -llua5.1
+ LUA51 = $(shell ls /usr/lib/liblua* | grep 5.1)
+ ifeq ($(LUA51),)
+ DEFS+=-I/usr/include/lua
+ LIBS= -llua
+ else
+ DEFS+=-I/usr/include/lua5.1
+ LIBS= -llua5.1
+ endif
else
DEFS+ = $(shell pkg-config --cflags lua)
LIBS = $(shell pkg-config --libs lua)