source: ThirdParty/LinearAlgebra/configure.ac

Candidate_v1.6.1
Last change on this file was 4e8108, checked in by Frederik Heber <heber@…>, 8 years ago

Libtool consolidates and updates itself through LIBTOOL_DEPS for all packages.

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