diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -187,7 +187,8 @@ search_interpreter() { | |||
187 | then | 187 | then |
188 | if detect_lua_version "$lua_at/$name" | 188 | if detect_lua_version "$lua_at/$name" |
189 | then | 189 | then |
190 | echo "Lua interpreter found: $(GREEN "$lua_at/$name")" | 190 | LUA="$lua_at/$name" |
191 | echo "Lua interpreter found: $(GREEN "$LUA")" | ||
191 | if [ "$LUA_BINDIR_SET" != "yes" ] | 192 | if [ "$LUA_BINDIR_SET" != "yes" ] |
192 | then | 193 | then |
193 | LUA_BINDIR="$lua_at" | 194 | LUA_BINDIR="$lua_at" |
@@ -196,7 +197,7 @@ search_interpreter() { | |||
196 | then | 197 | then |
197 | LUA_DIR=$(dirname "$lua_at") | 198 | LUA_DIR=$(dirname "$lua_at") |
198 | fi | 199 | fi |
199 | LUA_INTERPRETER="$name" | 200 | |
200 | return 0 | 201 | return 0 |
201 | fi | 202 | fi |
202 | fi | 203 | fi |
@@ -288,8 +289,8 @@ do | |||
288 | ;; | 289 | ;; |
289 | --with-lua-interpreter) | 290 | --with-lua-interpreter) |
290 | [ -n "$value" ] || die "Missing value in flag $key." | 291 | [ -n "$value" ] || die "Missing value in flag $key." |
291 | LUA_INTERPRETER="$value" | 292 | LUA_EXE="$value" |
292 | LUA_INTERPRETER_SET=yes | 293 | LUA_EXE_SET=yes |
293 | ;; | 294 | ;; |
294 | 295 | ||
295 | # For specialized uses of LuaRocks: | 296 | # For specialized uses of LuaRocks: |
@@ -366,9 +367,9 @@ case "$LUA_VERSION" in | |||
366 | ;; | 367 | ;; |
367 | esac | 368 | esac |
368 | 369 | ||
369 | if [ "$LUA_INTERPRETER_SET" = "yes" ] | 370 | if [ "$LUA_EXE_SET" = "yes" ] |
370 | then | 371 | then |
371 | names="$LUA_INTERPRETER" | 372 | names="$LUA_EXE" |
372 | fi | 373 | fi |
373 | 374 | ||
374 | for name in $names | 375 | for name in $names |
@@ -400,8 +401,8 @@ fi | |||
400 | 401 | ||
401 | if [ "$LUA_VERSION_SET" = "yes" ] | 402 | if [ "$LUA_VERSION_SET" = "yes" ] |
402 | then | 403 | then |
403 | echo_n "Checking if $LUA_BINDIR/$LUA_INTERPRETER is Lua version $LUA_VERSION... " | 404 | echo_n "Checking if $LUA is Lua version $LUA_VERSION... " |
404 | if detect_lua_version "$LUA_BINDIR/$LUA_INTERPRETER" | 405 | if detect_lua_version "$LUA" |
405 | then | 406 | then |
406 | echo "yes" | 407 | echo "yes" |
407 | else | 408 | else |
@@ -433,7 +434,7 @@ check_incdir() { | |||
433 | "$incdir/lua-$LUA_VERSION/lua.h" \ | 434 | "$incdir/lua-$LUA_VERSION/lua.h" \ |
434 | "$incdir/lua$(echo "$LUA_VERSION" | tr -d .)/lua.h" \ | 435 | "$incdir/lua$(echo "$LUA_VERSION" | tr -d .)/lua.h" \ |
435 | "$incdir/lua.h" \ | 436 | "$incdir/lua.h" \ |
436 | $("$LUA_BINDIR/$LUA_INTERPRETER" -e 'print(jit and [['"$incdir"'/luajit-]]..jit.version:match("(%d+%.%d+)")..[[/lua.h]] or "")') | 437 | $("$LUA" -e 'print(jit and [['"$incdir"'/luajit-]]..jit.version:match("(%d+%.%d+)")..[[/lua.h]] or "")') |
437 | do | 438 | do |
438 | if [ -f "$lua_h" ] | 439 | if [ -f "$lua_h" ] |
439 | then | 440 | then |
@@ -485,7 +486,7 @@ prefix=$prefix | |||
485 | sysconfdir=$sysconfdir | 486 | sysconfdir=$sysconfdir |
486 | rocks_tree=$rocks_tree | 487 | rocks_tree=$rocks_tree |
487 | LUA_VERSION=$LUA_VERSION | 488 | LUA_VERSION=$LUA_VERSION |
488 | LUA_INTERPRETER=$LUA_INTERPRETER | 489 | LUA=$LUA |
489 | LUA_DIR=$LUA_DIR | 490 | LUA_DIR=$LUA_DIR |
490 | LUA_BINDIR=$LUA_BINDIR | 491 | LUA_BINDIR=$LUA_BINDIR |
491 | LUA_INCDIR=$LUA_INCDIR | 492 | LUA_INCDIR=$LUA_INCDIR |