Module: sip-router Branch: master Commit: 1787364d4f7a227533f5e11a4e2aaf6dcf40e310 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1787364d...
Author: Ovidiu Sas osas@voipembedded.com Committer: Ovidiu Sas osas@voipembedded.com Date: Tue Oct 5 03:25:05 2010 -0400
modules/app_lua: fix linking flags
---
modules/app_lua/Makefile | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/modules/app_lua/Makefile b/modules/app_lua/Makefile index a466ab9..74e0460 100644 --- a/modules/app_lua/Makefile +++ b/modules/app_lua/Makefile @@ -8,9 +8,22 @@ include ../../Makefile.defs auto_gen= NAME=app_lua.so -LIBS= -llua5.1
-DEFS+=-I/usr/include/lua5.1 +BUILDER = $(shell which lua-config) +ifeq ($(BUILDER),) + BUILDER = $(shell which pkg-config) + ifeq ($(BUILDER),) + DEFS+=-I/usr/include/lua5.1 + LIBS= -llua5.1 + else + DEFS+ = $(shell pkg-config --cflags lua) + LIBS = $(shell pkg-config --libs lua) + endif +else + DEFS+ = $(shell lua-config --include) + LIBS = $(shell lua-config --libs) +endif + DEFS+=-DOPENSER_MOD_INTERFACE
SERLIBPATH=../../lib