| 1 |
# Public macros for the TeX Live (TL) tree. |
| 2 |
# Copyright (C) 2013, 2014 Peter Breitenlohner <[email protected]> |
| 3 |
# |
| 4 |
# This file is free software; the copyright holder |
| 5 |
# gives unlimited permission to copy and/or distribute it, |
| 6 |
# with or without modifications, as long as this notice is preserved. |
| 7 |
|
| 8 |
# KPSE_LUA53_FLAGS |
| 9 |
# ---------------- |
| 10 |
# Set the make variables LUA53_INCLUDES and LUA53_LIBS to the CPPFLAGS and |
| 11 |
# LIBS required for the `-ltexlua53' library in libs/lua53/ of the TL tree. |
| 12 |
AC_DEFUN([KPSE_LUA53_FLAGS], [dnl |
| 13 |
_KPSE_LIB_FLAGS([lua53], [texlua53], [lt tree], |
| 14 |
[-IBLD/libs/lua53/include], [BLD/libs/lua53/libtexlua53.la], [], |
| 15 |
[], [${top_builddir}/../../libs/lua53/include/lua.h])[]dnl |
| 16 |
]) # KPSE_LUA53_FLAGS |
| 17 |
|
| 18 |
# KPSE_LUA53_DEFINES |
| 19 |
# ------------------ |
| 20 |
# Set the make variable LUA53_DEFINES to the CPPFLAGS required when |
| 21 |
# compiling or using the `-ltexlua53' library. |
| 22 |
AC_DEFUN([KPSE_LUA53_DEFINES], [dnl |
| 23 |
AC_REQUIRE([KPSE_CHECK_WIN32])[]dnl |
| 24 |
AC_SUBST([LUA53_DEFINES], ['-DLUA_COMPAT_MODULE -DLUA_COMPAT_5_2 -DLUAI_HASHLIMIT=6']) |
| 25 |
if test "x$kpse_cv_have_win32" = xno; then |
| 26 |
LUA53_DEFINES="$LUA53_DEFINES -DLUA_USE_POSIX" |
| 27 |
AC_SEARCH_LIBS([dlopen], [dl]) |
| 28 |
if test "x$ac_cv_search_dlopen" != xno; then |
| 29 |
AC_CHECK_HEADER([dlfcn.h], |
| 30 |
[LUA53_DEFINES="$LUA53_DEFINES -DLUA_USE_DLOPEN"], |
| 31 |
[], [AC_INCLUDES_DEFAULT]) |
| 32 |
fi |
| 33 |
fi |
| 34 |
]) # KPSE_LUA53_DEFINES |