source: ThirdParty/vmg/configure.ac@ 7faa5c

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_vmg TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 7faa5c was 7faa5c, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit 'de061d9d851257a04e924d4472df4523d33bb08b' as 'ThirdParty/vmg'

  • 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])
187
188# superceded by libtool
189#AC_PROG_RANLIB
190#4_ifdef([AM_PROG_AR], [AM_PROG_AR])
191
192# Define these substitions here to keep all version information in one place.
193# For information on how to properly maintain the library version information,
194# refer to the libtool manual, section "Updating library version information":
195# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
196AC_SUBST([VMG_SO_VERSION], [1:0:0])
197AC_SUBST([VMG_API_VERSION], [1.0.0])
198
199# Checks for libraries.
200AC_CHECK_LIB([m], [sqrt])
201AX_LAPACK
202AM_CONDITIONAL([HAVE_LAPACK], [test "x$ax_lapack_ok" = xyes])
203
204# Checks for header files.
205
206# Checks for types.
207
208# Set up FCS library arguments.
209m4_ifdef([AX_FCS_CONFIG_SOLVER_ARGS],[AX_FCS_CONFIG_SOLVER_ARGS])
210
211# Set up FCS library.
212m4_ifdef([AX_FCS_CONFIG_SOLVER],[AX_FCS_CONFIG_SOLVER])
213
214# Set up FCS types
215m4_ifdef([AX_FCS_TYPES],
216 [AC_DEFINE([vmg_float], [fcs_float],
217 [Define to the primary interface and computation floating type.])
218 AC_DEFINE([vmg_int], [fcs_int],
219 [Define to the primary integer type for particle indices.])],
220 [AC_DEFINE([vmg_float], [double],
221 [Define to the primary interface and computation floating type.])
222 AC_DEFINE([vmg_int], [int],
223 [Define to the primary integer type for particle indices.])])
224
225# Set up information for FCS package if inside the FCS tree.
226have_fcs="no"
227m4_ifdef([AX_FCS_PACKAGE_RESET],[
228AX_FCS_PACKAGE_RESET
229AX_FCS_PACKAGE_ADD([vmg_LIBS],[-lfcs_vmg])
230AX_FCS_PACKAGE_ADD([vmg_LIBS_A],[src/libfcs_vmg.a])
231AX_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])
232AX_FCS_PACKAGE_ADD([CXXLIBS_USE],[yes])
233have_fsc="yes"
234])
235AM_CONDITIONAL(COND_HAVE_FCS, [test x"have_fcs" = xyes])
236
237# Checks for structures.
238
239# Checks for compiler characteristics.
240
241# Checks for library functions.
242
243# Checks for system services
244
245# we save the cache here because the tests below fail more commonly
246
247# package information
248AC_CONFIG_FILES([
249 VMG.pc:VMG.pc.in])
250
251AC_CONFIG_FILES([Makefile
252 src/Makefile
253 doc/Makefile
254 test/Makefile])
255AC_CONFIG_FILES([vmg.pc:vmg.pc.in])
256
257AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.