aboutsummaryrefslogtreecommitdiffstats
path: root/Lua
diff options
context:
space:
mode:
Diffstat (limited to 'Lua')
-rwxr-xr-xLua/configure67
-rw-r--r--Lua/configure.ac7
2 files changed, 72 insertions, 2 deletions
diff --git a/Lua/configure b/Lua/configure
index ad4d4413..2755c9a8 100755
--- a/Lua/configure
+++ b/Lua/configure
@@ -4526,6 +4526,8 @@ See the pkg-config man page for more details.
# find lua 5.1
+# (K)Ubuntu uses lua5.1.pc, Mac OS X and other
+# linux distributions use lua.pc
have_lib="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua5.1" >&5
@@ -4571,7 +4573,7 @@ $as_echo "yes" >&6; }
$as_echo "no" >&6; }
# check if package is required
- if test xyes = xyes -o x"$with_lua" = xyes ; then
+ if test xno = xyes -o x"$with_lua" = xyes ; then
# print error message and quit
err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1"`
as_fn_error "
@@ -4587,6 +4589,69 @@ See the pkg-config man page for more details.
fi
fi
+if [ x$lua_HAVE = xno ]; then
+
+ have_lib="no"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua >= 5.1" >&5
+$as_echo_n "checking for lua >= 5.1... " >&6; }
+ if test x"$with_lua" = xnocheck; then
+ # do not call pkg-config, use user settings
+ have_lib="yes"
+ elif test x"$with_lua" != xno; then
+ # check if package exists
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lua >= 5.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+
+ have_lib="yes"
+ lua_LIBS=`$PKG_CONFIG --libs --silence-errors "lua >= 5.1"`
+ lua_LIBDIRS=`$PKG_CONFIG --libs-only-L --silence-errors "lua >= 5.1"`
+ lua_LIBDIRS=`
+ echo "$lua_LIBDIRS" | $SED 's/^[ \t]*//' | $SED 's/[ \t]*$//'
+`
+ # add library directories to LIBS (ignore *_LIBS for now)
+ if test -n "$lua_LIBDIRS"; then
+ LIBS="$LIBS $lua_LIBDIRS"
+ fi
+
+fi
+ fi
+ if test x$have_lib = xyes; then
+ lua_HAVE="yes"
+ if test -n "$lua_LIBDIRS"; then
+ # show additional lib-dirs
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($lua_LIBDIRS)" >&5
+$as_echo "yes ($lua_LIBDIRS)" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ else
+ lua_HAVE="no"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+ # check if package is required
+ if test xyes = xyes -o x"$with_lua" = xyes ; then
+ # print error message and quit
+ err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "lua >= 5.1"`
+ as_fn_error "
+
+$err_msg
+
+Alternatively, you may set --with-lua=nocheck and the environment
+variables lua_[...] (see configure --help)
+to appropriate values to avoid the need to call pkg-config.
+
+See the pkg-config man page for more details.
+" "$LINENO" 5
+ fi
+ fi
+
+fi
# find FFMpeg
# Note: do not use the min/max version parameters with ffmpeg
diff --git a/Lua/configure.ac b/Lua/configure.ac
index 02d57a2a..898af362 100644
--- a/Lua/configure.ac
+++ b/Lua/configure.ac
@@ -167,7 +167,12 @@ PKG_HAVE([freetype], [freetype2], yes)
PKG_HAVE([sqlite3], [sqlite3], yes)
# find lua 5.1
-PKG_HAVE([lua], [lua5.1], yes)
+# (K)Ubuntu uses lua5.1.pc, Mac OS X and other
+# linux distributions use lua.pc
+PKG_HAVE([lua], [lua5.1], no)
+if [[ x$lua_HAVE = xno ]]; then
+ PKG_HAVE([lua], [lua >= 5.1], yes)
+fi
# find FFMpeg
# Note: do not use the min/max version parameters with ffmpeg