aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2014-04-26 14:53:15 +0200
committerBenoit Germain <bnt.germain@gmail.com>2014-04-26 14:53:15 +0200
commit555e3c26c733ce653aafec25ea77b25b6b1bed07 (patch)
treec3a6103b7dc61c1ba369abde1643b116f5a76076
parentd528fdd4e3db2d10e6b4c42180c657087d7bdae0 (diff)
parent8da7b226def76b14b18cb29c4a9d41316ae6cfcd (diff)
downloadlanes-555e3c26c733ce653aafec25ea77b25b6b1bed07.tar.gz
lanes-555e3c26c733ce653aafec25ea77b25b6b1bed07.tar.bz2
lanes-555e3c26c733ce653aafec25ea77b25b6b1bed07.zip
Merge pull request #101 from Stepets/master
LuaJIT auto detect part 2
-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