1AC_PREREQ(2.61) 2AC_INIT([ltp], [LTP_VERSION], [ltp@lists.linux.it]) 3AC_CONFIG_AUX_DIR([.]) 4AM_INIT_AUTOMAKE 5AC_CONFIG_HEADERS([include/config.h]) 6AC_CONFIG_MACRO_DIR([m4]) 7AC_CONFIG_FILES([ \ 8 include/mk/config.mk \ 9 include/mk/config-openposix.mk \ 10 include/mk/features.mk \ 11 lib/ltp.pc \ 12 m4/Makefile \ 13 execltp \ 14]) 15 16AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes) 17 18AC_CANONICAL_HOST 19 20AC_PROG_CC 21# <= 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, :)]) 24AC_PROG_AR 25AC_PROG_LEX 26AC_PROG_RANLIB 27AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) 28AC_PROG_STRIP 29AC_PROG_YACC 30 31AC_PREFIX_DEFAULT(/opt/ltp) 32 33AC_CHECK_HEADERS([ \ 34 dmapi.h \ 35 ifaddrs.h \ 36 libaio.h \ 37 mm.h \ 38 pthread.h \ 39 sys/xattr.h \ 40 linux/genetlink.h \ 41 linux/mempolicy.h \ 42 linux/module.h \ 43 linux/netlink.h \ 44 sys/epoll.h \ 45 sys/inotify.h \ 46 sys/fanotify.h \ 47 sys/jfsdmapi.h \ 48 sys/prctl.h \ 49]) 50 51# Tools knobs 52 53# Expect 54AC_ARG_WITH([bash], 55 [AC_HELP_STRING([--with-bash], 56 [have the Bourne Again SHell interpreter (default=no)])], 57 [with_bash=yes], 58) 59if test "x$with_bash" = xyes; then 60 AC_SUBST([WITH_BASH],["yes"]) 61else 62 AC_SUBST([WITH_BASH],["no"]) 63fi 64 65AC_ARG_WITH([expect], 66 [AC_HELP_STRING([--with-expect], 67 [have the Tcl/expect library (default=yes)])], 68 [with_expect=yes], 69 [with_expect=no] 70) 71if test "x$with_expect" = xyes; then 72 AC_SUBST([WITH_EXPECT],["yes"]) 73else 74 AC_SUBST([WITH_EXPECT],["no"]) 75fi 76 77# Perl 78AC_ARG_WITH([perl], 79 [AC_HELP_STRING([--with-perl], 80 [have a perl interpreter (default=yes)])], 81 [with_perl=yes], 82 [with_perl=no] 83) 84if test "x$with_perl" = xyes; then 85 AC_SUBST([WITH_PERL],["yes"]) 86else 87 AC_SUBST([WITH_PERL],["no"]) 88fi 89 90# Python 91AC_ARG_WITH([python], 92 [AC_HELP_STRING([--with-python], 93 [have a python interpreter (default=yes)])], 94 [with_python=yes], 95 [with_python=no] 96) 97if test "x$with_python" = xyes; then 98 AC_SUBST([WITH_PYTHON],["yes"]) 99else 100 AC_SUBST([WITH_PYTHON],["no"]) 101fi 102# END tools knobs 103 104# Testsuites knobs 105 106AC_ARG_WITH([open-posix-testsuite], 107 [AC_HELP_STRING([--with-open-posix-testsuite], 108 [compile and install the open posix testsuite (default=no)])], 109 [with_open_posix_testsuite=$withval] 110) 111if test "x$with_open_posix_testsuite" = xyes; then 112 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) 113else 114 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) 115fi 116 117# testcases/realtime requires bash and python. 118if test "x$with_bash" = xyes && test "x$with_python" = xyes; then 119 AC_ARG_WITH([realtime-testsuite], 120 [AC_HELP_STRING([--with-realtime-testsuite], 121 [compile and install the realtime testsuite (default=no)])], 122 [with_realtime_testsuite=yes] 123 ) 124fi 125if test "x$with_realtime_testsuite" = xyes; then 126 AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"]) 127 # Run configure on testcases/realtime as well. 128 AC_CONFIG_SUBDIRS([testcases/realtime]) 129else 130 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) 131fi 132 133AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) 134 135# END testsuites knobs 136LTP_CHECK_FORTIFY_SOURCE 137LTP_CHECK_CC_WARN_OLDSTYLE 138LTP_CHECK_MKDTEMP 139LTP_CHECK_CAPABILITY_SUPPORT 140LTP_CHECK_CRYPTO 141LTP_CHECK_LINUX_PTRACE 142LTP_CHECK_NOMMU_LINUX 143LTP_CHECK_PRCTL_SUPPORT 144LTP_CHECK_SECUREBITS 145LTP_CHECK_SELINUX 146LTP_CHECK_SIGNAL 147LTP_CHECK_SYSCALL_EVENTFD 148LTP_CHECK_SYSCALL_MODIFY_LDT 149LTP_CHECK_SYSCALL_NUMA 150LTP_CHECK_SYSCALL_QUOTACTL 151LTP_CHECK_SYSCALL_SIGNALFD 152LTP_CHECK_SYSCALL_UNSHARE 153LTP_CHECK_SYSCALL_UTIMENSAT 154LTP_CHECK_TASKSTATS 155LTP_CHECK_TIME 156LTP_CHECK_MADVISE 157LTP_CHECK_ACL_SUPPORT 158LTP_CHECK_FS_IOC_FLAGS 159LTP_CHECK_MREMAP_FIXED 160LTP_CHECK_KERNEL_DEVEL 161LTP_CHECK_XFS_QUOTACTL 162LTP_CHECK_CLONE_SUPPORTS_7_ARGS 163LTP_CHECK_MKDIRAT 164LTP_CHECK_FCHOWNAT 165LTP_CHECK_FSTATAT 166LTP_CHECK_MKNODAT 167LTP_CHECK_READLINKAT 168LTP_CHECK_OPENAT 169LTP_CHECK_RENAMEAT 170LTP_CHECK_RENAMEAT2 171LTP_CHECK_FALLOCATE 172LTP_CHECK_SYSCALL_FCNTL 173LTP_CHECK_SYSCALL_PERF_EVENT_OPEN 174LTP_CHECK_TIRPC 175LTP_CHECK_TEE 176LTP_CHECK_SPLICE 177LTP_CHECK_VMSPLICE 178LTP_CHECK_TIMERFD 179LTP_CHECK_CAN_SUPPORT 180LTP_CHECK_IOVEC 181LTP_CHECK_KEYCTL 182LTP_CHECK_LINUXRANDOM 183LTP_CHECK_IF_LINK 184LTP_CHECK_KCMP 185LTP_CHECK_KCMP_TYPE 186LTP_CHECK_PREADV 187LTP_CHECK_PWRITEV 188LTP_CHECK_EPOLL_PWAIT 189LTP_CHECK_KEYUTILS_SUPPORT 190LTP_CHECK_SYNC_ADD_AND_FETCH 191LTP_CHECK_BUILTIN_CLEAR_CACHE 192 193AC_OUTPUT 194