forked from sstsimulator/sst-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
259 lines (210 loc) · 8.89 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
AC_INIT([SSTCore], [-dev], [[email protected]])
AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([config])
AC_PREFIX_DEFAULT([/usr/local])
AM_INIT_AUTOMAKE([1.9.6 foreign dist-bzip2 subdir-objects no-define tar-pax])
# If Automake supports silent rules, enable them.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_pattern_allow([LT_LIBEXT])
AC_CONFIG_HEADERS([src/sst/core/sst_config.h])
# Lets check for the standard compilers and basic options
AC_PROG_CC
AM_PROG_CC_C_O
m4_if(m4_defn([AC_AUTOCONF_VERSION]), 2.71,, m4_defn([AC_AUTOCONF_VERSION]), 2.70,, [AC_PROG_CC_C99])
AC_C_INLINE
AC_PROG_MAKE_SET
AC_PROG_CXX
AC_CACHE_SAVE
AC_PROG_CPP
AC_CANONICAL_HOST
AC_CACHE_SAVE
LT_INIT([shared disable-static dlopen])
dnl Work out the C++ standard which we are going to use
AX_CXX_COMPILE_STDCXX_1Y
AX_CXX_COMPILE_STDCXX_0X
AS_IF([test "x$found_cxx1y" = "xyes"],
[CXXFLAGS="$CXXFLAGS $SST_CXX1Y_FLAGS"],
[CXXFLAGS="$CXXFLAGS $SST_CXX0X_FLAGS"])
SST_CHECK_PICKY
AS_IF([test "x$use_picky" = "xyes"],
[WARNFLAGS="-Wall -Wextra"],
[WARNFLAGS=""])
CFLAGS="$CFLAGS $WARNFLAGS"
CXXFLAGS="$CXXFLAGS $WARNFLAGS"
CPPFLAGS='-I$(top_srcdir)/src -I$(top_builddir)/src'" $CPPFLAGS"
AC_CHECK_HEADERS([c_asm.h dlfcn.h intrinsics.h mach/mach_time.h sys/time.h sys/stat.h sys/types.h unistd.h])
AC_CACHE_SAVE
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$DOXYGEN" = "doxygen"])
SST_CHECK_PREVIEW_BUILD()
SST_ENABLE_TESTFRAMEWORK_DEV()
SST_CHECK_OSX()
SST_CHECK_MPI([], [AC_MSG_ERROR([Could not find MPI package])])
SST_CHECK_PYTHON([], [AC_MSG_ERROR([Could not find Python, this is required for SST to build])])
SST_CHECK_LIBZ([have_zlib="yes"],[have_zlib="no"],[AC_MSG_ERROR([zlib was requested but could not be found.])])
SST_CHECK_BACKTRACE()
SST_CHECK_HDF5()
SST_CHECK_MEM_POOL()
SST_ENABLE_DEBUG_OUTPUT()
SST_ENABLE_DEBUG_EVENT_TRACKING()
AS_IF([test "$use_mempool" = "no" -a "$enable_debug_event_tracking" = "yes"],
[AC_MSG_ERROR([Event Tracking cannot be enabled with mem-pools disabled.])])
SST_ENABLE_CORE_PROFILE()
SST_CHECK_FPIC()
SST_CHECK_ZOLTAN([have_zoltan=1],[have_zoltan=0],[AC_MSG_ERROR([Zoltan requested but not found])])
AS_IF([test "x$have_zoltan" = "x1"], [AC_DEFINE_UNQUOTED([HAVE_ZOLTAN], [1],
[Define if you have the Zoltan library.])])
AM_CONDITIONAL([HAVE_ZOLTAN], [test "$have_zoltan" = 1])
AC_DEFINE_UNQUOTED([SST_CPPFLAGS], ["$CPPFLAGS"], [Defines the CPPFLAGS used to build SST])
AC_DEFINE_UNQUOTED([SST_CFLAGS], ["$CFLAGS"], [Defines the CFLAGS used to build SST])
AC_DEFINE_UNQUOTED([SST_CXXFLAGS], ["$CXXFLAGS"], [Defines the CXXFLAGS used to build SST])
AC_DEFINE_UNQUOTED([SST_LDFLAGS], ["$LDFLAGS"], [Defines the LDFLAGS used to build SST])
AC_DEFINE_UNQUOTED([SST_CC], ["$CC"], [Defines the C compiler used to build SST])
AC_DEFINE_UNQUOTED([SST_CXX], ["$CXX"], [Defines the C++ compiler used to build SST])
AC_DEFINE_UNQUOTED([SST_LD], ["$LD"], [Defines the linker used to build SST])
AC_DEFINE_UNQUOTED([SST_MPICC], ["$MPICC"], [Defines the MPI C compiler used to build SST])
AC_DEFINE_UNQUOTED([SST_MPICXX], ["$MPICXX"], [Defines the MPI C++ compilers used to build SST])
AC_DEFINE_UNQUOTED([SST_CPP], ["$CPP"], [Defines the C preprocessor used to build SST])
AC_DEFINE_UNQUOTED([SST_CXXCPP], ["$CXXCPP"], [Defines the C++ preprocessor used to build SST])
AC_DEFINE_UNQUOTED([SST_PYTHON_CPPFLAGS], ["$PYTHON_CPPFLAGS"],
[Defines the CPPFLAGS needed to compile Python into SST])
AC_DEFINE_UNQUOTED([SST_PYTHON_LDFLAGS], ["$PYTHON_LDFLAGS"],
[Defines the LDFLAGS needed to compile Python into SST])
AC_DEFINE([__STDC_FORMAT_MACROS], [1], [Defines that standard PRI macros should be enabled])
AC_MSG_CHECKING([for SST-Core Git Branch, Head SHA and Commit Count])
if test -d ".git" ; then
SSTCORE_GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
AC_MSG_RESULT([${SSTCORE_GIT_BRANCH}])
SSTCORE_GIT_HEADSHA=`git rev-parse HEAD`
AC_MSG_RESULT([${SSTCORE_GIT_HEADSHA}])
SSTCORE_GIT_COMMITCOUNT=`git rev-list HEAD | wc -l | sed -e 's/^ *//g'`
AC_MSG_RESULT([${SSTCORE_GIT_COMMITCOUNT}])
else
SSTCORE_GIT_BRANCH="N/A"
AC_MSG_RESULT([${SSTCORE_GIT_BRANCH}])
SSTCORE_GIT_HEADSHA="${PACKAGE_VERSION}"
AC_MSG_RESULT([${SSTCORE_GIT_HEADSHA}])
SSTCORE_GIT_COMMITCOUNT="0"
AC_MSG_RESULT([${SSTCORE_GIT_COMMITCOUNT}])
fi
AC_SUBST(SSTCORE_GIT_BRANCH)
AC_DEFINE_UNQUOTED([SSTCORE_GIT_BRANCH], ["$SSTCORE_GIT_BRANCH"], [SST-Core Git Branch])
AC_SUBST(SSTCORE_GIT_HEADSHA)
AC_DEFINE_UNQUOTED([SSTCORE_GIT_HEADSHA], ["$SSTCORE_GIT_HEADSHA"], [SST-Core Git Head SHA])
AC_SUBST(SSTCORE_GIT_COMMITCOUNT)
AC_DEFINE_UNQUOTED([SSTCORE_GIT_COMMITCOUNT], ["$SSTCORE_GIT_COMMITCOUNT"], [SST-Core Git Commit Count])
CC_VERSION=`$CC --version | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/%/g' | awk -F'%' '{print $1}'`
AC_SUBST(CC_VERSION)
MPICC_VERSION=`$MPICC --version | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/%/g' | awk -F'%' '{print $1}'`
AC_SUBST(MPICC_VERSION)
AC_CACHE_SAVE
AC_DEFINE_UNQUOTED([SST_INSTALL_PREFIX], ["$prefix"], [Defines the location SST will be installed in])
AC_CACHE_SAVE
dnl Remove flags like -g, -O, and -W, that are not needed by other elements
SST_EXPORT_CXXFLAGS=`echo "$CXXFLAGS" | sed -E -e 's/ *-(g|O@<:@^@<:@:space:@:>@@:>@*|W@<:@^@<:@:space:@:>@@:>@+)//g'`
SST_EXPORT_CFLAGS=`echo "$CFLAGS" | sed -E -e 's/ *-(g|O@<:@^@<:@:space:@:>@@:>@*|W@<:@^@<:@:space:@:>@@:>@+)//g'`
AC_SUBST(SST_EXPORT_CXXFLAGS)
AC_SUBST(SST_EXPORT_CFLAGS)
AC_CONFIG_FILES([
Makefile
doc/Makefile
doc/Doxyfile
share/Makefile
share/SSTConfig.cmake
src/sst/sstsimulator.conf:src/sst/sst.conf
src/Makefile
src/sst/Makefile
src/sst/SST-${PACKAGE_VERSION}.pc:src/sst/sst.pc.in
src/sst/core/Makefile
src/sst/core/build_info.h:src/sst/core/build_info.h.in
])
AC_OUTPUT
echo ""
echo "-------------------------------------------------------"
echo "SST Core Configuration completed."
echo "-------------------------------------------------------"
echo "Build Environment:"
echo ""
printf "%38s : %s\n" "SST-Core Version" "$PACKAGE_VERSION"
if test "x$SSTCORE_GIT_HEADSHA" != "x$PACKAGE_VERSION"; then
printf "%38s : %s\n" "Git Branch" "$SSTCORE_GIT_BRANCH"
printf "%38s : %s\n" "Git HEAD SHA" "$SSTCORE_GIT_HEADSHA"
printf "%38s : %s\n" "Branch Commit Count" "$SSTCORE_GIT_COMMITCOUNT"
else
printf "%38s : %s\n" "Version" "SST-Core $PACKAGE_VERSION"
fi
printf "%38s : %s\n" "Prefix" "$prefix"
printf "%38s : %s\n" "Preprocessor" "$CPP"
printf "%38s : %s\n" "C++ Compiler" "$CXX"
printf "%38s : %s\n" "C Compiler" "$CC"
printf "%38s : %s\n" "Compiler Version" "$CC_VERSION"
printf "%38s : %s\n" "MPI C Compiler" "$MPICC"
printf "%38s : %s\n" "MPI C++ Compiler" "$MPICXX"
printf "%38s : %s\n" "MPI Compiler Version" "$MPICC_VERSION"
printf "%38s : %s\n" "Linker" "$LD"
printf "%38s : %s\n" "Preprocessor Options" "$CPPFLAGS"
printf "%38s : %s\n" "C Compiler Options" "$CFLAGS"
printf "%38s : %s\n" "C++ Compiler Options" "$CXXFLAGS"
if test "x$found_cxx1y" = "xyes"; then
printf "%38s : %s\n" "C++ Standard Compliance" "C++1Y/14"
else
printf "%38s : %s\n" "C++ Standard Compliance" "C++11"
fi
printf "%38s : %s\n" "Linker Options" "$LDFLAGS"
echo "-------------------------------------------------------"
echo "Configuration Information (Options):"
echo ""
if test "x$sst_use_mpi" = "x1" ; then
printf "%38s : Yes\n" "MPI enabled"
else
printf "%38s : No\n" "MPI enabled"
fi
if test "x$use_mempool" = "xyes" ; then
printf "%38s : Yes\n" "Mempool enabled"
else
printf "%38s : No\n" "Mempool enabled"
fi
if test "x$enable_debug" = "xyes" ; then
printf "%38s : Yes\n" "Debug output enabled"
else
printf "%38s : No\n" "Debug output enabled"
fi
if test "x$enable_debug_event_tracking" = "xyes" ; then
printf "%38s : Yes\n" "Event tracking enabled"
else
printf "%38s : No\n" "Event tracking enabled"
fi
if test "x$enable_profile" = "xyes" ; then
printf "%38s : Yes\n" "Performance profiling enabled"
else
printf "%38s : No\n" "Performance profiling enabled"
fi
echo "-------------------------------------------------------"
echo "Configuration Information (Dependencies):"
echo ""
printf "%38s : %s (%s)\n" "Found Python" "$PYTHON_EXE" "$PYTHON_VERSION"
if test "x$PYTHON_VERSION3" = "xyes" ; then
printf "%38s : Yes\n" "Python3"
else
printf "%38s : No\n" "Python3"
fi
if test "x$sst_check_zoltan_happy" = "xyes" ; then
printf "%38s : Yes\n" "Zoltan Partitioner"
else
printf "%38s : No\n" "Zoltan Partitioner"
fi
if test "x$sst_check_hdf5_happy" = "xyes" ; then
printf "%38s : Yes\n" "HDF5 Support"
else
printf "%38s : No\n" "HDF5 Support"
fi
if test "x$sst_check_libz_happy" = "xyes" ; then
printf "%38s : Yes\n" "libz compression library"
else
printf "%38s : No\n" "libz compression library"
fi
if test "x$PYTHON_VERSION3" = "xno"; then
printf "DEPRECATION NOTICE: Use of Python 2 is deprecated in favor of Python 3.5 or greater. Support for Python 2 may be removed in SST 12 or later.\n"
fi
echo "-------------------------------------------------------"