aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 5 insertions, 24 deletions
diff --git a/configure b/configure
index 15a18bb8..42d18f61 100755
--- a/configure
+++ b/configure
@@ -58,9 +58,6 @@ system's package manager.
58--with-md5-checker=TOOL Which tool to use as a downloader. 58--with-md5-checker=TOOL Which tool to use as a downloader.
59 Valid options are: md5sum, openssl 59 Valid options are: md5sum, openssl
60 Default is to auto-detect. 60 Default is to auto-detect.
61--versioned-rocks-dir Use a versioned rocks dir, such as
62 \$PREFIX/lib/luarocks/rocks-$LUA_VERSION/.
63 Default is to auto-detect the necessity.
64--force-config Use a single config location. Do not use the 61--force-config Use a single config location. Do not use the
65 \$LUAROCKS_CONFIG variable or the user's home 62 \$LUAROCKS_CONFIG variable or the user's home
66 directory. Useful to avoid conflicts when LuaRocks 63 directory. Useful to avoid conflicts when LuaRocks
@@ -155,7 +152,8 @@ do
155 FORCE_CONFIG=yes 152 FORCE_CONFIG=yes
156 ;; 153 ;;
157 --versioned-rocks-dir) 154 --versioned-rocks-dir)
158 VERSIONED_ROCKS_DIR=yes 155 echo "--versioned-rocks-dir is no longer necessary."
156 echo "The rocks tree in LuaRocks 3.0 is always versioned."
159 ;; 157 ;;
160 --lua-suffix) 158 --lua-suffix)
161 [ -n "$value" ] || die "Missing value in flag $key." 159 [ -n "$value" ] || die "Missing value in flag $key."
@@ -411,25 +409,6 @@ for v in 5.1 5.2 5.3; do
411 fi 409 fi
412done 410done
413 411
414LUAROCKS_ROCKS_SUBDIR=/lib/luarocks/rocks
415if [ "$VERSIONED_ROCKS_DIR" = "yes" ]
416then
417 LUAROCKS_ROCKS_SUBDIR=$LUAROCKS_ROCKS_SUBDIR-$LUA_VERSION
418 echo "Using versioned rocks dir: $PREFIX$LUAROCKS_ROCKS_SUBDIR"
419elif [ -e "$PREFIX/share/lua/$LUA_VERSION/luarocks/site_config.lua" ]
420then
421 echo "Existing installation detected."
422 LUAROCKS_ROCKS_SUBDIR=`grep "LUAROCKS_ROCKS_SUBDIR" "$PREFIX/share/lua/$LUA_VERSION/luarocks/site_config.lua" | sed 's,.*=\[\[\(.*\)\]\],\1,'`
423 echo "Using previously configured rocks dir: $PREFIX$LUAROCKS_ROCKS_SUBDIR"
424elif [ -n "$LUA_OTHER_VERSION" ]
425then
426 echo "Existing installation detected for other Lua version ($LUA_OTHER_VERSION)."
427 LUAROCKS_ROCKS_SUBDIR=$LUAROCKS_ROCKS_SUBDIR-$LUA_VERSION
428 echo "Using versioned rocks dir: $PREFIX$LUAROCKS_ROCKS_SUBDIR"
429else
430 echo "Using unversioned rocks dir: $PREFIX$LUAROCKS_ROCKS_SUBDIR"
431fi
432
433if [ "$LUAROCKS_UNAME_S" = Linux ] 412if [ "$LUAROCKS_UNAME_S" = Linux ]
434then 413then
435 GCC_ARCH=`gcc -print-multiarch 2>/dev/null` 414 GCC_ARCH=`gcc -print-multiarch 2>/dev/null`
@@ -447,6 +426,8 @@ if [ -f config.unix ]; then
447 rm -f config.unix 426 rm -f config.unix
448fi 427fi
449 428
429SITE_CONFIG=src/luarocks/core/site_config_$(echo "$LUA_VERSION" | sed 's,\.,_,').lua
430
450# Write config 431# Write config
451 432
452echo "Writing configuration..." 433echo "Writing configuration..."
@@ -458,6 +439,7 @@ cat <<EOF > config.unix
458# Run "./configure --help" for details. 439# Run "./configure --help" for details.
459 440
460LUA_VERSION=$LUA_VERSION 441LUA_VERSION=$LUA_VERSION
442SITE_CONFIG=$SITE_CONFIG
461PREFIX=$PREFIX 443PREFIX=$PREFIX
462SYSCONFDIR=$SYSCONFDIR 444SYSCONFDIR=$SYSCONFDIR
463ROCKS_TREE=$ROCKS_TREE 445ROCKS_TREE=$ROCKS_TREE
@@ -472,7 +454,6 @@ LUAROCKS_UNAME_M=$LUAROCKS_UNAME_M
472LUAROCKS_UNAME_S=$LUAROCKS_UNAME_S 454LUAROCKS_UNAME_S=$LUAROCKS_UNAME_S
473LUAROCKS_DOWNLOADER=$LUAROCKS_DOWNLOADER 455LUAROCKS_DOWNLOADER=$LUAROCKS_DOWNLOADER
474LUAROCKS_MD5CHECKER=$LUAROCKS_MD5CHECKER 456LUAROCKS_MD5CHECKER=$LUAROCKS_MD5CHECKER
475LUAROCKS_ROCKS_SUBDIR=$LUAROCKS_ROCKS_SUBDIR
476MULTIARCH_SUBDIR=$MULTIARCH_SUBDIR 457MULTIARCH_SUBDIR=$MULTIARCH_SUBDIR
477 458
478EOF 459EOF