Lua configuration: Add a test for system with no .pc
[vlc.git] / configure.ac
index 0fd1322..d231d19 100644 (file)
@@ -1560,10 +1560,18 @@ then
     PKG_CHECK_MODULES(LUA, lua >= 5.1,
       [ have_lua=yes ],
       [ 
-       AC_MSG_WARN([lua >= 5.1 not found!])
+        have_lua=yes
+        AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h], 
+         [],  
+          [ have_lua=no ] )
+       AC_CHECK_LIB(  lua5.1 , luaL_newstate, 
+          [],
+         [ have_lua=no
+            AC_MSG_WARN([lua >= 5.1 not found!])
+         ])
       ])
     ])
-  if test "x${have_lua}" = "xyes" -o "x${enable_lua}" = "xyes";  then
+  if test "x${have_lua}" = "xyes" ;  then
      AC_DEFINE(HAVE_LUA, [], [Define if you have the lua library])
      VLC_ADD_PLUGINS([luaplaylist])
      VLC_ADD_LDFLAGS([luaplaylist],[$LUA_LIBS])