summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/Makefile
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-04-01 19:45:12 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-04-02 00:49:28 +0200
commit1bdec8a61473be3be0d33e3995670aca645312fc (patch)
tree178d302da0dfd36a2e78636e89d8192f820f6007 /crawl-ref/source/Makefile
parentf0b331f1eaa42456eb7751265b1353838dae49ad (diff)
downloadcrawl-ref-1bdec8a61473be3be0d33e3995670aca645312fc.tar.gz
crawl-ref-1bdec8a61473be3be0d33e3995670aca645312fc.zip
Allow USE_LUAJIT to work with system lua (libluajit-5.1-dev on Debian).
It does not work on any 64 bit architecture, though, and thus is not the default! Also, luajit is not 100% compatible with regular lua: for example it rejects "\/" as an invalid escape while regular lua lets it pass.
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r--crawl-ref/source/Makefile27
1 files changed, 16 insertions, 11 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
index 8b9dd231c3..94ac818db0 100644
--- a/crawl-ref/source/Makefile
+++ b/crawl-ref/source/Makefile
@@ -240,9 +240,6 @@ ifeq ($(uname_S),Darwin)
endif
COPY_FONTS = yes
endif
-ifdef USE_LUAJIT
- BUILD_LUA := YesPlease
-endif
ifdef USE_ICC
NO_RDYNAMIC := YesPlease
endif
@@ -570,18 +567,26 @@ ifndef BUILD_LUA
endif
endif
ifndef BUILD_LUA
- ifneq ($(shell $(PKGCONFIG) lua5.1 --exists || echo no),)
- ifneq ($(shell $(PKGCONFIG) lua --exists || echo no),)
- BUILD_LUA = yes
+ ifneq ($(USE_LUAJIT),)
+ ifeq ($(shell $(PKGCONFIG) luajit --exists || echo no),)
+ LUA_PACKAGE = luajit
else
- ifeq ($(shell $(PKGCONFIG) lua --modversion | head -c 3),5.1)
- LUA_PACKAGE = lua
- else
+ BUILD_LUA = yes
+ endif
+ else
+ ifneq ($(shell $(PKGCONFIG) lua5.1 --exists || echo no),)
+ ifneq ($(shell $(PKGCONFIG) lua --exists || echo no),)
BUILD_LUA = yes
+ else
+ ifeq ($(shell $(PKGCONFIG) lua --modversion | head -c 3),5.1)
+ LUA_PACKAGE = lua
+ else
+ BUILD_LUA = yes
+ endif
endif
+ else
+ LUA_PACKAGE = lua5.1
endif
- else
- LUA_PACKAGE = lua5.1
endif
endif
ifndef BUILD_LUA