source: configure.ac@ 0cfc27

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

If no CPPUNIT is found, compilation of unit tests is disabled.

  • uses conditional CONDCPPUNIT.
  • Property mode set to 100644
File size: 12.0 KB
RevLine 
[14de469]1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
[c8f12e]5AC_INIT(MoleCuilder, 1.3.7, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
[bf4b9f]6AC_CONFIG_AUX_DIR([build-aux])
[14de469]7AC_CONFIG_SRCDIR([src/builder.cpp])
[861874]8AC_CONFIG_HEADER([config.h libmolecuilder_config.h])
9AC_CONFIG_MACRO_DIR([m4])
[bf4b9f]10AC_CONFIG_SUBDIRS([LinearAlgebra])
[14de469]11
[dc322a]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)
[4cf35ac]15AM_INIT_AUTOMAKE([dist-bzip2 1.5 parallel-tests color-tests tar-pax])
[14de469]16
17# Checks for programs.
18AC_PROG_CXX
[54a746]19AC_PROG_INSTALL
[14de469]20
[0cfc27]21# check for cppunit (taken from svn.apache.org/../xmlbeanscxx)
22AM_PATH_CPPUNIT(1.9.6)
23AM_CONDITIONAL(CONDCPPUNIT, test "$CPPUNIT_LIBS")
24
[c015b3]25dnl Check if we have enable python
26# python module
27AC_MSG_CHECKING(whether to enable python module)
[f99714]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")
[c015b3]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
[e5cec4]44# Qt programs
[f99714]45AC_ARG_WITH(
46 [Qt-bin],
47 [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
[c015b3]48 [have_qtgui_path=$withval
[f99714]49 enable_qtgui="yes"],
50 have_qtgui_path="")
[c015b3]51AC_MSG_CHECKING(whether to enable Qt-based GUI)
[f99714]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")
[c015b3]57AC_MSG_RESULT($enable_qtgui)
58AS_IF([test x"$enable_qtgui" != x"no"],[
59 AC_PATH_PROGS([QT_MOC],
[e5cec4]60 [moc-qt4 moc],
61 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
[c015b3]62 [$have_qtgui_path]
[e5cec4]63 )
[5b991a]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 )
[e5cec4]69 AC_PATH_PROGS([QT_UIC],
70 [uic-qt4 uic],
71 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
[c015b3]72 [$have_qtgui_path]
[e5cec4]73 )
[c015b3]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"])
[e5cec4]79])
[c015b3]80AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
81AC_SUBST(HAVE_QTGUI)
[e5cec4]82
[ec188c]83# use doxygen
84DX_HTML_FEATURE(ON)
85DX_PS_FEATURE(OFF)
86DX_PDF_FEATURE(OFF)
[3158e6]87DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
[ec188c]88
89# use libtool
[a0064e]90LT_INIT([static])
[861874]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
[dbe3b9]96AC_SUBST([MOLECUILDER_SO_VERSION], [10:2:0])
[c8f12e]97AC_SUBST([MOLECUILDER_API_VERSION], [1.3.7])
[06aedc]98
[dc031c]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"
[f99714]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"],[
[dc031c]111 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
112 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
113 have_debug="yes"
[f99714]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])
[dc031c]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.
[f3b8a5]133AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
[f99714]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")
[f3b8a5]139AC_MSG_RESULT($enable_cache)
[f99714]140AS_IF([test x"$enable_cache" != x"no"],[
141 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
142],[
[dc031c]143 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
144 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
[f99714]145])
[dc031c]146AC_SUBST(HAVE_CACHE)
147
[14de469]148# Checks for libraries.
[861874]149AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
[14de469]150
[f08ae7]151# Boost
[79de12]152BOOST_REQUIRE([1.40])
[f08ae7]153
154# Boost headers only
155BOOST_ANY
[794bc8]156BOOST_ARRAY
[f08ae7]157BOOST_BIND
158BOOST_CONVERSION
[79de12]159BOOST_EXCEPTION
[f08ae7]160BOOST_FOREACH
161BOOST_FUNCTION
[619a0e]162BOOST_FUSION
[30c753]163BOOST_ITERATOR
[794bc8]164BOOST_MULTIARRAY
[619a0e]165BOOST_MPL
[f08ae7]166BOOST_PREPROCESSOR
167BOOST_RANDOM
168BOOST_SMART_PTR
[7f570c]169BOOST_STRING_ALGO
[f08ae7]170BOOST_TOKENIZER
171
172# Boost headers with libraries
[79de12]173BOOST_FILESYSTEM
[d920b9]174BOOST_IOSTREAMS
[79de12]175BOOST_PROGRAM_OPTIONS
[c015b3]176AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
[d7d022]177BOOST_SERIALIZATION
[79de12]178BOOST_THREADS
[fa861b]179
[f08ae7]180
[856d05]181# CodePatterns library (needs boost/exception_ptr.hpp before MemDebug.hpp)
182AM_PATH_CODEPATTERNS([1.2.3], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
[3027f8]183
[004d5c]184# JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
185AC_ARG_ENABLE(
186 [jobmarket],
187 AS_HELP_STRING([--enable-jobmarket],[turn on JobMarket feature [default=yes]]),
188 enable_jobmarket=$enableval,
189 enable_jobmarket="yes")
190AC_MSG_RESULT($enable_jobmarket)
191AS_IF([test x"$enable_jobmarket" != x"no"],[
[856d05]192 # JobMarket library (needs newer ax_jobmarket.m4 and smaller fixes)
193 AM_PATH_JOBMARKET([1.1.1], $have_debug,[
[004d5c]194 # the following is only required if we have JobMarket
195 BOOST_ASIO
196 AC_DEFINE(HAVE_JOBMARKET,1, ["use JobMarket to calculate fragment jobs."])
197 ],[
198 enable_jobmarket="no"
199 ])
200]
201#[
202# AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
203#]
204)
205AC_SUBST(HAVE_JOBMARKET)
206AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
[3027f8]207
[d2a0f6d]208# VMG library
209AC_MSG_CHECKING(whether to compile in long-range support via VMG)
210AC_ARG_ENABLE(
211 [vmg],
212 [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])],
213 [enable_vmg=$enableval],
214 enable_vmg="no")
215AC_MSG_RESULT($enable_vmg)
216AS_IF([test x"$enable_vmg" != x"no"],[
217 PKG_CHECK_MODULES(VMG, VMG >= 0.1)
218 AC_SUBST(VMG_CFLAGS)
219 AC_SUBST(VMG_LIBS)
[69c733]220 AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
[8a8c8c]221
222 # check whether to use mpi
223 AC_ARG_WITH(
224 [vmg-mpi],
225 [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])],
226 [with_vmg_mpi=yes],
227 [with_vmg_mpi=no])
228 AS_IF(
229 [test "x$with_vmg_mpi" != xno],
230 [
231 AC_LANG_SAVE
232 AC_LANG_CPLUSPLUS
233 LX_FIND_MPI
234 AC_LANG_RESTORE
235 AS_IF([test "x$have_CXX_mpi" = xyes],[
236 AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
237 AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
238 AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
239 AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
240 AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])
241 ])
242 ],
243 [])
[d2a0f6d]244])
245AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
[8a8c8c]246AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
[d2a0f6d]247
248
[14de469]249# Checks for header files.
250AC_HEADER_STDC
251AC_CHECK_HEADERS([sys/time.h])
252AC_HEADER_STDBOOL
253
[d3a46d]254AC_FUNC_MALLOC
255AC_FUNC_REALLOC
256AC_CHECK_FUNCS([floor pow sqrt strchr])
257
[14de469]258# Checks for typedefs, structures, and compiler characteristics.
259AC_C_CONST
260AC_C_INLINE
261AC_C_RESTRICT
262AC_TYPE_SIZE_T
263
264# Checks for library functions.
265# check for GNU Scientific Library
[bd3e55]266AC_CHECK_HEADERS([gsl/gsl_blas.h])
[db1a72]267AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
268AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
269AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
270#AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
271AC_CHECK_LIB(gsl, main)
[14de469]272
[490038]273# use CppUnit TestRunner or not
[f99714]274AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
275AC_ARG_ENABLE(
276 [ecut],
277 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
278 enable_ecut=$disableval,
279 enable_ecut="no")
280AC_MSG_RESULT($enable_ecut)
281AS_IF([test x"$enable_ecut" = x"yes"],[
[9b6b2f]282 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
283 AC_SUBST(HAVE_ECUT)
[f99714]284])
[fbbcde]285AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
[9b6b2f]286
[490038]287# with valgrinding testsuite or not
[f3b8a5]288AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
[f99714]289AC_ARG_ENABLE(
290 [valgrind],
291 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
292 enable_valgrind=$enableval,
293 enable_valgrind="no")
294AC_MSG_RESULT($enable_valgrind)
295AS_IF([test x"$enable_valgrind" = x"yes"], [
[490038]296 AC_CHECK_HEADER([valgrind/valgrind.h],
297 [
298 # check header
299 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
300 # check path
301 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
302 # set variables
303 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
304 AC_SUBST(VALGRIND)
305 ],
306 [
307 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
308 ]
309 )
[f3b8a5]310])
[490038]311
[14de469]312# Check for "extern inline", using a modified version
313# of the test for AC_C_INLINE from acspecific.mt
314AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
315[ac_cv_c_extern_inline=no
316AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
317extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
318double foo (double x) { return x + 1.0; };],
319[ foo(1.0) ],
320[ac_cv_c_extern_inline="yes"])
321])
322
323if test "$ac_cv_c_inline" != no ; then
324 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
325 AC_SUBST(HAVE_INLINE)
326fi
327
[bd3e55]328#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
[a19da5d]329
[0ca39c]330# test suite
[878044]331
[5079a0]332AC_CONFIG_FILES([
[689639]333 tests/Makefile])
334
335AC_CONFIG_TESTDIR(tests/CodeChecks)
[d0a719]336AC_CONFIG_FILES([
337 tests/CodeChecks/atlocal
338 tests/CodeChecks/Makefile])
[689639]339
[740d40]340AC_CONFIG_TESTDIR(tests/Fragmentations)
[038713]341AC_CONFIG_FILES([
[740d40]342 tests/Fragmentations/atlocal
343 tests/Fragmentations/Makefile])
[878044]344AC_CONFIG_FILES([tests/Fragmentations/analyzer], [chmod +x tests/Fragmentations/analyzer])
345AC_CONFIG_FILES([tests/Fragmentations/joiner], [chmod +x tests/Fragmentations/joiner])
[740d40]346AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
[689639]347
[004d5c]348AC_CONFIG_TESTDIR(tests/JobMarket)
349AC_CONFIG_FILES([
350 tests/JobMarket/atlocal
351 tests/JobMarket/Makefile])
352AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
353
[689639]354AC_CONFIG_TESTDIR(tests/regression)
355AC_CONFIG_FILES([
356 tests/regression/atlocal
357 tests/regression/Makefile])
358AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
359
360AC_CONFIG_TESTDIR(tests/Tesselations)
[5079a0]361AC_CONFIG_FILES([
[a85f45]362 tests/Tesselations/atlocal
363 tests/Tesselations/Makefile])
364AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
[689639]365
[5079a0]366AC_CONFIG_FILES([
367 doc/molecuilder.xml])
[861874]368AC_CONFIG_FILES([
[878044]369 MoleCuilder.pc:MoleCuilder.pc.in])
[5079a0]370AC_CONFIG_FILES([
371 Makefile
[ec188c]372 doc/Makefile
[938ffd]373 src/Makefile
[5b991a]374 data/icons/Makefile
[04e1fb]375 utils/Makefile
[85949a]376])
377AC_CONFIG_FILES([
[878044]378 src/unittests/Makefile
[85949a]379])
[d0b3aca]380
[c015b3]381# produce python scripts and tests only when python's present
382AM_COND_IF([CONDPYTHON],[
383 AC_CONFIG_TESTDIR([tests/Python])
[9fd196]384 AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
385 AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
[c015b3]386 AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
387 AC_CONFIG_FILES([tests/Python/atlocal])
388 AC_CONFIG_FILES([tests/Python/Makefile])
389])
[d0b3aca]390
[14de469]391AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.