FS-7180: when using system lua, properly link against reanmed library versions on debian for mod_lua

This commit is contained in:
Brian West 2015-01-20 13:18:12 -06:00
parent 1d361b6108
commit 861961bd4d
2 changed files with 15 additions and 3 deletions

View File

@ -518,6 +518,18 @@ AC_SUBST(SYS_XMLRPC_LDFLAGS)
AM_CONDITIONAL([SYSTEM_XMLRPCC],[test "${enable_xmlrpcc}" = "yes"])
AC_ARG_ENABLE([system-lua],[AS_HELP_STRING([--enable-system-lua],[use system lib for lua])],,[enable_system_lua="no"])
if test "${enable_system_lua}" = "yes" ; then
PKG_CHECK_MODULES([LUA],[lua5.2],[have_lua=yes],[have_lua=no])
if test "${have_lua}" = "no" ; then
PKG_CHECK_MODULES([LUA],[lua5.1],[have_lua=yes],[have_lua=no])
fi
if test "${have_lua}" = "no" ; then
PKG_CHECK_MODULES([LUA],[lua],[have_lua=yes],[have_lua=no])
fi
if test x"${LUA_LIBS}" = x"" ; then
LUA_LIBS="-llua"
fi
fi
AM_CONDITIONAL([SYSTEM_LUA],[test "${enable_system_lua}" = "yes"])
AC_ARG_ENABLE(srtp,

View File

@ -8,8 +8,8 @@ mod_LTLIBRARIES = mod_lua.la
mod_lua_la_SOURCES = mod_lua.cpp freeswitch_lua.cpp mod_lua_wrap.cpp
if SYSTEM_LUA
mod_lua_la_CXXFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS)
mod_lua_la_CFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS)
mod_lua_la_CXXFLAGS = $(AM_CPPFLAGS) $(LUA_CFLAGS) $(CPPFLAGS)
mod_lua_la_CFLAGS = $(AM_CPPFLAGS) $(LUA_CFLAGS) $(CPPFLAGS)
else
mod_lua_la_SOURCES += lua/lapi.c lua/lcode.c lua/lctype.c lua/ldebug.c lua/ldo.c lua/ldump.c lua/lfunc.c lua/lgc.c lua/llex.c lua/lmem.c lua/lobject.c lua/lopcodes.c lua/lparser.c lua/lstate.c lua/lstring.c lua/ltable.c lua/ltm.c lua/lundump.c lua/lvm.c lua/lzio.c lua/lauxlib.c lua/lbaselib.c lua/lbitlib.c lua/lcorolib.c lua/ldblib.c lua/liolib.c lua/lmathlib.c lua/loslib.c lua/lstrlib.c lua/ltablib.c lua/loadlib.c lua/linit.c
LUA_DIR=$(switch_srcdir)/src/mod/languages/mod_lua/lua
@ -21,7 +21,7 @@ mod_lua_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_lua_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lm $(AM_LDFLAGS) $(SOLINK)
if SYSTEM_LUA
mod_lua_la_LDFLAGS += -llua
mod_lua_la_LDFLAGS += $(LUA_LIBS)
endif
reswig: swigclean lua_wrap