Debian Codegraph @

m4/kpse-lua52-flags.m4

raw
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_LUA52_FLAGS
9 # ----------------
10 # Set the make variables LUA52_INCLUDES and LUA52_LIBS to the CPPFLAGS and
11 # LIBS required for the `-ltexlua52' library in libs/lua52/ of the TL tree.
12 AC_DEFUN([KPSE_LUA52_FLAGS], [dnl
13 _KPSE_LIB_FLAGS([lua52], [texlua52], [lt tree],
14 [-IBLD/libs/lua52/include], [BLD/libs/lua52/libtexlua52.la], [],
15 [], [${top_builddir}/../../libs/lua52/include/lua.h])[]dnl
16 ]) # KPSE_LUA52_FLAGS
17
18 # KPSE_LUA52_DEFINES
19 # ------------------
20 # Set the make variable LUA52_DEFINES to the CPPFLAGS required when
21 # compiling or using the `-ltexlua52' library.
22 AC_DEFUN([KPSE_LUA52_DEFINES], [dnl
23 AC_REQUIRE([KPSE_CHECK_WIN32])[]dnl
24 AC_SUBST([LUA52_DEFINES], ['-DLUA_COMPAT_MODULE -DLUAI_HASHLIMIT=6'])
25 if test "x$kpse_cv_have_win32" = xno; then
26 LUA52_DEFINES="$LUA52_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 [LUA52_DEFINES="$LUA52_DEFINES -DLUA_USE_DLOPEN"],
31 [], [AC_INCLUDES_DEFAULT])
32 fi
33 fi
34 ]) # KPSE_LUA52_DEFINES