Home | History | Annotate | Download | only in ltp
      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     ifaddrs.h \
     35     keyutils.h \
     36     linux/can.h \
     37     linux/genetlink.h \
     38     linux/keyctl.h \
     39     linux/if_packet.h \
     40     linux/if_ether.h \
     41     linux/mempolicy.h \
     42     linux/module.h \
     43     linux/netlink.h \
     44     mm.h \
     45     pthread.h \
     46     sys/epoll.h \
     47     sys/fanotify.h \
     48     sys/inotify.h \
     49     sys/prctl.h \
     50     sys/shm.h \
     51     sys/ustat.h \
     52     sys/xattr.h \
     53 ])
     54 
     55 AC_CHECK_FUNCS([ \
     56     profil \
     57     ustat \
     58 ])
     59 
     60 # Tools knobs
     61 
     62 # Expect
     63 AC_ARG_WITH([bash],
     64   [AC_HELP_STRING([--with-bash],
     65     [have the Bourne Again SHell interpreter (default=no)])],
     66   [with_bash=yes],
     67 )
     68 if test "x$with_bash" = xyes; then
     69     AC_SUBST([WITH_BASH],["yes"])
     70 else
     71     AC_SUBST([WITH_BASH],["no"])
     72 fi
     73 
     74 AC_ARG_WITH([expect],
     75   [AC_HELP_STRING([--with-expect],
     76     [have the Tcl/expect library (default=yes)])],
     77   [with_expect=yes],
     78   [with_expect=no]
     79 )
     80 if test "x$with_expect" = xyes; then
     81     AC_SUBST([WITH_EXPECT],["yes"])
     82 else
     83     AC_SUBST([WITH_EXPECT],["no"])
     84 fi
     85 
     86 # Perl
     87 AC_ARG_WITH([perl],
     88   [AC_HELP_STRING([--with-perl],
     89     [have a perl interpreter (default=yes)])],
     90   [with_perl=yes],
     91   [with_perl=no]
     92 )
     93 if test "x$with_perl" = xyes; then
     94     AC_SUBST([WITH_PERL],["yes"])
     95 else
     96     AC_SUBST([WITH_PERL],["no"])
     97 fi
     98 
     99 # Python
    100 AC_ARG_WITH([python],
    101   [AC_HELP_STRING([--with-python],
    102     [have a python interpreter (default=yes)])],
    103   [with_python=yes],
    104   [with_python=no]
    105 )
    106 if test "x$with_python" = xyes; then
    107     AC_SUBST([WITH_PYTHON],["yes"])
    108 else
    109     AC_SUBST([WITH_PYTHON],["no"])
    110 fi
    111 # END tools knobs
    112 
    113 # Testsuites knobs
    114 
    115 AC_ARG_WITH([open-posix-testsuite],
    116   [AC_HELP_STRING([--with-open-posix-testsuite],
    117     [compile and install the open posix testsuite (default=no)])],
    118   [with_open_posix_testsuite=$withval]
    119 )
    120 if test "x$with_open_posix_testsuite" = xyes; then
    121     AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
    122 else
    123     AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
    124 fi
    125 
    126 # testcases/realtime requires bash and python.
    127 if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
    128     AC_ARG_WITH([realtime-testsuite],
    129       [AC_HELP_STRING([--with-realtime-testsuite],
    130         [compile and install the realtime testsuite (default=no)])],
    131       [with_realtime_testsuite=yes]
    132     )
    133 fi
    134 if test "x$with_realtime_testsuite" = xyes; then
    135     AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
    136     # Run configure on testcases/realtime as well.
    137     AC_CONFIG_SUBDIRS([testcases/realtime])
    138 else
    139     AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
    140 fi
    141 
    142 AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
    143 
    144 AC_CONFIG_COMMANDS([syscalls.h], [cd ${ac_top_srcdir}/include/lapi/syscalls; ./regen.sh])
    145 
    146 # END testsuites knobs
    147 LTP_CHECK_FORTIFY_SOURCE
    148 LTP_CHECK_CC_WARN_OLDSTYLE
    149 LTP_CHECK_MKDTEMP
    150 LTP_CHECK_CAPABILITY_SUPPORT
    151 LTP_CHECK_CRYPTO
    152 LTP_CHECK_LINUX_PTRACE
    153 LTP_CHECK_NOMMU_LINUX
    154 LTP_CHECK_PRCTL_SUPPORT
    155 LTP_CHECK_SECUREBITS
    156 LTP_CHECK_SELINUX
    157 LTP_CHECK_SIGNAL
    158 LTP_CHECK_SYSCALL_EVENTFD
    159 LTP_CHECK_SYSCALL_MODIFY_LDT
    160 LTP_CHECK_SYSCALL_NUMA
    161 LTP_CHECK_SYSCALL_QUOTACTL
    162 LTP_CHECK_SYSCALL_SIGNALFD
    163 LTP_CHECK_SYSCALL_UNSHARE
    164 LTP_CHECK_SYSCALL_UTIMENSAT
    165 LTP_CHECK_TASKSTATS
    166 LTP_CHECK_TIME
    167 LTP_CHECK_MADVISE
    168 LTP_CHECK_ACL_SUPPORT
    169 LTP_CHECK_FS_IOC_FLAGS
    170 LTP_CHECK_MREMAP_FIXED
    171 LTP_CHECK_KERNEL_DEVEL
    172 LTP_CHECK_XFS_QUOTACTL
    173 LTP_CHECK_CLONE_SUPPORTS_7_ARGS
    174 LTP_CHECK_MKDIRAT
    175 LTP_CHECK_FCHOWNAT
    176 LTP_CHECK_FSTATAT
    177 LTP_CHECK_MKNODAT
    178 LTP_CHECK_READLINKAT
    179 LTP_CHECK_OPENAT
    180 LTP_CHECK_RENAMEAT
    181 LTP_CHECK_RENAMEAT2
    182 LTP_CHECK_FALLOCATE
    183 LTP_CHECK_SYSCALL_FCNTL
    184 LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
    185 LTP_CHECK_TIRPC
    186 LTP_CHECK_TEE
    187 LTP_CHECK_SPLICE
    188 LTP_CHECK_VMSPLICE
    189 LTP_CHECK_TIMERFD
    190 LTP_CHECK_IOVEC
    191 LTP_CHECK_LINUXRANDOM
    192 LTP_CHECK_IF_LINK
    193 LTP_CHECK_KCMP
    194 LTP_CHECK_KCMP_TYPE
    195 LTP_CHECK_PREADV
    196 LTP_CHECK_PWRITEV
    197 LTP_CHECK_EPOLL_PWAIT
    198 LTP_CHECK_KEYUTILS_SUPPORT
    199 LTP_CHECK_SYNC_ADD_AND_FETCH
    200 LTP_CHECK_BUILTIN_CLEAR_CACHE
    201 LTP_CHECK_MMSGHDR
    202 LTP_CHECK_UNAME_DOMAINNAME
    203 LTP_CHECK_X_TABLES
    204 LTP_CHECK_ATOMIC_MEMORY_MODEL
    205 LTP_CHECK_TPACKET_V3
    206 LTP_DETECT_HOST_CPU
    207 
    208 AC_OUTPUT
    209