diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-02-06 11:04:14 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-02-06 11:04:14 +0000 |
commit | ad714058c45d0dd9e1f1417d3af804229b93b6f9 (patch) | |
tree | 6bb4f268b2b3537df995f58374551da92463fe68 /Build/source/m4/kpse-luajit-flags.m4 | |
parent | 4169934ceb43a6b413b4280552bcd309333b469a (diff) |
LuaJITTeX
git-svn-id: svn://tug.org/texlive/trunk@32878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4/kpse-luajit-flags.m4')
-rw-r--r-- | Build/source/m4/kpse-luajit-flags.m4 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Build/source/m4/kpse-luajit-flags.m4 b/Build/source/m4/kpse-luajit-flags.m4 new file mode 100644 index 00000000000..a587ff29e02 --- /dev/null +++ b/Build/source/m4/kpse-luajit-flags.m4 @@ -0,0 +1,35 @@ +# Public macros for the TeX Live (TL) tree. +# Copyright (C) 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_LUAJIT_FLAGS +# ----------------- +# Set the make variables LUAJIT_INCLUDES and LUAJIT_LIBS to +# the CPPFLAGS and LIBS required for the `-lluajit' library in +# libs/luajit/ of the TL tree. +AC_DEFUN([KPSE_LUAJIT_FLAGS], [dnl +_KPSE_LIB_FLAGS([luajit], [luajit], [tree], + [-IBLD/libs/luajit/luajit-build/src], [BLD/libs/luajit/luajit-build/src/libluajit.a], [], + [], [${top_builddir}/../../libs/luajit/luajit-build/src/luajit.h])[]dnl +]) # KPSE_LUAJIT_FLAGS + +# KPSE_LUAJIT_DEFINES +# ------------------- +# Set the make variable LUAJIT_DEFINES to the CPPFLAGS required when +# compiling or using the `-lluajit' library. +AC_DEFUN([KPSE_LUAJIT_DEFINES], [dnl +AC_REQUIRE([KPSE_CHECK_WIN32])[]dnl +AC_SUBST([LUAJIT_DEFINES], [-DLUAJIT_ENABLE_LUA52COMPAT]) +if test "x$kpse_cv_have_win32" = xno; then + LUAJIT_DEFINES="$LUAJIT_DEFINES -DLUA_USE_POSIX" + AC_SEARCH_LIBS([dlopen], [dl]) + if test "x$ac_cv_search_dlopen" != xno; then + AC_CHECK_HEADER([dlfcn.h], + [LUAJIT_DEFINES="$LUAJIT_DEFINES -DLUA_USE_DLOPEN"], + [], [AC_INCLUDES_DEFAULT]) + fi +fi +]) # KPSE_LUAJIT_DEFINES |