forked from ofi-cray/cray-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
79 lines (63 loc) · 2.58 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
AC_PREREQ([2.63])
AC_INIT([cray-tests], [0.5])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 dist-bzip2 foreign -Wall -Werror subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CANONICAL_HOST
case $host_os in
*linux*)
;;
*)
AC_MSG_ERROR([cray-tests only builds on Linux])
;;
esac
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AM_PROG_LIBTOOL
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT
AC_ARG_WITH([libfabric],
AC_HELP_STRING([--with-libfabric], [Use non-default libfabric location - default NO]),
[AS_IF([test -d $withval/lib64], [fab_libdir="lib64"], [fab_libdir="lib"])
CPPFLAGS="-I $withval/include $CPPFLAGS"
LDFLAGS="-L$withval/$fab_libdir $LDFLAGS"],
[])
dnl I think we'd rather just search for the pmi module
AC_ARG_WITH([pmi],
AC_HELP_STRING([--with-pmi], [Specify PMI location - default NO]),
[AS_IF([test -d $withval/lib64], [pmi_libdir="lib64"], [pmi_libdir="lib"])
CPPFLAGS="-I $withval/include $CPPFLAGS"
CPPFLAGS="-I $withval $CPPFLAGS"
LDFLAGS="-L$withval/$pmi_libdir $LDFLAGS"
AM_CONDITIONAL([HAVE_PMI], [true])],
[AM_CONDITIONAL([HAVE_PMI], [false])])
AC_CHECK_LIB([pmi], [PMI_Allgather],
AM_CONDITIONAL([HAVE_CRAY_PMI], [true]),
AM_CONDITIONAL([HAVE_CRAY_PMI], [false]))
AC_ARG_WITH([profiler],
AC_HELP_STRING([--with-profiler], [Specify libprofiler location - default NO]),
[AS_IF([test -d $withval/lib64], [profiler_libdir="lib64"], [profiler_libdir="lib"])
CPPFLAGS="-I $withval/include $CPPFLAGS"
LDFLAGS="-L$withval/$profiler_libdir $LDFLAGS"
AM_CONDITIONAL([HAVE_PROFILE], [true])],
[AM_CONDITIONAL([HAVE_PROFILE], [false])])
AC_CHECK_LIB([profiler], [ProfilerStart],
AM_CONDITIONAL([HAVE_CPUPROFILE], [true]),
AM_CONDITIONAL([HAVE_CPUPROFILE], [false]))
dnl Checks for libraries
AC_CHECK_LIB([fabric], fi_getinfo, [],
AC_MSG_ERROR([fi_getinfo() not found. cray-tests requires libfabric.]))
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADER([rdma/fabric.h], [],
[AC_MSG_ERROR([<rdma/fabric.h> not found. cray-tests requires libfabric.])])
AC_MSG_CHECKING([for fi_trywait support])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <rdma/fi_eq.h>]],
[[fi_trywait(NULL, NULL, 0);]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([cray-tests requires fi_trywait support. Cannot continue])])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT