source: configure.ac@ e5cec4

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

Removed macro bnv_have_qt, replaced by pkg-config info.

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