1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-20 03:51:18 +00:00

add tolua++5.1 as an additional helper function and set library flag accordingly

This commit is contained in:
Cesare Tirabassi 2009-07-21 00:04:53 +02:00 committed by Brenden Matthews
parent c655ab12d2
commit 55f0b6c10c
2 changed files with 20 additions and 10 deletions

View File

@ -456,7 +456,7 @@ if test x$want_lua = xyes; then
want_lua_cairo=no
want_lua_imlib2=no
else
AC_CHECK_PROG(HAVE_TOLUAPP, tolua++, yes, no)
AC_CHECK_PROGS(HAVE_TOLUAPP, [tolua++ tolua++5.1], no)
if test "x$want_x11" != "xyes"; then
dnl silently disable if no x11
want_lua_cairo=no
@ -465,9 +465,14 @@ if test x$want_lua = xyes; then
PKG_CHECK_MODULES([cairo], cairo)
PKG_CHECK_MODULES([cairo_xlib], cairo-xlib)
if test x"$HAVE_TOLUAPP" = x"no"; then
AC_MSG_ERROR([tolua++ is required for Lua Cairo support.])
AC_MSG_ERROR([tolua++ or tolua++5.1 is required for Lua Cairo support.])
else
AC_CHECK_PROGS(toluapp, tolua++)
AC_CHECK_PROGS(toluapp, [tolua++ tolua++5.1])
AC_SEARCH_LIBS(tolua_error,
tolua++ tolua++5.1,
AC_SUBST(tolua_LIBS,"${LIBS}"),
AC_MSG_ERROR([tolua_error not found]),
-llua5.1)
AC_DEFINE(HAVE_LUA_CAIRO, 1, [Define if you want Lua Cairo bindings for Conky])
fi
libcairo_CFLAGS="$libcairo_CFLAGS $cairo_CFLAGS $cairo_xlib_CFLAGS"
@ -475,10 +480,15 @@ if test x$want_lua = xyes; then
fi
if test x$want_imlib2 = xyes; then
if test x"$HAVE_TOLUAPP" = x"no"; then
AC_MSG_ERROR([tolua++ is required for Lua Imlib2 support.])
AC_MSG_ERROR([tolua++ or tolua++5.1 is required for Lua Imlib2 support.])
else
want_lua_imlib2=yes
AC_CHECK_PROGS(toluapp, tolua++)
AC_CHECK_PROGS(toluapp, [tolua++ tolua++5.1])
AC_SEARCH_LIBS(tolua_error,
tolua++ tolua++5.1,
AC_SUBST(tolua_LIBS,"${LIBS}"),
AC_MSG_ERROR([tolua_error not found]),
-llua5.1)
AC_DEFINE(HAVE_LUA_IMLIB2, 1, [Define if you want Lua Imlib2 bindings for Conky])
fi
fi

View File

@ -35,8 +35,8 @@ if BUILD_LUA
if BUILD_LUA_CAIRO
libcairo = libcairo.la
libcairo_la_CFLAGS = $(cairo_CFLAGS) $(cairo_xlib_CFLAGS)
libcairo_la_LIBADD = $(cairo_LIBS) $(cairo_xlib_LIBS) -ltolua++
libcairo_la_CFLAGS = $(cairo_CFLAGS) $(cairo_xlib_CFLAGS) -I$(prefix)/include/lua5.1
libcairo_la_LIBADD = $(cairo_LIBS) $(cairo_xlib_LIBS) $(tolua_LIBS)
cairo.c: cairo.pkg
${toluapp} -n cairo -o cairo.c $(srcdir)/cairo.pkg
@ -47,8 +47,8 @@ if BUILD_LUA_IMLIB2
libimlib2 = libimlib2.la
libimlib2_la_CFLAGS = $(Imlib2_CFLAGS)
libimlib2_la_LIBADD = $(Imlib2_LIBS) -ltolua++
libimlib2_la_CFLAGS = $(Imlib2_CFLAGS) -I$(prefix)/include/lua5.1
libimlib2_la_LIBADD = $(Imlib2_LIBS) $(tolua_LIBS)
imlib2.c: imlib2.pkg
${toluapp} -n imlib2 -o imlib2.c $(srcdir)/imlib2.pkg