-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
93 lines (62 loc) · 2.02 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
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
############################
# Specify program versions #
############################
AC_PREREQ([2.70])
LT_PREREQ([2.4.6])
##################################
# Initialize Autoconf & Automake #
##################################
AC_INIT([drivers],
m4_normalize(m4_include([VERSION])),
[https://github.com/tailix/drivers/issues],
[drivers],
[https://github.com/tailix/drivers])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shutdown.c])
AC_CONFIG_FILES([
Makefile
include/Makefile
])
AM_INIT_AUTOMAKE([1.16 subdir-objects])
#########################
# Automake conditionals #
#########################
dnl Architecture
AM_CONDITIONAL([ASM_I386], [test "$host_cpu" = i386])
AM_CONDITIONAL([ASM_RISCV64], [test "$host_cpu" = riscv64])
AM_CONDITIONAL([ASM_X86_64], [test "$host_cpu" = x86_64])
dnl Architecture (additional)
AM_CONDITIONAL([ASM_RISCV], [test "$host_cpu" = riscv64])
AM_CONDITIONAL([ASM_X86], [test "$host_cpu" = i386 -o "$host_cpu" = x86_64])
####################
# Autoconf defines #
####################
dnl Architecture
AS_IF([test "$host_cpu" = i386], [AC_DEFINE([ASM_I386], [1], [architecture is i386])])
AS_IF([test "$host_cpu" = riscv64], [AC_DEFINE([ASM_RISCV64], [1], [architecture is RISC-V 64-bit])])
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ASM_X86_64], [1], [architecture is x86_64])])
dnl Architecture (additional)
AS_IF([test "$host_cpu" = riscv64], [AC_DEFINE([ASM_RISCV], [1], [architecture is RISC-V])])
AS_IF([test "$host_cpu" = i386], [AC_DEFINE([ASM_X86], [1], [architecture is x86])])
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ASM_X86], [1], [architecture is x86])])
##############
# Run checks #
##############
AC_LANG([C])
AM_PROG_AR
AM_PROG_AS
AC_PROG_CC
AC_C_INLINE
AC_CHECK_HEADER_STDBOOL
AC_CHECK_HEADERS([stdarg.h stddef.h stdint.h])
######################
# Initialize Libtool #
######################
LT_INIT([disable-shared])
##########
# Finish #
##########
AC_OUTPUT