| 1 |
dnl Process this file with autoconf to produce a configure script. |
| 2 |
dnl |
| 3 |
dnl Copyright (C) 2014 Peter Breitenlohner <[email protected]> |
| 4 |
dnl |
| 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. |
| 8 |
dnl |
| 9 |
m4_include([../version.ac])[] dnl define luajit_version |
| 10 |
AC_INIT([luajit native], luajit_version, [[email protected]]) |
| 11 |
AC_PREREQ([2.63]) |
| 12 |
AC_CONFIG_SRCDIR([../LuaJIT-src/src/luajit_rolling.h]) |
| 13 |
AC_CONFIG_AUX_DIR([../../../build-aux]) |
| 14 |
AC_CONFIG_MACRO_DIR([../../../m4]) |
| 15 |
|
| 16 |
KPSE_BASIC([luajit native]) |
| 17 |
|
| 18 |
AC_PROG_CC |
| 19 |
AC_PROG_LN_S |
| 20 |
|
| 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 LUAJITCROSSCOMPILER.]) |
| 25 |
AS_IF([test "x$LUAJITCROSSCOMPILER" != x""],[CC=$LUAJITCROSSCOMPILER], []) |
| 26 |
AS_CASE([$HOST_PTR_BITS], |
| 27 |
[32|64], [CC="$CC -m$HOST_PTR_BITS"; AC_MSG_WARN([trying: $CC])])]) |
| 28 |
|
| 29 |
KPSE_LUAJIT_DEFINES |
| 30 |
|
| 31 |
KPSE_SEARCH_LIBS([MATH_LIB], [pow], [m]) |
| 32 |
|
| 33 |
AC_SUBST([DASM_ARCH]) |
| 34 |
|
| 35 |
AC_SUBST([LUAJIT_TREE], [../LuaJIT-src]) |
| 36 |
|
| 37 |
dnl Not used but avoids putting a zillion useless -D's on the command line. |
| 38 |
AC_CONFIG_HEADERS([config.h]) |
| 39 |
|
| 40 |
AC_CONFIG_FILES([Makefile]) |
| 41 |
|
| 42 |
AC_OUTPUT |