forked from lsyncd/lsyncd
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AUTOMAKE_OPTIONS = foreign | ||
CFLAGS = -Wall -pedantic $(LIBLUA_CFLAGS) | ||
bin_PROGRAMS = lsyncd | ||
lsyncd_SOURCES = lsyncd.c | ||
lsyncd_LDADD = $(LIBLUA_LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
echo "Generating configure files... may take a while." | ||
|
||
autoreconf --install --force && \ | ||
echo "Preparing was successful if there was no error messages above." && \ | ||
echo "Now type:" && \ | ||
echo " ./configure && make" && \ | ||
echo "Run './configure --help' for more information" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- Autoconf -*- | ||
# Process this file with autoconf to produce a configure script. | ||
#AC_PREREQ(2.60) | ||
AC_INIT(lsyncd, 2.0, axkibe@gmail.com) | ||
AC_CONFIG_SRCDIR([lsyncd.c]) | ||
AC_CONFIG_HEADER([config.h]) | ||
AM_INIT_AUTOMAKE(lsyncd, main) | ||
# Checks for programs. | ||
AC_PROG_CC | ||
AC_PROG_INSTALL | ||
AC_PROG_MAKE_SET | ||
# Checks for libraries. | ||
PKG_CHECK_MODULES(LIBLUA, lua5.1) | ||
# Checks for header files. | ||
# Checks for typedefs, structures, and compiler characteristics. | ||
# Checks for library functions. | ||
AC_CHECK_HEADERS([sys/inotify.h]) | ||
AC_CONFIG_FILES([Makefile]) | ||
AC_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <stdio.h> | ||
#include <lua.h> | ||
#include <lualib.h> | ||
#include <lauxlib.h> | ||
|
||
/* the Lua interpreter */ | ||
lua_State* L; | ||
|
||
int main (int argc, char *argv[]) | ||
{ | ||
/* initialize Lua */ | ||
L = lua_open(); | ||
/* load Lua base libraries */ | ||
luaL_openlibs(L); | ||
/* register our function */ | ||
//lua_register(L, "average", average); | ||
/* run the script */ | ||
luaL_dofile(L, "lsyncd.lua"); | ||
/* cleanup Lua */ | ||
lua_close(L); | ||
/* pause */ | ||
printf( "Press enter to exit..." ); | ||
getchar(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
print("Hello\n") | ||
|