mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
Make configure opts for Lua extras more concise.
This commit is contained in:
parent
da06200e43
commit
7de7c60923
@ -411,8 +411,17 @@ dnl IMLIB2
|
|||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_ARG_ENABLE([imlib2],
|
AC_ARG_ENABLE([imlib2],
|
||||||
AC_HELP_STRING([--enable-imlib2], [enable if you want Imlib2 support (also enables Lua Imlib2 support if lua-extras enabled) [[default=no]]]),
|
AC_HELP_STRING([--enable-imlib2], [enable if you want Imlib2 support [[default=no]]]),
|
||||||
[want_imlib2="$enableval"], [want_imlib2=no])
|
[want_imlib2="$enableval"], [want_imlib2=no])
|
||||||
|
AC_ARG_ENABLE([lua-imlib2],
|
||||||
|
AC_HELP_STRING([--enable-lua-imlib2], [enable if you want Lua Imlib2 bindings for Conky @<:@default=no@:>@]),
|
||||||
|
[want_lua_imlib2="$enableval"], [want_lua_imlib2=no])
|
||||||
|
|
||||||
|
# if lua-imlib2 is enabled, we must force imlib2
|
||||||
|
if test x$want_lua_imlib2 = xyes; then
|
||||||
|
want_imlib2=yes
|
||||||
|
fi
|
||||||
|
|
||||||
if test x$want_imlib2 = xyes; then
|
if test x$want_imlib2 = xyes; then
|
||||||
if test "x$want_x11" != "xyes"; then
|
if test "x$want_x11" != "xyes"; then
|
||||||
dnl silently disable if no x11
|
dnl silently disable if no x11
|
||||||
@ -433,14 +442,14 @@ dnl
|
|||||||
AC_ARG_ENABLE([lua],
|
AC_ARG_ENABLE([lua],
|
||||||
AC_HELP_STRING([--enable-lua], [enable if you want Lua scripting support @<:@default=yes@:>@]),
|
AC_HELP_STRING([--enable-lua], [enable if you want Lua scripting support @<:@default=yes@:>@]),
|
||||||
[want_lua="$enableval"], [want_lua=yes])
|
[want_lua="$enableval"], [want_lua=yes])
|
||||||
AC_ARG_ENABLE([lua-extras],
|
|
||||||
AC_HELP_STRING([--enable-lua-extras], [enable if you want to install Lua extras (including bindings) @<:@default=no@:>@]),
|
|
||||||
[want_lua_extras="$enableval"], [want_lua_extras=no])
|
|
||||||
AC_ARG_ENABLE([lua-cairo],
|
AC_ARG_ENABLE([lua-cairo],
|
||||||
AC_HELP_STRING([--enable-lua-cairo], [enable if you want Lua Cairo bindings for Conky (requires lua-extras enabled) @<:@default=no@:>@]),
|
AC_HELP_STRING([--enable-lua-cairo], [enable if you want Lua Cairo bindings for Conky @<:@default=no@:>@]),
|
||||||
[want_lua_cairo="$enableval"], [want_lua_cairo=no])
|
[want_lua_cairo="$enableval"], [want_lua_cairo=no])
|
||||||
want_lua_imlib2=no
|
|
||||||
need_tolua=no
|
need_tolua=no
|
||||||
|
if test x$want_lua_cairo = xyes -o x$want_lua_imlib2 = xyes; then
|
||||||
|
need_tolua=yes
|
||||||
|
want_lua=yes
|
||||||
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(BUILD_LUA, test x$want_lua = xyes)
|
AM_CONDITIONAL(BUILD_LUA, test x$want_lua = xyes)
|
||||||
if test x$want_lua = xyes; then
|
if test x$want_lua = xyes; then
|
||||||
@ -452,11 +461,7 @@ if test x$want_lua = xyes; then
|
|||||||
conky_CFLAGS="$conky_CFLAGS $LUA_CFLAGS $LUA51_CFLAGS"
|
conky_CFLAGS="$conky_CFLAGS $LUA_CFLAGS $LUA51_CFLAGS"
|
||||||
conky_LIBS="$conky_LIBS $LUA_LIBS $LUA51_LIBS"
|
conky_LIBS="$conky_LIBS $LUA_LIBS $LUA51_LIBS"
|
||||||
|
|
||||||
want_lua_imlib2="$want_imlib2"
|
if test x$need_tolua = xyes; then
|
||||||
if test x$want_lua_extras != xyes; then
|
|
||||||
want_lua_cairo=no
|
|
||||||
want_lua_imlib2=no
|
|
||||||
else
|
|
||||||
AC_DEFINE(LUA_EXTRAS, 1, [Define if you want Lua extras])
|
AC_DEFINE(LUA_EXTRAS, 1, [Define if you want Lua extras])
|
||||||
if test "x$want_x11" != "xyes"; then
|
if test "x$want_x11" != "xyes"; then
|
||||||
dnl silently disable if no x11
|
dnl silently disable if no x11
|
||||||
@ -466,17 +471,13 @@ if test x$want_lua = xyes; then
|
|||||||
PKG_CHECK_MODULES([cairo], cairo)
|
PKG_CHECK_MODULES([cairo], cairo)
|
||||||
PKG_CHECK_MODULES([cairo_xlib], cairo-xlib)
|
PKG_CHECK_MODULES([cairo_xlib], cairo-xlib)
|
||||||
AC_DEFINE(HAVE_LUA_CAIRO, 1, [Define if you want Lua Cairo bindings for Conky])
|
AC_DEFINE(HAVE_LUA_CAIRO, 1, [Define if you want Lua Cairo bindings for Conky])
|
||||||
need_tolua=yes
|
|
||||||
libcairo_CFLAGS="$libcairo_CFLAGS $cairo_CFLAGS $cairo_xlib_CFLAGS"
|
libcairo_CFLAGS="$libcairo_CFLAGS $cairo_CFLAGS $cairo_xlib_CFLAGS"
|
||||||
libcairo_LIBS="$libcairo_LIBS $cairo_LIBS $cairo_xlib_LIBS"
|
libcairo_LIBS="$libcairo_LIBS $cairo_LIBS $cairo_xlib_LIBS"
|
||||||
fi
|
fi
|
||||||
if test x$want_imlib2 = xyes; then
|
if test x$want_imlib2 = xyes; then
|
||||||
need_tolua=yes
|
|
||||||
want_lua_imlib2=yes
|
|
||||||
AC_DEFINE(HAVE_LUA_IMLIB2, 1, [Define if you want Lua Imlib2 bindings for Conky])
|
AC_DEFINE(HAVE_LUA_IMLIB2, 1, [Define if you want Lua Imlib2 bindings for Conky])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test x$need_tolua = xyes; then
|
|
||||||
AC_CHECK_PROGS(toluapp, [tolua++ tolua++5.1], no)
|
AC_CHECK_PROGS(toluapp, [tolua++ tolua++5.1], no)
|
||||||
if test x$toluapp = xno; then
|
if test x$toluapp = xno; then
|
||||||
AC_MSG_ERROR([tolua++ or tolua++5.1 is required for Lua extras.])
|
AC_MSG_ERROR([tolua++ or tolua++5.1 is required for Lua extras.])
|
||||||
@ -489,8 +490,6 @@ if test x$want_lua = xyes; then
|
|||||||
fi
|
fi
|
||||||
conky_LIBS="$conky_LIBS $tolua_LIBS"
|
conky_LIBS="$conky_LIBS $tolua_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
|
||||||
AC_DEFINE(HAVE_LUA, 1, [Define if you want Lua scripting support])
|
AC_DEFINE(HAVE_LUA, 1, [Define if you want Lua scripting support])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(BUILD_LUA_CAIRO, test x$want_lua_cairo = xyes)
|
AM_CONDITIONAL(BUILD_LUA_CAIRO, test x$want_lua_cairo = xyes)
|
||||||
|
Loading…
Reference in New Issue
Block a user