| AC_PREREQ(2.61) |
| AC_INIT([ltp], [LTP_VERSION], [ltp-list@lists.sourceforge.net]) |
| AC_CONFIG_AUX_DIR([.]) |
| AM_INIT_AUTOMAKE |
| AC_CONFIG_HEADERS([include/config.h]) |
| AC_CONFIG_FILES([ \ |
| include/mk/config.mk \ |
| include/mk/features.mk \ |
| lib/ltp.pc \ |
| ltp-devel.spec \ |
| m4/Makefile \ |
| execltp \ |
| README.ltp-devel \ |
| ]) |
| |
| AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes) |
| |
| AC_CANONICAL_HOST |
| |
| AC_PROG_CC |
| # <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about |
| # 2.62. |
| AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) |
| AC_PROG_AR |
| AC_PROG_LEX |
| AC_PROG_RANLIB |
| AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) |
| AC_PROG_STRIP |
| AC_PROG_YACC |
| |
| AC_PREFIX_DEFAULT(/opt/ltp) |
| |
| AC_CHECK_HEADERS([ \ |
| dmapi.h \ |
| ifaddrs.h \ |
| libaio.h \ |
| mm.h \ |
| pthread.h \ |
| attr/xattr.h \ |
| linux/genetlink.h \ |
| linux/mempolicy.h \ |
| linux/module.h \ |
| linux/netlink.h \ |
| sys/epoll.h \ |
| sys/inotify.h \ |
| sys/jfsdmapi.h \ |
| sys/prctl.h \ |
| ]) |
| |
| # Tools knobs |
| |
| # Expect |
| AC_ARG_WITH([bash], |
| [AC_HELP_STRING([--with-bash], |
| [have the Bourne Again SHell interpreter (default=no)])], |
| [with_bash=yes], |
| ) |
| if test "x$with_bash" = xyes; then |
| AC_SUBST([WITH_BASH],["yes"]) |
| else |
| AC_SUBST([WITH_BASH],["no"]) |
| fi |
| |
| AC_ARG_WITH([expect], |
| [AC_HELP_STRING([--with-expect], |
| [have the Tcl/expect library (default=yes)])], |
| [with_expect=yes], |
| [with_expect=no] |
| ) |
| if test "x$with_expect" = xyes; then |
| AC_SUBST([WITH_EXPECT],["yes"]) |
| else |
| AC_SUBST([WITH_EXPECT],["no"]) |
| fi |
| |
| # Perl |
| AC_ARG_WITH([perl], |
| [AC_HELP_STRING([--with-perl], |
| [have a perl interpreter (default=yes)])], |
| [with_perl=yes], |
| [with_perl=no] |
| ) |
| if test "x$with_perl" = xyes; then |
| AC_SUBST([WITH_PERL],["yes"]) |
| else |
| AC_SUBST([WITH_PERL],["no"]) |
| fi |
| |
| # Python |
| AC_ARG_WITH([python], |
| [AC_HELP_STRING([--with-python], |
| [have a python interpreter (default=yes)])], |
| [with_python=yes], |
| [with_python=no] |
| ) |
| if test "x$with_python" = xyes; then |
| AC_SUBST([WITH_PYTHON],["yes"]) |
| else |
| AC_SUBST([WITH_PYTHON],["no"]) |
| fi |
| # END tools knobs |
| |
| # Testsuites knobs |
| |
| # testcases/kernel/power_management requires python. |
| if test "x$with_python" = xyes; then |
| AC_ARG_WITH([power-management-testsuite], |
| [AC_HELP_STRING([--with-power-management-testsuite], |
| [compile and install the x86 power management testsuite (default=no)])], |
| [with_power_management_testsuite=yes], |
| ) |
| fi |
| if test "x$with_power_management_testsuite" = xyes; then |
| AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["yes"]) |
| else |
| AC_SUBST([WITH_POWER_MANAGEMENT_TESTSUITE],["no"]) |
| fi |
| |
| AC_ARG_WITH([open-posix-testsuite], |
| [AC_HELP_STRING([--with-open-posix-testsuite], |
| [compile and install the open posix testsuite (default=no)])], |
| [with_open_posix_testsuite=yes] |
| ) |
| if test "x$with_open_posix_testsuite" = xyes; then |
| AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) |
| else |
| AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) |
| fi |
| |
| # testcases/realtime requires bash and python. |
| if test "x$with_bash" = xyes && test "x$with_python" = xyes; then |
| AC_ARG_WITH([realtime-testsuite], |
| [AC_HELP_STRING([--with-realtime-testsuite], |
| [compile and install the realtime testsuite (default=no)])], |
| [with_realtime_testsuite=yes] |
| ) |
| fi |
| if test "x$with_realtime_testsuite" = xyes; then |
| AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) |
| # Run configure on testcases/realtime as well. |
| AC_CONFIG_SUBDIRS([testcases/realtime]) |
| else |
| AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) |
| fi |
| |
| # END testsuites knobs |
| LTP_CHECK_FORTIFY_SOURCE |
| LTP_CHECK_MKDTEMP |
| LTP_CHECK_CAPABILITY_SUPPORT |
| LTP_CHECK_CRYPTO |
| LTP_CHECK_LINUX_PTRACE |
| LTP_CHECK_NOMMU_LINUX |
| LTP_CHECK_PRCTL_SUPPORT |
| LTP_CHECK_SECUREBITS |
| LTP_CHECK_SELINUX |
| LTP_CHECK_SIGNAL |
| LTP_CHECK_SYSCALL_EVENTFD |
| LTP_CHECK_SYSCALL_KEYCTL |
| LTP_CHECK_SYSCALL_MODIFY_LDT |
| LTP_CHECK_SYSCALL_NUMA |
| LTP_CHECK_SYSCALL_QUOTACTL |
| LTP_CHECK_SYSCALL_SIGNALFD |
| LTP_CHECK_SYSCALL_UNSHARE |
| LTP_CHECK_TASKSTATS |
| LTP_CHECK_TIME |
| LTP_CHECK_MADVISE |
| LTP_CHECK_ACL_SUPPORT |
| LTP_CHECK_FS_IOC_FLAGS |
| LTP_CHECK_MREMAP_FIXED |
| LTP_CHECK_KERNEL_DEVEL |
| LTP_CHECK_XFS_QUOTACTL |
| |
| AC_OUTPUT |