aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-05-24 17:04:10 +0200
committerHisham Muhammad <hisham@gobolinux.org>2018-05-25 13:18:05 -0300
commit1b3848fa703ba0f5eea5ca3741cce26f7349aeb9 (patch)
treef855de056111e4dde49ed05179f7188e40314e53
parent42992d6504d6cd111f000dd3aae912f18510e8e2 (diff)
downloadluarocks-1b3848fa703ba0f5eea5ca3741cce26f7349aeb9.tar.gz
luarocks-1b3848fa703ba0f5eea5ca3741cce26f7349aeb9.tar.bz2
luarocks-1b3848fa703ba0f5eea5ca3741cce26f7349aeb9.zip
configure: Learn about Lua 5.4
-rwxr-xr-xconfigure13
1 files changed, 8 insertions, 5 deletions
diff --git a/configure b/configure
index 42d18f61..7bc5bced 100755
--- a/configure
+++ b/configure
@@ -39,7 +39,7 @@ system's package manager.
39--rocks-tree=DIR Root of the local tree of installed rocks. 39--rocks-tree=DIR Root of the local tree of installed rocks.
40 Default is \$PREFIX 40 Default is \$PREFIX
41 41
42--lua-version=VERSION Use specific Lua version: 5.1, 5.2, or 5.3 42--lua-version=VERSION Use specific Lua version: 5.1, 5.2, 5.3, or 5.4
43 Default is auto-detected. 43 Default is auto-detected.
44--lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. 44--lua-suffix=SUFFIX Versioning suffix to use in Lua filenames.
45 Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) 45 Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...)
@@ -163,7 +163,7 @@ do
163 --lua-version|--with-lua-version) 163 --lua-version|--with-lua-version)
164 [ -n "$value" ] || die "Missing value in flag $key." 164 [ -n "$value" ] || die "Missing value in flag $key."
165 LUA_VERSION="$value" 165 LUA_VERSION="$value"
166 [ "$LUA_VERSION" = "5.1" -o "$LUA_VERSION" = "5.2" -o "$LUA_VERSION" = "5.3" ] || die "Invalid Lua version in flag $key." 166 [ "$LUA_VERSION" = "5.1" -o "$LUA_VERSION" = "5.2" -o "$LUA_VERSION" = "5.3" -o "$LUA_VERSION" = "5.4" ] || die "Invalid Lua version in flag $key."
167 LUA_VERSION_SET=yes 167 LUA_VERSION_SET=yes
168 ;; 168 ;;
169 --with-lua) 169 --with-lua)
@@ -224,7 +224,7 @@ then
224fi 224fi
225 225
226detect_lua_version() { 226detect_lua_version() {
227 detected_lua=`$1 -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null` 227 detected_lua=`$1 -e 'print(_VERSION:match(" (5%.[1234])$"))' 2> /dev/null`
228 if [ "$detected_lua" != "nil" ] 228 if [ "$detected_lua" != "nil" ]
229 then 229 then
230 if [ "$LUA_VERSION_SET" != "yes" ] 230 if [ "$LUA_VERSION_SET" != "yes" ]
@@ -286,9 +286,12 @@ then
286 suffixes="5.2 52 -5.2 -52" 286 suffixes="5.2 52 -5.2 -52"
287 elif [ "$LUA_VERSION_SET" = "yes" -a "$LUA_VERSION" = "5.3" ] 287 elif [ "$LUA_VERSION_SET" = "yes" -a "$LUA_VERSION" = "5.3" ]
288 then 288 then
289 suffixes="5.4 54 -5.4 -54"
290 elif [ "$LUA_VERSION_SET" = "yes" -a "$LUA_VERSION" = "5.4" ]
291 then
289 suffixes="5.3 53 -5.3 -53" 292 suffixes="5.3 53 -5.3 -53"
290 else 293 else
291 suffixes="5.3 53 -5.3 -53 5.2 52 -5.2 -52 5.1 51 -5.1 -51" 294 suffixes="5.4 54 -5.4 -54 5.3 53 -5.3 -53 5.2 52 -5.2 -52 5.1 51 -5.1 -51"
292 fi 295 fi
293 for suffix in `echo $suffixes` "" 296 for suffix in `echo $suffixes` ""
294 do 297 do
@@ -400,7 +403,7 @@ else
400 die "Could not determine processor architecture. 'uname -m' failed." 403 die "Could not determine processor architecture. 'uname -m' failed."
401fi 404fi
402 405
403for v in 5.1 5.2 5.3; do 406for v in 5.1 5.2 5.3 5.4; do
404 if [ "$v" != "$LUA_VERSION" ]; then 407 if [ "$v" != "$LUA_VERSION" ]; then
405 if [ -e "$PREFIX/share/lua/$v/luarocks/site_config.lua" ]; then 408 if [ -e "$PREFIX/share/lua/$v/luarocks/site_config.lua" ]; then
406 LUA_OTHER_VERSION="$v" 409 LUA_OTHER_VERSION="$v"