forked from sstsimulator/sst-macro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
309 lines (246 loc) · 8.97 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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
dnl
dnl This file is part of SST/macroscale:
dnl The macroscale architecture simulator from the SST suite.
dnl Copyright (c) 2009 Sandia Corporation.
dnl This software is distributed under the BSD License.
dnl Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
dnl the U.S. Government retains certain rights in this software.
dnl For more information, see the LICENSE file in the top
dnl SST/macroscale directory.
dnl
#-------------------------------------------------
launch/launch_info.h \
# Basic setup
#-------------------------------------------------
# Version info, used both in library versioning and inside sstmacro.
m4_define([SSTMAC_VERSION_TAG], 7)
m4_define([SSTMAC_SUBVERSION_TAG], 2)
m4_define([SSTMAC_SUBSUBVERSION_TAG], 0)
dnl Enable this for releases
dnl m4_define([SSTMAC_SNAPSHOT_TAG])
dnl Enable this for beta releases
dnl m4_define([SSTMAC_SNAPSHOT_TAG],-beta1)
# Enable this for development snapshots (should generally be enabled)
#m4_define([SSTMAC_SNAPSHOT_TAG],-snapshot)
# Construct the sstmacro version
m4_define([SSTMAC_ACVERSION_TAG],
[SSTMAC_VERSION_TAG.SSTMAC_SUBVERSION_TAG.SSTMAC_SUBSUBVERSION_TAG])
dnl AC_PREREQ([2.68]) avoid this if possible
AC_INIT([sstmacro], [SSTMAC_ACVERSION_TAG], [[email protected]])
AC_CONFIG_MACRO_DIR([acinclude])
AC_CONFIG_AUX_DIR(bin)
AC_CONFIG_HEADER(sstmac/common/config.h)
AX_PREFIX_CONFIG_H(sstmac/common/sstmac_config.h, SSTMAC)
AC_CANONICAL_TARGET
if test "X$prefix" == "XNONE"; then
MY_PREFIX=$ac_default_prefix
else
MY_PREFIX=`cd $prefix ; pwd`
fi
MY_ABS_SRCPATH=`cd $srcdir ; pwd`
AC_DEFINE_UNQUOTED([CONFIG_INSTALL_INCLUDE_PATH], "$MY_PREFIX/include/sstmac/configurations",
[The include path for .ini configurations])
AC_DEFINE_UNQUOTED([CONFIG_SRC_INCLUDE_PATH], "$MY_ABS_SRCPATH/configurations",
[The include path for .ini configurations])
# Construct the libtool version
dnl Libtool library versioning is used to determine compatible libraries. A libtool version
dnl consists of three numbers CURRENT:REVISION:AGE. These have the following meanings:
dnl CURRENT: The most recent interface number that this library implements.
dnl REVISION: The implementation number of the current interface.
dnl AGE: The difference between the newest and oldest interfaces
dnl that this library implements. In other words, the
dnl library implements all the interface numbers in the
dnl range from number current - age to current.
dnl For new releases the following procedure is used to determine the new version:
dnl If incompatible changes are made: CURRENT++, REVISION=0, AGE=0
dnl else if interfaces are added: CURRENT++, REVISION=0, AGE++
dnl else (no interface changes): REVISION++
m4_define([SSTMAC_CURRENT_LIBVERS], 7)
m4_define([SSTMAC_REVISION_LIBVERS], 1)
m4_define([SSTMAC_AGE_LIBVERS], 0)
m4_define([SSTMAC_LIBVERSION_TAG],
[SSTMAC_CURRENT_LIBVERS:SSTMAC_REVISION_LIBVERS:SSTMAC_AGE_LIBVERS])
# More version info.
AH_TEMPLATE([VERSION], [Major version number])
AH_TEMPLATE([SUBVERSION], [Major version number])
AH_TEMPLATE([SUBSUBVERSION], [Major version number])
AC_DEFINE_UNQUOTED(VERSION, [SSTMAC_VERSION_TAG])
AC_DEFINE_UNQUOTED(SUBVERSION, [SSTMAC_SUBVERSION_TAG])
AC_DEFINE_UNQUOTED(SUBSUBVERSION, [SSTMAC_SUBSUBVERSION_TAG])
AC_SUBST(SSTMAC_LIBVERSION, [SSTMAC_LIBVERSION_TAG])
# Init automake
AM_INIT_AUTOMAKE([tar-pax -Wall -Werror foreign -Wno-portability subdir-objects])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
#-------------------------------------------------
# Environment
#-------------------------------------------------
# Find out if this is running Mac OS X.
darwin=false
case $target_os in
darwin*) darwin=true ;;
esac
AM_CONDITIONAL([DARWIN],[test "$darwin" = true])
# Before detecting compilers, we must see if a non-native DES core
# will be used. If so, we try to use its compiler and flags.
# Currently only supporting native DES.
nat_des=yes # native DES
sst_des=no # SST/core DES
# Check compilers and environment
dnl AC_PROG_RANLIB
AC_PROG_CC
AC_PROG_CXX
AC_PROG_FC
AC_LANG_CPLUSPLUS
AC_PROG_LIBTOOL
LT_INIT([shared disable-static dlopen])
#LT_INIT()
LT_PREREQ([2.2.6])
AC_PROG_LN_S
os=`$srcdir/bin/config_tools/get_os`
if test "X$os" = "Xubuntu"; then
LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
AM_CONDITIONAL([HAVE_UBUNTU], [true])
else
AM_CONDITIONAL([HAVE_UBUNTU], [false])
fi
CHECK_DLOPEN()
CHECK_CLANG()
CHECK_GCC()
CHECK_SST_CORE()
AC_CHECK_HEADERS([mpi.h],
have_mpi_header=yes,
have_mpi_header=no
)
if test "X$have_integrated_core" = "Xyes"; then
ac_configure_args="$ac_configure_args --with-cxxflags='$CXXFLAGS'"
else
CHECK_CPP11()
CHECK_BOOST()
CHECK_MPI_PARALLEL()
fi
CHECK_PYTHON()
AM_CONDITIONAL(HAVE_REGEXP, false)
# Check what's available and what's requested for
# thread context switching of applications
CHECK_THREADING()
# Check for whether to support event calendar optimizations
CHECK_EVENT_CALENDAR()
# MiniMD uses atomic builtins that may not be there. We fake it if needed.
CHECK_ATOMICS()
# Check what debugging features to enable
# and what debugging features to disable for performance
CHECK_DEBUG()
# Define the default environment (serial,thread parallel,mpi parallel,etc)
AH_TEMPLATE([DISTRIBUTED_MEMORY], [Define to indicate distributed memory])
AH_TEMPLATE([DEFAULT_ENV_STRING], [Define to indicate default environment type (mpi/serial)])
AH_TEMPLATE([DEFAULT_RUNTIME_STRING], [Define to indicate default runtime type (mpi/serial)])
AH_TEMPLATE([DEFAULT_EVENT_MANAGER_STRING], [Define to indicate default event manager (event map/clock cycler)])
AH_TEMPLATE([DEFAULT_PARTITION_STRING], [Define to indicate default partitioning strategy])
CHECK_REPO_BUILD([sstmac])
CHECK_MPI_IMPLEMENTATION()
CHECK_OTF2()
CHECK_MPI_TIMELINE_STATS()
CHECK_THREAD_PARALLEL()
#CHECK_FORTRAN()
CHECK_BACKTRACE_VIZ()
CHECK_INTEGER_TYPES()
CHECK_STL_REPLACEMENT_HEADERS()
CHECK_COMM_SYNC_STATS()
CHECK_CLANG_LIBTOOLING()
#-------------------------------------------------
# Configure subdirs
#-------------------------------------------------
ac_configure_args="$ac_configure_args --enable-sst --enable-sst-subrepo"
# Configure sprockit
AC_CONFIG_SUBDIRS([sprockit])
# Configure dumpi.
AC_CONFIG_SUBDIRS([sst-dumpi])
AC_CONFIG_SUBDIRS([sumi])
#-------------------------------------------------
# Custom new. Make sure this is last otherwise
# configure tests will fail.
#-------------------------------------------------
CHECK_CUSTOM_NEW()
#-------------------------------------------------
# Finalize
#-------------------------------------------------
dnl Don't reorder options.
dnl AC_PRESERVE_HELP_ORDER
AC_CONFIG_FILES([
Makefile
sstmac/Makefile
sstmac/install/Makefile
sstmac/dumpi_util/Makefile
sstmac/libraries/blas/Makefile
sstmac/libraries/sumi/Makefile
sstmac/libraries/pthread/Makefile
sstmac/libraries/machines/Makefile
sstmac/libraries/uq/Makefile
sstmac/libraries/Makefile
sstmac/skeletons/Makefile
sstmac/software/Makefile
sstmac/hardware/Makefile
sstmac/sst_core/Makefile
sstmac/backends/Makefile
sstmac/backends/common/Makefile
sstmac/backends/native/Makefile
sstmac/backends/mpi/Makefile
sstmac/main/Makefile
sstmac/common/Makefile
sstmac/replacements/Makefile
sstmac/clang_replacements/Makefile
bin/Makefile
python/Makefile
configurations/Makefile
tests/Makefile
tests/external/Makefile
tests/unit_tests/Makefile
tests/unit_tests/util/Makefile
tests/sumi/Makefile
tests/api/mpi/Makefile
tests/api/globals/Makefile
docs/doxygen.cfg
sumi-mpi/Makefile
])
AC_CONFIG_FILES([bin/sstmacro-config], [chmod +x bin/sstmacro-config])
AC_CONFIG_FILES([bin/sstccvars.py])
AC_OUTPUT
if test "X$with_mpiparallel" = "Xtrue"; then
yesno_mpiparallel="yes"
else
yesno_mpiparallel="no"
fi
# --------- Print out a configuration summary. ---------
echo
echo "SST Macroscale Configuration Summary:"
echo "---------------------------------------------------------------"
echo "Install prefix $prefix"
echo "OS $os"
echo "C compiler $CC"
echo "C++ compiler $CXX"
echo "CFLAGS $CFLAGS"
echo "CXXFLAGS $CXXFLAGS"
echo "CPPFLAGS $CPPFLAGS"
echo "LDFLAGS $LDFLAGS"
echo
echo "User Space Threading:"
echo " GNU Pth $enable_pth"
echo " Pthread $enable_pthread"
echo " Ucontext $enable_ucontext"
echo " Fcontext $enable_fcontext"
echo
echo "Parallel Discrete Event Simulation:"
echo " MPI PDES $yesno_mpiparallel"
echo " Multithreaded $with_multithread"
echo " Spinlock $with_spinlock"
echo " Thread Affinity $with_cpu_affinity"
echo
echo "SST Core $have_integrated_core"
echo "Clang Autoskeleton $found_clang"
echo "OTF2 Replay $build_otf2"
echo "MPI Timeline Stats $enable_mpi_timeline"
echo "MPI Sync Stats $with_comm_sync_stats"
echo "Graphviz Trace $enable_graphviz"
echo "Sanity Checking $enable_sanity_check"
echo "---------------------------------------------------------------"