From 3cfec5538223e27b4bedd0d6cc43cc38efff633c Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 27 May 2013 13:36:50 +0200 Subject: [PATCH] configure: try to autodetect lualib Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0c3c93e7dbce144eab958fa6ed84b2891687ada4 Author: Stefan Seyfried Date: 2013-05-27 (Mon, 27 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- configure.ac | 13 +++++++++++++ src/Makefile.am | 2 +- src/gui/Makefile.am | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f74f03ace..10d3b5397 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,17 @@ if test x$BOXTYPE = xgeneric; then # needed by libstb-hal's cVideo / GLFramebuffer TUXBOX_APPS_LIB_PKGCONFIG(SWSCALE,libswscale) fi + +# either use dynamic lualib in package lua (openSUSE) +# ... or in package lua5.2 (debian-derivates) +# ... and if all fails, assume it is in the linker path (cross build) +PKG_CHECK_MODULES([LUA], [lua >= 5.2], echo "lua >= 5.2 found", [ + PKG_CHECK_MODULES([LUA], [lua5.2 >= 5.2], echo "lua5.2 found", [ + echo "=> lualib not found, assuming static lua in linker path..." + LUA_LIBS="-llua -ldl" + ]) +]) + #TUXBOX_APPS_LIB_PKGCONFIG(CONFIGFILE,tuxbox-configfile) #TUXBOX_APPS_LIB_PKGCONFIG(CONNECTION,tuxbox-connection) #TUXBOX_APPS_LIB_PKGCONFIG(EVENTSERVER,tuxbox-eventserver) @@ -193,6 +204,8 @@ AC_SUBST(VORBISIDEC_CFLAGS) AC_SUBST(VORBISIDEC_LIBS) AC_SUBST(STB_HAL_INC) AC_SUBST(STB_HAL_LIB) +AC_SUBST(LUA_CFLAGS) +AC_SUBST(LUA_LIBS) AC_OUTPUT([ Makefile diff --git a/src/Makefile.am b/src/Makefile.am index fa6fdbb34..d86322dc7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -105,7 +105,7 @@ neutrino_LDADD += -lgif else neutrino_LDADD += -lungif endif -neutrino_LDADD += -llua -ldl +neutrino_LDADD += @LUA_LIBS@ if ENABLE_UPNP neutrino_LDADD += \ diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 733203482..5a4e8578a 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -34,6 +34,7 @@ INCLUDES = \ -I$(top_srcdir)/lib/xmltree \ -I$(top_srcdir)/lib/libupnpclient \ @CURL_CFLAGS@ \ + @LUA_CFLAGS@ \ @FREETYPE_CFLAGS@ if BOXTYPE_COOL