diff options
author | Lauri Leukkunen <lle@rahina.org> | 2007-07-28 01:15:39 +0300 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2007-07-28 01:15:39 +0300 |
commit | 01a0c193529cd44fc2ab7b5009769087a4bb2ee1 (patch) | |
tree | 49fab889fa8eb42e33b8ba6f52b9a04edb90867e | |
parent | 86d096b7fae2002e6208e1bbf87e44b90773852f (diff) |
Change to use system liblua5.1
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | autogen.sh | 3 | ||||
-rw-r--r-- | config.mak.in | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | mapping/Makefile | 7 | ||||
-rw-r--r-- | mapping/mapping.c | 6 | ||||
-rw-r--r-- | preload/Makefile | 2 |
7 files changed, 15 insertions, 10 deletions
@@ -14,6 +14,7 @@ utils/sb_gcc_wrapper *.lock *.d autom4te.cache +aclocal.* mapping/libmapping.a config.mak @@ -1,8 +1,9 @@ #!/bin/bash -automake_version=1.9 +#automake_version=1.9 rm -rf configure autom4te.cache +aclocal autoheader autoconf diff --git a/config.mak.in b/config.mak.in index 96b1ddb..513c9ce 100644 --- a/config.mak.in +++ b/config.mak.in @@ -1,4 +1,6 @@ prefix=@prefix@ CC=@CC@ CXX=@CXX@ +LUA51_LIBS=@LUA51_LIBS@ +LUA51_CFLAGS=@LUA51_CFLAGS@ diff --git a/configure.ac b/configure.ac index a5b7c18..96c33b6 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,8 @@ AC_PROG_MAKE_SET # Checks for libraries. AC_CHECK_LIB([dl], [dlsym]) +PKG_CHECK_MODULES(LUA51, lua5.1 >= 5.1.0) + # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC @@ -177,5 +179,7 @@ AC_DEFINE_UNQUOTED(READLINK_TYPE, ${readlink_type}) AC_SUBST(PREFIX, ${prefix}) AC_SUBST(CC, ${CC}) AC_SUBST(CXX, ${CXX}) +AC_SUBST(LUA51_LIBS, ${LUA51_LIBS}) +AC_SUBST(LUA51_CFLAGS, ${LUA51_CFLAGS}) AC_OUTPUT diff --git a/mapping/Makefile b/mapping/Makefile index 5eea61e..bbebfe5 100644 --- a/mapping/Makefile +++ b/mapping/Makefile @@ -1,12 +1,9 @@ -source_list := $(shell find $(D)/lua-5.1.1/src -name "*.c" -not -name "lua.c" \ - -not -name "luac.c" -not -name "print.c") - -objs := $(source_list:.c=.o) $(D)/mapping.o +objs := $(D)/mapping.o mapping/libmapping.a: $(objs) mapping/libmapping.a: override CFLAGS := -O2 -g -fPIC -Wall -W \ - -I$(D)/lua-5.1.1/src $(CFLAGS) + $(LUA51_CFLAGS) $(CFLAGS) mapping/libmapping.a: override LDFLAGS := $(LDFLAGS) mapping/libmapping.a: override LIBS := diff --git a/mapping/mapping.c b/mapping/mapping.c index 35bf3a6..36fd8fc 100644 --- a/mapping/mapping.c +++ b/mapping/mapping.c @@ -37,9 +37,9 @@ #include <assert.h> #include <pthread.h> -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" +#include <lua.h> +#include <lualib.h> +#include <lauxlib.h> #include <mapping.h> #include <sb2.h> diff --git a/preload/Makefile b/preload/Makefile index bd8cf63..ca954bf 100644 --- a/preload/Makefile +++ b/preload/Makefile @@ -6,7 +6,7 @@ $(D)/libsb2.so: mapping/libmapping.a $(D)/libsb2.so: CFLAGS := $(CFLAGS) -fPIC -Wall -W $(D)/libsb2.so: LDFLAGS := $(LDFLAGS) -Wl,-soname=$(LIBSB2_SONAME) -$(D)/libsb2.so: LIBS := -ldl -lm -lpthread -lrt +$(D)/libsb2.so: LIBS := -ldl -lm -lpthread -lrt $(LUA51_LIBS) targets := $(targets) $(D)/libsb2.so |