blob: 13d3b68bc9b0265bde7322a91a98385e6bbb3754 [file] [log] [blame]
yaberauneya9913e822009-11-26 11:27:34 +00001AC_PREREQ(2.61)
Cyril Hrubis70d7e8c2015-09-15 12:50:31 +02002AC_INIT([ltp], [LTP_VERSION], [ltp@lists.linux.it])
yaberauneyaef772532009-10-09 17:55:43 +00003AC_CONFIG_AUX_DIR([.])
4AM_INIT_AUTOMAKE
subrata_modak3d8666c2008-11-11 08:31:27 +00005AC_CONFIG_HEADERS([include/config.h])
Cyril Hrubisedbae292014-07-15 14:57:27 +02006AC_CONFIG_MACRO_DIR([m4])
yaberauneyaef772532009-10-09 17:55:43 +00007AC_CONFIG_FILES([ \
8 include/mk/config.mk \
Cyril Hrubis63b65322016-04-20 18:23:53 +02009 include/mk/config-openposix.mk \
Garrett Cooper4f71cae2010-11-01 21:09:17 -070010 include/mk/features.mk \
yaberauneyaef772532009-10-09 17:55:43 +000011 lib/ltp.pc \
yaberauneyaef772532009-10-09 17:55:43 +000012 m4/Makefile \
yaberauneya0d39b832009-11-20 05:45:41 +000013 execltp \
vapierdf8759f2009-01-18 22:22:40 +000014])
subrata_modak3d8666c2008-11-11 08:31:27 +000015
Petr Vorel427b1be2018-02-14 23:27:54 +010016AM_MAINTAINER_MODE([enable])
17
yaberauneyaef772532009-10-09 17:55:43 +000018AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes)
19
20AC_CANONICAL_HOST
21
22AC_PROG_CC
yaberauneyaf7df1402009-10-17 02:24:20 +000023# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
24# 2.62.
25AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
yaberauneyaef772532009-10-09 17:55:43 +000026AC_PROG_AR
27AC_PROG_LEX
28AC_PROG_RANLIB
yaberauneyaa4bed682009-12-05 23:45:55 +000029AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
30AC_PROG_STRIP
yaberauneyaef772532009-10-09 17:55:43 +000031AC_PROG_YACC
32
33AC_PREFIX_DEFAULT(/opt/ltp)
34
yaberauneya80a06b52009-12-20 00:39:37 +000035AC_CHECK_HEADERS([ \
yaberauneyaef772532009-10-09 17:55:43 +000036 ifaddrs.h \
Petr Vorelbc2568d2017-10-16 17:41:54 +020037 keyutils.h \
Petr Vorel66923c62017-10-12 20:33:19 +020038 linux/can.h \
Alexey Kodanev640f1062018-03-23 18:06:04 +030039 linux/dccp.h \
Richard Palethorpea0ce4432018-07-05 16:56:33 +020040 linux/cryptouser.h \
yaberauneyaef772532009-10-09 17:55:43 +000041 linux/genetlink.h \
Petr Voreld47c06e2017-10-12 20:33:20 +020042 linux/keyctl.h \
Richard Palethorpedb141702017-11-02 15:34:41 +010043 linux/if_packet.h \
44 linux/if_ether.h \
yaberauneyacb805c42009-12-22 23:10:41 +000045 linux/mempolicy.h \
yaberauneyaef772532009-10-09 17:55:43 +000046 linux/module.h \
47 linux/netlink.h \
Petr Vorel839128b2017-10-12 20:33:18 +020048 mm.h \
Xiao Yangbf8f1d72018-04-04 19:12:54 +080049 netinet/sctp.h \
Petr Vorel839128b2017-10-12 20:33:18 +020050 pthread.h \
yaberauneyaef772532009-10-09 17:55:43 +000051 sys/epoll.h \
Jan Karaf057c1c2013-11-20 23:43:13 +010052 sys/fanotify.h \
Petr Vorel839128b2017-10-12 20:33:18 +020053 sys/inotify.h \
yaberauneyaef772532009-10-09 17:55:43 +000054 sys/prctl.h \
Sandeep Patil524edfb2017-11-08 16:34:36 -080055 sys/shm.h \
Petr Vorel0ff33b32017-10-11 15:53:33 +020056 sys/ustat.h \
Petr Vorel839128b2017-10-12 20:33:18 +020057 sys/xattr.h \
yaberauneyaef772532009-10-09 17:55:43 +000058])
59
Petr Vorel0ff33b32017-10-11 15:53:33 +020060AC_CHECK_FUNCS([ \
61 profil \
62 ustat \
63])
Petr Vorel25b35652017-10-02 15:33:41 +020064
Garrett Cooper52288dc2010-11-16 22:01:43 -080065# Tools knobs
66
67# Expect
68AC_ARG_WITH([bash],
69 [AC_HELP_STRING([--with-bash],
70 [have the Bourne Again SHell interpreter (default=no)])],
71 [with_bash=yes],
72)
73if test "x$with_bash" = xyes; then
74 AC_SUBST([WITH_BASH],["yes"])
75else
76 AC_SUBST([WITH_BASH],["no"])
77fi
78
79AC_ARG_WITH([expect],
80 [AC_HELP_STRING([--with-expect],
81 [have the Tcl/expect library (default=yes)])],
82 [with_expect=yes],
83 [with_expect=no]
84)
85if test "x$with_expect" = xyes; then
86 AC_SUBST([WITH_EXPECT],["yes"])
87else
88 AC_SUBST([WITH_EXPECT],["no"])
89fi
90
Anders Roxell39a85a12018-02-05 11:56:04 +010091# Numa
92AC_ARG_WITH([numa],
93 AC_HELP_STRING([--without-numa],
Petr Vorel4ace68a2018-02-07 11:09:49 +010094 [without numa support (default=no)]),
Anders Roxell39a85a12018-02-05 11:56:04 +010095 [with_numa=no],
96 [with_numa=yes]
97)
98
Garrett Cooper52288dc2010-11-16 22:01:43 -080099# Perl
100AC_ARG_WITH([perl],
101 [AC_HELP_STRING([--with-perl],
102 [have a perl interpreter (default=yes)])],
103 [with_perl=yes],
104 [with_perl=no]
105)
106if test "x$with_perl" = xyes; then
107 AC_SUBST([WITH_PERL],["yes"])
108else
109 AC_SUBST([WITH_PERL],["no"])
110fi
111
112# Python
113AC_ARG_WITH([python],
114 [AC_HELP_STRING([--with-python],
115 [have a python interpreter (default=yes)])],
116 [with_python=yes],
117 [with_python=no]
118)
119if test "x$with_python" = xyes; then
120 AC_SUBST([WITH_PYTHON],["yes"])
121else
122 AC_SUBST([WITH_PYTHON],["no"])
123fi
Anders Roxell7b258152018-02-14 13:04:31 +0100124
125# TI RPC
126AC_ARG_WITH([tirpc],
127 AC_HELP_STRING([--without-tirpc],
128 [without libtirpc support (default=no)]),
129 [with_tirpc=no],
130 [with_tirpc=yes]
131)
Garrett Cooper52288dc2010-11-16 22:01:43 -0800132# END tools knobs
133
134# Testsuites knobs
135
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800136AC_ARG_WITH([open-posix-testsuite],
137 [AC_HELP_STRING([--with-open-posix-testsuite],
138 [compile and install the open posix testsuite (default=no)])],
Mike Frysinger12298fe2017-03-31 18:12:12 -0400139 [with_open_posix_testsuite=$withval]
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800140)
141if test "x$with_open_posix_testsuite" = xyes; then
142 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
143else
144 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
145fi
146
Garrett Cooper52288dc2010-11-16 22:01:43 -0800147# testcases/realtime requires bash and python.
148if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
149 AC_ARG_WITH([realtime-testsuite],
150 [AC_HELP_STRING([--with-realtime-testsuite],
151 [compile and install the realtime testsuite (default=no)])],
152 [with_realtime_testsuite=yes]
153 )
154fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800155if test "x$with_realtime_testsuite" = xyes; then
156 AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
Garrett Cooper52288dc2010-11-16 22:01:43 -0800157 # Run configure on testcases/realtime as well.
158 AC_CONFIG_SUBDIRS([testcases/realtime])
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800159else
160 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
161fi
162
Mats Liljegrenfb6efc42014-04-15 10:31:15 +0200163AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
164
Li Wang8d47fa72017-10-26 16:51:15 +0800165AC_CONFIG_COMMANDS([syscalls.h], [cd ${ac_top_srcdir}/include/lapi/syscalls; ./regen.sh])
Cyril Hrubisa07008f2017-06-14 17:25:09 +0200166
Garrett Cooper52288dc2010-11-16 22:01:43 -0800167# END testsuites knobs
Cyril Hrubis4b3007a2013-09-02 16:13:16 +0200168LTP_CHECK_FORTIFY_SOURCE
Alexey Kodanev20eb0712014-04-11 13:26:59 +0400169LTP_CHECK_CC_WARN_OLDSTYLE
Cyril Hrubis6aa37bb2012-08-09 20:36:47 +0300170LTP_CHECK_MKDTEMP
yaberauneyaef772532009-10-09 17:55:43 +0000171LTP_CHECK_CAPABILITY_SUPPORT
172LTP_CHECK_CRYPTO
173LTP_CHECK_LINUX_PTRACE
Mike Frysinger9bd940b2010-08-17 17:22:03 -0400174LTP_CHECK_NOMMU_LINUX
Garrett Cooper4f71cae2010-11-01 21:09:17 -0700175LTP_CHECK_PRCTL_SUPPORT
176LTP_CHECK_SECUREBITS
yaberauneyaef772532009-10-09 17:55:43 +0000177LTP_CHECK_SELINUX
yaberauneyae34a3c22009-11-30 12:26:05 +0000178LTP_CHECK_SIGNAL
subrata_modak4fc9f542009-01-16 09:03:14 +0000179LTP_CHECK_SYSCALL_EVENTFD
vapierdf8759f2009-01-18 22:22:40 +0000180LTP_CHECK_SYSCALL_MODIFY_LDT
yaberauneyaef772532009-10-09 17:55:43 +0000181LTP_CHECK_SYSCALL_QUOTACTL
vapierdf8759f2009-01-18 22:22:40 +0000182LTP_CHECK_SYSCALL_SIGNALFD
subrata_modak5e0db1d2009-08-25 07:37:45 +0000183LTP_CHECK_SYSCALL_UNSHARE
Stanislav Kholmanskikh2d585022013-12-04 16:16:26 +0400184LTP_CHECK_SYSCALL_UTIMENSAT
subrata_modak1c310982009-05-25 15:01:45 +0000185LTP_CHECK_TASKSTATS
Garrett Cooper06c96f32010-02-24 19:16:01 -0800186LTP_CHECK_TIME
Cyril Hrubis877cbae2011-02-07 20:00:31 +0100187LTP_CHECK_MADVISE
Cyril Hrubisdcd79092011-03-31 18:01:23 +0200188LTP_CHECK_ACL_SUPPORT
Cyril Hrubisc57112e2012-02-10 14:06:43 +0100189LTP_CHECK_FS_IOC_FLAGS
Cyril Hrubisbd8ae722012-02-10 15:01:19 +0100190LTP_CHECK_MREMAP_FIXED
Alexey Kodaneve0ad93b2013-06-19 15:56:43 +0400191LTP_CHECK_KERNEL_DEVEL
DAN LI39773182013-08-27 14:26:16 +0800192LTP_CHECK_XFS_QUOTACTL
Zeng Linggang1db62662014-01-09 20:10:11 +0800193LTP_CHECK_CLONE_SUPPORTS_7_ARGS
Cyril Hrubisc5d25422014-01-09 16:54:09 +0100194LTP_CHECK_MKDIRAT
Zeng Linggangf9113612014-02-26 17:35:13 +0800195LTP_CHECK_FCHOWNAT
Alexey Kodaneva84303b2016-03-02 15:32:20 +0300196LTP_CHECK_FSTATAT
Xiaoguang Wang7525e622014-03-04 14:32:00 +0800197LTP_CHECK_MKNODAT
Cyril Hrubis0ea7aa02014-05-07 12:42:38 +0200198LTP_CHECK_READLINKAT
gux.fnst@cn.fujitsu.com0d1cfbe2014-05-08 17:50:52 +0800199LTP_CHECK_OPENAT
Eddie.Horngaeb991b2018-08-01 16:17:54 +0800200LTP_CHECK_EXECVEAT
Xing Gua3bfea22014-06-17 15:26:30 +0800201LTP_CHECK_RENAMEAT
Cedric Hnydab008b922015-10-01 11:46:25 +0200202LTP_CHECK_RENAMEAT2
vaishnavid0d28fea2018-09-03 12:16:31 +0000203LTP_CHECK_STATX
Xiaoguang Wang02610ee2014-03-05 10:26:50 +0800204LTP_CHECK_FALLOCATE
Xiaoguang Wang477ea282014-03-19 16:14:43 +0800205LTP_CHECK_SYSCALL_FCNTL
Xiaoguang Wang7e6be182014-04-10 12:08:45 +0800206LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
Anders Roxell7b258152018-02-14 13:04:31 +0100207if test "x$with_tirpc" = xyes; then
Stanislav Kholmanskikha86d71f2014-03-25 18:24:29 +0400208LTP_CHECK_TIRPC
Anders Roxell7b258152018-02-14 13:04:31 +0100209fi
Xing Gufd060ed2014-05-30 15:37:04 +0800210LTP_CHECK_TEE
Xing Gucf900502014-05-30 16:05:25 +0800211LTP_CHECK_SPLICE
Cyril Hrubis42000682014-06-03 12:23:17 +0200212LTP_CHECK_VMSPLICE
Zeng Linggang9ac868c2014-06-27 10:02:52 +0800213LTP_CHECK_TIMERFD
Cyril Hrubis4c256b32014-08-13 15:32:17 +0200214LTP_CHECK_IOVEC
Jan Stancek17dce712015-07-13 13:58:21 +0200215LTP_CHECK_LINUXRANDOM
Cyril Hrubis80edf932015-09-01 15:03:40 +0200216LTP_CHECK_IF_LINK
Cedric Hnyda64059842015-10-08 16:49:07 +0200217LTP_CHECK_KCMP
218LTP_CHECK_KCMP_TYPE
Xiao Yang1274a3c2015-12-03 19:31:12 +0800219LTP_CHECK_PREADV
Xiao Yang4ca27ac2015-12-03 19:31:13 +0800220LTP_CHECK_PWRITEV
Xiao Yang605d17c2018-09-28 17:10:50 +0800221LTP_CHECK_PREADV2
Jinhui huang6338f942019-03-01 15:16:27 +0800222LTP_CHECK_PWRITEV2
Guangwen Feng22c12be2016-03-03 16:24:45 +0800223LTP_CHECK_EPOLL_PWAIT
Xiao Yang2a9c1582016-04-14 17:22:05 +0800224LTP_CHECK_KEYUTILS_SUPPORT
Jan Stancekf61391e2016-04-13 13:09:23 +0200225LTP_CHECK_SYNC_ADD_AND_FETCH
Peter Maydell189aea22016-07-26 17:31:05 +0100226LTP_CHECK_BUILTIN_CLEAR_CACHE
Richard Palethorpe1be8bbd2017-06-23 14:22:04 +0200227LTP_CHECK_MMSGHDR
Richard Palethorpeb0589192017-06-23 14:22:06 +0200228LTP_CHECK_UNAME_DOMAINNAME
Richard Palethorpe4ae583e2017-08-02 16:24:22 +0200229LTP_CHECK_X_TABLES
Richard Palethorpebe880d12017-09-29 12:23:09 +0200230LTP_CHECK_ATOMIC_MEMORY_MODEL
Richard Palethorpedb141702017-11-02 15:34:41 +0100231LTP_CHECK_TPACKET_V3
Greg Hackmann0373e532018-12-05 10:19:13 -0800232LTP_CHECK_RLIMIT64
Petr Vorel00ff2c32018-01-06 02:32:28 +0100233LTP_DETECT_HOST_CPU
Cyril Hrubisdd79c1f2018-10-17 17:38:33 +0200234LTP_CHECK_PERF_EVENT
Sumit Gargeb636c92019-02-21 14:30:11 +0530235LTP_CHECK_SYNCFS
Xing Gua3bfea22014-06-17 15:26:30 +0800236
Petr Vorelf4176722018-02-07 11:29:42 +0100237if test "x$with_numa" = xyes; then
238 LTP_CHECK_SYSCALL_NUMA
239 numa_error_msg="test requires libnuma >= 2 and it's development packages"
240else
241 numa_error_msg="NUMA support was disabled during build"
242fi
243AC_DEFINE_UNQUOTED(NUMA_ERROR_MSG, ["$numa_error_msg"], [Error message when no NUMA support])
244
subrata_modak3d8666c2008-11-11 08:31:27 +0000245AC_OUTPUT