Working check for lua
authorKlaus Ethgen <Klaus@Ethgen.de>
Fri, 24 May 2019 08:04:42 +0000 (09:04 +0100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Fri, 24 May 2019 08:04:42 +0000 (09:04 +0100)
This was not working on gentoo as gento use slotted packages instead of
versioned package namens.

configure.ac

index 941d610..99b3e2d 100644 (file)
@@ -529,8 +529,15 @@ if test "x${liblua}" != "xno"; then
       AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
     ],
     [
-      HAVE_LUA=no
-      AC_MSG_WARN([$LUA_PKG_ERRORS])
+      PKG_CHECK_MODULES(LUA, lua >= 5.1,
+        [
+          HAVE_LUA=yes
+          AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
+        ],
+        [
+           HAVE_LUA=no
+           AC_MSG_WARN([$LUA_PKG_ERRORS])
+        ])
     ])
 else
   HAVE_LUA=disabled