source: ThirdParty/LinearAlgebra/configure.ac@ 599eca

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_levmar Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 599eca was 26dc12, checked in by Frederik Heber <heber@…>, 8 years ago

Modified check for CodePatterns presence in configure.ac's.

  • Property mode set to 100644
File size: 6.9 KB
RevLine 
[bf4b9f]1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
[d08ab3]5AC_INIT(LinearAlgebra, 1.0.4, [heber@ins.uni-bonn.de], [linearalgebra], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
[bf4b9f]6AC_CONFIG_AUX_DIR([build-aux])
7AC_CONFIG_SRCDIR([src/LinearAlgebra/Vector.cpp])
8AC_CONFIG_HEADER([config.h libLinearAlgebra_config.h])
9AC_CONFIG_MACRO_DIR([m4])
10
[dc322a]11# parallel-tests: use parallel test druver
12# color-tests: us coloring to indicate success/failure when available
13# tar-pax: use newer tar implementation with longer filename (>99 chars)
14AM_INIT_AUTOMAKE([dist-bzip2 1.11 parallel-tests color-tests tar-pax])
[bf4b9f]15
16# Checks for programs.
17AC_PROG_CXX
18AC_PROG_CC
19AC_PROG_INSTALL
[ec188c]20
[0cfc27]21# check for cppunit (taken from svn.apache.org/../xmlbeanscxx)
22AM_PATH_CPPUNIT(1.9.6)
23AM_CONDITIONAL(CONDCPPUNIT, test "$CPPUNIT_LIBS")
24
[ec188c]25DX_HTML_FEATURE(ON)
26DX_PS_FEATURE(OFF)
27DX_PDF_FEATURE(OFF)
[3158e6]28DX_INIT_DOXYGEN(LinearAlgebra, Doxyfile, ${docdir})
[bf4b9f]29
30LT_INIT([static])
31
32# Define these substitions here to keep all version information in one place.
33# For information on how to properly maintain the library version information,
34# refer to the libtool manual, section "Updating library version information":
35# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
[31021ab]36AC_SUBST([LINEARALGEBRA_SO_VERSION], [3:2:0])
37AC_SUBST([LINEARALGEBRA_API_VERSION], [1.0.5])
[bf4b9f]38
39dnl this macro is used to get the arguments supplied
40dnl to the configure script (./configure --enable-debug)
41dnl Check if we have enable debug support.
42AC_MSG_CHECKING(whether to enable debugging)
[f99714]43have_debug="no"
44AC_ARG_ENABLE(
45 [debug],
46 AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
47 enable_debug=$enableval,
48 enable_debug="no")
[f3b8a5]49AC_MSG_RESULT($enable_debug)
[f99714]50AS_IF([test x"$enable_debug" = x"yes"],[
[bf4b9f]51 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
52 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
[f99714]53 have_debug="yes"
54],[
55 AS_IF([test x"$enable_debug" = x"full"],[
56 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
57 AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
58 AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
59 AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
60 have_debug="full"
61 ],[
62 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
63 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
64 AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
65 have_debug="no"
66 ])
67])
[bf4b9f]68AC_SUBST(HAVE_DEBUG)
69
70dnl this macro is used to get the arguments supplied
71dnl to the configure script (./configure --enable-debug)
72dnl Check if we have enable debug support.
[f99714]73AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
74AC_ARG_ENABLE(
75 [cache],
76 AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
77 enable_cache=$enableval,
78 enable_cache="yes")
[f3b8a5]79AC_MSG_RESULT($enable_cache)
[f99714]80AS_IF([test x"$enable_cache" != x"no"],[
81 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
82],[
[bf4b9f]83 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
84 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
[f99714]85])
[bf4b9f]86AC_SUBST(HAVE_CACHE)
87
88# Checks for libraries.
89AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
90
[c2e567]91# CodePatterns library (serialization header before MemDebug.hpp )
[26dc12]92AM_PATH_CODEPATTERNS([1.3.2], $have_debug,,[
93 # compile from ThirdParty
94 #AC_DEFINE(COMPILE_CODEPATTERNS,1, ["compile internal codepatterns library."])
95 [CodePatterns_LDFLAGS='-L$(top_builddir)/../CodePatterns/src']
96 [CodePatterns_CFLAGS='-I$(top_srcdir)/../CodePatterns/src']
97 AS_IF([test x"$enable_debug" != x"no"], [
98 [CodePatterns_LIBS='-lcodepatterns-debug']
99 ],[
100 [CodePatterns_LIBS='-lcodepatterns']
101 ])
102 AC_SUBST(CodePatterns_LDFLAGS)
103 AC_SUBST(CodePatterns_CFLAGS)
104 AC_SUBST(CodePatterns_LIBS)
105 #AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])
106])
[bf4b9f]107
[29cbe9]108# boost
[f08ae7]109BOOST_REQUIRE([1.40])
[29cbe9]110
111# boost headers
[f08ae7]112BOOST_BIND
113BOOST_EXCEPTION
114
[29cbe9]115# boost libraries
116BOOST_SERIALIZATION
117
[bf4b9f]118# Checks for header files.
119AC_HEADER_STDC
120AC_CHECK_HEADERS([sys/time.h])
121AC_HEADER_STDBOOL
122
123AC_FUNC_MALLOC
124AC_FUNC_REALLOC
125AC_CHECK_FUNCS([floor pow sqrt strchr])
126
127# Checks for typedefs, structures, and compiler characteristics.
128AC_C_CONST
129AC_C_INLINE
130AC_C_RESTRICT
131AC_TYPE_SIZE_T
132
133# Checks for library functions.
134# check for GNU Scientific Library
135AC_CHECK_HEADERS([gsl/gsl_blas.h])
[db1a72]136AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
137AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
138AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
139#AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
140AC_CHECK_LIB(gsl, main)
[bf4b9f]141
142# use CppUnit TestRunner or not
[f99714]143AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
144AC_ARG_ENABLE(
145 [ecut],
146 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
147 enable_ecut=$disableval,
148 enable_ecut="no")
149AC_MSG_RESULT($enable_ecut)
150AS_IF([test x"$enable_ecut" = x"yes"],[
[bf4b9f]151 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
152 AC_SUBST(HAVE_ECUT)
[f99714]153])
[fbbcde]154AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
[bf4b9f]155
156# with valgrinding testsuite or not
[f3b8a5]157AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
[f99714]158AC_ARG_ENABLE(
159 [valgrind],
160 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
161 enable_valgrind=$enableval,
162 enable_valgrind="no")
163AC_MSG_RESULT($enable_valgrind)
164AS_IF([test x"$enable_valgrind" = x"yes"], [
[bf4b9f]165 AC_CHECK_HEADER([valgrind/valgrind.h],
166 [
167 # check header
168 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
169 # check path
170 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
171 # set variables
172 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
173 AC_SUBST(VALGRIND)
174 ],
175 [
176 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
177 ]
178 )
[f3b8a5]179])
[bf4b9f]180
181# Check for "extern inline", using a modified version
182# of the test for AC_C_INLINE from acspecific.mt
183AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
184[ac_cv_c_extern_inline=no
185AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
186extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
187double foo (double x) { return x + 1.0; };],
188[ foo(1.0) ],
189[ac_cv_c_extern_inline="yes"])
190])
191
192if test "$ac_cv_c_inline" != no ; then
193 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
194 AC_SUBST(HAVE_INLINE)
195fi
196
197#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
198
199# test suite
[689639]200AC_CONFIG_TESTDIR(tests/CodeChecks)
[bf4b9f]201AC_CONFIG_FILES([
202 tests/CodeChecks/atlocal
203 tests/CodeChecks/Makefile])
[689639]204
[bf4b9f]205AC_CONFIG_FILES([
206 LinearAlgebra.pc:LinearAlgebra.pc.in
207 LinearAlgebra-debug.pc:LinearAlgebra-debug.pc.in])
[689639]208
[bf4b9f]209AC_CONFIG_FILES([
210 Makefile
211 doc/Makefile
212 src/LinearAlgebra/Makefile
213])
[689639]214
[bf4b9f]215AC_CONFIG_FILES([
216 src/unittests/Makefile
217])
218AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.