source: configure.ac@ 06e153

Last change on this file since 06e153 was 716da7, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Fix energy calculation.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1729 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 7.5 KB
Line 
1
2# -*- Autoconf -*-
3# Process this file with autoconf to produce a configure script.
4
5AC_PREREQ([2.60])
6AC_INIT([VMG], [0.1], [tremolo-devel@ins.uni-bonn.de])
7
8AC_MSG_NOTICE([****************************************************************])
9AC_MSG_NOTICE([* Configuring solver VMG *])
10AC_MSG_NOTICE([****************************************************************])
11
12AC_CONFIG_SRCDIR([src/mg.cpp])
13AC_CONFIG_AUX_DIR([build-aux])
14AC_CONFIG_MACRO_DIR([m4])
15AC_CONFIG_HEADERS([config.h])
16AM_INIT_AUTOMAKE([1.7 -Wall foreign])
17
18# We use mostly C++, but may need Fortran compiler infos for Lapack.
19AC_LANG([C++])
20
21# switch for one-sided communications
22AC_MSG_CHECKING(whether to enable one-sided MPI2 communications)
23AC_ARG_ENABLE([one_sided],
24 AS_HELP_STRING([--enable-one-sided], [Enable use of one-sided communications as according to MPI2 standard]),
25 enable_one_sided=$enableval,
26 enable_one_sided="no")
27AC_MSG_RESULT($enable_one_sided)
28AS_IF([test "$enable_one_sided" = "yes"], [
29 AC_DEFINE([VMG_ONE_SIDED], [1], [Enable use of one-sided MPI2 communications])
30])
31
32# several debug output switches
33AC_MSG_CHECKING(whether to enable debugging)
34AC_ARG_ENABLE([debug],
35 AS_HELP_STRING([--enable-debug], [Enable debugging]),
36 enable_debug=$enableval,
37 enable_debug="no")
38AC_MSG_RESULT($enable_debug)
39AS_IF([test "$enable_debug" = "yes"], [
40 CXXFLAGS=${CXXFLAGS-"-g -O0 -Wall"}
41 AC_DEFINE([DEBUG], [1], [Debugging output])
42])
43
44AC_MSG_CHECKING(whether to enable debug checking of matrices)
45AC_ARG_ENABLE([debug-check-matrices],
46 AS_HELP_STRING([--enable-debug-check-matrices], [Enable matrix validity checks]),
47 enable_debug_check_matrices=$enableval,
48 enable_debug_check_matrices="no")
49AC_MSG_RESULT($enable_debug_check_matrices)
50AS_IF([test "$enable_debug_check_matrices" = "yes"], [
51 AC_DEFINE([DEBUG_MATRIX_CHECKS], [1], [Matrix validity checks])
52])
53
54AC_MSG_CHECKING(whether to enable debug output)
55AC_ARG_ENABLE([debug-output],
56 AS_HELP_STRING([--enable-debug-output], [Enable debugging output]),
57 enable_debug_output=$enableval,
58 enable_debug_output="no")
59AC_MSG_RESULT($enable_debug_output)
60AS_IF([test "$enable_debug_output" = "yes"], [
61 AC_DEFINE([DEBUG_OUTPUT], [1], [Debugging output])
62])
63
64AC_MSG_CHECKING(whether to enable MPE profiling)
65AC_ARG_ENABLE([mpe],
66 AS_HELP_STRING([--enable-mpe], [Enable MPE parallel profiling]),
67 enable_mpe=$enableval,
68 enable_mpe="no")
69AC_MSG_RESULT($enable_mpe)
70
71AC_MSG_CHECKING(whether to enable runtime measurement)
72AC_ARG_ENABLE([timer],
73 AS_HELP_STRING([--enable-timer], [Enable runtime measurement]),
74 enable_timer=$enableval,
75 enable_timer="no")
76AC_MSG_RESULT($enable_timer)
77AS_IF([test "$enable_timer" = "yes"], [
78 AC_DEFINE([DEBUG_MEASURE_TIME], [1], [Runtime measurement])
79])
80
81AC_MSG_CHECKING(whether to enable runtime measurement output)
82AC_ARG_ENABLE([timer-output],
83 AS_HELP_STRING([--enable-timer-output], [Enable runtime measurement output]),
84 enable_timer_output=$enableval,
85 enable_timer_output="no")
86AC_MSG_RESULT($enable_timer_output)
87AS_IF([test "$enable_timer_output" = "yes"], [
88 AC_DEFINE([DEBUG_MEASURE_TIME_OUTPUT], [1], [Output of runtime measurement])
89])
90
91AC_MSG_CHECKING(whether to enable MPI_Barrier debugging)
92AC_ARG_ENABLE([debug-barrier],
93 AS_HELP_STRING([--enable-debug-barrier], [Enable MPI_Barrier debugging]),
94 enable_debug_barrier=$enableval,
95 enable_debug_barrier="no")
96AC_MSG_RESULT($enable_debug_barrier)
97AS_IF([test "$enable_debug_barrier" = "yes"], [
98 AC_DEFINE([DEBUG_BARRIER], [1], [MPI_Barrier debugging])
99])
100
101AC_MSG_CHECKING(whether to enable release version)
102AC_ARG_ENABLE([release],
103 AS_HELP_STRING([--enable-release], [Compile with release settings]),
104 enable_release=$enableval,
105 enable_release="no")
106AC_MSG_RESULT($enable_release)
107AS_IF([test "$enable_release" = "yes"], [
108 AC_DEFINE([RELEASE], [1], [Release])
109 AC_DEFINE([NDEBUG], [1], [Skip asserts])
110])
111
112AC_ARG_VAR(BSPLINE_DEG, [Degree of interpolating B-Splines. Must be [3].])
113
114if test -z "$BSPLINE_DEG"
115then
116 BSPLINE_DEG=3
117fi
118
119AC_MSG_CHECKING(interpolation b-spline degree)
120AC_DEFINE_UNQUOTED([BSPLINE_DEGREE], ${BSPLINE_DEG}, [Interpolating B-Spline degree])
121AC_MSG_RESULT(${BSPLINE_DEG})
122
123# Checks for programs.
124AM_MISSING_PROG([DOXYGEN], [doxygen])
125
126# Get the C MPI compiler, because the following AC_FC_WRAPPERS macro works better if CC is from the same "family" as FC (which is MPI).
127AX_PROG_CC_MPI(,,AC_MSG_FAILURE([The VMG solver requires an MPI C compiler.]))
128
129# Do not even look for a non-MPI C++ compiler if MPICXX is set.
130if test -n "$MPICXX" && test -z "$CXX"; then
131 CXX=$MPICXX
132fi
133ACX_MPI([AC_DEFINE([HAVE_MPI], [1],
134 [Define if building the MPI parallel version])
135 CXX=$MPICXX
136 LIBS="$MPILIBS $LIBS"
137 AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
138 AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
139 AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
140 AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
141 AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])]
142 if test "$enable_mpe" = "yes"; then
143 AC_DEFINE([HAVE_MPE], [1], [Use MPE parallel profiler])
144 fi,
145 [AC_DEFINE([sequent], [1],
146 [Define if building the serial version])])
147
148# Get the Fortran MPI compiler, for Lapack.
149AC_LANG_PUSH([Fortran])
150# Do not even look for a non-MPI Fortran compiler if MPIFC is set.
151AX_PROG_FC_MPI(,,AC_MSG_FAILURE([The VMG solver requires an MPI Fortran compiler.]))
152
153# Find out how to call Fortran functions from C.
154AC_FC_WRAPPERS
155AC_LANG_POP([Fortran])
156
157# Check for the restrict keyword.
158AC_C_RESTRICT
159
160AM_OPTIONS_VTK
161AM_PATH_VTK([5.8.0],
162 [AC_DEFINE([HAVE_VTK], [1], [VTK present on system])])
163
164AC_SUBST([VTK_CXXFLAGS])
165AC_SUBST([VTK_LDFLAGS])
166AC_SUBST([VTK_LIBS])
167
168AX_BOOST_BASE([1.34],[have_boost=yes],[have_boost=no])
169if test "x$have_boost" = xyes ; then
170 AX_BOOST_SYSTEM
171 AX_BOOST_FILESYSTEM
172 AX_BOOST_UNIT_TEST_FRAMEWORK
173fi
174AM_CONDITIONAL([COND_HAVE_BOOST_UNIT_TEST], [test "x$have_boost" = xyes && test x"$ax_cv_boost_unit_test_framework" = xyes])
175AM_CONDITIONAL([COND_HAVE_BOOST_UNIT_TEST_LIB], [test "x$have_boost" = xyes && test x"$ax_cv_boost_unit_test_framework" = xyes && test x"$ax_cv_boost_unit_test_framework_lib" = xyes])
176
177AC_PROG_RANLIB
178
179# Checks for libraries.
180AC_CHECK_LIB([m], [sqrt])
181AX_LAPACK
182AM_CONDITIONAL([HAVE_LAPACK], [test "x$ax_lapack_ok" = xyes])
183
184# Checks for header files.
185
186# Checks for types.
187
188# Set up FCS types if inside the FCS tree.
189m4_ifdef([AX_FCS_TYPES],
190 [AX_FCS_TYPES
191 AC_DEFINE([vmg_float], [fcs_float],
192 [Define to the primary interface and computation floating type.])
193 AC_DEFINE([vmg_int], [fcs_int],
194 [Define to the primary integer type for particle indices.])],
195 [AC_DEFINE([vmg_float], [double],
196 [Define to the primary interface and computation floating type.])
197 AC_DEFINE([vmg_int], [int],
198 [Define to the primary integer type for particle indices.])])
199
200# Set up information for FCS package if inside the FCS tree.
201m4_ifdef([AX_FCS_PACKAGE_RESET],[
202AX_FCS_PACKAGE_RESET
203AX_FCS_PACKAGE_ADD([vmg_LIBS],[-lfcs_vmg])
204AX_FCS_PACKAGE_ADD([vmg_LIBS_A],[src/libfcs_vmg.a])
205AX_FCS_PACKAGE_ADD([vmg_LDADD],[$VTK_LDFLAGS $VTK_LIBS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $LAPACK_LIBS $BLAS_LIBS])
206AX_FCS_PACKAGE_ADD([CXXLIBS_USE],[yes])
207])
208
209# Checks for structures.
210
211# Checks for compiler characteristics.
212
213# Checks for library functions.
214
215# Checks for system services
216
217# we save the cache here because the tests below fail more commonly
218
219AC_CONFIG_FILES([Makefile
220 src/Makefile
221 doc/Makefile
222 test/Makefile
223 vmg_particles/Makefile])
224AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.