source: configure.ac@ 856d05

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 Candidate_v1.7.0 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 856d05 was 856d05, checked in by Frederik Heber <heber@…>, 13 years ago

MEMFIX: Added WorldTime and ObserverLog ::purgeInstance() calls.

  • added several memory fixes:
  • added ObserverLog include to GLMoleculeObject_bond, _molecule, and GLWorldView.
  • TESTFIX: due to changes with new JobMarket, we need to give jobids in regression test mpqc-jobs.
  • Property mode set to 100644
File size: 10.5 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.1, [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.
18AM_PATH_CPPUNIT(1.9.6)
19AC_PROG_CXX
20AC_PROG_CC
21AC_PROG_INSTALL
22
23dnl Check if we have enable python
24# python module
25AC_MSG_CHECKING(whether to enable python module)
26AC_ARG_ENABLE(
27 [python],
28 AS_HELP_STRING([--enable-python],[turn on python module [default=yes]]),
29 enable_python=$enableval,
30 enable_python="yes")
31AC_MSG_RESULT($enable_python)
32AS_IF([test x"$enable_python" != x"no"],[
33 # Python (for boost::python)
34 AM_PATH_PYTHON([2.2])
35 AX_PYTHON
36 AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."])
37])
38AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"])
39AC_SUBST(HAVE_PYTHON)
40
41dnl Check if we have enable qtgui
42# Qt programs
43AC_ARG_WITH(
44 [Qt-bin],
45 [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
46 [have_qtgui_path=$withval
47 enable_qtgui="yes"],
48 have_qtgui_path="")
49AC_MSG_CHECKING(whether to enable Qt-based GUI)
50AC_ARG_ENABLE(
51 [qtgui],
52 AS_HELP_STRING([--enable-qtgui],[turn on Qt GUI compilation [default=yes]]),
53 enable_qtgui=$enableval,
54 enable_qtgui="yes")
55AC_MSG_RESULT($enable_qtgui)
56AS_IF([test x"$enable_qtgui" != x"no"],[
57 AC_PATH_PROGS([QT_MOC],
58 [moc-qt4 moc],
59 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
60 [$have_qtgui_path]
61 )
62 AC_PATH_PROGS([QT_UIC],
63 [uic-qt4 uic],
64 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
65 [$have_qtgui_path]
66 )
67 PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
68 ])
69 AC_SUBST([QT_CFLAGS])
70 AC_SUBST([QT_LIBS])
71 AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
72])
73AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
74AC_SUBST(HAVE_QTGUI)
75
76# use doxygen
77DX_HTML_FEATURE(ON)
78DX_PS_FEATURE(OFF)
79DX_PDF_FEATURE(OFF)
80DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
81
82# use libtool
83LT_INIT([static])
84
85# Define these substitions here to keep all version information in one place.
86# For information on how to properly maintain the library version information,
87# refer to the libtool manual, section "Updating library version information":
88# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
89AC_SUBST([MOLECUILDER_SO_VERSION], [10:1:0])
90AC_SUBST([MOLECUILDER_API_VERSION], [1.3.1])
91
92dnl this macro is used to get the arguments supplied
93dnl to the configure script (./configure --enable-debug)
94dnl Check if we have enable debug support.
95AC_MSG_CHECKING(whether to enable debugging)
96have_debug="no"
97AC_ARG_ENABLE(
98 [debug],
99 AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
100 enable_debug=$enableval,
101 enable_debug="no")
102AC_MSG_RESULT($enable_debug)
103AS_IF([test x"$enable_debug" = x"yes"],[
104 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
105 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
106 have_debug="yes"
107],[
108 AS_IF([test x"$enable_debug" = x"full"],[
109 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
110 AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
111 AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
112 AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
113 have_debug="full"
114 ],[
115 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
116 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
117 AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
118 have_debug="no"
119 ])
120])
121AC_SUBST(HAVE_DEBUG)
122
123dnl this macro is used to get the arguments supplied
124dnl to the configure script (./configure --enable-debug)
125dnl Check if we have enable debug support.
126AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
127AC_ARG_ENABLE(
128 [cache],
129 AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
130 enable_cache=$enableval,
131 enable_cache="yes")
132AC_MSG_RESULT($enable_cache)
133AS_IF([test x"$enable_cache" != x"no"],[
134 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
135],[
136 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
137 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
138])
139AC_SUBST(HAVE_CACHE)
140
141# Checks for libraries.
142AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
143
144# Boost
145BOOST_REQUIRE([1.40])
146
147# Boost headers only
148BOOST_ANY
149BOOST_ARRAY
150BOOST_BIND
151BOOST_CONVERSION
152BOOST_EXCEPTION
153BOOST_FOREACH
154BOOST_FUNCTION
155BOOST_ITERATOR
156BOOST_MULTIARRAY
157BOOST_PREPROCESSOR
158BOOST_RANDOM
159BOOST_SMART_PTR
160BOOST_STRING_ALGO
161BOOST_TOKENIZER
162
163# Boost headers with libraries
164BOOST_FILESYSTEM
165BOOST_IOSTREAMS
166BOOST_PROGRAM_OPTIONS
167AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
168BOOST_SERIALIZATION
169BOOST_THREADS
170
171
172# CodePatterns library (needs boost/exception_ptr.hpp before MemDebug.hpp)
173AM_PATH_CODEPATTERNS([1.2.3], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
174
175# JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
176AC_ARG_ENABLE(
177 [jobmarket],
178 AS_HELP_STRING([--enable-jobmarket],[turn on JobMarket feature [default=yes]]),
179 enable_jobmarket=$enableval,
180 enable_jobmarket="yes")
181AC_MSG_RESULT($enable_jobmarket)
182AS_IF([test x"$enable_jobmarket" != x"no"],[
183 # JobMarket library (needs newer ax_jobmarket.m4 and smaller fixes)
184 AM_PATH_JOBMARKET([1.1.1], $have_debug,[
185 # the following is only required if we have JobMarket
186 BOOST_ASIO
187 AC_DEFINE(HAVE_JOBMARKET,1, ["use JobMarket to calculate fragment jobs."])
188 ],[
189 enable_jobmarket="no"
190 ])
191]
192#[
193# AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
194#]
195)
196AC_SUBST(HAVE_JOBMARKET)
197AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
198
199# Checks for header files.
200AC_HEADER_STDC
201AC_CHECK_HEADERS([sys/time.h])
202AC_HEADER_STDBOOL
203
204AC_FUNC_MALLOC
205AC_FUNC_REALLOC
206AC_CHECK_FUNCS([floor pow sqrt strchr])
207
208# Checks for typedefs, structures, and compiler characteristics.
209AC_C_CONST
210AC_C_INLINE
211AC_C_RESTRICT
212AC_TYPE_SIZE_T
213
214# Checks for library functions.
215# check for GNU Scientific Library
216AC_CHECK_HEADERS([gsl/gsl_blas.h])
217AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
218AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
219AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
220#AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
221AC_CHECK_LIB(gsl, main)
222
223# use CppUnit TestRunner or not
224AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
225AC_ARG_ENABLE(
226 [ecut],
227 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
228 enable_ecut=$disableval,
229 enable_ecut="no")
230AC_MSG_RESULT($enable_ecut)
231AS_IF([test x"$enable_ecut" = x"yes"],[
232 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
233 AC_SUBST(HAVE_ECUT)
234])
235AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
236
237# with valgrinding testsuite or not
238AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
239AC_ARG_ENABLE(
240 [valgrind],
241 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
242 enable_valgrind=$enableval,
243 enable_valgrind="no")
244AC_MSG_RESULT($enable_valgrind)
245AS_IF([test x"$enable_valgrind" = x"yes"], [
246 AC_CHECK_HEADER([valgrind/valgrind.h],
247 [
248 # check header
249 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
250 # check path
251 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
252 # set variables
253 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
254 AC_SUBST(VALGRIND)
255 ],
256 [
257 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
258 ]
259 )
260])
261
262# Check for "extern inline", using a modified version
263# of the test for AC_C_INLINE from acspecific.mt
264AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
265[ac_cv_c_extern_inline=no
266AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
267extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
268double foo (double x) { return x + 1.0; };],
269[ foo(1.0) ],
270[ac_cv_c_extern_inline="yes"])
271])
272
273if test "$ac_cv_c_inline" != no ; then
274 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
275 AC_SUBST(HAVE_INLINE)
276fi
277
278#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
279
280# test suite
281
282AC_CONFIG_FILES([
283 tests/Makefile])
284
285AC_CONFIG_TESTDIR(tests/CodeChecks)
286AC_CONFIG_FILES([
287 tests/CodeChecks/atlocal
288 tests/CodeChecks/Makefile])
289
290AC_CONFIG_TESTDIR(tests/Fragmentations)
291AC_CONFIG_FILES([
292 tests/Fragmentations/atlocal
293 tests/Fragmentations/Makefile])
294AC_CONFIG_FILES([tests/Fragmentations/analyzer], [chmod +x tests/Fragmentations/analyzer])
295AC_CONFIG_FILES([tests/Fragmentations/joiner], [chmod +x tests/Fragmentations/joiner])
296AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
297
298AC_CONFIG_TESTDIR(tests/JobMarket)
299AC_CONFIG_FILES([
300 tests/JobMarket/atlocal
301 tests/JobMarket/Makefile])
302AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
303
304AC_CONFIG_TESTDIR(tests/regression)
305AC_CONFIG_FILES([
306 tests/regression/atlocal
307 tests/regression/Makefile])
308AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
309
310AC_CONFIG_TESTDIR(tests/Tesselations)
311AC_CONFIG_FILES([
312 tests/Tesselations/atlocal
313 tests/Tesselations/Makefile])
314AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
315
316AC_CONFIG_FILES([
317 doc/molecuilder.xml])
318AC_CONFIG_FILES([
319 MoleCuilder.pc:MoleCuilder.pc.in])
320AC_CONFIG_FILES([
321 Makefile
322 doc/Makefile
323 src/Makefile
324 utils/Makefile
325])
326AC_CONFIG_FILES([
327 src/unittests/Makefile
328])
329
330# produce python scripts and tests only when python's present
331AM_COND_IF([CONDPYTHON],[
332 AC_CONFIG_TESTDIR([tests/Python])
333 AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
334 AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
335 AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
336 AC_CONFIG_FILES([tests/Python/atlocal])
337 AC_CONFIG_FILES([tests/Python/Makefile])
338])
339
340AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.