-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
158 lines (128 loc) · 4.42 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
AC_PREREQ([2.59])
AC_INIT([benvolio], [0.0], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects silent-rules])
AM_SILENT_RULES([yes])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/client/bv-client.cc])
AC_CONFIG_HEADERS([include/bv-config.h])
#
# checks for programs
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_INSTALL
LT_INIT
# thallium depends on c++-14
AX_CXX_COMPILE_STDCXX(14, noext, mandatory)
# checks for libraries
PKG_PROG_PKG_CONFIG
if test "x$PKG_CONFIG" == "x"; then
AC_MSG_ERROR([Could not find pkg-config utility!])
fi
# checks for mochi services:
PKG_CHECK_MODULES([THALLIUM],[thallium], [],
AC_MSG_ERROR([Could not find working thallium installation]))
LIBS="$THALLIUM_LIBS $LIBS"
CPPFLAGS="$THALLIUM_CFLAGS $CPPFLAGS"
CFLAGS="$THALLIUM_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([SSG],[ssg],[],
AC_MSG_ERROR([Could not find working ssg installation!]) )
LIBS="$SSG_LIBS $LIBS"
CPPFLAGS="$SSG_CFLAGS $CPPFLAGS"
CFLAGS="$SSG_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([ABTIO],[abt-io],[],
AC_MSG_ERROR([Could not find working abt-io installation!]) )
LIBS="$ABTIO_LIBS $LIBS"
CPPFLAGS="$ABTIO_CFLAGS $CPPFLAGS"
CFLAGS="$ABTIO_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([BEDROCK],[bedrock-server],[],
AC_MSG_ERROR([Could not find working bedrock installation!]) )
LIBS="$BEDROCK_LIBS $LIBS"
CPPFLAGS="$BEDROCK_CFLAGS $CPPFLAGS"
CFLAGS="$BEDROCK_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([JSON],[nlohmann_json],[],
AC_MSG_ERROR([Could not find nlohman-json]))
LIBS="$JSON_LIBS $LIBS"
CPPFLAGS="$JSON_CFLAGS $CPPFLAGS"
CFLAGS="$JSON_CFLAGS $CFLAGS"
use_drc=0
PKG_CHECK_MODULES([DRC],[cray-drc],
[AC_DEFINE([USE_DRC], 1, [use cray dynamic rdma credentials]) ]
use_drc=1,
[] )
LIBS="$DRC_LIBS $LIBS"
CPPFLAGS="$DRC_CFLAGS $CPPFLAGS"
CFLAGS="$DRC_CFLAGS $CFLAGS"
AC_CHECK_LIB([margo], [margo_finalize])
# Bootstrapping: we can do it with either MPI or PMIx, but both require SSG to
# support it. We need to check for both SSG's level of support as well as
# general support in the environment.
# check if SSG was compiled with PMIX support
ssg_with_pmix=no
ssg_with_mpi=no
AC_CHECK_LIB([ssg],
[ssg_group_create_pmix],
[ssg_with_pmix=yes
AC_DEFINE([SSG_HAS_PMIX], 1, [Does SSG library have PMIx support?])],
[],
[-lpmix]
)
# almost all implementations provide a 'libmpi' ... except vendors
AC_SEARCH_LIBS([MPI_Init],
[mpi mpich mpi_ibm])
AC_CHECK_LIB([ssg],
[ssg_group_create_mpi],
[ssg_with_mpi=yes
AC_DEFINE([SSG_HAS_MPI], 1,[Does SSG library have MPI support])],
[]
)
# benvolio will use MPI, PMIx or both to bootstrap, but only if we find the
# necessary supporting libraries
pmix_ok=no
mpi_ok=no
AC_CHECK_LIB([pmix], [PMIx_Init])
AC_MSG_CHECKING([If PMIx programs can be compiled])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include<pmix.h>]], [[PMIx_Init(NULL, NULL,0);]] )],
[AC_DEFINE([HAVE_PMIX], [1], [Define to 1 if compiled with PMIx support])
pmix_ok=yes
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])]
)
AC_MSG_CHECKING([If MPI programs can be compiled])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include<mpi.h>]], [[MPI_Init(0,0);]])],
[AC_MSG_RESULT([yes])
mpi_ok=yes
AC_DEFINE([HAVE_MPI], [1], [Able to use MPI])],
[AC_MSG_RESULT([no])]
)
use_pmix=no
if test x$pmix_ok = xyes -a x$ssg_with_pmix = xyes ; then
use_pmix=yes
fi
use_mpi=no
if test x$mpi_ok = xyes -a x$ssg_with_mpi = xyes ; then
use_mpi=yes;
fi
AM_CONDITIONAL([USE_PMIX], [ test x$use_pmix = xyes ])
AM_CONDITIONAL([USE_MPI], [ test x$use_mpi = xyes ])
# we need *some* way to bootstrap: we can support one or the other or both but not none
AC_MSG_CHECKING([If at least one bootstrap method available])
if test x$use_pmix = xyes -o x$use_mpi = xyes ; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([Unable to detect MPI or PMIx ])
fi
AC_CHECK_LIB([lustreapi], [llapi_file_get_stripe])
# checks for header files
AC_CHECK_HEADERS([lustre/lustreapi.h])
# Checks for typedefs, structures, and compiler characteristics.
# checks for library functions
# statx: a lightweight way to ask for only a subset of information
AC_CHECK_FUNCS(statx)
# margo_init_ext: initialize margo with a json string
# margo_get_config: returns a json string describing internal state of margo and dependencies
AC_CHECK_FUNCS(margo_init_ext margo_get_config abt_io_get_config)
AC_CONFIG_FILES([Makefile maint/bv-client.pc maint/bv-provider.pc])
AC_OUTPUT