1 AC_PREREQ(2.61) 2 AC_INIT([ltp], [LTP_VERSION], [ltp (a] lists.linux.it]) 3 AC_CONFIG_AUX_DIR([.]) 4 AM_INIT_AUTOMAKE 5 AC_CONFIG_HEADERS([include/config.h]) 6 AC_CONFIG_MACRO_DIR([m4]) 7 AC_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 16 AM_CONDITIONAL(CROSS_COMPILATION, test x$cross_compiling = xyes) 17 18 AC_CANONICAL_HOST 19 20 AC_PROG_CC 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, :)]) 24 AC_PROG_AR 25 AC_PROG_LEX 26 AC_PROG_RANLIB 27 AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) 28 AC_PROG_STRIP 29 AC_PROG_YACC 30 31 AC_PREFIX_DEFAULT(/opt/ltp) 32 33 AC_CHECK_HEADERS([ \ 34 dmapi.h \ 35 ifaddrs.h \ 36 libaio.h \ 37 mm.h \ 38 pthread.h \ 39 attr/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 54 AC_ARG_WITH([bash], 55 [AC_HELP_STRING([--with-bash], 56 [have the Bourne Again SHell interpreter (default=no)])], 57 [with_bash=yes], 58 ) 59 if test "x$with_bash" = xyes; then 60 AC_SUBST([WITH_BASH],["yes"]) 61 else 62 AC_SUBST([WITH_BASH],["no"]) 63 fi 64 65 AC_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 ) 71 if test "x$with_expect" = xyes; then 72 AC_SUBST([WITH_EXPECT],["yes"]) 73 else 74 AC_SUBST([WITH_EXPECT],["no"]) 75 fi 76 77 # Perl 78 AC_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 ) 84 if test "x$with_perl" = xyes; then 85 AC_SUBST([WITH_PERL],["yes"]) 86 else 87 AC_SUBST([WITH_PERL],["no"]) 88 fi 89 90 # Python 91 AC_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 ) 97 if test "x$with_python" = xyes; then 98 AC_SUBST([WITH_PYTHON],["yes"]) 99 else 100 AC_SUBST([WITH_PYTHON],["no"]) 101 fi 102 # END tools knobs 103 104 # Testsuites knobs 105 106 AC_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=yes] 110 ) 111 if test "x$with_open_posix_testsuite" = xyes; then 112 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"]) 113 else 114 AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"]) 115 fi 116 117 # testcases/realtime requires bash and python. 118 if 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 ) 124 fi 125 if 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]) 129 else 130 AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) 131 fi 132 133 AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) 134 135 # END testsuites knobs 136 LTP_CHECK_FORTIFY_SOURCE 137 LTP_CHECK_CC_WARN_OLDSTYLE 138 LTP_CHECK_MKDTEMP 139 LTP_CHECK_CAPABILITY_SUPPORT 140 LTP_CHECK_CRYPTO 141 LTP_CHECK_LINUX_PTRACE 142 LTP_CHECK_NOMMU_LINUX 143 LTP_CHECK_PRCTL_SUPPORT 144 LTP_CHECK_SECUREBITS 145 LTP_CHECK_SELINUX 146 LTP_CHECK_SIGNAL 147 LTP_CHECK_SYSCALL_EVENTFD 148 LTP_CHECK_SYSCALL_MODIFY_LDT 149 LTP_CHECK_SYSCALL_NUMA 150 LTP_CHECK_SYSCALL_QUOTACTL 151 LTP_CHECK_SYSCALL_SIGNALFD 152 LTP_CHECK_SYSCALL_UNSHARE 153 LTP_CHECK_SYSCALL_UTIMENSAT 154 LTP_CHECK_TASKSTATS 155 LTP_CHECK_TIME 156 LTP_CHECK_MADVISE 157 LTP_CHECK_ACL_SUPPORT 158 LTP_CHECK_FS_IOC_FLAGS 159 LTP_CHECK_MREMAP_FIXED 160 LTP_CHECK_KERNEL_DEVEL 161 LTP_CHECK_XFS_QUOTACTL 162 LTP_CHECK_CLONE_SUPPORTS_7_ARGS 163 LTP_CHECK_MKDIRAT 164 LTP_CHECK_FCHOWNAT 165 LTP_CHECK_FSTATAT 166 LTP_CHECK_MKNODAT 167 LTP_CHECK_READLINKAT 168 LTP_CHECK_OPENAT 169 LTP_CHECK_RENAMEAT 170 LTP_CHECK_RENAMEAT2 171 LTP_CHECK_FALLOCATE 172 LTP_CHECK_SYSCALL_FCNTL 173 LTP_CHECK_SYSCALL_PERF_EVENT_OPEN 174 LTP_CHECK_TIRPC 175 LTP_CHECK_TEE 176 LTP_CHECK_SPLICE 177 LTP_CHECK_VMSPLICE 178 LTP_CHECK_TIMERFD 179 LTP_CHECK_CAN_SUPPORT 180 LTP_CHECK_IOVEC 181 LTP_CHECK_KEYCTL 182 LTP_CHECK_LINUXRANDOM 183 LTP_CHECK_IF_LINK 184 LTP_CHECK_KCMP 185 LTP_CHECK_KCMP_TYPE 186 LTP_CHECK_PREADV 187 LTP_CHECK_PWRITEV 188 LTP_CHECK_EPOLL_PWAIT 189 LTP_CHECK_KEYUTILS_SUPPORT 190 LTP_CHECK_SYNC_ADD_AND_FETCH 191 192 AC_OUTPUT 193