File lsyncd-lua52.patch of Package lsyncd

--- lsyncd.h.orig
+++ lsyncd.h
@@ -23,9 +23,19 @@
 #include <stdbool.h>
 #include <stdlib.h>
 
-#define LUA_USE_APICHECK 1
+#define LUA_COMPAT_ALL
 #include <lua.h>
 
+#ifndef luaL_Reg
+/* Lua 5.0 */
+#define luaL_Reg luaL_reg
+#endif
+
+#ifndef lua_open
+#define lua_open luaL_newstate
+#endif
+
+
 /**
  * Lsyncd runtime configuration
  */
--- configure.ac.orig
+++ configure.ac
@@ -6,7 +6,9 @@ AC_CONFIG_SRCDIR([lsyncd.c])
 AC_CONFIG_HEADER([config.h])
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 # Checks for programs.
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 
--- Makefile.am.orig
+++ Makefile.am
@@ -1,7 +1,8 @@
 AUTOMAKE_OPTIONS = foreign
-CFLAGS += -Wall $(LUA_CFLAGS)
+AM_CFLAGS = -Wall $(LUA_CFLAGS)
 bin_PROGRAMS = lsyncd
-lsyncd_SOURCES = lsyncd.h lsyncd.c lsyncd.lua default-rsync.lua
+BUILT_SOURCES = runner.c defaults.c
+lsyncd_SOURCES = lsyncd.h lsyncd.c runner.c defaults.c lsyncd.lua default-rsync.lua
 
 if INOTIFY
 lsyncd_SOURCES += inotify.c
@@ -39,8 +40,6 @@ doc/lsyncd.1: doc/lsyncd.1.txt
 
 CLEANFILES = runner.out defaults.out runner.c defaults.c
 
-# compiles the runner and the defaults into the binary
-lsyncd_LDADD += runner.o defaults.o
 
 runner.o: runner.c
 defaults.o: defaults.c
openSUSE Build Service is sponsored by