]> git.sesse.net Git - vlc/commitdiff
configure.ac - lua checks
authorDominique Martinet <asmadeus@via.ecp.fr>
Fri, 28 Aug 2009 11:18:07 +0000 (13:18 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 2 Sep 2009 16:51:19 +0000 (19:51 +0300)
Makes the configure throw an error when lua is not found and
--enable-lua has been specified.
Also checks for liblua with libmath, so it actually works when there
is no pkgconfig file.

Slightly modified by Rémi Denis-Courmont
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
configure.ac

index 6f0b053d9edd3e32c31b855b9c22c5dadea300ac..333e54279eee37d87ef8a358f4456008278e2873 100644 (file)
@@ -1702,8 +1702,10 @@ then
             AC_CHECK_LIB( lua , luaL_newstate,
               [LUA_LIBS="-llua"],
               [ have_lua=no
-                AC_MSG_WARN([lua >= 5.1 not found!])
-              ])
+                AS_IF([test "x${enable_lua}" = "xyes"],
+                  [AC_MSG_ERROR([lua >= 5.1 not found!])],
+                  [AC_MSG_WARN([lua >= 5.1 not found!])])
+              ], [-lm])
           )
         )
       ])