Module: sip-router
Branch: master
Commit: d41c9a91afdd7a5a2c5e689f3302211c6bbeffb6
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d41c9a91afdd7a5a2c5e689f3302211c6bbeffb6

Author: Ovidiu Sas <[email protected]>
Committer: Ovidiu Sas <[email protected]>
Date:   Mon Dec  3 18:39:19 2012 -0500

app_lua: fix cross-compilation

---

 modules/app_lua/Makefile |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/modules/app_lua/Makefile b/modules/app_lua/Makefile
index 6be02a7..af30c4a 100644
--- a/modules/app_lua/Makefile
+++ b/modules/app_lua/Makefile
@@ -7,17 +7,24 @@ include ../../Makefile.defs
 auto_gen=
 NAME=app_lua.so
 
+ifeq ($(CROSS_COMPILE),)
 BUILDER = $(shell which lua-config)
+endif
+
 ifeq ($(BUILDER),)
+       ifeq ($(CROSS_COMPILE),)
        BUILDER = $(shell which pkg-config)
+       endif
        ifeq ($(BUILDER),)
-               LUA51 = $(shell ls /usr/lib/liblua* | grep liblua5.1)
+               LUA51 = $(shell ls $(LOCALBASE)/lib/liblua* | grep liblua5.1)
+               DEFS+=-I$(LOCALBASE)/include
+               LIBS+=-L$(LOCALBASE)/lib -lm
                ifeq ($(LUA51),)
-                       DEFS+=-I/usr/include/lua
-                       LIBS= -llua -lm
+                       DEFS+=-I$(LOCALBASE)/include/lua
+                       LIBS+=-llua
                else
-                       DEFS+=-I/usr/include/lua5.1
-                       LIBS= -llua5.1 -lm
+                       DEFS+=-I$(LOCALBASE)/include/lua5.1
+                       LIBS+=-llua5.1
                endif
        else
                LUAVER=XX


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to