blob: 940f4f7bd7570baca09126407889f7e672957519 [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 \
10 ltp-devel.spec \
11 m4/Makefile \
yaberauneya0d39b832009-11-20 05:45:41 +000012 execltp \
yaberauneyaef772532009-10-09 17:55:43 +000013 README.ltp-devel \
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 \
Caspar Zhanga97441d2012-01-10 11:01:10 +080039 attr/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 \
46 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
Garrett Cooper52288dc2010-11-16 22:01:43 -0800146# END testsuites knobs
Cyril Hrubis4b3007a2013-09-02 16:13:16 +0200147LTP_CHECK_FORTIFY_SOURCE
Cyril Hrubis6aa37bb2012-08-09 20:36:47 +0300148LTP_CHECK_MKDTEMP
yaberauneyaef772532009-10-09 17:55:43 +0000149LTP_CHECK_CAPABILITY_SUPPORT
150LTP_CHECK_CRYPTO
151LTP_CHECK_LINUX_PTRACE
Mike Frysinger9bd940b2010-08-17 17:22:03 -0400152LTP_CHECK_NOMMU_LINUX
Garrett Cooper4f71cae2010-11-01 21:09:17 -0700153LTP_CHECK_PRCTL_SUPPORT
154LTP_CHECK_SECUREBITS
yaberauneyaef772532009-10-09 17:55:43 +0000155LTP_CHECK_SELINUX
yaberauneyae34a3c22009-11-30 12:26:05 +0000156LTP_CHECK_SIGNAL
subrata_modak4fc9f542009-01-16 09:03:14 +0000157LTP_CHECK_SYSCALL_EVENTFD
Garrett Coopere99ebbc2010-11-03 10:15:10 -0700158LTP_CHECK_SYSCALL_KEYCTL
vapierdf8759f2009-01-18 22:22:40 +0000159LTP_CHECK_SYSCALL_MODIFY_LDT
yaberauneyaef772532009-10-09 17:55:43 +0000160LTP_CHECK_SYSCALL_NUMA
161LTP_CHECK_SYSCALL_QUOTACTL
vapierdf8759f2009-01-18 22:22:40 +0000162LTP_CHECK_SYSCALL_SIGNALFD
subrata_modak5e0db1d2009-08-25 07:37:45 +0000163LTP_CHECK_SYSCALL_UNSHARE
subrata_modak1c310982009-05-25 15:01:45 +0000164LTP_CHECK_TASKSTATS
Garrett Cooper06c96f32010-02-24 19:16:01 -0800165LTP_CHECK_TIME
Cyril Hrubis877cbae2011-02-07 20:00:31 +0100166LTP_CHECK_MADVISE
Cyril Hrubisdcd79092011-03-31 18:01:23 +0200167LTP_CHECK_ACL_SUPPORT
Cyril Hrubisc57112e2012-02-10 14:06:43 +0100168LTP_CHECK_FS_IOC_FLAGS
Cyril Hrubisbd8ae722012-02-10 15:01:19 +0100169LTP_CHECK_MREMAP_FIXED
Alexey Kodaneve0ad93b2013-06-19 15:56:43 +0400170LTP_CHECK_KERNEL_DEVEL
DAN LI39773182013-08-27 14:26:16 +0800171LTP_CHECK_XFS_QUOTACTL
subrata_modak3d8666c2008-11-11 08:31:27 +0000172
173AC_OUTPUT