blob: 9f397e7c296846dc0bffeebf77b0c57159674e2a [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])
yaberauneyaef772532009-10-09 17:55:43 +00006AC_CONFIG_FILES([ \
7 include/mk/config.mk \
Garrett Cooper4f71cae2010-11-01 21:09:17 -07008 include/mk/features.mk \
yaberauneyaef772532009-10-09 17:55:43 +00009 lib/ltp.pc \
yaberauneyaef772532009-10-09 17:55:43 +000010 m4/Makefile \
yaberauneya0d39b832009-11-20 05:45:41 +000011 execltp \
vapierdf8759f2009-01-18 22:22:40 +000012])
subrata_modak3d8666c2008-11-11 08:31:27 +000013
yaberauneyaef772532009-10-09 17:55:43 +000014AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes)
15
16AC_CANONICAL_HOST
17
18AC_PROG_CC
yaberauneyaf7df1402009-10-17 02:24:20 +000019# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
20# 2.62.
21AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
yaberauneyaef772532009-10-09 17:55:43 +000022AC_PROG_AR
23AC_PROG_LEX
24AC_PROG_RANLIB
yaberauneyaa4bed682009-12-05 23:45:55 +000025AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
26AC_PROG_STRIP
yaberauneyaef772532009-10-09 17:55:43 +000027AC_PROG_YACC
28
29AC_PREFIX_DEFAULT(/opt/ltp)
30
yaberauneya80a06b52009-12-20 00:39:37 +000031AC_CHECK_HEADERS([ \
yaberauneyaef772532009-10-09 17:55:43 +000032 dmapi.h \
33 ifaddrs.h \
34 libaio.h \
35 mm.h \
yaberauneya9913e822009-11-26 11:27:34 +000036 pthread.h \
Caspar Zhanga97441d2012-01-10 11:01:10 +080037 attr/xattr.h \
yaberauneyaef772532009-10-09 17:55:43 +000038 linux/genetlink.h \
yaberauneyacb805c42009-12-22 23:10:41 +000039 linux/mempolicy.h \
yaberauneyaef772532009-10-09 17:55:43 +000040 linux/module.h \
41 linux/netlink.h \
yaberauneyaef772532009-10-09 17:55:43 +000042 sys/epoll.h \
43 sys/inotify.h \
Jan Karaf057c1c2013-11-20 23:43:13 +010044 sys/fanotify.h \
yaberauneyaef772532009-10-09 17:55:43 +000045 sys/jfsdmapi.h \
46 sys/prctl.h \
47])
48
Garrett Cooper52288dc2010-11-16 22:01:43 -080049# Tools knobs
50
51# Expect
52AC_ARG_WITH([bash],
53 [AC_HELP_STRING([--with-bash],
54 [have the Bourne Again SHell interpreter (default=no)])],
55 [with_bash=yes],
56)
57if test "x$with_bash" = xyes; then
58 AC_SUBST([WITH_BASH],["yes"])
59else
60 AC_SUBST([WITH_BASH],["no"])
61fi
62
63AC_ARG_WITH([expect],
64 [AC_HELP_STRING([--with-expect],
65 [have the Tcl/expect library (default=yes)])],
66 [with_expect=yes],
67 [with_expect=no]
68)
69if test "x$with_expect" = xyes; then
70 AC_SUBST([WITH_EXPECT],["yes"])
71else
72 AC_SUBST([WITH_EXPECT],["no"])
73fi
74
75# Perl
76AC_ARG_WITH([perl],
77 [AC_HELP_STRING([--with-perl],
78 [have a perl interpreter (default=yes)])],
79 [with_perl=yes],
80 [with_perl=no]
81)
82if test "x$with_perl" = xyes; then
83 AC_SUBST([WITH_PERL],["yes"])
84else
85 AC_SUBST([WITH_PERL],["no"])
86fi
87
88# Python
89AC_ARG_WITH([python],
90 [AC_HELP_STRING([--with-python],
91 [have a python interpreter (default=yes)])],
92 [with_python=yes],
93 [with_python=no]
94)
95if test "x$with_python" = xyes; then
96 AC_SUBST([WITH_PYTHON],["yes"])
97else
98 AC_SUBST([WITH_PYTHON],["no"])
99fi
100# END tools knobs
101
102# Testsuites knobs
103
104# testcases/kernel/power_management requires python.
105if test "x$with_python" = xyes; then
106 AC_ARG_WITH([power-management-testsuite],
107 [AC_HELP_STRING([--with-power-management-testsuite],
108 [compile and install the x86 power management testsuite (default=no)])],
109 [with_power_management_testsuite=yes],
110 )
111fi
112if test "x$with_power_management_testsuite" = xyes; then
113 AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["yes"])
114else
115 AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["no"])
116fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800117
118AC_ARG_WITH([open-posix-testsuite],
119 [AC_HELP_STRING([--with-open-posix-testsuite],
120 [compile and install the open posix testsuite (default=no)])],
121 [with_open_posix_testsuite=yes]
122)
123if test "x$with_open_posix_testsuite" = xyes; then
124 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
125else
126 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
127fi
128
Garrett Cooper52288dc2010-11-16 22:01:43 -0800129# testcases/realtime requires bash and python.
130if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
131 AC_ARG_WITH([realtime-testsuite],
132 [AC_HELP_STRING([--with-realtime-testsuite],
133 [compile and install the realtime testsuite (default=no)])],
134 [with_realtime_testsuite=yes]
135 )
136fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800137if test "x$with_realtime_testsuite" = xyes; then
138 AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
Garrett Cooper52288dc2010-11-16 22:01:43 -0800139 # Run configure on testcases/realtime as well.
140 AC_CONFIG_SUBDIRS([testcases/realtime])
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800141else
142 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
143fi
144
Mats Liljegrenfb6efc42014-04-15 10:31:15 +0200145AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
146
Garrett Cooper52288dc2010-11-16 22:01:43 -0800147# END testsuites knobs
Cyril Hrubis4b3007a2013-09-02 16:13:16 +0200148LTP_CHECK_FORTIFY_SOURCE
Alexey Kodanev20eb0712014-04-11 13:26:59 +0400149LTP_CHECK_CC_WARN_OLDSTYLE
Cyril Hrubis6aa37bb2012-08-09 20:36:47 +0300150LTP_CHECK_MKDTEMP
yaberauneyaef772532009-10-09 17:55:43 +0000151LTP_CHECK_CAPABILITY_SUPPORT
152LTP_CHECK_CRYPTO
153LTP_CHECK_LINUX_PTRACE
Mike Frysinger9bd940b2010-08-17 17:22:03 -0400154LTP_CHECK_NOMMU_LINUX
Garrett Cooper4f71cae2010-11-01 21:09:17 -0700155LTP_CHECK_PRCTL_SUPPORT
156LTP_CHECK_SECUREBITS
yaberauneyaef772532009-10-09 17:55:43 +0000157LTP_CHECK_SELINUX
yaberauneyae34a3c22009-11-30 12:26:05 +0000158LTP_CHECK_SIGNAL
subrata_modak4fc9f542009-01-16 09:03:14 +0000159LTP_CHECK_SYSCALL_EVENTFD
Garrett Coopere99ebbc2010-11-03 10:15:10 -0700160LTP_CHECK_SYSCALL_KEYCTL
vapierdf8759f2009-01-18 22:22:40 +0000161LTP_CHECK_SYSCALL_MODIFY_LDT
yaberauneyaef772532009-10-09 17:55:43 +0000162LTP_CHECK_SYSCALL_NUMA
163LTP_CHECK_SYSCALL_QUOTACTL
vapierdf8759f2009-01-18 22:22:40 +0000164LTP_CHECK_SYSCALL_SIGNALFD
subrata_modak5e0db1d2009-08-25 07:37:45 +0000165LTP_CHECK_SYSCALL_UNSHARE
Stanislav Kholmanskikh2d585022013-12-04 16:16:26 +0400166LTP_CHECK_SYSCALL_UTIMENSAT
subrata_modak1c310982009-05-25 15:01:45 +0000167LTP_CHECK_TASKSTATS
Garrett Cooper06c96f32010-02-24 19:16:01 -0800168LTP_CHECK_TIME
Cyril Hrubis877cbae2011-02-07 20:00:31 +0100169LTP_CHECK_MADVISE
Cyril Hrubisdcd79092011-03-31 18:01:23 +0200170LTP_CHECK_ACL_SUPPORT
Cyril Hrubisc57112e2012-02-10 14:06:43 +0100171LTP_CHECK_FS_IOC_FLAGS
Cyril Hrubisbd8ae722012-02-10 15:01:19 +0100172LTP_CHECK_MREMAP_FIXED
Alexey Kodaneve0ad93b2013-06-19 15:56:43 +0400173LTP_CHECK_KERNEL_DEVEL
DAN LI39773182013-08-27 14:26:16 +0800174LTP_CHECK_XFS_QUOTACTL
Zeng Linggang1db62662014-01-09 20:10:11 +0800175LTP_CHECK_CLONE_SUPPORTS_7_ARGS
Cyril Hrubisc5d25422014-01-09 16:54:09 +0100176LTP_CHECK_MKDIRAT
Zeng Linggangf9113612014-02-26 17:35:13 +0800177LTP_CHECK_FCHOWNAT
Xiaoguang Wang7525e622014-03-04 14:32:00 +0800178LTP_CHECK_MKNODAT
Xiaoguang Wang02610ee2014-03-05 10:26:50 +0800179LTP_CHECK_FALLOCATE
Xiaoguang Wang477ea282014-03-19 16:14:43 +0800180LTP_CHECK_SYSCALL_FCNTL
subrata_modak3d8666c2008-11-11 08:31:27 +0000181
182AC_OUTPUT