-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
171 lines (154 loc) · 3.96 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
AC_PREREQ(2.61)
AC_INIT([ltp], [LTP_VERSION], [[email protected]])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([ \
include/mk/config.mk \
include/mk/features.mk \
lib/ltp.pc \
ltp-devel.spec \
m4/Makefile \
execltp \
README.ltp-devel \
])
AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes)
AC_CANONICAL_HOST
AC_PROG_CC
# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
# 2.62.
AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
AC_PROG_AR
AC_PROG_LEX
AC_PROG_RANLIB
AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
AC_PROG_STRIP
AC_PROG_YACC
AC_PREFIX_DEFAULT(/opt/ltp)
AC_CHECK_HEADERS([ \
dmapi.h \
ifaddrs.h \
libaio.h \
mm.h \
pthread.h \
attr/xattr.h \
linux/genetlink.h \
linux/mempolicy.h \
linux/module.h \
linux/netlink.h \
sys/epoll.h \
sys/inotify.h \
sys/jfsdmapi.h \
sys/prctl.h \
])
# Tools knobs
# Expect
AC_ARG_WITH([bash],
[AC_HELP_STRING([--with-bash],
[have the Bourne Again SHell interpreter (default=no)])],
[with_bash=yes],
)
if test "x$with_bash" = xyes; then
AC_SUBST([WITH_BASH],["yes"])
else
AC_SUBST([WITH_BASH],["no"])
fi
AC_ARG_WITH([expect],
[AC_HELP_STRING([--with-expect],
[have the Tcl/expect library (default=yes)])],
[with_expect=yes],
[with_expect=no]
)
if test "x$with_expect" = xyes; then
AC_SUBST([WITH_EXPECT],["yes"])
else
AC_SUBST([WITH_EXPECT],["no"])
fi
# Perl
AC_ARG_WITH([perl],
[AC_HELP_STRING([--with-perl],
[have a perl interpreter (default=yes)])],
[with_perl=yes],
[with_perl=no]
)
if test "x$with_perl" = xyes; then
AC_SUBST([WITH_PERL],["yes"])
else
AC_SUBST([WITH_PERL],["no"])
fi
# Python
AC_ARG_WITH([python],
[AC_HELP_STRING([--with-python],
[have a python interpreter (default=yes)])],
[with_python=yes],
[with_python=no]
)
if test "x$with_python" = xyes; then
AC_SUBST([WITH_PYTHON],["yes"])
else
AC_SUBST([WITH_PYTHON],["no"])
fi
# END tools knobs
# Testsuites knobs
# testcases/kernel/power_management requires python.
if test "x$with_python" = xyes; then
AC_ARG_WITH([power-management-testsuite],
[AC_HELP_STRING([--with-power-management-testsuite],
[compile and install the x86 power management testsuite (default=no)])],
[with_power_management_testsuite=yes],
)
fi
if test "x$with_power_management_testsuite" = xyes; then
AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["yes"])
else
AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["no"])
fi
AC_ARG_WITH([open-posix-testsuite],
[AC_HELP_STRING([--with-open-posix-testsuite],
[compile and install the open posix testsuite (default=no)])],
[with_open_posix_testsuite=yes]
)
if test "x$with_open_posix_testsuite" = xyes; then
AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
else
AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
fi
# testcases/realtime requires bash and python.
if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
AC_ARG_WITH([realtime-testsuite],
[AC_HELP_STRING([--with-realtime-testsuite],
[compile and install the realtime testsuite (default=no)])],
[with_realtime_testsuite=yes]
)
fi
if test "x$with_realtime_testsuite" = xyes; then
AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
# Run configure on testcases/realtime as well.
AC_CONFIG_SUBDIRS([testcases/realtime])
else
AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
fi
# END testsuites knobs
LTP_CHECK_MKDTEMP
LTP_CHECK_CAPABILITY_SUPPORT
LTP_CHECK_CRYPTO
LTP_CHECK_LINUX_PTRACE
LTP_CHECK_NOMMU_LINUX
LTP_CHECK_PRCTL_SUPPORT
LTP_CHECK_SECUREBITS
LTP_CHECK_SELINUX
LTP_CHECK_SIGNAL
LTP_CHECK_SYSCALL_EVENTFD
LTP_CHECK_SYSCALL_KEYCTL
LTP_CHECK_SYSCALL_MODIFY_LDT
LTP_CHECK_SYSCALL_NUMA
LTP_CHECK_SYSCALL_QUOTACTL
LTP_CHECK_SYSCALL_SIGNALFD
LTP_CHECK_SYSCALL_UNSHARE
LTP_CHECK_TASKSTATS
LTP_CHECK_TIME
LTP_CHECK_MADVISE
LTP_CHECK_ACL_SUPPORT
LTP_CHECK_FS_IOC_FLAGS
LTP_CHECK_MREMAP_FIXED
AC_OUTPUT