blob: c389bf957a3d38e515c9f00cd7cddadf4aa99707 [file] [log] [blame]
yaberauneya9913e822009-11-26 11:27:34 +00001AC_PREREQ(2.61)
yaberauneyaef772532009-10-09 17:55:43 +00002AC_INIT([ltp], [LTP_VERSION], [ltp-results@lists.sourceforge.net])
3AC_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 \
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 \
43 sys/acl.h \
44 sys/epoll.h \
45 sys/inotify.h \
46 sys/jfsdmapi.h \
47 sys/prctl.h \
48])
49
Garrett Cooper52288dc2010-11-16 22:01:43 -080050AC_CONFIG_SUBDIRS([testcases/kernel/syscalls/libevent])
51
52# Tools knobs
53
54# Expect
55AC_ARG_WITH([bash],
56 [AC_HELP_STRING([--with-bash],
57 [have the Bourne Again SHell interpreter (default=no)])],
58 [with_bash=yes],
59)
60if test "x$with_bash" = xyes; then
61 AC_SUBST([WITH_BASH],["yes"])
62else
63 AC_SUBST([WITH_BASH],["no"])
64fi
65
66AC_ARG_WITH([expect],
67 [AC_HELP_STRING([--with-expect],
68 [have the Tcl/expect library (default=yes)])],
69 [with_expect=yes],
70 [with_expect=no]
71)
72if test "x$with_expect" = xyes; then
73 AC_SUBST([WITH_EXPECT],["yes"])
74else
75 AC_SUBST([WITH_EXPECT],["no"])
76fi
77
78# Perl
79AC_ARG_WITH([perl],
80 [AC_HELP_STRING([--with-perl],
81 [have a perl interpreter (default=yes)])],
82 [with_perl=yes],
83 [with_perl=no]
84)
85if test "x$with_perl" = xyes; then
86 AC_SUBST([WITH_PERL],["yes"])
87else
88 AC_SUBST([WITH_PERL],["no"])
89fi
90
91# Python
92AC_ARG_WITH([python],
93 [AC_HELP_STRING([--with-python],
94 [have a python interpreter (default=yes)])],
95 [with_python=yes],
96 [with_python=no]
97)
98if test "x$with_python" = xyes; then
99 AC_SUBST([WITH_PYTHON],["yes"])
100else
101 AC_SUBST([WITH_PYTHON],["no"])
102fi
103# END tools knobs
104
105# Testsuites knobs
106
107# testcases/kernel/power_management requires python.
108if test "x$with_python" = xyes; then
109 AC_ARG_WITH([power-management-testsuite],
110 [AC_HELP_STRING([--with-power-management-testsuite],
111 [compile and install the x86 power management testsuite (default=no)])],
112 [with_power_management_testsuite=yes],
113 )
114fi
115if test "x$with_power_management_testsuite" = xyes; then
116 AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["yes"])
117else
118 AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["no"])
119fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800120
121AC_ARG_WITH([open-posix-testsuite],
122 [AC_HELP_STRING([--with-open-posix-testsuite],
123 [compile and install the open posix testsuite (default=no)])],
124 [with_open_posix_testsuite=yes]
125)
126if test "x$with_open_posix_testsuite" = xyes; then
127 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
128else
129 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
130fi
131
Garrett Cooper52288dc2010-11-16 22:01:43 -0800132# testcases/realtime requires bash and python.
133if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
134 AC_ARG_WITH([realtime-testsuite],
135 [AC_HELP_STRING([--with-realtime-testsuite],
136 [compile and install the realtime testsuite (default=no)])],
137 [with_realtime_testsuite=yes]
138 )
139fi
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800140if test "x$with_realtime_testsuite" = xyes; then
141 AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
Garrett Cooper52288dc2010-11-16 22:01:43 -0800142 # Run configure on testcases/realtime as well.
143 AC_CONFIG_SUBDIRS([testcases/realtime])
Garrett Cooper92dfd5b2010-11-16 20:02:26 -0800144else
145 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
146fi
147
Garrett Cooper52288dc2010-11-16 22:01:43 -0800148# END testsuites knobs
yaberauneyaef772532009-10-09 17:55:43 +0000149
150LTP_CHECK_CAPABILITY_SUPPORT
151LTP_CHECK_CRYPTO
152LTP_CHECK_LINUX_PTRACE
Mike Frysinger9bd940b2010-08-17 17:22:03 -0400153LTP_CHECK_NOMMU_LINUX
Garrett Cooper4f71cae2010-11-01 21:09:17 -0700154LTP_CHECK_PRCTL_SUPPORT
155LTP_CHECK_SECUREBITS
yaberauneyaef772532009-10-09 17:55:43 +0000156LTP_CHECK_SELINUX
yaberauneyae34a3c22009-11-30 12:26:05 +0000157LTP_CHECK_SIGNAL
subrata_modak4fc9f542009-01-16 09:03:14 +0000158LTP_CHECK_SYSCALL_EVENTFD
Garrett Coopere99ebbc2010-11-03 10:15:10 -0700159LTP_CHECK_SYSCALL_KEYCTL
vapierdf8759f2009-01-18 22:22:40 +0000160LTP_CHECK_SYSCALL_MODIFY_LDT
yaberauneyaef772532009-10-09 17:55:43 +0000161LTP_CHECK_SYSCALL_NUMA
162LTP_CHECK_SYSCALL_QUOTACTL
vapierdf8759f2009-01-18 22:22:40 +0000163LTP_CHECK_SYSCALL_SIGNALFD
subrata_modak5e0db1d2009-08-25 07:37:45 +0000164LTP_CHECK_SYSCALL_UNSHARE
subrata_modak1c310982009-05-25 15:01:45 +0000165LTP_CHECK_TASKSTATS
Garrett Cooper06c96f32010-02-24 19:16:01 -0800166LTP_CHECK_TIME
subrata_modak3d8666c2008-11-11 08:31:27 +0000167
168AC_OUTPUT