-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
62 lines (48 loc) · 1.49 KB
/
configure.ac
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
AC_INIT([Verify SRCU], [0.1.0])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AC_CONFIG_SRCDIR([src/combined_source.c])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
AM_PROG_AR
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_AWK
AC_PROG_MKDIR_P
AC_ARG_WITH([linux],
[AS_HELP_STRING([--with-linux=dir],
[Specify the location of the Linux kernel source tree])],
[],
[with_linux=no])
AS_IF([test "x${with_linux}" = x || test "x${with_linux}" = xyes || \
test "x${with_linux}" = xno],
[AC_MSG_ERROR([Linux kernel source needed])])
AC_MSG_CHECKING([whether the Linux kernel source is at the specified location])
AS_IF([test '!' -f "${with_linux}/kernel/rcu/srcu.c"],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([${with_linux} does not contain the Linux kernel source])],
[AC_MSG_RESULT([yes])])
dnl Create the linux_source symlink.
AC_CONFIG_COMMANDS_POST([
rm -rf linux_source
${LN_S} "${with_linux}" linux_source])
AC_DEFINE([__KERNEL__], [], [Make the kernel think that it is getting compiled])
AC_DEFINE([_GNU_SOURCE], [], [Tell the standard headers to include everything])
dnl TODO: Check for more features of the compiler instead of assuming GCC. Some
dnl error checking might be helpful too.
AC_CHECK_HEADERS([inttypes.h limits.h stddef.h stdlib.h string.h])
AC_TYPE_SIZE_T
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_C_TYPEOF
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT