Until now this is without any functionality.
AC_SUBST(LIBCHAMPLAIN_GTK_CFLAGS)
AC_SUBST(LIBCHAMPLAIN_GTK_LIBS)
+# Lua support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([lua],
+ AC_HELP_STRING([--disable-lua], [disable lua support]),
+ [liblua=$enableval], [liblua=auto])
+
+if test "x${liblua}" != "xno"; then
+ PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
+ [
+ HAVE_LUA=yes
+ AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
+ ],
+ [
+ HAVE_LUA=no
+ AC_MSG_WARN([$LUA_PKG_ERRORS])
+ ])
+else
+ HAVE_LUA=disabled
+fi
+
+AM_CONDITIONAL(HAVE_LUA, [test "x$HAVE_LUA" = xyes])
+AC_SUBST(LUA_CFLAGS)
+AC_SUBST(LUA_LIBS)
+
+# ----------------------------------------------------------------------
+
AH_TOP([
/** \file
* \short autogenerated definition by autoheader.
Gtk: $GTK_CFLAGS
Glib: $GLIB_CFLAGS
Thread: $GTHREAD_LIBS
- Others: $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS
+ Others: $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS $LUA_LIBS
Localization:
NLS support: $USE_NLS
Lirc: $HAVE_LIRC
Libchamplain: $HAVE_LIBCHAMPLAIN
Libchamplain-gtk: $HAVE_LIBCHAMPLAIN_GTK
+ Lua: $HAVE_LUA
Documentation:
Doxygen: $DOXYGEN
$(EXIV2_CFLAGS) \
$(LIBCHAMPLAIN_CFLAGS) \
$(LIBCHAMPLAIN_GTK_CFLAGS) \
+ $(LUA_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir)
$(EXIV2_CFLAGS) \
$(LIBCHAMPLAIN_CFLAGS) \
$(LIBCHAMPLAIN_GTK_CFLAGS) \
+ $(LUA_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir)
view_file_icon.c \
view_file_icon.h \
window.c \
- window.h
+ window.h \
+ lua.c
-geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS)
+geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS) $(LUA_LIBS)
EXTRA_DIST = \
$(extra_SLIK)
--- /dev/null
+/** \file
+ * \short LUA implementation
+ * \author Klaus Ethgen <Klaus@Ethgen.de>
+ */
+
+/*
+ * This file is a part of Geeqie project (http://geeqie.sourceforge.net/).
+ * Copyright (C) 2008 - 2010 The Geeqie Team
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ */
+
+#include "config.h"
+
+#ifdef HAVE_LUA
+
+#include <lua.h>
+#include <lauxlib.h>
+
+static lua_State *L; /** The LUA object needed for all operations (NOTE: That is
+ * a upper-case variable to match the documentation!) */
+
+/**
+ * \brief Initialize the lua interpreter.
+ */
+void lua_init(void)
+{
+ L = luaL_newstate();
+ luaL_openlibs(L); /* Open all libraries for lua programms */
+}
+
+#endif
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
--- /dev/null
+/** \file
+ * \short LUA implementation
+ * \author Klaus Ethgen <Klaus@Ethgen.de>
+ */
+
+/*
+ * This file is a part of Geeqie project (http://geeqie.sourceforge.net/).
+ * Copyright (C) 2008 - 2010 The Geeqie Team
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ */
+
+#ifndef __LUA_H
+#define __LUA_H
+
+#ifdef HAVE_LUA
+
+void lua_init(void);
+
+#endif
+#endif
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
#include "exif.h"
#include "histogram.h"
#include "pixbuf_util.h"
+#include "lua.h"
#ifdef HAVE_LIBCHAMPLAIN
#ifdef HAVE_LIBCHAMPLAIN_GTK
#endif
exif_init();
-
+
+#ifdef HAVE_LUA
+ lua_init();
+#endif
+
/* setup random seed for random slideshow */
srand(time(NULL));