blob: 0e1c3b844bec500e9654a5175f1339f5c38f9bb9 [file] [log] [blame]
yaberauneya9913e822009-11-26 11:27:34 +00001AC_PREREQ(2.61)
Garrett Cooperf09527b2010-11-29 10:23:58 -08002AC_INIT([ltp], [LTP_VERSION], [ltp-list@lists.sourceforge.net])
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 \
Garrett Cooper4f71cae2010-11-01 21:09:17 -07009 include/mk/features.mk \
yaberauneyaef772532009-10-09 17:55:43 +000010 lib/ltp.pc \
yaberauneyaef772532009-10-09 17:55:43 +000011 m4/Makefile \
yaberauneya0d39b832009-11-20 05:45:41 +000012 execltp \
vapierdf8759f2009-01-18 22:22:40 +000013])
subrata_modak3d8666c2008-11-11 08:31:27 +000014
yaberauneyaef772532009-10-09 17:55:43 +000015AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes)
16
17AC_CANONICAL_HOST
18
19AC_PROG_CC
yaberauneyaf7df1402009-10-17 02:24:20 +000020# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
21# 2.62.
22AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
yaberauneyaef772532009-10-09 17:55:43 +000023AC_PROG_AR
24AC_PROG_LEX
25AC_PROG_RANLIB
yaberauneyaa4bed682009-12-05 23:45:55 +000026AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
27AC_PROG_STRIP
yaberauneyaef772532009-10-09 17:55:43 +000028AC_PROG_YACC
29
30AC_PREFIX_DEFAULT(/opt/ltp)
31
yaberauneya80a06b52009-12-20 00:39:37 +000032AC_CHECK_HEADERS([ \
yaberauneyaef772532009-10-09 17:55:43 +000033 dmapi.h \
34 ifaddrs.h \
35 libaio.h \
36 mm.h \
yaberauneya9913e822009-11-26 11:27:34 +000037 pthread.h \
Caspar Zhanga97441d2012-01-10 11:01:10 +080038 attr/xattr.h \
yaberauneyaef772532009-10-09 17:55:43 +000039 linux/genetlink.h \
yaberauneyacb805c42009-12-22 23:10:41 +000040 linux/mempolicy.h \
yaberauneyaef772532009-10-09 17:55:43 +000041 linux/module.h \
42 linux/netlink.h \
yaberauneyaef772532009-10-09 17:55:43 +000043 sys/epoll.h \
44 sys/inotify.h \
Jan Karaf057c1c2013-11-20 23:43:13 +010045 sys/fanotify.h \
yaberauneyaef772532009-10-09 17:55:43 +000046 sys/jfsdmapi.h \
47 sys/prctl.h \
48])
49
Garrett Cooper52288dc2010-11-16 22:01:43 -080050# Tools knobs
51
52# Expect
53AC_ARG_WITH([bash],
54 [AC_HELP_STRING([--with-bash],
55 [have the Bourne Again SHell interpreter (default=no)])],
56 [with_bash=yes],
57)
58if test "x$with_bash" = xyes; then
59 AC_SUBST([WITH_BASH],["yes"])
60else
61 AC_SUBST([WITH_BASH],["no"])
62fi
63
64AC_ARG_WITH([expect],
65 [AC_HELP_STRING([--with-expect],
66 [have the Tcl/expect library (default=yes)])],
67 [with_expect=yes],
68 [with_expect=no]
69)
70if test "x$with_expect" = xyes; then
71 AC_SUBST([WITH_EXPECT],["yes"])
72else
73 AC_SUBST([WITH_EXPECT],["no"])
74fi
75
76# Perl
77AC_ARG_WITH([perl],
78 [AC_HELP_STRING([--with-perl],
79 [have a perl interpreter (default=yes)])],
80 [with_perl=yes],
81 [with_perl=no]
82)
83if test "x$with_perl" = xyes; then
84 AC_SUBST([WITH_PERL],["yes"])
85else
86 AC_SUBST([WITH_PERL],["no"])
87fi
88
89# Python
90AC_ARG_WITH([python],
91 [AC_HELP_STRING([--with-python],
92 [have a python interpreter (default=yes)])],
93 [with_python=yes],
94 [with_python=no]
95)
96if test "x$with_python" = xyes; then
97 AC_SUBST([WITH_PYTHON],["yes"])
98else
99 AC_SUBST([WITH_PYTHON],["no"])
100fi
101# END tools knobs
102
103# Testsuites knobs
104
105# testcases/kernel/power_management requires python.
106if test "x$with_python" = xyes; then
107 AC_ARG_WITH([power-management-testsuite],
108 [AC_HELP_STRING([--with-power-management-testsuite],
109 [compile and install the x86 power management testsuite (default=no)])],
110 [with_power_management_testsuite=yes],
111 )
112fi
113if test "x$with_power_management_testsuite" = xyes; then
114 AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["yes"])
115else
116 AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["no"])
117fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800118
119AC_ARG_WITH([open-posix-testsuite],
120 [AC_HELP_STRING([--with-open-posix-testsuite],
121 [compile and install the open posix testsuite (default=no)])],
122 [with_open_posix_testsuite=yes]
123)
124if test "x$with_open_posix_testsuite" = xyes; then
125 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
126else
127 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
128fi
129
Garrett Cooper52288dc2010-11-16 22:01:43 -0800130# testcases/realtime requires bash and python.
131if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
132 AC_ARG_WITH([realtime-testsuite],
133 [AC_HELP_STRING([--with-realtime-testsuite],
134 [compile and install the realtime testsuite (default=no)])],
135 [with_realtime_testsuite=yes]
136 )
137fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800138if test "x$with_realtime_testsuite" = xyes; then
139 AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
Garrett Cooper52288dc2010-11-16 22:01:43 -0800140 # Run configure on testcases/realtime as well.
141 AC_CONFIG_SUBDIRS([testcases/realtime])
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800142else
143 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
144fi
145
Mats Liljegrenfb6efc42014-04-15 10:31:15 +0200146AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
147
Garrett Cooper52288dc2010-11-16 22:01:43 -0800148# END testsuites knobs
Cyril Hrubis4b3007a2013-09-02 16:13:16 +0200149LTP_CHECK_FORTIFY_SOURCE
Alexey Kodanev20eb0712014-04-11 13:26:59 +0400150LTP_CHECK_CC_WARN_OLDSTYLE
Cyril Hrubis6aa37bb2012-08-09 20:36:47 +0300151LTP_CHECK_MKDTEMP
yaberauneyaef772532009-10-09 17:55:43 +0000152LTP_CHECK_CAPABILITY_SUPPORT
153LTP_CHECK_CRYPTO
154LTP_CHECK_LINUX_PTRACE
Mike Frysinger9bd940b2010-08-17 17:22:03 -0400155LTP_CHECK_NOMMU_LINUX
Garrett Cooper4f71cae2010-11-01 21:09:17 -0700156LTP_CHECK_PRCTL_SUPPORT
157LTP_CHECK_SECUREBITS
yaberauneyaef772532009-10-09 17:55:43 +0000158LTP_CHECK_SELINUX
yaberauneyae34a3c22009-11-30 12:26:05 +0000159LTP_CHECK_SIGNAL
subrata_modak4fc9f542009-01-16 09:03:14 +0000160LTP_CHECK_SYSCALL_EVENTFD
Garrett Coopere99ebbc2010-11-03 10:15:10 -0700161LTP_CHECK_SYSCALL_KEYCTL
vapierdf8759f2009-01-18 22:22:40 +0000162LTP_CHECK_SYSCALL_MODIFY_LDT
yaberauneyaef772532009-10-09 17:55:43 +0000163LTP_CHECK_SYSCALL_NUMA
164LTP_CHECK_SYSCALL_QUOTACTL
vapierdf8759f2009-01-18 22:22:40 +0000165LTP_CHECK_SYSCALL_SIGNALFD
subrata_modak5e0db1d2009-08-25 07:37:45 +0000166LTP_CHECK_SYSCALL_UNSHARE
Stanislav Kholmanskikh2d585022013-12-04 16:16:26 +0400167LTP_CHECK_SYSCALL_UTIMENSAT
subrata_modak1c310982009-05-25 15:01:45 +0000168LTP_CHECK_TASKSTATS
Garrett Cooper06c96f32010-02-24 19:16:01 -0800169LTP_CHECK_TIME
Cyril Hrubis877cbae2011-02-07 20:00:31 +0100170LTP_CHECK_MADVISE
Cyril Hrubisdcd79092011-03-31 18:01:23 +0200171LTP_CHECK_ACL_SUPPORT
Cyril Hrubisc57112e2012-02-10 14:06:43 +0100172LTP_CHECK_FS_IOC_FLAGS
Cyril Hrubisbd8ae722012-02-10 15:01:19 +0100173LTP_CHECK_MREMAP_FIXED
Alexey Kodaneve0ad93b2013-06-19 15:56:43 +0400174LTP_CHECK_KERNEL_DEVEL
DAN LI39773182013-08-27 14:26:16 +0800175LTP_CHECK_XFS_QUOTACTL
Zeng Linggang1db62662014-01-09 20:10:11 +0800176LTP_CHECK_CLONE_SUPPORTS_7_ARGS
Cyril Hrubisc5d25422014-01-09 16:54:09 +0100177LTP_CHECK_MKDIRAT
Zeng Linggangf9113612014-02-26 17:35:13 +0800178LTP_CHECK_FCHOWNAT
Xiaoguang Wang7525e622014-03-04 14:32:00 +0800179LTP_CHECK_MKNODAT
Cyril Hrubis0ea7aa02014-05-07 12:42:38 +0200180LTP_CHECK_READLINKAT
gux.fnst@cn.fujitsu.com0d1cfbe2014-05-08 17:50:52 +0800181LTP_CHECK_OPENAT
Xing Gua3bfea22014-06-17 15:26:30 +0800182LTP_CHECK_RENAMEAT
Xiaoguang Wang02610ee2014-03-05 10:26:50 +0800183LTP_CHECK_FALLOCATE
Xiaoguang Wang477ea282014-03-19 16:14:43 +0800184LTP_CHECK_SYSCALL_FCNTL
Xiaoguang Wang7e6be182014-04-10 12:08:45 +0800185LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
Stanislav Kholmanskikha86d71f2014-03-25 18:24:29 +0400186LTP_CHECK_TIRPC
Xing Gufd060ed2014-05-30 15:37:04 +0800187LTP_CHECK_TEE
Xing Gucf900502014-05-30 16:05:25 +0800188LTP_CHECK_SPLICE
Cyril Hrubis42000682014-06-03 12:23:17 +0200189LTP_CHECK_VMSPLICE
Xing Gua3bfea22014-06-17 15:26:30 +0800190
subrata_modak3d8666c2008-11-11 08:31:27 +0000191AC_OUTPUT