aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile
index e8f0eab..6a92ce2 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -41,24 +41,32 @@ ifeq "$(LUAROCKS)" ""
41 # Autodetect LUA_FLAGS and/or LUA_LIBS 41 # Autodetect LUA_FLAGS and/or LUA_LIBS
42 # 42 #
43 ifneq "$(shell which pkg-config)" "" 43 ifneq "$(shell which pkg-config)" ""
44 ifeq "$(shell pkg-config --exists lua5.1 && echo 1)" "1" 44 ifeq "$(shell pkg-config --exists luajit && echo 1)" "1"
45 LUA_FLAGS:=$(shell pkg-config --cflags lua5.1) 45 LUA_FLAGS:=$(shell pkg-config --cflags luajit)
46 LUA_LIBS:=$(shell pkg-config --libs lua5.1) 46 LUA_LIBS:=$(shell pkg-config --libs luajit)
47 # 47 #
48 # Ubuntu: -I/usr/include/lua5.1 48 # Debian: -I/usr/include/luajit-2.0
49 # -llua5.1 49 # -lluajit-5.1
50 else 50 else
51 ifeq "$(shell pkg-config --exists lua && echo 1)" "1" 51 ifeq "$(shell pkg-config --exists lua5.1 && echo 1)" "1"
52 LUA_FLAGS:=$(shell pkg-config --cflags lua) 52 LUA_FLAGS:=$(shell pkg-config --cflags lua5.1)
53 LUA_LIBS:=$(shell pkg-config --libs lua) 53 LUA_LIBS:=$(shell pkg-config --libs lua5.1)
54 # 54 #
55 # OS X fink with pkg-config: 55 # Ubuntu: -I/usr/include/lua5.1
56 # -I/sw/include 56 # -llua5.1
57 # -L/sw/lib -llua -lm
58 else 57 else
59 $(warning *** 'pkg-config' existed but did not know of 'lua[5.1]' - Good luck!) 58 ifeq "$(shell pkg-config --exists lua && echo 1)" "1"
60 LUA_FLAGS:= 59 LUA_FLAGS:=$(shell pkg-config --cflags lua)
61 LUA_LIBS:=-llua 60 LUA_LIBS:=$(shell pkg-config --libs lua)
61 #
62 # OS X fink with pkg-config:
63 # -I/sw/include
64 # -L/sw/lib -llua -lm
65 else
66 $(warning *** 'pkg-config' existed but did not know of 'lua[5.1]' - Good luck!)
67 LUA_FLAGS:=
68 LUA_LIBS:=-llua
69 endif
62 endif 70 endif
63 endif 71 endif
64 else 72 else