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 \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 40 | linux/genetlink.h \ |
Petr Vorel | d47c06e | 2017-10-12 20:33:20 +0200 | [diff] [blame] | 41 | linux/keyctl.h \ |
Richard Palethorpe | db14170 | 2017-11-02 15:34:41 +0100 | [diff] [blame] | 42 | linux/if_packet.h \ |
| 43 | linux/if_ether.h \ |
yaberauneya | cb805c4 | 2009-12-22 23:10:41 +0000 | [diff] [blame] | 44 | linux/mempolicy.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 45 | linux/module.h \ |
| 46 | linux/netlink.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 47 | mm.h \ |
Xiao Yang | bf8f1d7 | 2018-04-04 19:12:54 +0800 | [diff] [blame] | 48 | netinet/sctp.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 49 | pthread.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 50 | sys/epoll.h \ |
Jan Kara | f057c1c | 2013-11-20 23:43:13 +0100 | [diff] [blame] | 51 | sys/fanotify.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 52 | sys/inotify.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 53 | sys/prctl.h \ |
Sandeep Patil | 524edfb | 2017-11-08 16:34:36 -0800 | [diff] [blame] | 54 | sys/shm.h \ |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 55 | sys/ustat.h \ |
Petr Vorel | 839128b | 2017-10-12 20:33:18 +0200 | [diff] [blame] | 56 | sys/xattr.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 57 | ]) |
| 58 | |
Petr Vorel | 0ff33b3 | 2017-10-11 15:53:33 +0200 | [diff] [blame] | 59 | AC_CHECK_FUNCS([ \ |
| 60 | profil \ |
| 61 | ustat \ |
| 62 | ]) |
Petr Vorel | 25b3565 | 2017-10-02 15:33:41 +0200 | [diff] [blame] | 63 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 64 | # Tools knobs |
| 65 | |
| 66 | # Expect |
| 67 | AC_ARG_WITH([bash], |
| 68 | [AC_HELP_STRING([--with-bash], |
| 69 | [have the Bourne Again SHell interpreter (default=no)])], |
| 70 | [with_bash=yes], |
| 71 | ) |
| 72 | if test "x$with_bash" = xyes; then |
| 73 | AC_SUBST([WITH_BASH],["yes"]) |
| 74 | else |
| 75 | AC_SUBST([WITH_BASH],["no"]) |
| 76 | fi |
| 77 | |
| 78 | AC_ARG_WITH([expect], |
| 79 | [AC_HELP_STRING([--with-expect], |
| 80 | [have the Tcl/expect library (default=yes)])], |
| 81 | [with_expect=yes], |
| 82 | [with_expect=no] |
| 83 | ) |
| 84 | if test "x$with_expect" = xyes; then |
| 85 | AC_SUBST([WITH_EXPECT],["yes"]) |
| 86 | else |
| 87 | AC_SUBST([WITH_EXPECT],["no"]) |
| 88 | fi |
| 89 | |
Anders Roxell | 39a85a1 | 2018-02-05 11:56:04 +0100 | [diff] [blame] | 90 | # Numa |
| 91 | AC_ARG_WITH([numa], |
| 92 | AC_HELP_STRING([--without-numa], |
Petr Vorel | 4ace68a | 2018-02-07 11:09:49 +0100 | [diff] [blame] | 93 | [without numa support (default=no)]), |
Anders Roxell | 39a85a1 | 2018-02-05 11:56:04 +0100 | [diff] [blame] | 94 | [with_numa=no], |
| 95 | [with_numa=yes] |
| 96 | ) |
| 97 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 98 | # Perl |
| 99 | AC_ARG_WITH([perl], |
| 100 | [AC_HELP_STRING([--with-perl], |
| 101 | [have a perl interpreter (default=yes)])], |
| 102 | [with_perl=yes], |
| 103 | [with_perl=no] |
| 104 | ) |
| 105 | if test "x$with_perl" = xyes; then |
| 106 | AC_SUBST([WITH_PERL],["yes"]) |
| 107 | else |
| 108 | AC_SUBST([WITH_PERL],["no"]) |
| 109 | fi |
| 110 | |
| 111 | # Python |
| 112 | AC_ARG_WITH([python], |
| 113 | [AC_HELP_STRING([--with-python], |
| 114 | [have a python interpreter (default=yes)])], |
| 115 | [with_python=yes], |
| 116 | [with_python=no] |
| 117 | ) |
| 118 | if test "x$with_python" = xyes; then |
| 119 | AC_SUBST([WITH_PYTHON],["yes"]) |
| 120 | else |
| 121 | AC_SUBST([WITH_PYTHON],["no"]) |
| 122 | fi |
Anders Roxell | 7b25815 | 2018-02-14 13:04:31 +0100 | [diff] [blame] | 123 | |
| 124 | # TI RPC |
| 125 | AC_ARG_WITH([tirpc], |
| 126 | AC_HELP_STRING([--without-tirpc], |
| 127 | [without libtirpc support (default=no)]), |
| 128 | [with_tirpc=no], |
| 129 | [with_tirpc=yes] |
| 130 | ) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 131 | # END tools knobs |
| 132 | |
| 133 | # Testsuites knobs |
| 134 | |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 135 | AC_ARG_WITH([open-posix-testsuite], |
| 136 | [AC_HELP_STRING([--with-open-posix-testsuite], |
| 137 | [compile and install the open posix testsuite (default=no)])], |
Mike Frysinger | 12298fe | 2017-03-31 18:12:12 -0400 | [diff] [blame] | 138 | [with_open_posix_testsuite=$withval] |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 139 | ) |
| 140 | if test "x$with_open_posix_testsuite" = xyes; then |
| 141 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) |
| 142 | else |
| 143 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) |
| 144 | fi |
| 145 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 146 | # testcases/realtime requires bash and python. |
| 147 | if test "x$with_bash" = xyes && test "x$with_python" = xyes; then |
| 148 | AC_ARG_WITH([realtime-testsuite], |
| 149 | [AC_HELP_STRING([--with-realtime-testsuite], |
| 150 | [compile and install the realtime testsuite (default=no)])], |
| 151 | [with_realtime_testsuite=yes] |
| 152 | ) |
| 153 | fi |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 154 | if test "x$with_realtime_testsuite" = xyes; then |
| 155 | AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 156 | # Run configure on testcases/realtime as well. |
| 157 | AC_CONFIG_SUBDIRS([testcases/realtime]) |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 158 | else |
| 159 | AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) |
| 160 | fi |
| 161 | |
Mats Liljegren | fb6efc4 | 2014-04-15 10:31:15 +0200 | [diff] [blame] | 162 | AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) |
| 163 | |
Li Wang | 8d47fa7 | 2017-10-26 16:51:15 +0800 | [diff] [blame] | 164 | 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] | 165 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 166 | # END testsuites knobs |
Cyril Hrubis | 4b3007a | 2013-09-02 16:13:16 +0200 | [diff] [blame] | 167 | LTP_CHECK_FORTIFY_SOURCE |
Alexey Kodanev | 20eb071 | 2014-04-11 13:26:59 +0400 | [diff] [blame] | 168 | LTP_CHECK_CC_WARN_OLDSTYLE |
Cyril Hrubis | 6aa37bb | 2012-08-09 20:36:47 +0300 | [diff] [blame] | 169 | LTP_CHECK_MKDTEMP |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 170 | LTP_CHECK_CAPABILITY_SUPPORT |
| 171 | LTP_CHECK_CRYPTO |
| 172 | LTP_CHECK_LINUX_PTRACE |
Mike Frysinger | 9bd940b | 2010-08-17 17:22:03 -0400 | [diff] [blame] | 173 | LTP_CHECK_NOMMU_LINUX |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 174 | LTP_CHECK_PRCTL_SUPPORT |
| 175 | LTP_CHECK_SECUREBITS |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 176 | LTP_CHECK_SELINUX |
yaberauneya | e34a3c2 | 2009-11-30 12:26:05 +0000 | [diff] [blame] | 177 | LTP_CHECK_SIGNAL |
subrata_modak | 4fc9f54 | 2009-01-16 09:03:14 +0000 | [diff] [blame] | 178 | LTP_CHECK_SYSCALL_EVENTFD |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 179 | LTP_CHECK_SYSCALL_MODIFY_LDT |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 180 | LTP_CHECK_SYSCALL_QUOTACTL |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 181 | LTP_CHECK_SYSCALL_SIGNALFD |
subrata_modak | 5e0db1d | 2009-08-25 07:37:45 +0000 | [diff] [blame] | 182 | LTP_CHECK_SYSCALL_UNSHARE |
Stanislav Kholmanskikh | 2d58502 | 2013-12-04 16:16:26 +0400 | [diff] [blame] | 183 | LTP_CHECK_SYSCALL_UTIMENSAT |
subrata_modak | 1c31098 | 2009-05-25 15:01:45 +0000 | [diff] [blame] | 184 | LTP_CHECK_TASKSTATS |
Garrett Cooper | 06c96f3 | 2010-02-24 19:16:01 -0800 | [diff] [blame] | 185 | LTP_CHECK_TIME |
Cyril Hrubis | 877cbae | 2011-02-07 20:00:31 +0100 | [diff] [blame] | 186 | LTP_CHECK_MADVISE |
Cyril Hrubis | dcd7909 | 2011-03-31 18:01:23 +0200 | [diff] [blame] | 187 | LTP_CHECK_ACL_SUPPORT |
Cyril Hrubis | c57112e | 2012-02-10 14:06:43 +0100 | [diff] [blame] | 188 | LTP_CHECK_FS_IOC_FLAGS |
Cyril Hrubis | bd8ae72 | 2012-02-10 15:01:19 +0100 | [diff] [blame] | 189 | LTP_CHECK_MREMAP_FIXED |
Alexey Kodanev | e0ad93b | 2013-06-19 15:56:43 +0400 | [diff] [blame] | 190 | LTP_CHECK_KERNEL_DEVEL |
DAN LI | 3977318 | 2013-08-27 14:26:16 +0800 | [diff] [blame] | 191 | LTP_CHECK_XFS_QUOTACTL |
Zeng Linggang | 1db6266 | 2014-01-09 20:10:11 +0800 | [diff] [blame] | 192 | LTP_CHECK_CLONE_SUPPORTS_7_ARGS |
Cyril Hrubis | c5d2542 | 2014-01-09 16:54:09 +0100 | [diff] [blame] | 193 | LTP_CHECK_MKDIRAT |
Zeng Linggang | f911361 | 2014-02-26 17:35:13 +0800 | [diff] [blame] | 194 | LTP_CHECK_FCHOWNAT |
Alexey Kodanev | a84303b | 2016-03-02 15:32:20 +0300 | [diff] [blame] | 195 | LTP_CHECK_FSTATAT |
Xiaoguang Wang | 7525e62 | 2014-03-04 14:32:00 +0800 | [diff] [blame] | 196 | LTP_CHECK_MKNODAT |
Cyril Hrubis | 0ea7aa0 | 2014-05-07 12:42:38 +0200 | [diff] [blame] | 197 | LTP_CHECK_READLINKAT |
gux.fnst@cn.fujitsu.com | 0d1cfbe | 2014-05-08 17:50:52 +0800 | [diff] [blame] | 198 | LTP_CHECK_OPENAT |
Xing Gu | a3bfea2 | 2014-06-17 15:26:30 +0800 | [diff] [blame] | 199 | LTP_CHECK_RENAMEAT |
Cedric Hnyda | b008b92 | 2015-10-01 11:46:25 +0200 | [diff] [blame] | 200 | LTP_CHECK_RENAMEAT2 |
Xiaoguang Wang | 02610ee | 2014-03-05 10:26:50 +0800 | [diff] [blame] | 201 | LTP_CHECK_FALLOCATE |
Xiaoguang Wang | 477ea28 | 2014-03-19 16:14:43 +0800 | [diff] [blame] | 202 | LTP_CHECK_SYSCALL_FCNTL |
Xiaoguang Wang | 7e6be18 | 2014-04-10 12:08:45 +0800 | [diff] [blame] | 203 | LTP_CHECK_SYSCALL_PERF_EVENT_OPEN |
Anders Roxell | 7b25815 | 2018-02-14 13:04:31 +0100 | [diff] [blame] | 204 | if test "x$with_tirpc" = xyes; then |
Stanislav Kholmanskikh | a86d71f | 2014-03-25 18:24:29 +0400 | [diff] [blame] | 205 | LTP_CHECK_TIRPC |
Anders Roxell | 7b25815 | 2018-02-14 13:04:31 +0100 | [diff] [blame] | 206 | fi |
Xing Gu | fd060ed | 2014-05-30 15:37:04 +0800 | [diff] [blame] | 207 | LTP_CHECK_TEE |
Xing Gu | cf90050 | 2014-05-30 16:05:25 +0800 | [diff] [blame] | 208 | LTP_CHECK_SPLICE |
Cyril Hrubis | 4200068 | 2014-06-03 12:23:17 +0200 | [diff] [blame] | 209 | LTP_CHECK_VMSPLICE |
Zeng Linggang | 9ac868c | 2014-06-27 10:02:52 +0800 | [diff] [blame] | 210 | LTP_CHECK_TIMERFD |
Cyril Hrubis | 4c256b3 | 2014-08-13 15:32:17 +0200 | [diff] [blame] | 211 | LTP_CHECK_IOVEC |
Jan Stancek | 17dce71 | 2015-07-13 13:58:21 +0200 | [diff] [blame] | 212 | LTP_CHECK_LINUXRANDOM |
Cyril Hrubis | 80edf93 | 2015-09-01 15:03:40 +0200 | [diff] [blame] | 213 | LTP_CHECK_IF_LINK |
Cedric Hnyda | 6405984 | 2015-10-08 16:49:07 +0200 | [diff] [blame] | 214 | LTP_CHECK_KCMP |
| 215 | LTP_CHECK_KCMP_TYPE |
Xiao Yang | 1274a3c | 2015-12-03 19:31:12 +0800 | [diff] [blame] | 216 | LTP_CHECK_PREADV |
Xiao Yang | 4ca27ac | 2015-12-03 19:31:13 +0800 | [diff] [blame] | 217 | LTP_CHECK_PWRITEV |
Guangwen Feng | 22c12be | 2016-03-03 16:24:45 +0800 | [diff] [blame] | 218 | LTP_CHECK_EPOLL_PWAIT |
Xiao Yang | 2a9c158 | 2016-04-14 17:22:05 +0800 | [diff] [blame] | 219 | LTP_CHECK_KEYUTILS_SUPPORT |
Jan Stancek | f61391e | 2016-04-13 13:09:23 +0200 | [diff] [blame] | 220 | LTP_CHECK_SYNC_ADD_AND_FETCH |
Peter Maydell | 189aea2 | 2016-07-26 17:31:05 +0100 | [diff] [blame] | 221 | LTP_CHECK_BUILTIN_CLEAR_CACHE |
Richard Palethorpe | 1be8bbd | 2017-06-23 14:22:04 +0200 | [diff] [blame] | 222 | LTP_CHECK_MMSGHDR |
Richard Palethorpe | b058919 | 2017-06-23 14:22:06 +0200 | [diff] [blame] | 223 | LTP_CHECK_UNAME_DOMAINNAME |
Richard Palethorpe | 4ae583e | 2017-08-02 16:24:22 +0200 | [diff] [blame] | 224 | LTP_CHECK_X_TABLES |
Richard Palethorpe | be880d1 | 2017-09-29 12:23:09 +0200 | [diff] [blame] | 225 | LTP_CHECK_ATOMIC_MEMORY_MODEL |
Richard Palethorpe | db14170 | 2017-11-02 15:34:41 +0100 | [diff] [blame] | 226 | LTP_CHECK_TPACKET_V3 |
Petr Vorel | 00ff2c3 | 2018-01-06 02:32:28 +0100 | [diff] [blame] | 227 | LTP_DETECT_HOST_CPU |
Xing Gu | a3bfea2 | 2014-06-17 15:26:30 +0800 | [diff] [blame] | 228 | |
Petr Vorel | f417672 | 2018-02-07 11:29:42 +0100 | [diff] [blame] | 229 | if test "x$with_numa" = xyes; then |
| 230 | LTP_CHECK_SYSCALL_NUMA |
| 231 | numa_error_msg="test requires libnuma >= 2 and it's development packages" |
| 232 | else |
| 233 | numa_error_msg="NUMA support was disabled during build" |
| 234 | fi |
| 235 | AC_DEFINE_UNQUOTED(NUMA_ERROR_MSG, ["$numa_error_msg"], [Error message when no NUMA support]) |
| 236 | |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 237 | AC_OUTPUT |