source: configure.ac@ 076a77

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

RandomNumberGeneratorFactory nows uses Clone instead of Creator pattern.

  • requires CodePatterns 1.0.4.
  • RandomNumberGenerator_Encapsulation implements clone() with calls the constructor ...
  • ... who in turn (sadly) needs some evil dynamic_cast to get the complex type from the simple interface, because we need access to true engine and distribution. The instances themselves are obtained properly from the respective factories. However, the constructor is protected now.
  • FIX: friend classes can actually be forward declared.
  • Property mode set to 100644
File size: 7.7 KB
Line 
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT(MoleCuilder, 1.0.8, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
6AC_CONFIG_AUX_DIR(config)
7AC_CONFIG_SRCDIR([src/builder.cpp])
8AC_CONFIG_HEADER([config.h libmolecuilder_config.h])
9AC_CONFIG_MACRO_DIR([m4])
10
11AM_INIT_AUTOMAKE([dist-bzip2 1.11 parallel-tests color-tests])
12
13# Checks for programs.
14AM_PATH_CPPUNIT(1.9.6)
15AC_PROG_CXX
16AC_PROG_CC
17AC_PROG_INSTALL
18AC_CHECK_PROG([LATEX],[latex],[latex],[:])
19AC_CHECK_PROG([BIBTEX],[bibtex],[bibtex],[:])
20AC_CHECK_PROG([DVIPS],[dvips],[dvips],[:])
21AC_CHECK_PROG([PDFLATEX],[pdflatex],[pdflatex],[:])
22AC_CHECK_PROG([XMLTO],[xmlto],[xmlto],[:])
23AM_MISSING_PROG([DOXYGEN], [doxygen])
24
25LT_INIT([static])
26
27# Define these substitions here to keep all version information in one place.
28# For information on how to properly maintain the library version information,
29# refer to the libtool manual, section "Updating library version information":
30# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
31AC_SUBST([MOLECUILDER_SO_VERSION], [2:0:0])
32AC_SUBST([MOLECUILDER_API_VERSION], [1.0.8])
33
34dnl this macro is used to get the arguments supplied
35dnl to the configure script (./configure --enable-debug)
36dnl Check if we have enable debug support.
37AC_MSG_CHECKING(whether to enable debugging)
38default="no"
39have_debug="no"
40AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes/full] turn on debugging
41 [default=$default]],, enable_debug=$default)
42if test "x$enable_debug" = "xyes"; then
43 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
44 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
45 have_debug="yes"
46elif test "x$enable_debug" = "xfull"; then
47 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
48 AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
49 AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
50 have_debug="full"
51else
52 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
53 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
54 have_debug="no"
55fi
56AC_MSG_RESULT($have_debug)
57AC_SUBST(HAVE_DEBUG)
58
59dnl this macro is used to get the arguments supplied
60dnl to the configure script (./configure --enable-debug)
61dnl Check if we have enable debug support.
62AC_MSG_CHECKING([whether to enable internal caching of values (speedup!)])
63default="yes"
64AC_ARG_ENABLE(cache, [ --enable-cache=[no/yes] turn on caching
65 [default=$default]],, enable_cache=$default)
66if test "x$enable_cache" = "xno"; then
67 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
68 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
69 AC_MSG_RESULT(no)
70else
71 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
72 AC_MSG_RESULT(yes)
73fi
74AC_SUBST(HAVE_CACHE)
75
76#AC_MSG_CHECKING(whether to enable profiling)
77#default="no"
78#AC_ARG_ENABLE(debug, [ --enable-profile=[no/yes] turn on profiling
79# [default=$default]],, enable_profile=$default)
80#if test "x$enable_profile" = "xyes"; then
81# CXXFLAGS="$CXXFLAGS -g -DDEBUG -pg"
82# DEBUG=-pg;
83# AC_MSG_RESULT(yes)
84#else
85# AC_MSG_RESULT(no)
86#fi
87
88#AC_MSG_CHECKING(whether to enable serialization)
89#default="no"
90#AC_ARG_ENABLE(debug, [ --enable-serialization=[no/yes] turn on serialization support
91# [default=$default]],, enable_serialization=$default)
92#if test "x$enable_serialization" = "xyes"; then
93# CXXFLAGS="$CXXFLAGS -DSERIALIZATION"
94# serialization=yes;
95# AC_MSG_RESULT(yes)
96#else
97# serialization=no;
98# AC_MSG_RESULT(no)
99#fi
100
101# Checks for libraries.
102AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
103
104# Boost libraries
105AX_BOOST_BASE([1.40])
106AX_BOOST_PROGRAM_OPTIONS
107AX_BOOST_SYSTEM
108AX_BOOST_FILESYSTEM
109AX_BOOST_THREAD
110#AX_BOOST_SERIALIZATION
111
112#QT4 libraries
113gw_CHECK_QT4
114AX_CHECK_GLU
115#AC_MSG_NOTICE(["GLU_CFLAGS: $GLU_CFLAGS, GLU_CXXFLAGS: $GLU_CXXFLAGS, GLU_LDFLAGS: $GLU_LDFLAGS, GLU_LIBS: $GLU_LIBS"])
116
117# CodePatterns library (needs Clone pattern)
118AM_PATH_CODEPATTERNS([1.0.4], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
119
120# Checks for header files.
121AC_HEADER_STDC
122AC_CHECK_HEADERS([sys/time.h])
123AC_HEADER_STDBOOL
124
125AC_FUNC_MALLOC
126AC_FUNC_REALLOC
127AC_CHECK_FUNCS([floor pow sqrt strchr])
128
129# Checks for typedefs, structures, and compiler characteristics.
130AC_C_CONST
131AC_C_INLINE
132AC_C_RESTRICT
133AC_TYPE_SIZE_T
134
135# Checks for library functions.
136# check for GNU Scientific Library
137AC_CHECK_HEADERS([gsl/gsl_blas.h])
138AC_SEARCH_LIBS(dnrm2, goto blas cblas gslblas gslcblas)
139AC_CHECK_LIB(gsl, main, [],
140 [AC_SEARCH_LIBS(cblas_dnrm2, blas cblas gslblas gslcblas)])
141AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
142
143# add replacement/saturation hydrogen or not
144AC_ARG_ENABLE([hydrogen],AS_HELP_STRING([--enable-hydrogen],[Adding saturation hydrogen (default is yes)]),
145 [enable_hydrogen=$enableval], [enable_hydrogen=yes])
146if test x"$enable_hydrogen" = xyes; then
147 AC_DEFINE(ADDHYDROGEN,1, ["Adding saturation hydrogen"])
148 AC_SUBST(ADDHYDROGEN)
149fi
150
151# use CppUnit TestRunner or not
152AC_ARG_ENABLE([ecut],AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient (default is no)]),
153 [enable_ecut=$enableval], [enable_ecut=no])
154if test x"$enable_ecut" = xyes; then
155 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
156 AC_SUBST(HAVE_ECUT)
157fi
158
159# with valgrinding testsuite or not
160AC_ARG_WITH([valgrind],AS_HELP_STRING([--with-valgrind],[Use Valgrind on the testsuite (default is no)]),
161 [with_valgrind=$withval], [with_valgrind=no])
162if test x"$with_valgrind" = xyes; then
163 AC_CHECK_HEADER([valgrind/valgrind.h],
164 [
165 # check header
166 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
167 # check path
168 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
169 # set variables
170 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
171 AC_SUBST(VALGRIND)
172 ],
173 [
174 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
175 ]
176 )
177fi
178
179# Check for "extern inline", using a modified version
180# of the test for AC_C_INLINE from acspecific.mt
181AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
182[ac_cv_c_extern_inline=no
183AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
184extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
185double foo (double x) { return x + 1.0; };],
186[ foo(1.0) ],
187[ac_cv_c_extern_inline="yes"])
188])
189
190if test "$ac_cv_c_inline" != no ; then
191 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
192 AC_SUBST(HAVE_INLINE)
193fi
194
195#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
196
197# test suite
198AC_CONFIG_TESTDIR(tests/regression)
199AC_CONFIG_FILES([
200 tests/Makefile
201 tests/regression/atlocal
202 tests/regression/Makefile])
203AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
204AC_CONFIG_FILES([
205 tests/CodeChecks/atlocal
206 tests/CodeChecks/Makefile])
207AC_CONFIG_FILES([
208 tests/Tesselations/Makefile
209 tests/Tesselations/defs])
210AC_CONFIG_FILES([
211 doc/molecuilder.xml])
212AC_CONFIG_FILES([
213 MoleCuilder.pc:MoleCuilder.pc.in])
214AC_CONFIG_FILES([
215 Makefile
216 doc/Makefile
217 src/Makefile
218 src/Actions/Makefile
219 src/Exceptions/Makefile
220 src/LinearAlgebra/Makefile
221 src/Parser/Makefile
222 src/Shapes/Makefile
223 src/UIElements/Makefile
224])
225AC_CONFIG_FILES([
226 src/unittests/Makefile
227 src/Actions/unittests/Makefile
228 src/Descriptors/unittests/Makefile
229 src/LinearAlgebra/unittests/Makefile
230 src/Parser/unittests/Makefile
231 src/RandomNumbers/unittests/Makefile
232 src/Shapes/unittests/Makefile
233 src/UIElements/Menu/unittests/Makefile
234])
235AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.