aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure31
1 files changed, 24 insertions, 7 deletions
diff --git a/configure b/configure
index e84f00bf..7916749f 100755
--- a/configure
+++ b/configure
@@ -256,22 +256,23 @@ detect_lua_version() {
256} 256}
257 257
258search_interpreter() { 258search_interpreter() {
259 LUA_SUFFIX="$1" 259 suffix="$1"
260 if [ "$LUA_BINDIR_SET" = "yes" ] 260 if [ "$LUA_BINDIR_SET" = "yes" ]
261 then 261 then
262 find_lua="$LUA_BINDIR" 262 find_lua="$LUA_BINDIR"
263 elif [ "$LUA_DIR_SET" = "yes" ] 263 elif [ "$LUA_DIR_SET" = "yes" ]
264 then 264 then
265 if [ -f "$LUA_DIR/bin/lua$LUA_SUFFIX" ] 265 if [ -f "$LUA_DIR/bin/lua$suffix" ]
266 then 266 then
267 find_lua="$LUA_DIR/bin" 267 find_lua="$LUA_DIR/bin"
268 fi 268 fi
269 else 269 else
270 find_lua=`find_program lua$LUA_SUFFIX` 270 find_lua=`find_program lua$suffix`
271 fi 271 fi
272 if [ -n "$find_lua" -a -x "$find_lua/lua$LUA_SUFFIX" ] 272 if [ -n "$find_lua" -a -x "$find_lua/lua$suffix" ]
273 then 273 then
274 echo "Lua interpreter found: $find_lua/lua$LUA_SUFFIX..." 274 echo "Lua interpreter found: $find_lua/lua$suffix..."
275 LUA_SUFFIX=$suffix
275 detect_lua_version "$find_lua/lua$LUA_SUFFIX" 276 detect_lua_version "$find_lua/lua$LUA_SUFFIX"
276 return 0 277 return 0
277 fi 278 fi
@@ -292,9 +293,13 @@ then
292 else 293 else
293 suffixes="5.3 53 -5.3 -53 5.2 52 -5.2 -52 5.1 51 -5.1 -51" 294 suffixes="5.3 53 -5.3 -53 5.2 52 -5.2 -52 5.1 51 -5.1 -51"
294 fi 295 fi
296 lua_interp_found=no
295 for suffix in "" `echo $suffixes` 297 for suffix in "" `echo $suffixes`
296 do 298 do
297 search_interpreter "$suffix" && break 299 search_interpreter "$suffix" && {
300 lua_interp_found=yes
301 break
302 }
298 done 303 done
299fi 304fi
300 305
@@ -313,7 +318,7 @@ then
313 echo "lua$LUA_SUFFIX found in \$PATH: $find_lua" 318 echo "lua$LUA_SUFFIX found in \$PATH: $find_lua"
314 else 319 else
315 echo "lua$LUA_SUFFIX not found in \$PATH." 320 echo "lua$LUA_SUFFIX not found in \$PATH."
316 die "You may want to use the flags --with-lua and/or --lua-suffix. See --help." 321 die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-suffix. See --help."
317 fi 322 fi
318fi 323fi
319 324
@@ -332,6 +337,18 @@ then
332 LUA_BINDIR="$LUA_DIR/bin" 337 LUA_BINDIR="$LUA_DIR/bin"
333fi 338fi
334 339
340if [ "$lua_interp_found" != "yes" ]
341then
342 echo_n "Checking Lua interpreter... "
343 if [ -x "$LUA_BINDIR/lua$LUA_SUFFIX" ]
344 then
345 echo "lua$LUA_SUFFIX found in $LUA_BINDIR"
346 else
347 echo "lua$LUA_SUFFIX not found (looked in $LUA_BINDIR)"
348 die "You may want to use the flag --with-lua or --with-lua-bin. See --help."
349 fi
350fi
351
335echo_n "Checking Lua includes... " 352echo_n "Checking Lua includes... "
336lua_h="$LUA_INCDIR/lua.h" 353lua_h="$LUA_INCDIR/lua.h"
337if [ -f "$lua_h" ] 354if [ -f "$lua_h" ]