source: ThirdParty/vmg/configure.ac@ 5b3781

FitPartialCharges_GlobalError PartialCharges_OrthogonalSummation
Last change on this file since 5b3781 was 4e8108, checked in by Frederik Heber <heber@…>, 9 years ago

Libtool consolidates and updates itself through LIBTOOL_DEPS for all packages.

  • Property mode set to 100644
File size: 8.4 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([libvmg_config.h])
16AM_INIT_AUTOMAKE([1.7 dist-bzip2 1.5 parallel-tests color-tests tar-pax subdir-objects])
17
18# We use mostly C++, but may need Fortran compiler infos for Lapack.
19AC_LANG([C++])
20
21# Release version switch
22AC_MSG_CHECKING(whether to enable debug version)
23AC_ARG_ENABLE([debug],
24 AS_HELP_STRING([--enable-debug], [Compile with debug settings]),
25 enable_debug=$enableval,
26 enable_debug="no")
27AC_MSG_RESULT($enable_debug)
28AS_IF([test "$enable_debug" = "no"], [
29 AC_DEFINE([RELEASE], [1], [Release])
30 AC_DEFINE([NDEBUG], [1], [Skip asserts])
31])
32
33# One-sided communications
34AC_MSG_CHECKING(whether to enable one-sided MPI2 communications)
35AC_ARG_ENABLE([one_sided],
36 AS_HELP_STRING([--enable-one-sided], [Enable use of one-sided communications as according to MPI2 standard]),
37 enable_one_sided=$enableval,
38 enable_one_sided="no")
39AC_MSG_RESULT($enable_one_sided)
40AS_IF([test "$enable_one_sided" = "yes"], [
41 AC_DEFINE([VMG_ONE_SIDED], [1], [Enable use of one-sided MPI2 communications])
42])
43
44# Interpolating B-Spline degree
45AC_ARG_VAR(BSPLINE_DEG, [Degree of interpolating B-Splines. Must be in [3-6].])
46if test -z "$BSPLINE_DEG"
47then
48 BSPLINE_DEG=3
49fi
50AC_MSG_CHECKING(interpolation b-spline degree)
51AC_DEFINE_UNQUOTED([BSPLINE_DEGREE], ${BSPLINE_DEG}, [Interpolating B-Spline degree])
52AC_MSG_RESULT(${BSPLINE_DEG})
53
54# Debugging switches
55AC_MSG_CHECKING(whether to enable debugging)
56AC_ARG_ENABLE([debug],
57 AS_HELP_STRING([--enable-debug], [Enable debugging]),
58 enable_debug=$enableval,
59 enable_debug="no")
60AS_IF([test "x$enable_fcs_debug" != "x"],[enable_debug="yes"])
61AC_MSG_RESULT($enable_debug)
62AS_IF([test "$enable_debug" = "yes"], [
63 CXXFLAGS=${CXXFLAGS-"-g -O0 -Wall"}
64 AC_DEFINE([DEBUG], [1], [Debugging])
65])
66
67AC_MSG_CHECKING(whether to enable debug checking of matrices)
68AC_ARG_ENABLE([debug-check-matrices],
69 AS_HELP_STRING([--enable-debug-check-matrices], [Enable matrix validity checks]),
70 enable_debug_check_matrices=$enableval,
71 enable_debug_check_matrices="no")
72AC_MSG_RESULT($enable_debug_check_matrices)
73AS_IF([test "$enable_debug_check_matrices" = "yes"], [
74 AC_DEFINE([DEBUG_MATRIX_CHECKS], [1], [Matrix validity checks])
75])
76
77AC_MSG_CHECKING(whether to enable MPE profiling)
78AC_ARG_ENABLE([mpe],
79 AS_HELP_STRING([--enable-mpe], [Enable MPE parallel profiling]),
80 enable_mpe=$enableval,
81 enable_mpe="no")
82AC_MSG_RESULT($enable_mpe)
83
84AC_MSG_CHECKING(whether to enable MPI_Barrier debugging)
85AC_ARG_ENABLE([debug-barrier],
86 AS_HELP_STRING([--enable-debug-barrier], [Enable MPI_Barrier debugging]),
87 enable_debug_barrier=$enableval,
88 enable_debug_barrier="no")
89AC_MSG_RESULT($enable_debug_barrier)
90AS_IF([test "$enable_debug_barrier" = "yes"], [
91 AC_DEFINE([DEBUG_BARRIER], [1], [MPI_Barrier debugging])
92])
93
94# Several output switches
95AC_MSG_CHECKING(whether to enable info output)
96AC_ARG_ENABLE([output-info],
97 AS_HELP_STRING([--enable-output-info], [Enable info output]),
98 enable_output_info=$enableval,
99 enable_output_info="no")
100AS_IF([test "x$enable_fcs_info" != "x"],[enable_output_info="yes"])
101AC_MSG_RESULT($enable_output_info)
102AS_IF([test "$enable_output_info" = "yes"], [
103 AC_DEFINE([OUTPUT_INFO], [1], [Output level info])
104])
105
106AC_MSG_CHECKING(whether to enable debug output)
107AC_ARG_ENABLE([output-debug],
108 AS_HELP_STRING([--enable-output-debug], [Enable debug output]),
109 enable_output_debug=$enableval,
110 enable_output_debug="no")
111AS_IF([test "x$enable_fcs_debug" != "x"],[enable_output_debug="yes"])
112AC_MSG_RESULT($enable_output_debug)
113AS_IF([test "$enable_output_debug" = "yes"], [
114 AC_DEFINE([OUTPUT_DEBUG], [1], [Output level debug])
115])
116
117AC_MSG_CHECKING(whether to enable timing output)
118AC_ARG_ENABLE([output-timing],
119 AS_HELP_STRING([--enable-output-timing], [Enable timing output]),
120 enable_output_timing=$enableval,
121 enable_output_timing="no")
122AS_IF([test "x$enable_fcs_timing" != "x"],[enable_output_timing="yes"])
123AC_MSG_RESULT($enable_output_timing)
124AS_IF([test "$enable_output_timing" = "yes"], [
125 AC_DEFINE([OUTPUT_TIMING], [1], [Output level timing])
126])
127
128
129# Checks for programs.
130AM_MISSING_PROG([DOXYGEN], [doxygen])
131
132# 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).
133AX_PROG_CC_MPI(,,AC_MSG_FAILURE([The VMG solver requires an MPI C compiler.]))
134
135# Do not even look for a non-MPI C++ compiler if MPICXX is set.
136if test -n "$MPICXX" && test -z "$CXX"; then
137 CXX=$MPICXX
138fi
139ACX_MPI([AC_DEFINE([HAVE_MPI], [1],
140 [Define if building the MPI parallel version])
141 CXX=$MPICXX
142 LIBS="$MPILIBS $LIBS"
143 AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
144 AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
145 AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
146 AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
147 AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])]
148 if test "$enable_mpe" = "yes"; then
149 AC_DEFINE([HAVE_MPE], [1], [Use MPE parallel profiler])
150 fi,
151 [AC_DEFINE([sequent], [1],
152 [Define if building the serial version])])
153
154# Get the Fortran MPI compiler, for Lapack.
155AC_LANG_PUSH([Fortran])
156# Do not even look for a non-MPI Fortran compiler if MPIFC is set.
157AX_PROG_FC_MPI(,,AC_MSG_FAILURE([The VMG solver requires an MPI Fortran compiler.]))
158
159# Find out how to call Fortran functions from C.
160AC_FC_WRAPPERS
161AC_LANG_POP([Fortran])
162
163# Check for the restrict keyword.
164AC_C_RESTRICT
165
166AM_OPTIONS_VTK
167AM_PATH_VTK([5.8.0],
168 [AC_DEFINE([HAVE_VTK], [1], [VTK present on system])])
169
170AC_SUBST([VTK_CXXFLAGS])
171AC_SUBST([VTK_LDFLAGS])
172AC_SUBST([VTK_LIBS])
173
174# Boost
175BOOST_REQUIRE([1.34])
176
177# Boost headers with libraries
178BOOST_SYSTEM
179BOOST_FILESYSTEM
180BOOST_TEST
181
182AM_CONDITIONAL([COND_HAVE_BOOST_UNIT_TEST], [test x"$boost_cv_lib_unit_test_framework" = xyes])
183AM_CONDITIONAL([COND_HAVE_BOOST_UNIT_TEST_LIB], [test x"$boost_cv_lib_unit_test_framework" = xyes])
184
185# use libtool
186LT_INIT([static])
187AC_SUBST([LIBTOOL_DEPS])
188
189dnl superceded by libtool
190dnl AC_PROG_RANLIB
191dnl 4_ifdef([AM_PROG_AR], [AM_PROG_AR])
192
193# Define these substitions here to keep all version information in one place.
194# For information on how to properly maintain the library version information,
195# refer to the libtool manual, section "Updating library version information":
196# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
197AC_SUBST([VMG_SO_VERSION], [1:0:0])
198AC_SUBST([VMG_API_VERSION], [1.0.0])
199
200# Checks for libraries.
201AC_CHECK_LIB([m], [sqrt])
202AX_LAPACK
203AM_CONDITIONAL([HAVE_LAPACK], [test "x$ax_lapack_ok" = xyes])
204
205# Checks for header files.
206
207# Checks for types.
208
209# Set up FCS library arguments.
210m4_ifdef([AX_FCS_CONFIG_SOLVER_ARGS],[AX_FCS_CONFIG_SOLVER_ARGS])
211
212# Set up FCS library.
213m4_ifdef([AX_FCS_CONFIG_SOLVER],[AX_FCS_CONFIG_SOLVER])
214
215# Set up FCS types
216m4_ifdef([AX_FCS_TYPES],
217 [AC_DEFINE([vmg_float], [fcs_float],
218 [Define to the primary interface and computation floating type.])
219 AC_DEFINE([vmg_int], [fcs_int],
220 [Define to the primary integer type for particle indices.])],
221 [AC_DEFINE([vmg_float], [double],
222 [Define to the primary interface and computation floating type.])
223 AC_DEFINE([vmg_int], [int],
224 [Define to the primary integer type for particle indices.])])
225
226# Set up information for FCS package if inside the FCS tree.
227have_fcs="no"
228m4_ifdef([AX_FCS_PACKAGE_RESET],[
229AX_FCS_PACKAGE_RESET
230AX_FCS_PACKAGE_ADD([vmg_LIBS],[-lfcs_vmg])
231AX_FCS_PACKAGE_ADD([vmg_LIBS_A],[src/libfcs_vmg.a])
232AX_FCS_PACKAGE_ADD([vmg_LDADD],[$VTK_LDFLAGS $VTK_LIBS $BOOST_SYSTEM_LDFLAGS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LDFLAGS $BOOST_FILESYSTEM_LIBS $LAPACK_LIBS $BLAS_LIBS])
233AX_FCS_PACKAGE_ADD([CXXLIBS_USE],[yes])
234have_fsc="yes"
235])
236AM_CONDITIONAL(COND_HAVE_FCS, [test x"have_fcs" = xyes])
237
238# Checks for structures.
239
240# Checks for compiler characteristics.
241
242# Checks for library functions.
243
244# Checks for system services
245
246# we save the cache here because the tests below fail more commonly
247
248# package information
249AC_CONFIG_FILES([
250 VMG.pc:VMG.pc.in])
251
252AC_CONFIG_FILES([Makefile
253 src/Makefile
254 doc/Makefile
255 test/Makefile])
256
257AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.