blob: 6941e0e809a3f4e13ab6e48d79e120a7a68d0884 [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
yaberauneyaef772532009-10-09 17:55:43 +000016AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes)
17
18AC_CANONICAL_HOST
19
20AC_PROG_CC
yaberauneyaf7df1402009-10-17 02:24:20 +000021# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
22# 2.62.
23AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
yaberauneyaef772532009-10-09 17:55:43 +000024AC_PROG_AR
25AC_PROG_LEX
26AC_PROG_RANLIB
yaberauneyaa4bed682009-12-05 23:45:55 +000027AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
28AC_PROG_STRIP
yaberauneyaef772532009-10-09 17:55:43 +000029AC_PROG_YACC
30
31AC_PREFIX_DEFAULT(/opt/ltp)
32
yaberauneya80a06b52009-12-20 00:39:37 +000033AC_CHECK_HEADERS([ \
yaberauneyaef772532009-10-09 17:55:43 +000034 dmapi.h \
35 ifaddrs.h \
36 libaio.h \
37 mm.h \
yaberauneya9913e822009-11-26 11:27:34 +000038 pthread.h \
Dejan Jovicevic70a21de2016-10-04 11:14:00 +020039 sys/xattr.h \
yaberauneyaef772532009-10-09 17:55:43 +000040 linux/genetlink.h \
yaberauneyacb805c42009-12-22 23:10:41 +000041 linux/mempolicy.h \
yaberauneyaef772532009-10-09 17:55:43 +000042 linux/module.h \
43 linux/netlink.h \
yaberauneyaef772532009-10-09 17:55:43 +000044 sys/epoll.h \
45 sys/inotify.h \
Jan Karaf057c1c2013-11-20 23:43:13 +010046 sys/fanotify.h \
yaberauneyaef772532009-10-09 17:55:43 +000047 sys/jfsdmapi.h \
48 sys/prctl.h \
49])
50
Garrett Cooper52288dc2010-11-16 22:01:43 -080051# Tools knobs
52
53# Expect
54AC_ARG_WITH([bash],
55 [AC_HELP_STRING([--with-bash],
56 [have the Bourne Again SHell interpreter (default=no)])],
57 [with_bash=yes],
58)
59if test "x$with_bash" = xyes; then
60 AC_SUBST([WITH_BASH],["yes"])
61else
62 AC_SUBST([WITH_BASH],["no"])
63fi
64
65AC_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)
71if test "x$with_expect" = xyes; then
72 AC_SUBST([WITH_EXPECT],["yes"])
73else
74 AC_SUBST([WITH_EXPECT],["no"])
75fi
76
77# Perl
78AC_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)
84if test "x$with_perl" = xyes; then
85 AC_SUBST([WITH_PERL],["yes"])
86else
87 AC_SUBST([WITH_PERL],["no"])
88fi
89
90# Python
91AC_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)
97if test "x$with_python" = xyes; then
98 AC_SUBST([WITH_PYTHON],["yes"])
99else
100 AC_SUBST([WITH_PYTHON],["no"])
101fi
102# END tools knobs
103
104# Testsuites knobs
105
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800106AC_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)
111if test "x$with_open_posix_testsuite" = xyes; then
112 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
113else
114 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
115fi
116
Garrett Cooper52288dc2010-11-16 22:01:43 -0800117# testcases/realtime requires bash and python.
118if 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 )
124fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800125if test "x$with_realtime_testsuite" = xyes; then
126 AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
Garrett Cooper52288dc2010-11-16 22:01:43 -0800127 # Run configure on testcases/realtime as well.
128 AC_CONFIG_SUBDIRS([testcases/realtime])
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800129else
130 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
131fi
132
Mats Liljegrenfb6efc42014-04-15 10:31:15 +0200133AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
134
Garrett Cooper52288dc2010-11-16 22:01:43 -0800135# END testsuites knobs
Cyril Hrubis4b3007a2013-09-02 16:13:16 +0200136LTP_CHECK_FORTIFY_SOURCE
Alexey Kodanev20eb0712014-04-11 13:26:59 +0400137LTP_CHECK_CC_WARN_OLDSTYLE
Cyril Hrubis6aa37bb2012-08-09 20:36:47 +0300138LTP_CHECK_MKDTEMP
yaberauneyaef772532009-10-09 17:55:43 +0000139LTP_CHECK_CAPABILITY_SUPPORT
140LTP_CHECK_CRYPTO
141LTP_CHECK_LINUX_PTRACE
Mike Frysinger9bd940b2010-08-17 17:22:03 -0400142LTP_CHECK_NOMMU_LINUX
Garrett Cooper4f71cae2010-11-01 21:09:17 -0700143LTP_CHECK_PRCTL_SUPPORT
144LTP_CHECK_SECUREBITS
yaberauneyaef772532009-10-09 17:55:43 +0000145LTP_CHECK_SELINUX
yaberauneyae34a3c22009-11-30 12:26:05 +0000146LTP_CHECK_SIGNAL
subrata_modak4fc9f542009-01-16 09:03:14 +0000147LTP_CHECK_SYSCALL_EVENTFD
vapierdf8759f2009-01-18 22:22:40 +0000148LTP_CHECK_SYSCALL_MODIFY_LDT
yaberauneyaef772532009-10-09 17:55:43 +0000149LTP_CHECK_SYSCALL_NUMA
150LTP_CHECK_SYSCALL_QUOTACTL
vapierdf8759f2009-01-18 22:22:40 +0000151LTP_CHECK_SYSCALL_SIGNALFD
subrata_modak5e0db1d2009-08-25 07:37:45 +0000152LTP_CHECK_SYSCALL_UNSHARE
Stanislav Kholmanskikh2d585022013-12-04 16:16:26 +0400153LTP_CHECK_SYSCALL_UTIMENSAT
subrata_modak1c310982009-05-25 15:01:45 +0000154LTP_CHECK_TASKSTATS
Garrett Cooper06c96f32010-02-24 19:16:01 -0800155LTP_CHECK_TIME
Cyril Hrubis877cbae2011-02-07 20:00:31 +0100156LTP_CHECK_MADVISE
Cyril Hrubisdcd79092011-03-31 18:01:23 +0200157LTP_CHECK_ACL_SUPPORT
Cyril Hrubisc57112e2012-02-10 14:06:43 +0100158LTP_CHECK_FS_IOC_FLAGS
Cyril Hrubisbd8ae722012-02-10 15:01:19 +0100159LTP_CHECK_MREMAP_FIXED
Alexey Kodaneve0ad93b2013-06-19 15:56:43 +0400160LTP_CHECK_KERNEL_DEVEL
DAN LI39773182013-08-27 14:26:16 +0800161LTP_CHECK_XFS_QUOTACTL
Zeng Linggang1db62662014-01-09 20:10:11 +0800162LTP_CHECK_CLONE_SUPPORTS_7_ARGS
Cyril Hrubisc5d25422014-01-09 16:54:09 +0100163LTP_CHECK_MKDIRAT
Zeng Linggangf9113612014-02-26 17:35:13 +0800164LTP_CHECK_FCHOWNAT
Alexey Kodaneva84303b2016-03-02 15:32:20 +0300165LTP_CHECK_FSTATAT
Xiaoguang Wang7525e622014-03-04 14:32:00 +0800166LTP_CHECK_MKNODAT
Cyril Hrubis0ea7aa02014-05-07 12:42:38 +0200167LTP_CHECK_READLINKAT
gux.fnst@cn.fujitsu.com0d1cfbe2014-05-08 17:50:52 +0800168LTP_CHECK_OPENAT
Xing Gua3bfea22014-06-17 15:26:30 +0800169LTP_CHECK_RENAMEAT
Cedric Hnydab008b922015-10-01 11:46:25 +0200170LTP_CHECK_RENAMEAT2
Xiaoguang Wang02610ee2014-03-05 10:26:50 +0800171LTP_CHECK_FALLOCATE
Xiaoguang Wang477ea282014-03-19 16:14:43 +0800172LTP_CHECK_SYSCALL_FCNTL
Xiaoguang Wang7e6be182014-04-10 12:08:45 +0800173LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
Stanislav Kholmanskikha86d71f2014-03-25 18:24:29 +0400174LTP_CHECK_TIRPC
Xing Gufd060ed2014-05-30 15:37:04 +0800175LTP_CHECK_TEE
Xing Gucf900502014-05-30 16:05:25 +0800176LTP_CHECK_SPLICE
Cyril Hrubis42000682014-06-03 12:23:17 +0200177LTP_CHECK_VMSPLICE
Zeng Linggang9ac868c2014-06-27 10:02:52 +0800178LTP_CHECK_TIMERFD
Zeng Linggangc0af3d62014-07-21 17:21:25 +0800179LTP_CHECK_CAN_SUPPORT
Cyril Hrubis4c256b32014-08-13 15:32:17 +0200180LTP_CHECK_IOVEC
Cyril Hrubis7c631b22014-08-19 09:50:06 +0200181LTP_CHECK_KEYCTL
Jan Stancek17dce712015-07-13 13:58:21 +0200182LTP_CHECK_LINUXRANDOM
Cyril Hrubis80edf932015-09-01 15:03:40 +0200183LTP_CHECK_IF_LINK
Cedric Hnyda64059842015-10-08 16:49:07 +0200184LTP_CHECK_KCMP
185LTP_CHECK_KCMP_TYPE
Xiao Yang1274a3c2015-12-03 19:31:12 +0800186LTP_CHECK_PREADV
Xiao Yang4ca27ac2015-12-03 19:31:13 +0800187LTP_CHECK_PWRITEV
Guangwen Feng22c12be2016-03-03 16:24:45 +0800188LTP_CHECK_EPOLL_PWAIT
Xiao Yang2a9c1582016-04-14 17:22:05 +0800189LTP_CHECK_KEYUTILS_SUPPORT
Jan Stancekf61391e2016-04-13 13:09:23 +0200190LTP_CHECK_SYNC_ADD_AND_FETCH
Peter Maydell189aea22016-07-26 17:31:05 +0100191LTP_CHECK_BUILTIN_CLEAR_CACHE
Xing Gua3bfea22014-06-17 15:26:30 +0800192
subrata_modak3d8666c2008-11-11 08:31:27 +0000193AC_OUTPUT