Import lua plugin
Written by @mniip
This commit is contained in:
parent
a77c6df7e2
commit
2e478f1b5a
41
configure.ac
41
configure.ac
@ -118,6 +118,10 @@ AC_ARG_ENABLE(perl,
|
||||
[AS_HELP_STRING([--disable-perl],[don\'t build the perl plugin])],
|
||||
perl=$enableval, perl=yes)
|
||||
|
||||
AC_ARG_ENABLE(lua,
|
||||
[AS_HELP_STRING([--disable-lua],[don\'t build the lua plugin])],
|
||||
lua=$enableval, lua=yes)
|
||||
|
||||
AC_ARG_ENABLE(perl_old,
|
||||
[AS_HELP_STRING([--disable-perl_old],[no backwards compatibility for perl plugin])],
|
||||
perl_old=$enableval, perl_old=yes)
|
||||
@ -218,6 +222,40 @@ AS_IF([test "x$_gdk_tgt" = xquartz], [
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** Lua **************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
AS_IF([test "$lua" = yes], [
|
||||
AC_MSG_CHECKING(for plugin interface used by lua)
|
||||
AS_IF([test "$plugin" = yes], [
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
m4_define_default([_LUA_LIST], [luajit lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51])
|
||||
|
||||
AC_ARG_VAR([LUA], [The Lua pkgconfig name, e.g. luajit or lua5.2])
|
||||
AS_IF([test "x$LUA" = 'x'], [
|
||||
for lua_var in _LUA_LIST; do
|
||||
$PKG_CONFIG --exists $lua_var || continue
|
||||
LUA=$lua_var
|
||||
break
|
||||
done
|
||||
AS_IF([test "x$LUA" = 'x'], [
|
||||
AC_MSG_ERROR([Failed to find lua])
|
||||
])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([LUA], $LUA, [
|
||||
AC_SUBST([LUA_CFLAGS])
|
||||
AC_SUBST([LUA_LIBS])
|
||||
])
|
||||
], [
|
||||
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for lua])
|
||||
lua=no
|
||||
])
|
||||
])
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** PERL *************************************************************
|
||||
dnl *********************************************************************
|
||||
@ -564,6 +602,7 @@ AM_CONDITIONAL(USE_LIBCANBERRA, test "x$libcanberra" = "xyes")
|
||||
AM_CONDITIONAL(DO_TEXT, test "x$textfe" = "xyes")
|
||||
AM_CONDITIONAL(DO_GTK, test "x$gtkfe" = "xyes")
|
||||
AM_CONDITIONAL(DO_PERL, test "x$perl" = "xyes")
|
||||
AM_CONDITIONAL(DO_LUA, test "x$lua" = "xyes")
|
||||
AM_CONDITIONAL(DO_PYTHON, test "x$python" != "xno")
|
||||
AM_CONDITIONAL(DO_PLUGIN, test "x$plugin" = "xyes")
|
||||
AM_CONDITIONAL(DO_CHECKSUM, test "x$checksum" = "xyes")
|
||||
@ -716,6 +755,7 @@ src/htm/Makefile
|
||||
src/htm/thememan
|
||||
osx/Info.plist
|
||||
plugins/Makefile
|
||||
plugins/lua/Makefile
|
||||
plugins/python/Makefile
|
||||
plugins/perl/Makefile
|
||||
plugins/checksum/Makefile
|
||||
@ -741,6 +781,7 @@ echo libcanberra support ... : $libcanberra
|
||||
echo Plugin interface ...... : $plugin
|
||||
echo libproxy support ...... : $libproxy
|
||||
echo
|
||||
echo Lua ................... : $lua \($LUA\)
|
||||
echo Perl .................. : $perl
|
||||
echo Python ................ : $python
|
||||
echo
|
||||
|
@ -1,3 +1,7 @@
|
||||
if DO_LUA
|
||||
lua = lua
|
||||
endif
|
||||
|
||||
if DO_PYTHON
|
||||
pythondir = python
|
||||
endif
|
||||
@ -22,4 +26,4 @@ if DO_SYSINFO
|
||||
sysinfodir = sysinfo
|
||||
endif
|
||||
|
||||
SUBDIRS = $(pythondir) $(perldir) $(checksumdir) $(doatdir) $(fishlimdir) $(sysinfodir)
|
||||
SUBDIRS = $(lua) $(pythondir) $(perldir) $(checksumdir) $(doatdir) $(fishlimdir) $(sysinfodir)
|
||||
|
9
plugins/lua/Makefile.am
Normal file
9
plugins/lua/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
||||
libdir = $(hexchatlibdir)
|
||||
|
||||
lib_LTLIBRARIES = lua.la
|
||||
lua_la_SOURCES = lua.c
|
||||
lua_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module
|
||||
lua_la_LIBADD = $(LUA_LIBS) $(GLIB_LIBS)
|
||||
lua_la_CPPFLAGS = -I$(top_srcdir)/src/common
|
||||
lua_la_CFLAGS = $(GLIB_CFLAGS) $(LUA_CFLAGS)
|
||||
|
1699
plugins/lua/lua.c
Normal file
1699
plugins/lua/lua.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user