source: configure.ac@ 36bb2d

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

Merge branch 'VMGJob_SamplingNucleiCharges' into Candidate_v1.3.5

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