yaberauneya | 9913e82 | 2009-11-26 11:27:34 +0000 | [diff] [blame] | 1 | AC_PREREQ(2.61) |
Cyril Hrubis | 70d7e8c | 2015-09-15 12:50:31 +0200 | [diff] [blame] | 2 | AC_INIT([ltp], [LTP_VERSION], [ltp@lists.linux.it]) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 3 | AC_CONFIG_AUX_DIR([.]) |
| 4 | AM_INIT_AUTOMAKE |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 5 | AC_CONFIG_HEADERS([include/config.h]) |
Cyril Hrubis | edbae29 | 2014-07-15 14:57:27 +0200 | [diff] [blame] | 6 | AC_CONFIG_MACRO_DIR([m4]) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 7 | AC_CONFIG_FILES([ \ |
| 8 | include/mk/config.mk \ |
Cyril Hrubis | 63b6532 | 2016-04-20 18:23:53 +0200 | [diff] [blame] | 9 | include/mk/config-openposix.mk \ |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 10 | include/mk/features.mk \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 11 | lib/ltp.pc \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 12 | m4/Makefile \ |
yaberauneya | 0d39b83 | 2009-11-20 05:45:41 +0000 | [diff] [blame] | 13 | execltp \ |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 14 | ]) |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 15 | |
Petr Vorel | 427b1be | 2018-02-14 23:27:54 +0100 | [diff] [blame] | 16 | AM_MAINTAINER_MODE([enable]) |
| 17 | |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 18 | AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes) |
| 19 | |
| 20 | AC_CANONICAL_HOST |
| 21 | |
| 22 | AC_PROG_CC |
yaberauneya | f7df140 | 2009-10-17 02:24:20 +0000 | [diff] [blame] | 23 | # <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about |
| 24 | # 2.62. |
| 25 | AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 26 | AC_PROG_AR |
| 27 | AC_PROG_LEX |
| 28 | AC_PROG_RANLIB |
yaberauneya | a4bed68 | 2009-12-05 23:45:55 +0000 | [diff] [blame] | 29 | AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) |
| 30 | AC_PROG_STRIP |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 31 | AC_PROG_YACC |
| 32 | |
| 33 | AC_PREFIX_DEFAULT(/opt/ltp) |
| 34 | |
yaberauneya | 80a06b5 | 2009-12-20 00:39:37 +0000 | [diff] [blame] | 35 | AC_CHECK_HEADERS([ \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 36 | ifaddrs.h \ |
Petr Vorel | bc2568d | 2017-10-16 17:41:54 +0200 | [diff] [blame] | 37 | keyutils.h \ |
Petr Vorel | 66923c6 | 2017-10-12 20:33:19 +0200 | [diff] [blame] | 38 | linux/can.h \ |
Alexey Kodanev | 640f106 | 2018-03-23 18:06:04 +0300 | [diff] [blame] | 39 | linux/dccp.h \ |
Richard Palethorpe | a0ce443 | 2018-07-05 16:56:33 +0200 | [diff] [blame] | 40 | linux/cryptouser.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 41 | linux/genetlink.h \ |
Petr Vorel | d47c06e | 2017-10-12 20:33:20 +0200 | [diff] [blame] | 42 | linux/keyctl.h \ |
Eric Biggers | ef85101 | 2019-03-18 10:13:22 -0700 | [diff] [blame] | 43 | linux/if_alg.h \ |
Richard Palethorpe | db14170 | 2017-11-02 15:34:41 +0100 | [diff] [blame] | 44 | linux/if_packet.h \ |
| 45 | linux/if_ether.h \ |
yaberauneya | cb805c4 | 2009-12-22 23:10:41 +0000 | [diff] [blame] | 46 | linux/mempolicy.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 47 | linux/module.h \ |
| 48 | linux/netlink.h \ |
Yang Xu | 3ddc217 | 2019-05-23 10:54:00 +0800 | [diff] [blame^] | 49 | linux/seccomp.h \ |
Christian Amann | b3621af | 2019-03-19 09:07:32 +0100 | [diff] [blame] | 50 | linux/userfaultfd.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 51 | mm.h \ |
Xiao Yang | bf8f1d7 | 2018-04-04 19:12:54 +0800 | [diff] [blame] | 52 | netinet/sctp.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 53 | pthread.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 54 | sys/epoll.h \ |
Jan Kara | f057c1c | 2013-11-20 23:43:13 +0100 | [diff] [blame] | 55 | sys/fanotify.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 56 | sys/inotify.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 57 | sys/prctl.h \ |
Sandeep Patil | 524edfb | 2017-11-08 16:34:36 -0800 | [diff] [blame] | 58 | sys/shm.h \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 59 | sys/ustat.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 60 | sys/xattr.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 61 | ]) |
| 62 | |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 63 | AC_CHECK_FUNCS([ \ |
Christian Amann | a72f4b2 | 2019-05-06 12:54:57 +0200 | [diff] [blame] | 64 | copy_file_range \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 65 | epoll_pwait \ |
| 66 | execveat \ |
| 67 | fallocate \ |
| 68 | fchownat \ |
| 69 | fstatat \ |
| 70 | kcmp \ |
| 71 | mkdirat \ |
| 72 | mknodat \ |
| 73 | openat \ |
| 74 | preadv \ |
| 75 | preadv2 \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 76 | profil \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 77 | pwritev \ |
| 78 | pwritev2 \ |
| 79 | readlinkat \ |
| 80 | renameat \ |
| 81 | renameat2 \ |
Yang Xu | 4c41cf7 | 2019-04-17 14:05:02 +0800 | [diff] [blame] | 82 | sched_getcpu \ |
Xiao Yang | a600c36 | 2019-04-05 15:46:24 +0800 | [diff] [blame] | 83 | sigpending \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 84 | splice \ |
Xiao Yang | 66c59e9 | 2019-04-05 17:12:50 +0800 | [diff] [blame] | 85 | stime \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 86 | syncfs \ |
| 87 | sync_file_range \ |
| 88 | tee \ |
| 89 | unshare \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 90 | ustat \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 91 | vmsplice \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 92 | ]) |
Petr Vorel | 25b3565 | 2017-10-02 15:33:41 +0200 | [diff] [blame] | 93 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 94 | # Tools knobs |
| 95 | |
| 96 | # Expect |
| 97 | AC_ARG_WITH([bash], |
| 98 | [AC_HELP_STRING([--with-bash], |
| 99 | [have the Bourne Again SHell interpreter (default=no)])], |
| 100 | [with_bash=yes], |
| 101 | ) |
| 102 | if test "x$with_bash" = xyes; then |
| 103 | AC_SUBST([WITH_BASH],["yes"]) |
| 104 | else |
| 105 | AC_SUBST([WITH_BASH],["no"]) |
| 106 | fi |
| 107 | |
| 108 | AC_ARG_WITH([expect], |
| 109 | [AC_HELP_STRING([--with-expect], |
| 110 | [have the Tcl/expect library (default=yes)])], |
| 111 | [with_expect=yes], |
| 112 | [with_expect=no] |
| 113 | ) |
| 114 | if test "x$with_expect" = xyes; then |
| 115 | AC_SUBST([WITH_EXPECT],["yes"]) |
| 116 | else |
| 117 | AC_SUBST([WITH_EXPECT],["no"]) |
| 118 | fi |
| 119 | |
Anders Roxell | 39a85a1 | 2018-02-05 11:56:04 +0100 | [diff] [blame] | 120 | # Numa |
| 121 | AC_ARG_WITH([numa], |
| 122 | AC_HELP_STRING([--without-numa], |
Petr Vorel | 4ace68a | 2018-02-07 11:09:49 +0100 | [diff] [blame] | 123 | [without numa support (default=no)]), |
Anders Roxell | 39a85a1 | 2018-02-05 11:56:04 +0100 | [diff] [blame] | 124 | [with_numa=no], |
| 125 | [with_numa=yes] |
| 126 | ) |
| 127 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 128 | # Perl |
| 129 | AC_ARG_WITH([perl], |
| 130 | [AC_HELP_STRING([--with-perl], |
| 131 | [have a perl interpreter (default=yes)])], |
| 132 | [with_perl=yes], |
| 133 | [with_perl=no] |
| 134 | ) |
| 135 | if test "x$with_perl" = xyes; then |
| 136 | AC_SUBST([WITH_PERL],["yes"]) |
| 137 | else |
| 138 | AC_SUBST([WITH_PERL],["no"]) |
| 139 | fi |
| 140 | |
| 141 | # Python |
| 142 | AC_ARG_WITH([python], |
| 143 | [AC_HELP_STRING([--with-python], |
| 144 | [have a python interpreter (default=yes)])], |
| 145 | [with_python=yes], |
| 146 | [with_python=no] |
| 147 | ) |
| 148 | if test "x$with_python" = xyes; then |
| 149 | AC_SUBST([WITH_PYTHON],["yes"]) |
| 150 | else |
| 151 | AC_SUBST([WITH_PYTHON],["no"]) |
| 152 | fi |
Anders Roxell | 7b25815 | 2018-02-14 13:04:31 +0100 | [diff] [blame] | 153 | |
| 154 | # TI RPC |
| 155 | AC_ARG_WITH([tirpc], |
| 156 | AC_HELP_STRING([--without-tirpc], |
| 157 | [without libtirpc support (default=no)]), |
| 158 | [with_tirpc=no], |
| 159 | [with_tirpc=yes] |
| 160 | ) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 161 | # END tools knobs |
| 162 | |
| 163 | # Testsuites knobs |
| 164 | |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 165 | AC_ARG_WITH([open-posix-testsuite], |
| 166 | [AC_HELP_STRING([--with-open-posix-testsuite], |
| 167 | [compile and install the open posix testsuite (default=no)])], |
Mike Frysinger | 12298fe | 2017-03-31 18:12:12 -0400 | [diff] [blame] | 168 | [with_open_posix_testsuite=$withval] |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 169 | ) |
| 170 | if test "x$with_open_posix_testsuite" = xyes; then |
| 171 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) |
| 172 | else |
| 173 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) |
| 174 | fi |
| 175 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 176 | # testcases/realtime requires bash and python. |
| 177 | if test "x$with_bash" = xyes && test "x$with_python" = xyes; then |
| 178 | AC_ARG_WITH([realtime-testsuite], |
| 179 | [AC_HELP_STRING([--with-realtime-testsuite], |
| 180 | [compile and install the realtime testsuite (default=no)])], |
| 181 | [with_realtime_testsuite=yes] |
| 182 | ) |
| 183 | fi |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 184 | if test "x$with_realtime_testsuite" = xyes; then |
| 185 | AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 186 | # Run configure on testcases/realtime as well. |
| 187 | AC_CONFIG_SUBDIRS([testcases/realtime]) |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 188 | else |
| 189 | AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) |
| 190 | fi |
| 191 | |
Mats Liljegren | fb6efc4 | 2014-04-15 10:31:15 +0200 | [diff] [blame] | 192 | AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) |
| 193 | |
Li Wang | 8d47fa7 | 2017-10-26 16:51:15 +0800 | [diff] [blame] | 194 | AC_CONFIG_COMMANDS([syscalls.h], [cd ${ac_top_srcdir}/include/lapi/syscalls; ./regen.sh]) |
Cyril Hrubis | a07008f | 2017-06-14 17:25:09 +0200 | [diff] [blame] | 195 | |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 196 | # custom functions |
| 197 | LTP_CHECK_ACL_SUPPORT |
| 198 | LTP_CHECK_ATOMIC_MEMORY_MODEL |
| 199 | LTP_CHECK_BUILTIN_CLEAR_CACHE |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 200 | LTP_CHECK_CAPABILITY_SUPPORT |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 201 | LTP_CHECK_CC_WARN_OLDSTYLE |
| 202 | LTP_CHECK_CLONE_SUPPORTS_7_ARGS |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 203 | LTP_CHECK_CRYPTO |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 204 | LTP_CHECK_FIDEDUPE |
| 205 | LTP_CHECK_FORTIFY_SOURCE |
| 206 | LTP_CHECK_FS_IOC_FLAGS |
| 207 | LTP_CHECK_FTS_H |
| 208 | LTP_CHECK_IF_LINK |
| 209 | LTP_CHECK_IOVEC |
| 210 | LTP_CHECK_KCMP_TYPE |
| 211 | LTP_CHECK_KERNEL_DEVEL |
| 212 | LTP_CHECK_KEYUTILS_SUPPORT |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 213 | LTP_CHECK_LINUX_PTRACE |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 214 | LTP_CHECK_LINUXRANDOM |
| 215 | LTP_CHECK_MADVISE |
| 216 | LTP_CHECK_MKDTEMP |
| 217 | LTP_CHECK_MMSGHDR |
| 218 | LTP_CHECK_MREMAP_FIXED |
Mike Frysinger | 9bd940b | 2010-08-17 17:22:03 -0400 | [diff] [blame] | 219 | LTP_CHECK_NOMMU_LINUX |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 220 | LTP_CHECK_PERF_EVENT |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 221 | LTP_CHECK_PRCTL_SUPPORT |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 222 | LTP_CHECK_RLIMIT64 |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 223 | LTP_CHECK_SECUREBITS |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 224 | LTP_CHECK_SELINUX |
yaberauneya | e34a3c2 | 2009-11-30 12:26:05 +0000 | [diff] [blame] | 225 | LTP_CHECK_SIGNAL |
vaishnavid | 0d28fea | 2018-09-03 12:16:31 +0000 | [diff] [blame] | 226 | LTP_CHECK_STATX |
Jan Stancek | f61391e | 2016-04-13 13:09:23 +0200 | [diff] [blame] | 227 | LTP_CHECK_SYNC_ADD_AND_FETCH |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 228 | LTP_CHECK_SYSCALL_EVENTFD |
| 229 | LTP_CHECK_SYSCALL_FCNTL |
| 230 | LTP_CHECK_SYSCALL_MODIFY_LDT |
Xing Gu | a3bfea2 | 2014-06-17 15:26:30 +0800 | [diff] [blame] | 231 | |
Petr Vorel | f417672 | 2018-02-07 11:29:42 +0100 | [diff] [blame] | 232 | if test "x$with_numa" = xyes; then |
| 233 | LTP_CHECK_SYSCALL_NUMA |
| 234 | numa_error_msg="test requires libnuma >= 2 and it's development packages" |
| 235 | else |
| 236 | numa_error_msg="NUMA support was disabled during build" |
| 237 | fi |
| 238 | AC_DEFINE_UNQUOTED(NUMA_ERROR_MSG, ["$numa_error_msg"], [Error message when no NUMA support]) |
| 239 | |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 240 | LTP_CHECK_SYSCALL_PERF_EVENT_OPEN |
| 241 | LTP_CHECK_SYSCALL_QUOTACTL |
| 242 | LTP_CHECK_SYSCALL_SIGNALFD |
| 243 | LTP_CHECK_SYSCALL_UTIMENSAT |
| 244 | LTP_CHECK_TASKSTATS |
| 245 | LTP_CHECK_TIME |
| 246 | LTP_CHECK_TIMERFD |
| 247 | test "x$with_tirpc" = xyes && LTP_CHECK_TIRPC |
| 248 | LTP_CHECK_TPACKET_V3 |
| 249 | LTP_CHECK_UNAME_DOMAINNAME |
| 250 | LTP_CHECK_XFS_QUOTACTL |
| 251 | LTP_CHECK_X_TABLES |
| 252 | LTP_DETECT_HOST_CPU |
| 253 | |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 254 | AC_OUTPUT |