source: configure.ac@ 0cd8cf

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 0cd8cf was 503acc1, checked in by Frederik Heber <heber@…>, 12 years ago

MPQCJob and MPQCData now have bool to decide whether to sample electron density or not.

  • this passes on DoLongRange from FragmentationAutomationAction.
  • MPQCFragmentController::addJobsFromQueue() now does some more manipulation besides changing the id to something valid.
  • using boost::polymorphic_downcast and boost/cast.hpp (added check to boost.m4).
  • Property mode set to 100644
File size: 12.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.3.13, [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_ARG_WITH(
46 [Qt-bin],
47 [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
48 [have_qtgui_path=$withval
49 enable_qtgui="yes"],
50 have_qtgui_path="")
51AC_MSG_CHECKING(whether to enable Qt-based GUI)
52AC_ARG_ENABLE(
53 [qtgui],
54 AS_HELP_STRING([--enable-qtgui],[turn on Qt GUI compilation [default=yes]]),
55 enable_qtgui=$enableval,
56 enable_qtgui="yes")
57AC_MSG_RESULT($enable_qtgui)
58AS_IF([test x"$enable_qtgui" != x"no"],[
59 AC_PATH_PROGS([QT_MOC],
60 [moc-qt4 moc],
61 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
62 [$have_qtgui_path]
63 )
64 AC_PATH_PROGS([QT_RCC],
65 [rcc-qt4 rcc],
66 [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])],
67 [$have_qtgui_path]
68 )
69 AC_PATH_PROGS([QT_UIC],
70 [uic-qt4 uic],
71 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
72 [$have_qtgui_path]
73 )
74 PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
75 ])
76 AC_SUBST([QT_CFLAGS])
77 AC_SUBST([QT_LIBS])
78 AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
79])
80AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
81AC_SUBST(HAVE_QTGUI)
82
83# use doxygen
84DX_HTML_FEATURE(ON)
85DX_PS_FEATURE(OFF)
86DX_PDF_FEATURE(OFF)
87DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
88
89# use libtool
90LT_INIT([static])
91
92# Define these substitions here to keep all version information in one place.
93# For information on how to properly maintain the library version information,
94# refer to the libtool manual, section "Updating library version information":
95# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
96AC_SUBST([MOLECUILDER_SO_VERSION], [11:4:1])
97AC_SUBST([MOLECUILDER_API_VERSION], [1.3.13])
98
99dnl this macro is used to get the arguments supplied
100dnl to the configure script (./configure --enable-debug)
101dnl Check if we have enable debug support.
102AC_MSG_CHECKING(whether to enable debugging)
103have_debug="no"
104AC_ARG_ENABLE(
105 [debug],
106 AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
107 enable_debug=$enableval,
108 enable_debug="no")
109AC_MSG_RESULT($enable_debug)
110AS_IF([test x"$enable_debug" = x"yes"],[
111 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
112 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
113 have_debug="yes"
114],[
115 AS_IF([test x"$enable_debug" = x"full"],[
116 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
117 AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
118 AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
119 AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
120 have_debug="full"
121 ],[
122 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
123 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
124 AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
125 have_debug="no"
126 ])
127])
128AC_SUBST(HAVE_DEBUG)
129
130dnl this macro is used to get the arguments supplied
131dnl to the configure script (./configure --enable-debug)
132dnl Check if we have enable debug support.
133AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
134AC_ARG_ENABLE(
135 [cache],
136 AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
137 enable_cache=$enableval,
138 enable_cache="yes")
139AC_MSG_RESULT($enable_cache)
140AS_IF([test x"$enable_cache" != x"no"],[
141 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
142],[
143 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
144 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
145])
146AC_SUBST(HAVE_CACHE)
147
148# Checks for libraries.
149AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
150
151# Boost
152BOOST_REQUIRE([1.40])
153
154# Boost headers only
155BOOST_ANY
156BOOST_ARRAY
157BOOST_BIND
158BOOST_CAST
159BOOST_CONVERSION
160BOOST_EXCEPTION
161BOOST_FOREACH
162BOOST_FUNCTION
163BOOST_FUSION
164BOOST_ITERATOR
165BOOST_MULTIARRAY
166BOOST_MPL
167BOOST_PREPROCESSOR
168BOOST_RANDOM
169BOOST_SMART_PTR
170BOOST_STRING_ALGO
171BOOST_TOKENIZER
172
173# Boost headers with libraries
174BOOST_FILESYSTEM
175BOOST_IOSTREAMS
176BOOST_PROGRAM_OPTIONS
177AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
178BOOST_SERIALIZATION
179BOOST_THREADS
180
181
182# CodePatterns library (needs fixes to Chronos)
183AM_PATH_CODEPATTERNS([1.2.5], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
184
185# JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
186AC_ARG_ENABLE(
187 [jobmarket],
188 AS_HELP_STRING([--enable-jobmarket],[turn on JobMarket feature [default=yes]]),
189 enable_jobmarket=$enableval,
190 enable_jobmarket="yes")
191AC_MSG_RESULT($enable_jobmarket)
192AS_IF([test x"$enable_jobmarket" != x"no"],[
193 # JobMarket library (needs newer ax_jobmarket.m4 and smaller fixes)
194 AM_PATH_JOBMARKET([1.1.3], $have_debug,[
195 # the following is only required if we have JobMarket
196 BOOST_ASIO
197 AC_DEFINE(HAVE_JOBMARKET,1, ["use JobMarket to calculate fragment jobs."])
198 ],[
199 enable_jobmarket="no"
200 ])
201]
202#[
203# AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
204#]
205)
206AC_SUBST(HAVE_JOBMARKET)
207AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
208
209# VMG library
210AC_MSG_CHECKING(whether to compile in long-range support via VMG)
211AC_ARG_ENABLE(
212 [vmg],
213 [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])],
214 [enable_vmg=$enableval],
215 enable_vmg="no")
216AC_MSG_RESULT($enable_vmg)
217AS_IF([test x"$enable_vmg" != x"no"],[
218 PKG_CHECK_MODULES(VMG, VMG >= 0.1)
219 AC_SUBST(VMG_CFLAGS)
220 AC_SUBST(VMG_LIBS)
221 AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
222
223 # check whether to use mpi
224 AC_ARG_WITH(
225 [vmg-mpi],
226 [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])],
227 [with_vmg_mpi=yes],
228 [with_vmg_mpi=no])
229 AS_IF(
230 [test "x$with_vmg_mpi" != xno],
231 [
232 AC_LANG_SAVE
233 AC_LANG_CPLUSPLUS
234 LX_FIND_MPI
235 AC_LANG_RESTORE
236 AS_IF([test "x$have_CXX_mpi" = xyes],[
237 AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
238 AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
239 AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
240 AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
241 AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])
242 ])
243 ],
244 [])
245])
246AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
247AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
248
249
250# Check for Levenberg-Marquardt implementation
251enable_levmar=no
252AX_LAPACK([enable_levmar=yes],[enable_levmar=no])
253AC_MSG_CHECKING(whether to compile in Levenberg-Marquardt)
254AS_IF([test x"$enable_levmar" = x"yes"],[
255 AC_ARG_WITH(
256 [levmar],
257 [AS_HELP_STRING([--with-levmar], [give path to LevMar package])],
258 [have_levmar_path=$withval],
259 [enable_levmar=no])
260 ],[enable_levmar=no])
261AC_MSG_RESULT($enable_levmar)
262AS_IF([test x"$enable_levmar" = x"yes"],[
263 LEVMAR_CPPFLAGS="-I${have_levmar_path}/include"
264 LEVMAR_LDFLAGS="-L${have_levmar_path}/lib"
265 LEVMAR_LIBS="-llevmar"
266 AC_SUBST(LEVMAR_CPPFLAGS)
267 AC_SUBST(LEVMAR_LDFLAGS)
268 AC_SUBST(LEVMAR_LIBS)
269 ])
270AM_CONDITIONAL([CONDLEVMAR], [test x"$enable_levmar" = x"yes"])
271
272# Checks for header files.
273AC_HEADER_STDC
274AC_CHECK_HEADERS([sys/time.h])
275AC_HEADER_STDBOOL
276
277AC_FUNC_MALLOC
278AC_FUNC_REALLOC
279AC_CHECK_FUNCS([floor pow sqrt strchr])
280
281# Checks for typedefs, structures, and compiler characteristics.
282AC_C_CONST
283AC_C_INLINE
284AC_C_RESTRICT
285AC_TYPE_SIZE_T
286
287# Checks for library functions.
288# check for GNU Scientific Library
289AC_CHECK_HEADERS([gsl/gsl_blas.h])
290AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
291AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
292AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
293#AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
294AC_CHECK_LIB(gsl, main)
295
296# use CppUnit TestRunner or not
297AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
298AC_ARG_ENABLE(
299 [ecut],
300 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
301 enable_ecut=$disableval,
302 enable_ecut="no")
303AC_MSG_RESULT($enable_ecut)
304AS_IF([test x"$enable_ecut" = x"yes"],[
305 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
306 AC_SUBST(HAVE_ECUT)
307])
308AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
309
310# with valgrinding testsuite or not
311AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
312AC_ARG_ENABLE(
313 [valgrind],
314 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
315 enable_valgrind=$enableval,
316 enable_valgrind="no")
317AC_MSG_RESULT($enable_valgrind)
318AS_IF([test x"$enable_valgrind" = x"yes"], [
319 AC_CHECK_HEADER([valgrind/valgrind.h],
320 [
321 # check header
322 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
323 # check path
324 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
325 # set variables
326 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
327 AC_SUBST(VALGRIND)
328 ],
329 [
330 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
331 ]
332 )
333])
334
335# Check for "extern inline", using a modified version
336# of the test for AC_C_INLINE from acspecific.mt
337AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
338[ac_cv_c_extern_inline=no
339AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
340extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
341double foo (double x) { return x + 1.0; };],
342[ foo(1.0) ],
343[ac_cv_c_extern_inline="yes"])
344])
345
346if test "$ac_cv_c_inline" != no ; then
347 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
348 AC_SUBST(HAVE_INLINE)
349fi
350
351#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
352
353# test suite
354
355AC_CONFIG_FILES([
356 tests/Makefile])
357
358AC_CONFIG_TESTDIR(tests/CodeChecks)
359AC_CONFIG_FILES([
360 tests/CodeChecks/atlocal
361 tests/CodeChecks/Makefile])
362
363AC_CONFIG_TESTDIR(tests/Fragmentations)
364AC_CONFIG_FILES([
365 tests/Fragmentations/atlocal
366 tests/Fragmentations/Makefile])
367AC_CONFIG_FILES([tests/Fragmentations/analyzer], [chmod +x tests/Fragmentations/analyzer])
368AC_CONFIG_FILES([tests/Fragmentations/joiner], [chmod +x tests/Fragmentations/joiner])
369AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
370
371AC_CONFIG_TESTDIR(tests/JobMarket)
372AC_CONFIG_FILES([
373 tests/JobMarket/atlocal
374 tests/JobMarket/Makefile])
375AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
376
377AC_CONFIG_TESTDIR(tests/regression)
378AC_CONFIG_FILES([
379 tests/regression/atlocal
380 tests/regression/Makefile])
381AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
382
383AC_CONFIG_TESTDIR(tests/Tesselations)
384AC_CONFIG_FILES([
385 tests/Tesselations/atlocal
386 tests/Tesselations/Makefile])
387AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
388
389AC_CONFIG_FILES([
390 doc/molecuilder.xml])
391AC_CONFIG_FILES([
392 MoleCuilder.pc:MoleCuilder.pc.in])
393AC_CONFIG_FILES([
394 Makefile
395 doc/Makefile
396 src/Makefile
397 data/icons/Makefile
398 utils/Makefile
399])
400AC_CONFIG_FILES([
401 src/unittests/Makefile
402])
403
404# produce python scripts and tests only when python's present
405AM_COND_IF([CONDPYTHON],[
406 AC_CONFIG_TESTDIR([tests/Python])
407 AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
408 AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
409 AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
410 AC_CONFIG_FILES([tests/Python/atlocal])
411 AC_CONFIG_FILES([tests/Python/Makefile])
412])
413
414AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.