source: configure.ac@ 6108fd

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 6108fd was db1a72, checked in by Frederik Heber <heber@…>, 13 years ago

FIX: Corrected check for gsl's blas requirement.

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