source: configure.ac@ d61161

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

Merge branch 'michi-list-query-validator' into stable

  • Property mode set to 100644
File size: 10.6 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.3, [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_INSTALL
21
22dnl Check if we have enable python
23# python module
24AC_MSG_CHECKING(whether to enable python module)
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")
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
41# Qt programs
42AC_ARG_WITH(
43 [Qt-bin],
44 [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
45 [have_qtgui_path=$withval
46 enable_qtgui="yes"],
47 have_qtgui_path="")
48AC_MSG_CHECKING(whether to enable Qt-based GUI)
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")
54AC_MSG_RESULT($enable_qtgui)
55AS_IF([test x"$enable_qtgui" != x"no"],[
56 AC_PATH_PROGS([QT_MOC],
57 [moc-qt4 moc],
58 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
59 [$have_qtgui_path]
60 )
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 )
66 AC_PATH_PROGS([QT_UIC],
67 [uic-qt4 uic],
68 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
69 [$have_qtgui_path]
70 )
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"])
76])
77AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
78AC_SUBST(HAVE_QTGUI)
79
80# use doxygen
81DX_HTML_FEATURE(ON)
82DX_PS_FEATURE(OFF)
83DX_PDF_FEATURE(OFF)
84DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
85
86# use libtool
87LT_INIT([static])
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
93AC_SUBST([MOLECUILDER_SO_VERSION], [10:2:0])
94AC_SUBST([MOLECUILDER_API_VERSION], [1.3.3])
95
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"
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"],[
108 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
109 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
110 have_debug="yes"
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])
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.
130AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
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")
136AC_MSG_RESULT($enable_cache)
137AS_IF([test x"$enable_cache" != x"no"],[
138 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
139],[
140 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
141 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
142])
143AC_SUBST(HAVE_CACHE)
144
145# Checks for libraries.
146AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
147
148# Boost
149BOOST_REQUIRE([1.40])
150
151# Boost headers only
152BOOST_ANY
153BOOST_ARRAY
154BOOST_BIND
155BOOST_CONVERSION
156BOOST_EXCEPTION
157BOOST_FOREACH
158BOOST_FUNCTION
159BOOST_FUSION
160BOOST_ITERATOR
161BOOST_MULTIARRAY
162BOOST_MPL
163BOOST_PREPROCESSOR
164BOOST_RANDOM
165BOOST_SMART_PTR
166BOOST_STRING_ALGO
167BOOST_TOKENIZER
168
169# Boost headers with libraries
170BOOST_FILESYSTEM
171BOOST_IOSTREAMS
172BOOST_PROGRAM_OPTIONS
173AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
174BOOST_SERIALIZATION
175BOOST_THREADS
176
177
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...])])
180
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"],[
189 # JobMarket library (needs newer ax_jobmarket.m4 and smaller fixes)
190 AM_PATH_JOBMARKET([1.1.1], $have_debug,[
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"])
204
205# Checks for header files.
206AC_HEADER_STDC
207AC_CHECK_HEADERS([sys/time.h])
208AC_HEADER_STDBOOL
209
210AC_FUNC_MALLOC
211AC_FUNC_REALLOC
212AC_CHECK_FUNCS([floor pow sqrt strchr])
213
214# Checks for typedefs, structures, and compiler characteristics.
215AC_C_CONST
216AC_C_INLINE
217AC_C_RESTRICT
218AC_TYPE_SIZE_T
219
220# Checks for library functions.
221# check for GNU Scientific Library
222AC_CHECK_HEADERS([gsl/gsl_blas.h])
223AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
224AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
225AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
226#AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
227AC_CHECK_LIB(gsl, main)
228
229# use CppUnit TestRunner or not
230AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
231AC_ARG_ENABLE(
232 [ecut],
233 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
234 enable_ecut=$disableval,
235 enable_ecut="no")
236AC_MSG_RESULT($enable_ecut)
237AS_IF([test x"$enable_ecut" = x"yes"],[
238 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
239 AC_SUBST(HAVE_ECUT)
240])
241AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
242
243# with valgrinding testsuite or not
244AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
245AC_ARG_ENABLE(
246 [valgrind],
247 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
248 enable_valgrind=$enableval,
249 enable_valgrind="no")
250AC_MSG_RESULT($enable_valgrind)
251AS_IF([test x"$enable_valgrind" = x"yes"], [
252 AC_CHECK_HEADER([valgrind/valgrind.h],
253 [
254 # check header
255 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
256 # check path
257 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
258 # set variables
259 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
260 AC_SUBST(VALGRIND)
261 ],
262 [
263 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
264 ]
265 )
266])
267
268# Check for "extern inline", using a modified version
269# of the test for AC_C_INLINE from acspecific.mt
270AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
271[ac_cv_c_extern_inline=no
272AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
273extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
274double foo (double x) { return x + 1.0; };],
275[ foo(1.0) ],
276[ac_cv_c_extern_inline="yes"])
277])
278
279if test "$ac_cv_c_inline" != no ; then
280 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
281 AC_SUBST(HAVE_INLINE)
282fi
283
284#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
285
286# test suite
287
288AC_CONFIG_FILES([
289 tests/Makefile])
290
291AC_CONFIG_TESTDIR(tests/CodeChecks)
292AC_CONFIG_FILES([
293 tests/CodeChecks/atlocal
294 tests/CodeChecks/Makefile])
295
296AC_CONFIG_TESTDIR(tests/Fragmentations)
297AC_CONFIG_FILES([
298 tests/Fragmentations/atlocal
299 tests/Fragmentations/Makefile])
300AC_CONFIG_FILES([tests/Fragmentations/analyzer], [chmod +x tests/Fragmentations/analyzer])
301AC_CONFIG_FILES([tests/Fragmentations/joiner], [chmod +x tests/Fragmentations/joiner])
302AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
303
304AC_CONFIG_TESTDIR(tests/JobMarket)
305AC_CONFIG_FILES([
306 tests/JobMarket/atlocal
307 tests/JobMarket/Makefile])
308AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
309
310AC_CONFIG_TESTDIR(tests/regression)
311AC_CONFIG_FILES([
312 tests/regression/atlocal
313 tests/regression/Makefile])
314AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
315
316AC_CONFIG_TESTDIR(tests/Tesselations)
317AC_CONFIG_FILES([
318 tests/Tesselations/atlocal
319 tests/Tesselations/Makefile])
320AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
321
322AC_CONFIG_FILES([
323 doc/molecuilder.xml])
324AC_CONFIG_FILES([
325 MoleCuilder.pc:MoleCuilder.pc.in])
326AC_CONFIG_FILES([
327 Makefile
328 doc/Makefile
329 src/Makefile
330 data/Makefile
331 data/icons/Makefile
332 utils/Makefile
333])
334AC_CONFIG_FILES([
335 src/unittests/Makefile
336])
337
338# produce python scripts and tests only when python's present
339AM_COND_IF([CONDPYTHON],[
340 AC_CONFIG_TESTDIR([tests/Python])
341 AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
342 AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
343 AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
344 AC_CONFIG_FILES([tests/Python/atlocal])
345 AC_CONFIG_FILES([tests/Python/Makefile])
346])
347
348AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.