Merge branch 'lua53'
authorKlaus Ethgen <Klaus@Ethgen.de>
Wed, 7 Aug 2019 14:55:15 +0000 (15:55 +0100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Wed, 7 Aug 2019 14:55:15 +0000 (15:55 +0100)
* lua53:
  Compatibility function for lua > 5.1

1  2 
configure.ac

diff --combined configure.ac
@@@ -197,7 -197,7 +197,7 @@@ els
    prefix=$prefix
  fi
  
 -AM_PATH_GLIB_2_0(2.24.0,,AC_MSG_ERROR(GLIB >= 2.24.0 not installed.))
 +AM_PATH_GLIB_2_0(2.52.0,,AC_MSG_ERROR(GLIB >= 2.52.0 not installed.))
  AC_ARG_ENABLE([gtk3], AC_HELP_STRING([--disable-gtk3], [use gtk2 instead of gtk3]),[gtk3="${enableval}"], [gtk3=m4_ifdef([AM_PATH_GTK_3_0], [auto], [no])])
  
  if test x$gtk3 = xyes; then
@@@ -523,22 -523,29 +523,29 @@@ AC_ARG_ENABLE([lua]
      [liblua=$enableval], [liblua=auto])
  
  if test "x${liblua}" != "xno"; then
-   PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
+   PKG_CHECK_MODULES(LUA, lua5.3 >= 5.3,
      [
        HAVE_LUA=yes
        AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
      ],
      [
-       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])
-        ])
-     ])
+      PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
+        [
+        HAVE_LUA=yes
+        AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
+        ],
+        [
+        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
  fi
@@@ -656,21 -663,6 +663,21 @@@ AC_SUBST(DJVU_LIBS
  
  AM_CONDITIONAL(HAVE_MARKDOWN, [ "$(command -v markdown)" ])
  
 +# _NL_TIME_FIRST_WEEKDAY support
 +# note that it is an enum and not a define
 +# ----------------------------------------------------------------------
 +
 +AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
 +AC_TRY_LINK([#include <langinfo.h>], [
 +char c;
 +c = *((unsigned char *)  nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
 +], nl_ok=yes, nl_ok=no)
 +AC_MSG_RESULT($nl_ok)
 +if test "$nl_ok" = "yes"; then
 +  AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
 +      [Define if _NL_TIME_FIRST_WEEKDAY is available])
 +fi
 +
  # ----------------------------------------------------------------------
  
  AH_TOP([