yaberauneya | 9913e82 | 2009-11-26 11:27:34 +0000 | [diff] [blame] | 1 | AC_PREREQ(2.61) |
Garrett Cooper | f09527b | 2010-11-29 10:23:58 -0800 | [diff] [blame] | 2 | AC_INIT([ltp], [LTP_VERSION], [ltp-list@lists.sourceforge.net]) |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 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 \ |
Caspar Zhang | a97441d | 2012-01-10 11:01:10 +0800 | [diff] [blame] | 39 | attr/xattr.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 40 | linux/genetlink.h \ |
yaberauneya | cb805c4 | 2009-12-22 23:10:41 +0000 | [diff] [blame] | 41 | linux/mempolicy.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 42 | linux/module.h \ |
| 43 | linux/netlink.h \ |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 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 | # Tools knobs |
| 51 | |
| 52 | # Expect |
| 53 | AC_ARG_WITH([bash], |
| 54 | [AC_HELP_STRING([--with-bash], |
| 55 | [have the Bourne Again SHell interpreter (default=no)])], |
| 56 | [with_bash=yes], |
| 57 | ) |
| 58 | if test "x$with_bash" = xyes; then |
| 59 | AC_SUBST([WITH_BASH],["yes"]) |
| 60 | else |
| 61 | AC_SUBST([WITH_BASH],["no"]) |
| 62 | fi |
| 63 | |
| 64 | AC_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 | ) |
| 70 | if test "x$with_expect" = xyes; then |
| 71 | AC_SUBST([WITH_EXPECT],["yes"]) |
| 72 | else |
| 73 | AC_SUBST([WITH_EXPECT],["no"]) |
| 74 | fi |
| 75 | |
| 76 | # Perl |
| 77 | AC_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 | ) |
| 83 | if test "x$with_perl" = xyes; then |
| 84 | AC_SUBST([WITH_PERL],["yes"]) |
| 85 | else |
| 86 | AC_SUBST([WITH_PERL],["no"]) |
| 87 | fi |
| 88 | |
| 89 | # Python |
| 90 | AC_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 | ) |
| 96 | if test "x$with_python" = xyes; then |
| 97 | AC_SUBST([WITH_PYTHON],["yes"]) |
| 98 | else |
| 99 | AC_SUBST([WITH_PYTHON],["no"]) |
| 100 | fi |
| 101 | # END tools knobs |
| 102 | |
| 103 | # Testsuites knobs |
| 104 | |
| 105 | # testcases/kernel/power_management requires python. |
| 106 | if 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 | ) |
| 112 | fi |
| 113 | if test "x$with_power_management_testsuite" = xyes; then |
| 114 | AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["yes"]) |
| 115 | else |
| 116 | AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["no"]) |
| 117 | fi |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 118 | |
| 119 | AC_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 | ) |
| 124 | if test "x$with_open_posix_testsuite" = xyes; then |
| 125 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) |
| 126 | else |
| 127 | AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) |
| 128 | fi |
| 129 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 130 | # testcases/realtime requires bash and python. |
| 131 | if 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 | ) |
| 137 | fi |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 138 | if test "x$with_realtime_testsuite" = xyes; then |
| 139 | AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 140 | # Run configure on testcases/realtime as well. |
| 141 | AC_CONFIG_SUBDIRS([testcases/realtime]) |
Garrett Cooper | 92dfd5b | 2010-11-16 20:02:26 -0800 | [diff] [blame] | 142 | else |
| 143 | AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) |
| 144 | fi |
| 145 | |
Garrett Cooper | 52288dc | 2010-11-16 22:01:43 -0800 | [diff] [blame] | 146 | # END testsuites knobs |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 147 | |
Cyril Hrubis | 6aa37bb | 2012-08-09 20:36:47 +0300 | [diff] [blame^] | 148 | LTP_CHECK_MKDTEMP |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 149 | LTP_CHECK_CAPABILITY_SUPPORT |
| 150 | LTP_CHECK_CRYPTO |
| 151 | LTP_CHECK_LINUX_PTRACE |
Mike Frysinger | 9bd940b | 2010-08-17 17:22:03 -0400 | [diff] [blame] | 152 | LTP_CHECK_NOMMU_LINUX |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 153 | LTP_CHECK_PRCTL_SUPPORT |
| 154 | LTP_CHECK_SECUREBITS |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 155 | LTP_CHECK_SELINUX |
yaberauneya | e34a3c2 | 2009-11-30 12:26:05 +0000 | [diff] [blame] | 156 | LTP_CHECK_SIGNAL |
subrata_modak | 4fc9f54 | 2009-01-16 09:03:14 +0000 | [diff] [blame] | 157 | LTP_CHECK_SYSCALL_EVENTFD |
Garrett Cooper | e99ebbc | 2010-11-03 10:15:10 -0700 | [diff] [blame] | 158 | LTP_CHECK_SYSCALL_KEYCTL |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 159 | LTP_CHECK_SYSCALL_MODIFY_LDT |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 160 | LTP_CHECK_SYSCALL_NUMA |
| 161 | LTP_CHECK_SYSCALL_QUOTACTL |
vapier | df8759f | 2009-01-18 22:22:40 +0000 | [diff] [blame] | 162 | LTP_CHECK_SYSCALL_SIGNALFD |
subrata_modak | 5e0db1d | 2009-08-25 07:37:45 +0000 | [diff] [blame] | 163 | LTP_CHECK_SYSCALL_UNSHARE |
subrata_modak | 1c31098 | 2009-05-25 15:01:45 +0000 | [diff] [blame] | 164 | LTP_CHECK_TASKSTATS |
Garrett Cooper | 06c96f3 | 2010-02-24 19:16:01 -0800 | [diff] [blame] | 165 | LTP_CHECK_TIME |
Cyril Hrubis | 877cbae | 2011-02-07 20:00:31 +0100 | [diff] [blame] | 166 | LTP_CHECK_MADVISE |
Cyril Hrubis | dcd7909 | 2011-03-31 18:01:23 +0200 | [diff] [blame] | 167 | LTP_CHECK_ACL_SUPPORT |
Cyril Hrubis | c57112e | 2012-02-10 14:06:43 +0100 | [diff] [blame] | 168 | LTP_CHECK_FS_IOC_FLAGS |
Cyril Hrubis | bd8ae72 | 2012-02-10 15:01:19 +0100 | [diff] [blame] | 169 | LTP_CHECK_MREMAP_FIXED |
subrata_modak | 3d8666c | 2008-11-11 08:31:27 +0000 | [diff] [blame] | 170 | |
| 171 | AC_OUTPUT |