This repository was archived by the owner on Nov 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
110 lines (102 loc) · 3.24 KB
/
configure.ac
File metadata and controls
110 lines (102 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
dnl# -*- Autoconf -*-
dnl# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([LuaBitOp],[1.0.2],[web-08@luajit.org])
AC_CONFIG_SRCDIR([bit.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_TARGET dnl# also calls the "_HOST" version of the macro
# Automake
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
# Checks for programs.
AM_PROG_AR
if test "x${AR}" = "x"; then
test -z "${AR}" || unset AR
AC_CHECK_TOOLS([AR],[ar gar])dnl
## might want to switch around these checks...
if test "x${ac_cv_prog_AR}" = "x"; then
test -z "${ac_cv_prog_AR}" || unset ac_cv_prog_AR
m4_ifdef([AC_PROG_AR],[dnl
AC_PROG_AR
],[
test -x "`which ar`" && echo "using `which ar` for ar"
])
fi
else
test -n "${AR}" && export AR
fi
AM_PROG_CC_C_O
AC_PROG_CC_C99
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_PROG_INSTALL
AM_PROG_INSTALL_STRIP
AC_DEFUN([AC_REQUIRE_RANLIB],[
AC_REQUIRE([AC_PROG_RANLIB])dnl
])dnl
## https://savannah.gnu.org/support/?108503
if test "x${RANLIB}" = "x"; then
test -z "${RANLIB}" || unset RANLIB
AC_REQUIRE_RANLIB
else
test -n "${RANLIB}" && export RANLIB
AC_SUBST([RANLIB])
fi
AC_PATH_PROGS([LUA],[lua lua5.1 lua5.2 lua5.3 lua5.4 luajit])
LT_INIT([win32-dll dlopen])
CMAKE_FIND_BINARY
# Checks for libraries.
PKG_CHECK_MODULES([LUA],
[lua >= 5.1],
[HAVE_LUA=yes
CFLAGS="${CFLAGS} ${LUA_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${LUA_CFLAGS}"
LIBS="${LIBS} ${LUA_LIBS}"
AC_SUBST([LUA_CFLAGS])dnl
AC_SUBST([LUA_LIBS])],[
# If the previous check failed, see if the pkg name includes the version:
PKG_CHECK_MODULES([LUA51],
[lua5.1 >= 5.1],
[HAVE_LUA=yes
CFLAGS="${CFLAGS} ${LUA51_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${LUA51_CFLAGS}"
LIBS="${LIBS} ${LUA51_LIBS}"
AC_SUBST([LUA51_CFLAGS])dnl
AC_SUBST([LUA51_LIBS])dnl
])dnl
])dnl
## Check like this too:
AC_CHECK_LIB([lua],[luaL_error],[],[
AC_SEARCH_LIBS([luaL_error],[lua lua5.1 lua5.2 lua5.3 lua5.4 luajit])dnl
])dnl
# Checks for header files.
AC_CHECK_HEADERS([lua.h luaconf.h lauxlib.h])
if test "x${ac_cv_header_lua_h}" = "xno"; then
test -n "${ac_cv_header_lua_h}" && echo "ac_cv_header_lua_h is '${ac_cv_header_lua_h}'"
AC_MSG_ERROR([lua.h is required, but it was not found])
fi
if test "x${ac_cv_header_stdio_h}" = "x"; then
test -z "${ac_cv_header_stdio_h}" || unset ac_cv_header_stdio_h
AC_CHECK_HEADERS([stdio.h])
fi
if test "x${ac_cv_header_stdint_h}" = "x"; then
test -z "${ac_cv_header_stdint_h}" || unset ac_cv_header_stdint_h
AC_CHECK_HEADERS([stdint.h])
fi
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_INT32_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_CHECK_TYPE([lua_State])dnl
# Checks for library functions.
AC_CHECK_FUNCS([luaL_error lua_pushlstring lua_pushnumber \
luaL_checknumber lua_gettop luaL_setfuncs lua_createtable \
lua_type])dnl
# Output.
AC_CONFIG_FILES([Makefile])
AC_OUTPUT