summaryrefslogtreecommitdiff
path: root/Build/source/m4/kpse-lua52-flags.m4
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/m4/kpse-lua52-flags.m4
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4/kpse-lua52-flags.m4')
-rw-r--r--Build/source/m4/kpse-lua52-flags.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/Build/source/m4/kpse-lua52-flags.m4 b/Build/source/m4/kpse-lua52-flags.m4
new file mode 100644
index 00000000000..d214af5531a
--- /dev/null
+++ b/Build/source/m4/kpse-lua52-flags.m4
@@ -0,0 +1,34 @@
+# Public macros for the TeX Live (TL) tree.
+# Copyright (C) 2013, 2014 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holder
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# KPSE_LUA52_FLAGS
+# ----------------
+# Set the make variables LUA52_INCLUDES and LUA52_LIBS to the CPPFLAGS and
+# LIBS required for the `-ltexlua52' library in libs/lua52/ of the TL tree.
+AC_DEFUN([KPSE_LUA52_FLAGS], [dnl
+_KPSE_LIB_FLAGS([lua52], [texlua52], [lt tree],
+ [-IBLD/libs/lua52/include], [BLD/libs/lua52/libtexlua52.la], [],
+ [], [${top_builddir}/../../libs/lua52/include/lua.h])[]dnl
+]) # KPSE_LUA52_FLAGS
+
+# KPSE_LUA52_DEFINES
+# ------------------
+# Set the make variable LUA52_DEFINES to the CPPFLAGS required when
+# compiling or using the `-ltexlua52' library.
+AC_DEFUN([KPSE_LUA52_DEFINES], [dnl
+AC_REQUIRE([KPSE_CHECK_WIN32])[]dnl
+AC_SUBST([LUA52_DEFINES], ['-DLUA_COMPAT_MODULE -DLUAI_HASHLIMIT=6'])
+if test "x$kpse_cv_have_win32" = xno; then
+ LUA52_DEFINES="$LUA52_DEFINES -DLUA_USE_POSIX"
+ AC_SEARCH_LIBS([dlopen], [dl])
+ if test "x$ac_cv_search_dlopen" != xno; then
+ AC_CHECK_HEADER([dlfcn.h],
+ [LUA52_DEFINES="$LUA52_DEFINES -DLUA_USE_DLOPEN"],
+ [], [AC_INCLUDES_DEFAULT])
+ fi
+fi
+]) # KPSE_LUA52_DEFINES