1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
5 dnl This file is free software; the copyright holder
6 dnl gives unlimited permission to copy and/or distribute it,
7 dnl with or without modifications, as long as this notice is preserved.
9 m4_include([../version.ac])[] dnl define luajit_version
10 AC_INIT([luajit native], luajit_version, [tex-k@tug.org])
12 AC_CONFIG_SRCDIR([../LuaJIT-src/src/luajit.h])
13 AC_CONFIG_AUX_DIR([../../../build-aux])
14 AC_CONFIG_MACRO_DIR([../../../m4])
16 KPSE_BASIC([luajit native])
21 AC_CHECK_SIZEOF([void *])
22 AS_IF([test "x$ac_cv_sizeof_void_p" != "x$HOST_PTR_SIZE"], [dnl
23 HOST_PTR_BITS=`expr 8 \* $HOST_PTR_SIZE`
24 AC_MSG_WARN([pointer size mismatch in cross-build; use a ${HOST_PTR_BITS}bit compiler BULDCC.])
25 AS_CASE([$HOST_PTR_BITS],
26 [32|64], [CC="$CC -m$HOST_PTR_BITS"; AC_MSG_WARN([trying: $CC])])])
30 KPSE_SEARCH_LIBS([MATH_LIB], [pow], [m])
34 AC_SUBST([LUAJIT_TREE], [../LuaJIT-src])
36 dnl Not used but avoids putting a zillion useless -D's on the command line.
37 AC_CONFIG_HEADERS([config.h])
39 AC_CONFIG_FILES([Makefile])