diff --git a/configure.ac.in b/configure.ac.in index f1ea1288..70d56739 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -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 @@ -590,7 +600,7 @@ if test "x$want_xdamage" = "xyes"; then conky_LIBS="$conky_LIBS $XDamage_LIBS" else dnl non-modular X11 installation - AC_CHECK_LIB([Xdamage], [XDamageQueryExtension], [conky_LIBS="$conky_LIBS -lXdamage"], + AC_CHECK_LIB([Xdamage], [XDamageQueryExtension], [conky_LIBS="$conky_LIBS -lXdamage"], AC_MSG_ERROR([Could not find XDamageQueryExtension in -lXdamage])) fi AC_DEFINE(HAVE_XDAMAGE, 1, [Define for X11 Xdamage extension]) diff --git a/lua/Makefile.am b/lua/Makefile.am index 85b8db6a..49fcde01 100644 --- a/lua/Makefile.am +++ b/lua/Makefile.am @@ -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