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 | b6eab54 | 2020-10-05 15:30:44 +0200 | [diff] [blame] | 16 | AC_ARG_VAR(HOSTCC, [The C compiler on the host]) |
| 17 | |
Petr Vorel | 427b1be | 2018-02-14 23:27:54 +0100 | [diff] [blame] | 18 | AM_MAINTAINER_MODE([enable]) |
| 19 | |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 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 | |
Petr Vorel | 3fda26a | 2021-02-18 15:49:23 +0100 | [diff] [blame] | 33 | m4_ifndef([PKG_CHECK_EXISTS], |
Petr Vorel | 6e17e2b | 2021-02-15 12:00:39 +0100 | [diff] [blame] | 34 | [m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency), see INSTALL])]) |
| 35 | |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 36 | AC_PREFIX_DEFAULT(/opt/ltp) |
| 37 | |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 38 | AC_CHECK_DECLS([IFLA_NET_NS_PID],,,[#include <linux/if_link.h>]) |
| 39 | AC_CHECK_DECLS([MADV_MERGEABLE],,,[#include <sys/mman.h>]) |
| 40 | AC_CHECK_DECLS([PR_CAPBSET_DROP, PR_CAPBSET_READ],,,[#include <sys/prctl.h>]) |
Martin Doucha | 3cc956f | 2021-03-19 12:43:49 +0100 | [diff] [blame] | 41 | AC_CHECK_DECLS([SEM_STAT_ANY],,,[#include <sys/sem.h>]) |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 42 | |
Petr Vorel | 2ebe5dd | 2020-09-02 14:43:06 +0200 | [diff] [blame] | 43 | AC_CHECK_HEADERS_ONCE([ \ |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 44 | asm/ldt.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 45 | ifaddrs.h \ |
Petr Vorel | bc2568d | 2017-10-16 17:41:54 +0200 | [diff] [blame] | 46 | keyutils.h \ |
Petr Vorel | 66923c6 | 2017-10-12 20:33:19 +0200 | [diff] [blame] | 47 | linux/can.h \ |
Yang Xu | df5ce33 | 2019-07-30 13:45:32 +0800 | [diff] [blame] | 48 | linux/cgroupstats.h \ |
Richard Palethorpe | a0ce443 | 2018-07-05 16:56:33 +0200 | [diff] [blame] | 49 | linux/cryptouser.h \ |
Richard Palethorpe via ltp | 6c68f3c | 2021-02-11 17:45:39 +0000 | [diff] [blame] | 50 | linux/close_range.h \ |
Yang Xu | df5ce33 | 2019-07-30 13:45:32 +0800 | [diff] [blame] | 51 | linux/dccp.h \ |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 52 | linux/fs.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 53 | linux/genetlink.h \ |
Eric Biggers | ef85101 | 2019-03-18 10:13:22 -0700 | [diff] [blame] | 54 | linux/if_alg.h \ |
Richard Palethorpe | db14170 | 2017-11-02 15:34:41 +0100 | [diff] [blame] | 55 | linux/if_ether.h \ |
Petr Vorel | b6bf84c | 2020-02-17 15:22:27 +0100 | [diff] [blame] | 56 | linux/if_packet.h \ |
Martin Doucha | fe9e951 | 2021-02-04 12:03:39 +0100 | [diff] [blame] | 57 | linux/io_uring.h \ |
Yang Xu | df5ce33 | 2019-07-30 13:45:32 +0800 | [diff] [blame] | 58 | linux/keyctl.h \ |
yaberauneya | cb805c4 | 2009-12-22 23:10:41 +0000 | [diff] [blame] | 59 | linux/mempolicy.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 60 | linux/module.h \ |
| 61 | linux/netlink.h \ |
Alessio Balsini | 531c799 | 2021-05-05 23:18:36 +0100 | [diff] [blame] | 62 | linux/openat2.h \ |
Yang Xu | 3ddc217 | 2019-05-23 10:54:00 +0800 | [diff] [blame] | 63 | linux/seccomp.h \ |
Yang Xu | fe9d921 | 2019-07-12 17:54:35 +0800 | [diff] [blame] | 64 | linux/securebits.h \ |
Petr Vorel | ef12b90 | 2020-05-06 13:03:29 +0200 | [diff] [blame] | 65 | linux/tty.h \ |
Petr Vorel | 28a9cd8 | 2019-06-17 23:00:49 +0200 | [diff] [blame] | 66 | linux/types.h \ |
Christian Amann | b3621af | 2019-03-19 09:07:32 +0100 | [diff] [blame] | 67 | linux/userfaultfd.h \ |
Xiao Yang | bf8f1d7 | 2018-04-04 19:12:54 +0800 | [diff] [blame] | 68 | netinet/sctp.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 69 | pthread.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 70 | sys/epoll.h \ |
Jan Kara | f057c1c | 2013-11-20 23:43:13 +0100 | [diff] [blame] | 71 | sys/fanotify.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 72 | sys/inotify.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 73 | sys/prctl.h \ |
Sandeep Patil | 524edfb | 2017-11-08 16:34:36 -0800 | [diff] [blame] | 74 | sys/shm.h \ |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 75 | sys/timerfd.h \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 76 | sys/ustat.h \ |
Petr Vorel | 2e7b809 | 2019-07-06 22:51:06 +0200 | [diff] [blame] | 77 | sys/utsname.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 78 | sys/xattr.h \ |
Yang Xu | 208f231 | 2019-10-23 17:00:27 +0800 | [diff] [blame] | 79 | xfs/xqm.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 80 | ]) |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 81 | AC_CHECK_HEADERS(fts.h, [have_fts=1]) |
| 82 | AC_SUBST(HAVE_FTS_H, $have_fts) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 83 | |
Petr Vorel | 2ebe5dd | 2020-09-02 14:43:06 +0200 | [diff] [blame] | 84 | AC_CHECK_FUNCS_ONCE([ \ |
Viresh Kumar | 1b0e8dd | 2020-03-20 09:54:02 +0530 | [diff] [blame] | 85 | clone3 \ |
Richard Palethorpe via ltp | 6c68f3c | 2021-02-11 17:45:39 +0000 | [diff] [blame] | 86 | close_range \ |
Christian Amann | a72f4b2 | 2019-05-06 12:54:57 +0200 | [diff] [blame] | 87 | copy_file_range \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 88 | epoll_pwait \ |
| 89 | execveat \ |
| 90 | fallocate \ |
| 91 | fchownat \ |
Viresh Kumar | 9832fd9 | 2020-02-14 17:05:50 +0530 | [diff] [blame] | 92 | fsconfig \ |
| 93 | fsmount \ |
| 94 | fsopen \ |
| 95 | fspick \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 96 | fstatat \ |
Cyril Hrubis | 6ab05d5 | 2020-06-26 11:57:27 +0200 | [diff] [blame] | 97 | getauxval \ |
Khem Raj | 6d9de5f | 2019-07-26 11:25:23 -0700 | [diff] [blame] | 98 | getdents \ |
| 99 | getdents64 \ |
Viresh Kumar | 57a961f | 2020-01-28 08:31:33 +0530 | [diff] [blame] | 100 | io_pgetevents \ |
Vikas Kumar | 95399bc | 2020-03-13 11:50:58 +0530 | [diff] [blame] | 101 | io_uring_setup \ |
| 102 | io_uring_register \ |
| 103 | io_uring_enter \ |
Petr Vorel | b6bf84c | 2020-02-17 15:22:27 +0100 | [diff] [blame] | 104 | kcmp \ |
Yang Xu | 7eb7a97 | 2021-02-18 13:52:49 +0800 | [diff] [blame] | 105 | mallinfo \ |
Petr Vorel | 4df2c0a | 2021-01-14 13:45:10 +0100 | [diff] [blame] | 106 | mallopt \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 107 | mkdirat \ |
| 108 | mknodat \ |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 109 | modify_ldt \ |
Viresh Kumar | 9832fd9 | 2020-02-14 17:05:50 +0530 | [diff] [blame] | 110 | move_mount \ |
Matthew Bobrowski | 02b39d8 | 2019-06-20 19:57:58 +1000 | [diff] [blame] | 111 | name_to_handle_at \ |
Viresh Kumar | 9832fd9 | 2020-02-14 17:05:50 +0530 | [diff] [blame] | 112 | open_tree \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 113 | openat \ |
Viresh Kumar | 1b884d9 | 2020-03-16 12:06:15 +0530 | [diff] [blame] | 114 | openat2 \ |
Viresh Kumar | 5415162 | 2020-01-27 14:07:48 +0530 | [diff] [blame] | 115 | pidfd_open \ |
Christian Amann | e3c82be | 2019-06-14 09:28:27 +0200 | [diff] [blame] | 116 | pidfd_send_signal \ |
Yang Xu | df5ce33 | 2019-07-30 13:45:32 +0800 | [diff] [blame] | 117 | pkey_mprotect \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 118 | preadv \ |
| 119 | preadv2 \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 120 | profil \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 121 | pwritev \ |
| 122 | pwritev2 \ |
Alexey Kodanev | 652e02f | 2020-09-24 10:17:39 +0300 | [diff] [blame] | 123 | rand_r \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 124 | readlinkat \ |
Steve Muckle | 1010e92 | 2019-07-25 14:11:19 -0700 | [diff] [blame] | 125 | recvmmsg \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 126 | renameat \ |
| 127 | renameat2 \ |
Yang Xu | 4c41cf7 | 2019-04-17 14:05:02 +0800 | [diff] [blame] | 128 | sched_getcpu \ |
Steve Muckle | 1010e92 | 2019-07-25 14:11:19 -0700 | [diff] [blame] | 129 | sendmmsg \ |
Cyril Hrubis | 7cd69c1 | 2020-03-18 16:37:54 +0100 | [diff] [blame] | 130 | setns \ |
Xiao Yang | a600c36 | 2019-04-05 15:46:24 +0800 | [diff] [blame] | 131 | sigpending \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 132 | splice \ |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 133 | statx \ |
Xiao Yang | 66c59e9 | 2019-04-05 17:12:50 +0800 | [diff] [blame] | 134 | stime \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 135 | sync_file_range \ |
Petr Vorel | b6bf84c | 2020-02-17 15:22:27 +0100 | [diff] [blame] | 136 | syncfs \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 137 | tee \ |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 138 | timerfd_create \ |
| 139 | timerfd_gettime \ |
| 140 | timerfd_settime \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 141 | unshare \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 142 | ustat \ |
Xiao Yang | 8fd49ce | 2019-04-05 15:55:39 +0800 | [diff] [blame] | 143 | vmsplice \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 144 | ]) |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 145 | AC_CHECK_FUNCS(mkdtemp,[],AC_MSG_ERROR(mkdtemp() not found!)) |
| 146 | |
| 147 | AC_CHECK_MEMBERS([struct fanotify_event_info_fid.fsid.__val],,,[#include <sys/fanotify.h>]) |
| 148 | AC_CHECK_MEMBERS([struct perf_event_mmap_page.aux_head],,,[#include <linux/perf_event.h>]) |
| 149 | AC_CHECK_MEMBERS([struct sigaction.sa_sigaction],[],[],[#include <signal.h>]) |
| 150 | |
| 151 | AC_CHECK_MEMBERS([struct utsname.domainname],,,[ |
| 152 | #define _GNU_SOURCE |
| 153 | #include <sys/utsname.h> |
| 154 | ]) |
| 155 | |
| 156 | AC_CHECK_TYPES([enum kcmp_type],,,[#include <linux/kcmp.h>]) |
| 157 | AC_CHECK_TYPES([struct acct_v3],,,[#include <sys/acct.h>]) |
Yang Xu | 8841259 | 2020-08-21 18:18:39 +0800 | [diff] [blame] | 158 | AC_CHECK_TYPES([struct af_alg_iv, struct sockaddr_alg],,,[# include <linux/if_alg.h>]) |
Alessio Balsini | bb496d9 | 2021-05-05 23:32:33 +0100 | [diff] [blame] | 159 | AC_CHECK_TYPES([struct clone_args],,,[#include <sched.h>]) |
Petr Vorel | a26fedd | 2020-08-28 12:46:42 +0200 | [diff] [blame] | 160 | AC_CHECK_TYPES([struct fanotify_event_info_fid, struct fanotify_event_info_header],,,[#include <sys/fanotify.h>]) |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 161 | AC_CHECK_TYPES([struct file_dedupe_range],,,[#include <linux/fs.h>]) |
Petr Vorel | 86cf811 | 2021-01-12 13:31:45 +0100 | [diff] [blame] | 162 | |
| 163 | AC_CHECK_TYPES([struct file_handle],,,[ |
| 164 | #define _GNU_SOURCE |
| 165 | #include <fcntl.h> |
| 166 | ]) |
| 167 | |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 168 | AC_CHECK_TYPES([struct fs_quota_statv],,,[#include <xfs/xqm.h>]) |
| 169 | AC_CHECK_TYPES([struct if_nextdqblk],,,[#include <linux/quota.h>]) |
| 170 | AC_CHECK_TYPES([struct iovec],,,[#include <sys/uio.h>]) |
Viresh Kumar | 3e1fc06 | 2020-05-22 12:46:04 +0530 | [diff] [blame] | 171 | AC_CHECK_TYPES([struct ipc64_perm],,,[#include <sys/ipcbuf.h>]) |
Yang Xu | 1898754 | 2020-06-11 18:35:13 +0800 | [diff] [blame] | 172 | AC_CHECK_TYPES([struct loop_config],,,[#include <linux/loop.h>]) |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 173 | |
Alessio Balsini | 7b96910 | 2021-05-05 23:42:51 +0100 | [diff] [blame] | 174 | AC_CHECK_TYPES([struct __kernel_itimerspec],,,[#include <linux/time_types.h>]) |
| 175 | AC_CHECK_TYPES([struct __kernel_old_timespec],,,[#include <linux/time_types.h>]) |
| 176 | AC_CHECK_TYPES([struct __kernel_old_timeval],,,[#include <linux/time_types.h>]) |
| 177 | AC_CHECK_TYPES([struct __kernel_timespec],,,[#include <linux/time_types.h>]) |
| 178 | |
| 179 | AC_CHECK_TYPES([struct __kernel_timex],,,[#include <sys/timex.h>]) |
| 180 | AC_CHECK_TYPES([struct __kernel_timex_timeval],,,[#include <sys/timex.h>]) |
| 181 | |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 182 | AC_CHECK_TYPES([struct mmsghdr],,,[ |
| 183 | #define _GNU_SOURCE |
| 184 | #include <sys/types.h> |
| 185 | #include <sys/socket.h> |
| 186 | ]) |
| 187 | |
Petr Vorel | a26fedd | 2020-08-28 12:46:42 +0200 | [diff] [blame] | 188 | AC_CHECK_TYPES([struct msqid64_ds],,,[#include <sys/msgbuf.h>]) |
| 189 | |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 190 | AC_CHECK_TYPES([struct rlimit64],,,[ |
| 191 | #define _LARGEFILE64_SOURCE |
| 192 | #include <sys/resource.h> |
| 193 | ]) |
| 194 | |
Alessio Balsini | 7676993 | 2021-05-06 12:34:11 +0100 | [diff] [blame] | 195 | AC_CHECK_TYPES([struct semun],,,[#include <sys/sem.h>]) |
Petr Vorel | a26fedd | 2020-08-28 12:46:42 +0200 | [diff] [blame] | 196 | AC_CHECK_TYPES([struct semid64_ds],,,[#include <sys/sem.h>]) |
| 197 | AC_CHECK_TYPES([struct shmid64_ds],,,[#include <sys/shmbuf.h>]) |
| 198 | |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 199 | AC_CHECK_TYPES([struct statx, struct statx_timestamp],,,[ |
| 200 | #define _GNU_SOURCE |
| 201 | #include <sys/stat.h> |
| 202 | ]) |
| 203 | |
| 204 | AC_CHECK_TYPES([struct termio],,,[#include <sys/ioctl.h>]) |
Petr Vorel | a26fedd | 2020-08-28 12:46:42 +0200 | [diff] [blame] | 205 | AC_CHECK_TYPES([struct tpacket_req3],,,[# include <linux/if_packet.h>]) |
| 206 | AC_CHECK_TYPES([struct user_desc, struct modify_ldt_ldt_s],[],[],[#include <asm/ldt.h>]) |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 207 | |
| 208 | AC_CHECK_TYPES([struct xt_entry_match, struct xt_entry_target],,,[ |
| 209 | #include <sys/types.h> |
| 210 | #include <netinet/in.h> |
| 211 | #include <net/if.h> |
| 212 | #include <limits.h> |
| 213 | #include <linux/netfilter_ipv4/ip_tables.h> |
| 214 | ]) |
Petr Vorel | 25b3565 | 2017-10-02 15:33:41 +0200 | [diff] [blame] | 215 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 216 | # Tools knobs |
| 217 | |
Petr Vorel | 31085e0 | 2020-10-05 15:30:53 +0200 | [diff] [blame] | 218 | # Bash |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 219 | AC_ARG_WITH([bash], |
| 220 | [AC_HELP_STRING([--with-bash], |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 221 | [have the Bourne Again Shell interpreter])], |
| 222 | [with_bash=$withval], |
| 223 | [with_bash=no] |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 224 | ) |
| 225 | if test "x$with_bash" = xyes; then |
| 226 | AC_SUBST([WITH_BASH],["yes"]) |
| 227 | else |
| 228 | AC_SUBST([WITH_BASH],["no"]) |
| 229 | fi |
| 230 | |
Petr Vorel | 31085e0 | 2020-10-05 15:30:53 +0200 | [diff] [blame] | 231 | # metadata |
| 232 | AC_ARG_ENABLE([metadata], |
| 233 | [AC_HELP_STRING([--disable-metadata], |
| 234 | [Disable metadata generation (both HTML and PDF, default no)])], |
| 235 | [], [enable_metadata=yes] |
| 236 | ) |
| 237 | AC_ARG_ENABLE([metadata_html], |
| 238 | [AC_HELP_STRING([--disable-metadata-html], |
| 239 | [Disable metadata HTML generation (default no)])], |
| 240 | [], [enable_metadata_html=yes] |
| 241 | ) |
| 242 | |
| 243 | AC_ARG_ENABLE([metadata_pdf], |
| 244 | [AC_HELP_STRING([--enable-metadata-pdf], |
| 245 | [Enable metadata PDF generation (default no)])], |
| 246 | [], [enable_metadata_pdf=no] |
| 247 | ) |
| 248 | |
| 249 | AC_ARG_WITH([metadata_generator], |
| 250 | [AC_HELP_STRING([--with-metadata-generator=asciidoc|asciidoctor], |
| 251 | [Specify metadata generator to use (default autodetect)])], |
| 252 | [with_metadata_generator=$withval], |
| 253 | [with_metadata_generator=detect] |
| 254 | ) |
| 255 | |
| 256 | LTP_DOCPARSE |
| 257 | |
| 258 | # Expect |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 259 | AC_ARG_WITH([expect], |
| 260 | [AC_HELP_STRING([--with-expect], |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 261 | [have the Tcl/expect library])], |
| 262 | [with_expect=$withval], |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 263 | [with_expect=no] |
| 264 | ) |
| 265 | if test "x$with_expect" = xyes; then |
| 266 | AC_SUBST([WITH_EXPECT],["yes"]) |
| 267 | else |
| 268 | AC_SUBST([WITH_EXPECT],["no"]) |
| 269 | fi |
| 270 | |
Anders Roxell | 39a85a1 | 2018-02-05 11:56:04 +0100 | [diff] [blame] | 271 | # Numa |
| 272 | AC_ARG_WITH([numa], |
| 273 | AC_HELP_STRING([--without-numa], |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 274 | [without numa support]), |
| 275 | [with_numa=$withval], |
Anders Roxell | 39a85a1 | 2018-02-05 11:56:04 +0100 | [diff] [blame] | 276 | [with_numa=yes] |
| 277 | ) |
| 278 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 279 | # Perl |
| 280 | AC_ARG_WITH([perl], |
| 281 | [AC_HELP_STRING([--with-perl], |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 282 | [have a perl interpreter])], |
| 283 | [with_perl=$withval], |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 284 | [with_perl=no] |
| 285 | ) |
| 286 | if test "x$with_perl" = xyes; then |
| 287 | AC_SUBST([WITH_PERL],["yes"]) |
| 288 | else |
| 289 | AC_SUBST([WITH_PERL],["no"]) |
| 290 | fi |
| 291 | |
| 292 | # Python |
| 293 | AC_ARG_WITH([python], |
| 294 | [AC_HELP_STRING([--with-python], |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 295 | [have a python interpreter])], |
| 296 | [with_python=$withval], |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 297 | [with_python=no] |
| 298 | ) |
| 299 | if test "x$with_python" = xyes; then |
| 300 | AC_SUBST([WITH_PYTHON],["yes"]) |
| 301 | else |
| 302 | AC_SUBST([WITH_PYTHON],["no"]) |
| 303 | fi |
Anders Roxell | 7b25815 | 2018-02-14 13:04:31 +0100 | [diff] [blame] | 304 | |
| 305 | # TI RPC |
| 306 | AC_ARG_WITH([tirpc], |
| 307 | AC_HELP_STRING([--without-tirpc], |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 308 | [without libtirpc support]), |
| 309 | [with_tirpc=$withval], |
Anders Roxell | 7b25815 | 2018-02-14 13:04:31 +0100 | [diff] [blame] | 310 | [with_tirpc=yes] |
| 311 | ) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 312 | # END tools knobs |
| 313 | |
| 314 | # Testsuites knobs |
| 315 | |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 316 | AC_ARG_WITH([open-posix-testsuite], |
| 317 | [AC_HELP_STRING([--with-open-posix-testsuite], |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 318 | [compile and install the open posix testsuite])], |
| 319 | [with_open_posix_testsuite=$withval], |
| 320 | [with_open_posix_testsuite=no] |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 321 | ) |
| 322 | if test "x$with_open_posix_testsuite" = xyes; then |
| 323 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) |
| 324 | else |
| 325 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) |
| 326 | fi |
| 327 | |
Joerg Vehlow | 9e7f568 | 2019-11-13 11:41:49 +0100 | [diff] [blame] | 328 | # TODO: testcases/realtime requires bash and python. |
| 329 | AC_ARG_WITH([realtime-testsuite], |
| 330 | [AC_HELP_STRING([--with-realtime-testsuite], |
| 331 | [compile and install the realtime testsuite])], |
| 332 | [with_realtime_testsuite=$withval], |
| 333 | [with_realtime_testsuite=no] |
| 334 | ) |
| 335 | |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 336 | if test "x$with_realtime_testsuite" = xyes; then |
| 337 | AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 338 | # Run configure on testcases/realtime as well. |
| 339 | AC_CONFIG_SUBDIRS([testcases/realtime]) |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 340 | else |
| 341 | AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) |
| 342 | fi |
| 343 | |
Li Wang | 8d47fa7 | 2017-10-26 16:51:15 +0800 | [diff] [blame] | 344 | 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] | 345 | |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 346 | # custom functions |
Petr Vorel | 452c513 | 2020-01-29 19:26:27 +0100 | [diff] [blame] | 347 | # NOTE: don't create custom functions for simple checks, put them into this file |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 348 | LTP_CHECK_ACL_SUPPORT |
| 349 | LTP_CHECK_ATOMIC_MEMORY_MODEL |
| 350 | LTP_CHECK_BUILTIN_CLEAR_CACHE |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 351 | LTP_CHECK_CAPABILITY_SUPPORT |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 352 | LTP_CHECK_CC_WARN_OLDSTYLE |
| 353 | LTP_CHECK_CLONE_SUPPORTS_7_ARGS |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 354 | LTP_CHECK_CRYPTO |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 355 | LTP_CHECK_FORTIFY_SOURCE |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 356 | LTP_CHECK_KERNEL_DEVEL |
| 357 | LTP_CHECK_KEYUTILS_SUPPORT |
Petr Vorel | 553ca8e | 2019-11-01 14:48:16 +0100 | [diff] [blame] | 358 | LTP_CHECK_LIBMNL |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 359 | LTP_CHECK_LINUX_PTRACE |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 360 | LTP_CHECK_LINUXRANDOM |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 361 | LTP_CHECK_MREMAP_FIXED |
Mike Frysinger | 9bd940b | 2010-08-17 17:22:03 -0400 | [diff] [blame] | 362 | LTP_CHECK_NOMMU_LINUX |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 363 | LTP_CHECK_SELINUX |
Jan Stancek | f61391e | 2016-04-13 13:09:23 +0200 | [diff] [blame] | 364 | LTP_CHECK_SYNC_ADD_AND_FETCH |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 365 | LTP_CHECK_SYSCALL_EVENTFD |
| 366 | LTP_CHECK_SYSCALL_FCNTL |
Xing Gu | a3bfea2 | 2014-06-17 15:26:30 +0800 | [diff] [blame] | 367 | |
Petr Vorel | f417672 | 2018-02-07 11:29:42 +0100 | [diff] [blame] | 368 | if test "x$with_numa" = xyes; then |
| 369 | LTP_CHECK_SYSCALL_NUMA |
Petr Vorel | 2faab87 | 2021-01-21 10:38:19 +0100 | [diff] [blame] | 370 | numa_error_msg="test requires libnuma development packages with LIBNUMA_API_VERSION >= 2" |
Petr Vorel | f417672 | 2018-02-07 11:29:42 +0100 | [diff] [blame] | 371 | else |
| 372 | numa_error_msg="NUMA support was disabled during build" |
| 373 | fi |
| 374 | AC_DEFINE_UNQUOTED(NUMA_ERROR_MSG, ["$numa_error_msg"], [Error message when no NUMA support]) |
| 375 | |
Christian Amann | e3c82be | 2019-06-14 09:28:27 +0200 | [diff] [blame] | 376 | |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 377 | LTP_CHECK_SYSCALL_PERF_EVENT_OPEN |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 378 | LTP_CHECK_SYSCALL_SIGNALFD |
| 379 | LTP_CHECK_SYSCALL_UTIMENSAT |
| 380 | LTP_CHECK_TASKSTATS |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 381 | test "x$with_tirpc" = xyes && LTP_CHECK_TIRPC |
Petr Vorel | a50338c | 2019-04-12 15:48:53 +0200 | [diff] [blame] | 382 | LTP_DETECT_HOST_CPU |
| 383 | |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 384 | AC_OUTPUT |