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 | |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 16 | AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes) |
| 17 | |
| 18 | AC_CANONICAL_HOST |
| 19 | |
| 20 | AC_PROG_CC |
yaberauneya | f7df140 | 2009-10-17 02:24:20 +0000 | [diff] [blame] | 21 | # <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about |
| 22 | # 2.62. |
| 23 | AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 24 | AC_PROG_AR |
| 25 | AC_PROG_LEX |
| 26 | AC_PROG_RANLIB |
yaberauneya | a4bed68 | 2009-12-05 23:45:55 +0000 | [diff] [blame] | 27 | AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) |
| 28 | AC_PROG_STRIP |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 29 | AC_PROG_YACC |
| 30 | |
| 31 | AC_PREFIX_DEFAULT(/opt/ltp) |
| 32 | |
yaberauneya | 80a06b5 | 2009-12-20 00:39:37 +0000 | [diff] [blame] | 33 | AC_CHECK_HEADERS([ \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 34 | dmapi.h \ |
| 35 | ifaddrs.h \ |
| 36 | libaio.h \ |
| 37 | mm.h \ |
yaberauneya | 9913e82 | 2009-11-26 11:27:34 +0000 | [diff] [blame] | 38 | pthread.h \ |
Dejan Jovicevic | 70a21de | 2016-10-04 11:14:00 +0200 | [diff] [blame] | 39 | sys/xattr.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 40 | linux/genetlink.h \ |
yaberauneya | cb805c4 | 2009-12-22 23:10:41 +0000 | [diff] [blame] | 41 | linux/mempolicy.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 42 | linux/module.h \ |
| 43 | linux/netlink.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 44 | sys/epoll.h \ |
| 45 | sys/inotify.h \ |
Jan Kara | f057c1c | 2013-11-20 23:43:13 +0100 | [diff] [blame] | 46 | sys/fanotify.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 47 | sys/jfsdmapi.h \ |
| 48 | sys/prctl.h \ |
| 49 | ]) |
| 50 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 51 | # Tools knobs |
| 52 | |
| 53 | # Expect |
| 54 | AC_ARG_WITH([bash], |
| 55 | [AC_HELP_STRING([--with-bash], |
| 56 | [have the Bourne Again SHell interpreter (default=no)])], |
| 57 | [with_bash=yes], |
| 58 | ) |
| 59 | if test "x$with_bash" = xyes; then |
| 60 | AC_SUBST([WITH_BASH],["yes"]) |
| 61 | else |
| 62 | AC_SUBST([WITH_BASH],["no"]) |
| 63 | fi |
| 64 | |
| 65 | AC_ARG_WITH([expect], |
| 66 | [AC_HELP_STRING([--with-expect], |
| 67 | [have the Tcl/expect library (default=yes)])], |
| 68 | [with_expect=yes], |
| 69 | [with_expect=no] |
| 70 | ) |
| 71 | if test "x$with_expect" = xyes; then |
| 72 | AC_SUBST([WITH_EXPECT],["yes"]) |
| 73 | else |
| 74 | AC_SUBST([WITH_EXPECT],["no"]) |
| 75 | fi |
| 76 | |
| 77 | # Perl |
| 78 | AC_ARG_WITH([perl], |
| 79 | [AC_HELP_STRING([--with-perl], |
| 80 | [have a perl interpreter (default=yes)])], |
| 81 | [with_perl=yes], |
| 82 | [with_perl=no] |
| 83 | ) |
| 84 | if test "x$with_perl" = xyes; then |
| 85 | AC_SUBST([WITH_PERL],["yes"]) |
| 86 | else |
| 87 | AC_SUBST([WITH_PERL],["no"]) |
| 88 | fi |
| 89 | |
| 90 | # Python |
| 91 | AC_ARG_WITH([python], |
| 92 | [AC_HELP_STRING([--with-python], |
| 93 | [have a python interpreter (default=yes)])], |
| 94 | [with_python=yes], |
| 95 | [with_python=no] |
| 96 | ) |
| 97 | if test "x$with_python" = xyes; then |
| 98 | AC_SUBST([WITH_PYTHON],["yes"]) |
| 99 | else |
| 100 | AC_SUBST([WITH_PYTHON],["no"]) |
| 101 | fi |
| 102 | # END tools knobs |
| 103 | |
| 104 | # Testsuites knobs |
| 105 | |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 106 | AC_ARG_WITH([open-posix-testsuite], |
| 107 | [AC_HELP_STRING([--with-open-posix-testsuite], |
| 108 | [compile and install the open posix testsuite (default=no)])], |
| 109 | [with_open_posix_testsuite=yes] |
| 110 | ) |
| 111 | if test "x$with_open_posix_testsuite" = xyes; then |
| 112 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) |
| 113 | else |
| 114 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) |
| 115 | fi |
| 116 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 117 | # testcases/realtime requires bash and python. |
| 118 | if test "x$with_bash" = xyes && test "x$with_python" = xyes; then |
| 119 | AC_ARG_WITH([realtime-testsuite], |
| 120 | [AC_HELP_STRING([--with-realtime-testsuite], |
| 121 | [compile and install the realtime testsuite (default=no)])], |
| 122 | [with_realtime_testsuite=yes] |
| 123 | ) |
| 124 | fi |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 125 | if test "x$with_realtime_testsuite" = xyes; then |
| 126 | AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 127 | # Run configure on testcases/realtime as well. |
| 128 | AC_CONFIG_SUBDIRS([testcases/realtime]) |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 129 | else |
| 130 | AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) |
| 131 | fi |
| 132 | |
Mats Liljegren | fb6efc4 | 2014-04-15 10:31:15 +0200 | [diff] [blame] | 133 | AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) |
| 134 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 135 | # END testsuites knobs |
Cyril Hrubis | 4b3007a | 2013-09-02 16:13:16 +0200 | [diff] [blame] | 136 | LTP_CHECK_FORTIFY_SOURCE |
Alexey Kodanev | 20eb071 | 2014-04-11 13:26:59 +0400 | [diff] [blame] | 137 | LTP_CHECK_CC_WARN_OLDSTYLE |
Cyril Hrubis | 6aa37bb | 2012-08-09 20:36:47 +0300 | [diff] [blame] | 138 | LTP_CHECK_MKDTEMP |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 139 | LTP_CHECK_CAPABILITY_SUPPORT |
| 140 | LTP_CHECK_CRYPTO |
| 141 | LTP_CHECK_LINUX_PTRACE |
Mike Frysinger | 9bd940b | 2010-08-17 17:22:03 -0400 | [diff] [blame] | 142 | LTP_CHECK_NOMMU_LINUX |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 143 | LTP_CHECK_PRCTL_SUPPORT |
| 144 | LTP_CHECK_SECUREBITS |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 145 | LTP_CHECK_SELINUX |
yaberauneya | e34a3c2 | 2009-11-30 12:26:05 +0000 | [diff] [blame] | 146 | LTP_CHECK_SIGNAL |
subrata_modak | 4fc9f54 | 2009-01-16 09:03:14 +0000 | [diff] [blame] | 147 | LTP_CHECK_SYSCALL_EVENTFD |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 148 | LTP_CHECK_SYSCALL_MODIFY_LDT |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 149 | LTP_CHECK_SYSCALL_NUMA |
| 150 | LTP_CHECK_SYSCALL_QUOTACTL |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 151 | LTP_CHECK_SYSCALL_SIGNALFD |
subrata_modak | 5e0db1d | 2009-08-25 07:37:45 +0000 | [diff] [blame] | 152 | LTP_CHECK_SYSCALL_UNSHARE |
Stanislav Kholmanskikh | 2d58502 | 2013-12-04 16:16:26 +0400 | [diff] [blame] | 153 | LTP_CHECK_SYSCALL_UTIMENSAT |
subrata_modak | 1c31098 | 2009-05-25 15:01:45 +0000 | [diff] [blame] | 154 | LTP_CHECK_TASKSTATS |
Garrett Cooper | 06c96f3 | 2010-02-24 19:16:01 -0800 | [diff] [blame] | 155 | LTP_CHECK_TIME |
Cyril Hrubis | 877cbae | 2011-02-07 20:00:31 +0100 | [diff] [blame] | 156 | LTP_CHECK_MADVISE |
Cyril Hrubis | dcd7909 | 2011-03-31 18:01:23 +0200 | [diff] [blame] | 157 | LTP_CHECK_ACL_SUPPORT |
Cyril Hrubis | c57112e | 2012-02-10 14:06:43 +0100 | [diff] [blame] | 158 | LTP_CHECK_FS_IOC_FLAGS |
Cyril Hrubis | bd8ae72 | 2012-02-10 15:01:19 +0100 | [diff] [blame] | 159 | LTP_CHECK_MREMAP_FIXED |
Alexey Kodanev | e0ad93b | 2013-06-19 15:56:43 +0400 | [diff] [blame] | 160 | LTP_CHECK_KERNEL_DEVEL |
DAN LI | 3977318 | 2013-08-27 14:26:16 +0800 | [diff] [blame] | 161 | LTP_CHECK_XFS_QUOTACTL |
Zeng Linggang | 1db6266 | 2014-01-09 20:10:11 +0800 | [diff] [blame] | 162 | LTP_CHECK_CLONE_SUPPORTS_7_ARGS |
Cyril Hrubis | c5d2542 | 2014-01-09 16:54:09 +0100 | [diff] [blame] | 163 | LTP_CHECK_MKDIRAT |
Zeng Linggang | f911361 | 2014-02-26 17:35:13 +0800 | [diff] [blame] | 164 | LTP_CHECK_FCHOWNAT |
Alexey Kodanev | a84303b | 2016-03-02 15:32:20 +0300 | [diff] [blame] | 165 | LTP_CHECK_FSTATAT |
Xiaoguang Wang | 7525e62 | 2014-03-04 14:32:00 +0800 | [diff] [blame] | 166 | LTP_CHECK_MKNODAT |
Cyril Hrubis | 0ea7aa0 | 2014-05-07 12:42:38 +0200 | [diff] [blame] | 167 | LTP_CHECK_READLINKAT |
gux.fnst@cn.fujitsu.com | 0d1cfbe | 2014-05-08 17:50:52 +0800 | [diff] [blame] | 168 | LTP_CHECK_OPENAT |
Xing Gu | a3bfea2 | 2014-06-17 15:26:30 +0800 | [diff] [blame] | 169 | LTP_CHECK_RENAMEAT |
Cedric Hnyda | b008b92 | 2015-10-01 11:46:25 +0200 | [diff] [blame] | 170 | LTP_CHECK_RENAMEAT2 |
Xiaoguang Wang | 02610ee | 2014-03-05 10:26:50 +0800 | [diff] [blame] | 171 | LTP_CHECK_FALLOCATE |
Xiaoguang Wang | 477ea28 | 2014-03-19 16:14:43 +0800 | [diff] [blame] | 172 | LTP_CHECK_SYSCALL_FCNTL |
Xiaoguang Wang | 7e6be18 | 2014-04-10 12:08:45 +0800 | [diff] [blame] | 173 | LTP_CHECK_SYSCALL_PERF_EVENT_OPEN |
Stanislav Kholmanskikh | a86d71f | 2014-03-25 18:24:29 +0400 | [diff] [blame] | 174 | LTP_CHECK_TIRPC |
Xing Gu | fd060ed | 2014-05-30 15:37:04 +0800 | [diff] [blame] | 175 | LTP_CHECK_TEE |
Xing Gu | cf90050 | 2014-05-30 16:05:25 +0800 | [diff] [blame] | 176 | LTP_CHECK_SPLICE |
Cyril Hrubis | 4200068 | 2014-06-03 12:23:17 +0200 | [diff] [blame] | 177 | LTP_CHECK_VMSPLICE |
Zeng Linggang | 9ac868c | 2014-06-27 10:02:52 +0800 | [diff] [blame] | 178 | LTP_CHECK_TIMERFD |
Zeng Linggang | c0af3d6 | 2014-07-21 17:21:25 +0800 | [diff] [blame] | 179 | LTP_CHECK_CAN_SUPPORT |
Cyril Hrubis | 4c256b3 | 2014-08-13 15:32:17 +0200 | [diff] [blame] | 180 | LTP_CHECK_IOVEC |
Cyril Hrubis | 7c631b2 | 2014-08-19 09:50:06 +0200 | [diff] [blame] | 181 | LTP_CHECK_KEYCTL |
Jan Stancek | 17dce71 | 2015-07-13 13:58:21 +0200 | [diff] [blame] | 182 | LTP_CHECK_LINUXRANDOM |
Cyril Hrubis | 80edf93 | 2015-09-01 15:03:40 +0200 | [diff] [blame] | 183 | LTP_CHECK_IF_LINK |
Cedric Hnyda | 6405984 | 2015-10-08 16:49:07 +0200 | [diff] [blame] | 184 | LTP_CHECK_KCMP |
| 185 | LTP_CHECK_KCMP_TYPE |
Xiao Yang | 1274a3c | 2015-12-03 19:31:12 +0800 | [diff] [blame] | 186 | LTP_CHECK_PREADV |
Xiao Yang | 4ca27ac | 2015-12-03 19:31:13 +0800 | [diff] [blame] | 187 | LTP_CHECK_PWRITEV |
Guangwen Feng | 22c12be | 2016-03-03 16:24:45 +0800 | [diff] [blame] | 188 | LTP_CHECK_EPOLL_PWAIT |
Xiao Yang | 2a9c158 | 2016-04-14 17:22:05 +0800 | [diff] [blame] | 189 | LTP_CHECK_KEYUTILS_SUPPORT |
Jan Stancek | f61391e | 2016-04-13 13:09:23 +0200 | [diff] [blame] | 190 | LTP_CHECK_SYNC_ADD_AND_FETCH |
Peter Maydell | 189aea2 | 2016-07-26 17:31:05 +0100 | [diff] [blame] | 191 | LTP_CHECK_BUILTIN_CLEAR_CACHE |
Xing Gu | a3bfea2 | 2014-06-17 15:26:30 +0800 | [diff] [blame] | 192 | |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 193 | AC_OUTPUT |