beta-0.89.2
[luatex.git] / source / m4 / kpse-luajit-flags.m4
blobe846c3087f2943930c0552b8b91c35506f84c5b7
1 # Public macros for the TeX Live (TL) tree.
2 # Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
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.
8 # KPSE_LUAJIT_FLAGS
9 # -----------------
10 # Set the make variables LUAJIT_INCLUDES and LUAJIT_LIBS to the CPPFLAGS and
11 # LIBS required for the `-ltexluajit' library in libs/luajit/ of the TL tree.
12 AC_DEFUN([KPSE_LUAJIT_FLAGS], [dnl
13 _KPSE_LIB_FLAGS([luajit], [texluajit], [lt tree],
14                 [-IBLD/libs/luajit/include], [BLD/libs/luajit/libtexluajit.la], [],
15                 [], [${top_builddir}/../../libs/luajit/include/luajit.h])[]dnl
16 ]) # KPSE_LUAJIT_FLAGS
18 # KPSE_LUAJIT_DEFINES
19 # -------------------
20 # Set the make variable LUAJIT_DEFINES to the CPPFLAGS required when
21 # compiling or using the `-ltexluajit' library.
22 # Set the make variable LUAJIT_LDEXTRA to the LDFLAGS required when
23 # linking with the `-lluajit' library.
24 AC_DEFUN([KPSE_LUAJIT_DEFINES], [dnl
25 AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
26 AC_SUBST([LUAJIT_DEFINES], ['-DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6'])
27 AS_CASE([$host_os:$host_cpu],
28         [*darwin*:x86_64], [LUAJIT_LDEXTRA='-pagezero_size 10000 -image_base 100000000'])
29 AC_SUBST([LUAJIT_LDEXTRA])
30 ]) # KPSE_LUAJIT_DEFINES