source: configure.ac@ 57388c9

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since 57388c9 was 5a2d98, checked in by Frederik Heber <heber@…>, 11 years ago

Set version to 1.4.4.

  • MoleCuilder library is now 13:2:1.
  • Codename "Gross" ([LOTR,ch.1]: "...Together we score one-hundred and forty-four...: One Gross, if I may use the expression.").
  • Property mode set to 100644
File size: 13.7 KB
Line 
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT(MoleCuilder, 1.4.4, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
6AC_CONFIG_AUX_DIR([build-aux])
7AC_CONFIG_SRCDIR([src/builder.cpp])
8AC_CONFIG_HEADER([config.h libmolecuilder_config.h])
9AC_CONFIG_MACRO_DIR([m4])
10AC_CONFIG_SUBDIRS([LinearAlgebra])
11
12# parallel-tests: use parallel test druver
13# color-tests: us coloring to indicate success/failure when available
14# tar-pax: use newer tar implementation with longer filename (>99 chars)
15AM_INIT_AUTOMAKE([dist-bzip2 1.5 parallel-tests color-tests tar-pax])
16
17# Checks for programs.
18AC_PROG_CXX
19AC_PROG_INSTALL
20
21# check for cppunit (taken from svn.apache.org/../xmlbeanscxx)
22AM_PATH_CPPUNIT(1.9.6)
23AM_CONDITIONAL(CONDCPPUNIT, test "$CPPUNIT_LIBS")
24
25dnl Check if we have enable python
26# python module
27AC_MSG_CHECKING(whether to enable python module)
28AC_ARG_ENABLE(
29 [python],
30 AS_HELP_STRING([--enable-python],[turn on python module [default=yes]]),
31 enable_python=$enableval,
32 enable_python="yes")
33AC_MSG_RESULT($enable_python)
34AS_IF([test x"$enable_python" != x"no"],[
35 # Python (for boost::python)
36 AM_PATH_PYTHON([2.2])
37 AX_PYTHON
38 AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."])
39])
40AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"])
41AC_SUBST(HAVE_PYTHON)
42
43dnl Check if we have enable qtgui
44# Qt programs
45AC_MSG_CHECKING(whether to enable Qt-based GUI)
46AC_ARG_ENABLE(
47 [qtgui],
48 AS_HELP_STRING([--enable-qtgui],[turn on Qt GUI compilation [default=yes]]),
49 enable_qtgui=$enableval,
50 enable_qtgui="yes")
51AC_MSG_RESULT($enable_qtgui)
52AS_IF([test x"$enable_qtgui" != x"no"],[
53 AC_ARG_WITH(
54 [Qt-bin],
55 [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
56 [have_qtgui_path=$withval],
57 have_qtgui_path="")
58 AC_PATH_PROGS([QT_MOC],
59 [moc-qt4 moc],
60 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
61 [$have_qtgui_path]
62 )
63 AC_PATH_PROGS([QT_RCC],
64 [rcc-qt4 rcc],
65 [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])],
66 [$have_qtgui_path]
67 )
68 AC_PATH_PROGS([QT_UIC],
69 [uic-qt4 uic],
70 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
71 [$have_qtgui_path]
72 )
73 PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
74 ])
75 AC_SUBST([QT_CFLAGS])
76 AC_SUBST([QT_LIBS])
77 AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
78])
79AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
80AC_SUBST(HAVE_QTGUI)
81
82# check additionally for QWT to enable plotting of potentials
83AC_MSG_CHECKING(whether to enable Qwt-based plotting)
84#enable_qwt=yes
85AC_ARG_ENABLE(
86 [qwt],
87 AS_HELP_STRING([--enable-qwt],[turn on Qwt compilation [default=yes]]),
88 enable_qwt=$enableval,
89 enable_qwt="yes")
90AC_MSG_RESULT($enable_qwt)
91AS_IF([test x"$enable_qwt" != x"no"],[
92 MOL_AC_HAVE_QWT_IFELSE(
93 [
94 enable_qwt=yes
95 AC_DEFINE(HAVE_QWT,1, ["Build Qwt-based plotting"])
96 ],
97 [
98 enable_qwt=no
99 AC_MSG_WARN([Qwt not found, disabling plotting in QtUI.])
100 ]
101 )
102])
103AM_CONDITIONAL([CONDQWT], [test x"$enable_qwt" != x"no"])
104AC_SUBST(HAVE_QWT)
105
106# use doxygen
107DX_HTML_FEATURE(ON)
108DX_PS_FEATURE(OFF)
109DX_PDF_FEATURE(OFF)
110DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
111
112# use libtool
113LT_INIT([static])
114
115# Define these substitions here to keep all version information in one place.
116# For information on how to properly maintain the library version information,
117# refer to the libtool manual, section "Updating library version information":
118# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
119AC_SUBST([MOLECUILDER_SO_VERSION], [13:2:1])
120AC_SUBST([MOLECUILDER_API_VERSION], [1.4.4])
121
122dnl this macro is used to get the arguments supplied
123dnl to the configure script (./configure --enable-debug)
124dnl Check if we have enable debug support.
125AC_MSG_CHECKING(whether to enable debugging)
126have_debug="no"
127AC_ARG_ENABLE(
128 [debug],
129 AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
130 enable_debug=$enableval,
131 enable_debug="no")
132AC_MSG_RESULT($enable_debug)
133AS_IF([test x"$enable_debug" = x"yes"],[
134 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
135 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
136 have_debug="yes"
137],[
138 AS_IF([test x"$enable_debug" = x"full"],[
139 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
140 AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
141 AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
142 AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
143 have_debug="full"
144 ],[
145 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
146 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
147 AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
148 have_debug="no"
149 ])
150])
151AC_SUBST(HAVE_DEBUG)
152
153dnl this macro is used to get the arguments supplied
154dnl to the configure script (./configure --enable-debug)
155dnl Check if we have enable debug support.
156AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
157AC_ARG_ENABLE(
158 [cache],
159 AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
160 enable_cache=$enableval,
161 enable_cache="yes")
162AC_MSG_RESULT($enable_cache)
163AS_IF([test x"$enable_cache" != x"no"],[
164 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
165],[
166 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
167 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
168])
169AC_SUBST(HAVE_CACHE)
170
171# Checks for libraries.
172AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
173
174# Boost
175BOOST_REQUIRE([1.40])
176
177# Boost headers only
178BOOST_ANY
179BOOST_ARRAY
180BOOST_BIMAP
181BOOST_BIND
182BOOST_CAST
183BOOST_CONVERSION
184BOOST_EXCEPTION
185BOOST_FOREACH
186BOOST_FUNCTION
187BOOST_FUSION
188BOOST_GRAPH
189BOOST_ITERATOR
190BOOST_MULTIARRAY
191BOOST_MPL
192BOOST_PREPROCESSOR
193BOOST_RANDOM
194BOOST_SMART_PTR
195BOOST_STRING_ALGO
196BOOST_TOKENIZER
197
198# Boost headers with libraries
199BOOST_FILESYSTEM
200BOOST_IOSTREAMS
201BOOST_PROGRAM_OPTIONS
202AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
203BOOST_SERIALIZATION
204BOOST_THREADS
205
206
207# CodePatterns library (extended toString.hpp)
208AM_PATH_CODEPATTERNS([1.2.7], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
209
210# JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
211AC_ARG_ENABLE(
212 [jobmarket],
213 AS_HELP_STRING([--enable-jobmarket],[turn on JobMarket feature [default=yes]]),
214 enable_jobmarket=$enableval,
215 enable_jobmarket="yes")
216AC_MSG_RESULT($enable_jobmarket)
217AS_IF([test x"$enable_jobmarket" != x"no"],[
218 # JobMarket library (needs priorizing of jobs)
219 AM_PATH_JOBMARKET([1.1.4], $have_debug,[
220 # the following is only required if we have JobMarket
221 BOOST_ASIO
222 AC_DEFINE(HAVE_JOBMARKET,1, ["use JobMarket to calculate fragment jobs."])
223 ],[
224 enable_jobmarket="no"
225 ])
226]
227#[
228# AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
229#]
230)
231AC_SUBST(HAVE_JOBMARKET)
232AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
233
234# VMG library
235AC_MSG_CHECKING(whether to compile in long-range support via VMG)
236AC_ARG_ENABLE(
237 [vmg],
238 [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])],
239 [enable_vmg=$enableval],
240 enable_vmg="no")
241AC_MSG_RESULT($enable_vmg)
242AS_IF([test x"$enable_vmg" != x"no"],[
243 PKG_CHECK_MODULES(VMG, VMG >= 0.1)
244 AC_SUBST(VMG_CFLAGS)
245 AC_SUBST(VMG_LIBS)
246 AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
247
248 # check whether to use mpi
249 AC_ARG_WITH(
250 [vmg-mpi],
251 [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])],
252 [with_vmg_mpi=yes],
253 [with_vmg_mpi=no])
254 AS_IF(
255 [test "x$with_vmg_mpi" != xno],
256 [
257 AC_LANG_SAVE
258 AC_LANG_CPLUSPLUS
259 LX_FIND_MPI
260 AC_LANG_RESTORE
261 AS_IF([test "x$have_CXX_mpi" = xyes],[
262 AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
263 AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
264 AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
265 AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
266 AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])
267 ])
268 ],
269 [])
270])
271AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
272AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
273
274
275# Check for Levenberg-Marquardt implementation
276AC_ARG_ENABLE(
277 [levmar],
278 AS_HELP_STRING([--enable-levmar],[turn on LevMar feature [default=no]]),
279 enable_levmar=$enableval,
280 enable_levmar="no")
281AS_IF([test x"$enable_levmar" = x"yes"],[
282 AX_LAPACK([enable_levmar=yes],[enable_levmar=no])])
283AC_MSG_CHECKING(whether to compile in Levenberg-Marquardt)
284AS_IF([test x"$enable_levmar" = x"yes"],[
285 AC_ARG_WITH(
286 [levmar],
287 [AS_HELP_STRING([--with-levmar], [give path to LevMar package])],
288 [have_levmar_path=$withval],
289 [enable_levmar=no])
290 ],[enable_levmar=no])
291AC_MSG_RESULT($enable_levmar)
292AS_IF([test x"$enable_levmar" = x"yes"],[
293 LEVMAR_CPPFLAGS="-I${have_levmar_path}/include"
294 LEVMAR_LDFLAGS="-L${have_levmar_path}/lib"
295 LEVMAR_LIBS="-llevmar"
296 AC_SUBST(LEVMAR_CPPFLAGS)
297 AC_SUBST(LEVMAR_LDFLAGS)
298 AC_SUBST(LEVMAR_LIBS)
299 AC_DEFINE(HAVE_LEVMAR,1, ["use levmar for non-linear minimisation/potential fitting."])
300 ])
301AM_CONDITIONAL([CONDLEVMAR], [test x"$enable_levmar" = x"yes"])
302
303# Checks for header files.
304AC_HEADER_STDC
305AC_CHECK_HEADERS([sys/time.h])
306AC_HEADER_STDBOOL
307
308AC_FUNC_MALLOC
309AC_FUNC_REALLOC
310AC_CHECK_FUNCS([floor pow sqrt strchr])
311
312# Checks for typedefs, structures, and compiler characteristics.
313AC_C_CONST
314AC_C_INLINE
315AC_C_RESTRICT
316AC_TYPE_SIZE_T
317
318# Checks for library functions.
319# check for GNU Scientific Library
320AC_CHECK_HEADERS([gsl/gsl_blas.h])
321AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
322AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
323AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
324#AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
325AC_CHECK_LIB(gsl, main)
326
327# use CppUnit TestRunner or not
328AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
329AC_ARG_ENABLE(
330 [ecut],
331 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
332 enable_ecut=$disableval,
333 enable_ecut="no")
334AC_MSG_RESULT($enable_ecut)
335AS_IF([test x"$enable_ecut" = x"yes"],[
336 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
337 AC_SUBST(HAVE_ECUT)
338])
339AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
340
341# with valgrinding testsuite or not
342AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
343AC_ARG_ENABLE(
344 [valgrind],
345 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
346 enable_valgrind=$enableval,
347 enable_valgrind="no")
348AC_MSG_RESULT($enable_valgrind)
349AS_IF([test x"$enable_valgrind" = x"yes"], [
350 AC_CHECK_HEADER([valgrind/valgrind.h],
351 [
352 # check header
353 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
354 # check path
355 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
356 # set variables
357 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
358 AC_SUBST(VALGRIND)
359 ],
360 [
361 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
362 ]
363 )
364])
365
366# Check for "extern inline", using a modified version
367# of the test for AC_C_INLINE from acspecific.mt
368AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
369[ac_cv_c_extern_inline=no
370AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
371extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
372double foo (double x) { return x + 1.0; };],
373[ foo(1.0) ],
374[ac_cv_c_extern_inline="yes"])
375])
376
377if test "$ac_cv_c_inline" != no ; then
378 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
379 AC_SUBST(HAVE_INLINE)
380fi
381
382#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
383
384# test suite
385
386AC_CONFIG_FILES([
387 tests/Makefile])
388
389AC_CONFIG_TESTDIR(tests/CodeChecks)
390AC_CONFIG_FILES([
391 tests/CodeChecks/atlocal
392 tests/CodeChecks/Makefile])
393
394AC_CONFIG_TESTDIR(tests/Fragmentations)
395AC_CONFIG_FILES([
396 tests/Fragmentations/atlocal
397 tests/Fragmentations/Makefile])
398AC_CONFIG_FILES([tests/Fragmentations/analyzer], [chmod +x tests/Fragmentations/analyzer])
399AC_CONFIG_FILES([tests/Fragmentations/joiner], [chmod +x tests/Fragmentations/joiner])
400AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
401
402AC_CONFIG_TESTDIR(tests/JobMarket)
403AC_CONFIG_FILES([
404 tests/JobMarket/atlocal
405 tests/JobMarket/Makefile])
406AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
407
408AC_CONFIG_TESTDIR(tests/regression)
409AC_CONFIG_FILES([
410 tests/regression/atlocal
411 tests/regression/Makefile])
412AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
413AC_CONFIG_FILES([tests/regression/runpython], [chmod +x tests/regression/runpython])
414
415AC_CONFIG_TESTDIR(tests/Tesselations)
416AC_CONFIG_FILES([
417 tests/Tesselations/atlocal
418 tests/Tesselations/Makefile])
419AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
420
421AC_CONFIG_FILES([
422 doc/molecuilder.xml])
423AC_CONFIG_FILES([
424 MoleCuilder.pc:MoleCuilder.pc.in])
425AC_CONFIG_FILES([
426 Makefile
427 doc/Makefile
428 src/Makefile
429 data/icons/Makefile
430 utils/Makefile
431])
432AC_CONFIG_FILES([
433 src/unittests/Makefile
434])
435
436# produce python scripts and tests only when python's present
437AC_CONFIG_TESTDIR([tests/Python])
438AC_CONFIG_FILES([tests/Python/atlocal])
439AM_COND_IF([CONDPYTHON],[
440 AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
441 AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
442 AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
443])
444AC_CONFIG_FILES([tests/Python/Makefile])
445
446AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.