yaberauneya | 9913e82 | 2009-11-26 11:27:34 +0000 | [diff] [blame] | 1 | AC_PREREQ(2.61) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 2 | AC_INIT([ltp], [LTP_VERSION], [ltp-results@lists.sourceforge.net]) |
| 3 | AC_CONFIG_AUX_DIR([.]) |
| 4 | AM_INIT_AUTOMAKE |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 5 | AC_CONFIG_HEADERS([include/config.h]) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 6 | AC_CONFIG_FILES([ \ |
| 7 | include/mk/config.mk \ |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 8 | include/mk/features.mk \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 9 | lib/ltp.pc \ |
| 10 | ltp-devel.spec \ |
| 11 | m4/Makefile \ |
yaberauneya | 0d39b83 | 2009-11-20 05:45:41 +0000 | [diff] [blame] | 12 | execltp \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 13 | README.ltp-devel \ |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 14 | ]) |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 15 | |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 16 | AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes) |
| 17 | |
| 18 | AC_CANONICAL_HOST |
| 19 | |
| 20 | AC_PROG_CC |
yaberauneya | f7df140 | 2009-10-17 02:24:20 +0000 | [diff] [blame] | 21 | # <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about |
| 22 | # 2.62. |
| 23 | AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 24 | AC_PROG_AR |
| 25 | AC_PROG_LEX |
| 26 | AC_PROG_RANLIB |
yaberauneya | a4bed68 | 2009-12-05 23:45:55 +0000 | [diff] [blame] | 27 | AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) |
| 28 | AC_PROG_STRIP |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 29 | AC_PROG_YACC |
| 30 | |
| 31 | AC_PREFIX_DEFAULT(/opt/ltp) |
| 32 | |
yaberauneya | 80a06b5 | 2009-12-20 00:39:37 +0000 | [diff] [blame] | 33 | AC_CHECK_HEADERS([ \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 34 | dmapi.h \ |
| 35 | ifaddrs.h \ |
| 36 | libaio.h \ |
| 37 | mm.h \ |
yaberauneya | 9913e82 | 2009-11-26 11:27:34 +0000 | [diff] [blame] | 38 | pthread.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 39 | linux/genetlink.h \ |
yaberauneya | cb805c4 | 2009-12-22 23:10:41 +0000 | [diff] [blame] | 40 | linux/mempolicy.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 41 | 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 Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame^] | 50 | AC_CONFIG_SUBDIRS([testcases/kernel/syscalls/libevent]) |
| 51 | |
| 52 | # Tools knobs |
| 53 | |
| 54 | # Expect |
| 55 | AC_ARG_WITH([bash], |
| 56 | [AC_HELP_STRING([--with-bash], |
| 57 | [have the Bourne Again SHell interpreter (default=no)])], |
| 58 | [with_bash=yes], |
| 59 | ) |
| 60 | if test "x$with_bash" = xyes; then |
| 61 | AC_SUBST([WITH_BASH],["yes"]) |
| 62 | else |
| 63 | AC_SUBST([WITH_BASH],["no"]) |
| 64 | fi |
| 65 | |
| 66 | AC_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 | ) |
| 72 | if test "x$with_expect" = xyes; then |
| 73 | AC_SUBST([WITH_EXPECT],["yes"]) |
| 74 | else |
| 75 | AC_SUBST([WITH_EXPECT],["no"]) |
| 76 | fi |
| 77 | |
| 78 | # Perl |
| 79 | AC_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 | ) |
| 85 | if test "x$with_perl" = xyes; then |
| 86 | AC_SUBST([WITH_PERL],["yes"]) |
| 87 | else |
| 88 | AC_SUBST([WITH_PERL],["no"]) |
| 89 | fi |
| 90 | |
| 91 | # Python |
| 92 | AC_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 | ) |
| 98 | if test "x$with_python" = xyes; then |
| 99 | AC_SUBST([WITH_PYTHON],["yes"]) |
| 100 | else |
| 101 | AC_SUBST([WITH_PYTHON],["no"]) |
| 102 | fi |
| 103 | # END tools knobs |
| 104 | |
| 105 | # Testsuites knobs |
| 106 | |
| 107 | # testcases/kernel/power_management requires python. |
| 108 | if 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 | ) |
| 114 | fi |
| 115 | if test "x$with_power_management_testsuite" = xyes; then |
| 116 | AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["yes"]) |
| 117 | else |
| 118 | AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["no"]) |
| 119 | fi |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 120 | |
| 121 | AC_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 | ) |
| 126 | if test "x$with_open_posix_testsuite" = xyes; then |
| 127 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) |
| 128 | else |
| 129 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) |
| 130 | fi |
| 131 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame^] | 132 | # testcases/realtime requires bash and python. |
| 133 | if 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 | ) |
| 139 | fi |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 140 | if test "x$with_realtime_testsuite" = xyes; then |
| 141 | AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame^] | 142 | # Run configure on testcases/realtime as well. |
| 143 | AC_CONFIG_SUBDIRS([testcases/realtime]) |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 144 | else |
| 145 | AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) |
| 146 | fi |
| 147 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame^] | 148 | # END testsuites knobs |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 149 | |
| 150 | LTP_CHECK_CAPABILITY_SUPPORT |
| 151 | LTP_CHECK_CRYPTO |
| 152 | LTP_CHECK_LINUX_PTRACE |
Mike Frysinger | 9bd940b | 2010-08-17 17:22:03 -0400 | [diff] [blame] | 153 | LTP_CHECK_NOMMU_LINUX |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 154 | LTP_CHECK_PRCTL_SUPPORT |
| 155 | LTP_CHECK_SECUREBITS |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 156 | LTP_CHECK_SELINUX |
yaberauneya | e34a3c2 | 2009-11-30 12:26:05 +0000 | [diff] [blame] | 157 | LTP_CHECK_SIGNAL |
subrata_modak | 4fc9f54 | 2009-01-16 09:03:14 +0000 | [diff] [blame] | 158 | LTP_CHECK_SYSCALL_EVENTFD |
Garrett Cooper | e99ebbc | 2010-11-03 10:15:10 -0700 | [diff] [blame] | 159 | LTP_CHECK_SYSCALL_KEYCTL |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 160 | LTP_CHECK_SYSCALL_MODIFY_LDT |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 161 | LTP_CHECK_SYSCALL_NUMA |
| 162 | LTP_CHECK_SYSCALL_QUOTACTL |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 163 | LTP_CHECK_SYSCALL_SIGNALFD |
subrata_modak | 5e0db1d | 2009-08-25 07:37:45 +0000 | [diff] [blame] | 164 | LTP_CHECK_SYSCALL_UNSHARE |
subrata_modak | 1c31098 | 2009-05-25 15:01:45 +0000 | [diff] [blame] | 165 | LTP_CHECK_TASKSTATS |
Garrett Cooper | 06c96f3 | 2010-02-24 19:16:01 -0800 | [diff] [blame] | 166 | LTP_CHECK_TIME |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 167 | |
| 168 | AC_OUTPUT |