From 7be89493082b76813282e60360c11408aa2e181d Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Sat, 26 May 2012 03:04:54 +0200
Debbug: 674621
Status: applied
Subject: [PATCH] Switch to Lua 5.1

---
 configure.in   |   28 +++-------------------------
 debian/control |    4 ++--
 2 files changed, 5 insertions(+), 27 deletions(-)

diff --git a/configure.in b/configure.in
index cc94356..9b196bf 100644
--- a/configure.in
+++ b/configure.in
@@ -36,31 +36,9 @@ if test "x$LUAPFX" != x ; then
     LUA_CFLAGS="-I$LUAPFX"
     LUA_LIBS="-L$LUAPFX -llua -llualib"
 else
-dnl Debian, and possibly other systems, include this script...
-    AC_CHECK_PROGS(LUACONFIG, [lua-config lua-config50 lua-config5.0], "")
-    if test "x$LUACONFIG" != x; then
-        LUA_CFLAGS="`[$LUACONFIG --include]`"
-        LUA_LIBS="`[$LUACONFIG --static]`"
-    else dnl ...otherwise, attempt to guess
-        PKG_CHECK_MODULES(LUA, lua, [], [
-            LUA_CFLAGS=""
-            LUA_LIBS=""
-            AC_CHECK_LIB(lua, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua",
-            [AC_CHECK_LIB(lua50, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua50",
-            [AC_CHECK_LIB(lua5.0, lua_setfenv, LUA_LIBS="$LUA_LIBS -llua5.0",
-                [AC_MSG_ERROR([*** Lua5 is required.
-                 Try --with-lua=PREFIX
-                 You can download lua from http://www.lua.org])],
-                 $LUA_LIBS)], $LUA_LIBS)], $LUA_LIBS)
-
-            AC_CHECK_LIB(lualib, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib",
-            [AC_CHECK_LIB(lualib50, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib50",
-            [AC_CHECK_LIB(lualib5.0, luaopen_base, LUA_LIBS="$LUA_LIBS -llualib5.0",
-                [AC_MSG_ERROR([*** Lualib5 is required.
-                 You can download lua from http://www.lua.org])],
-                 $LUA_LIBS)], $LUA_LIBS)], $LUA_LIBS)
-        ])
-   fi
+    PKG_CHECK_MODULES(LUA, [lua5.1], [], [
+        AC_MSG_ERROR([*** Lualib5.1 is required.
+                      You can download lua from http://www.lua.org])])
 fi
 AC_SUBST(LUA_CFLAGS)
 AC_SUBST(LUA_LIBS)
diff --git a/debian/control b/debian/control
index cb47911..34e3fb7 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,9 @@ Section: games
 Priority: optional
 Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
 Uploaders: Alexander Reichle-Schmehl <tolimar@debian.org>, Gerfried Fuchs <rhonda@debian.org>
-Build-Depends: debhelper (>= 7), quilt, liblua50-dev, libsdl1.2-dev,
+Build-Depends: debhelper (>= 7), quilt, liblua5.1-dev, libsdl1.2-dev,
   libsdl-mixer1.2-dev (>= 1.2.4-3), libsdl-image1.2-dev, libsdl-ttf2.0-dev,
-  liblualib50-dev, libx11-dev, sharutils, libfribidi-dev, pkg-config,
+  libx11-dev, sharutils, libfribidi-dev, pkg-config,
   autotools-dev
 Standards-Version: 3.9.2
 Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/fillets-ng/
-- 
1.7.10

