diff options
author | Reuben Thomas <rrt@sc3d.org> | 2014-02-11 13:38:15 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2014-08-05 15:56:36 +0100 |
commit | 9e58a2227622988b738166314cc8d3021112ce8e (patch) | |
tree | 24490871ee3621a7130ea127a1773c75b9046133 /configure | |
parent | 23739a7fbedcadd3ba38af11d0f3146a8ef37061 (diff) | |
download | luarocks-9e58a2227622988b738166314cc8d3021112ce8e.tar.gz luarocks-9e58a2227622988b738166314cc8d3021112ce8e.tar.bz2 luarocks-9e58a2227622988b738166314cc8d3021112ce8e.zip |
Add --with-lua-bin and improve documentation of --with-lua
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -44,7 +44,10 @@ system's package manager. | |||
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...) |
46 | --with-lua=PREFIX Use Lua from given prefix. | 46 | --with-lua=PREFIX Use Lua from given prefix. |
47 | Default is $LUA_DIR | 47 | Default is auto-detected (the parent directory of \$LUA_BINDIR). |
48 | --with-lua-bin=DIR You can also specify Lua's bin dir. | ||
49 | Default is the directory of the auto-detected Lua interpreter, | ||
50 | or \$LUA_DIR/bin if --with-lua is used. | ||
48 | --with-lua-include=DIR You can also specify Lua's includes dir. | 51 | --with-lua-include=DIR You can also specify Lua's includes dir. |
49 | Default is \$LUA_DIR/include | 52 | Default is \$LUA_DIR/include |
50 | --with-lua-lib=DIR You can also specify Lua's libraries dir. | 53 | --with-lua-lib=DIR You can also specify Lua's libraries dir. |
@@ -185,6 +188,11 @@ do | |||
185 | LUA_DIR="$value" | 188 | LUA_DIR="$value" |
186 | LUA_DIR_SET=yes | 189 | LUA_DIR_SET=yes |
187 | ;; | 190 | ;; |
191 | --with-lua-bin) | ||
192 | [ -n "$value" ] || die "Missing value in flag $key." | ||
193 | LUA_BINDIR="$value" | ||
194 | LUA_BINDIR_SET=yes | ||
195 | ;; | ||
188 | --with-lua-include) | 196 | --with-lua-include) |
189 | [ -n "$value" ] || die "Missing value in flag $key." | 197 | [ -n "$value" ] || die "Missing value in flag $key." |
190 | LUA_INCDIR="$value" | 198 | LUA_INCDIR="$value" |
@@ -249,7 +257,10 @@ detect_lua_version() { | |||
249 | 257 | ||
250 | search_interpreter() { | 258 | search_interpreter() { |
251 | LUA_SUFFIX="$1" | 259 | LUA_SUFFIX="$1" |
252 | if [ "$LUA_DIR_SET" = "yes" ] | 260 | if [ "$LUA_BINDIR_SET" = "yes" ] |
261 | then | ||
262 | find_lua="$LUA_BINDIR" | ||
263 | elif [ "$LUA_DIR_SET" = "yes" ] | ||
253 | then | 264 | then |
254 | if [ -f "$LUA_DIR/bin/lua$suffix" ] | 265 | if [ -f "$LUA_DIR/bin/lua$suffix" ] |
255 | then | 266 | then |
@@ -260,7 +271,7 @@ search_interpreter() { | |||
260 | fi | 271 | fi |
261 | if [ -n "$find_lua" ] | 272 | if [ -n "$find_lua" ] |
262 | then | 273 | then |
263 | echo "Lua interpreter found: $find_lua/lua$suffix..." | 274 | echo "Lua interpreter: $find_lua/lua$suffix..." |
264 | detect_lua_version "$find_lua/lua$suffix" | 275 | detect_lua_version "$find_lua/lua$suffix" |
265 | return 0 | 276 | return 0 |
266 | fi | 277 | fi |
@@ -316,7 +327,7 @@ then | |||
316 | LUA_LIBDIR="$LUA_DIR/lib" | 327 | LUA_LIBDIR="$LUA_DIR/lib" |
317 | fi | 328 | fi |
318 | 329 | ||
319 | if [ "$LUA_DIR_SET" = "yes" ] | 330 | if [ "$LUA_DIR_SET" = "yes" -a "$LUA_BINDIR_SET" != "yes" ] |
320 | then | 331 | then |
321 | LUA_BINDIR="$LUA_DIR/bin" | 332 | LUA_BINDIR="$LUA_DIR/bin" |
322 | fi | 333 | fi |