source: configure.ac@ 5b8c49

Candidate_v1.7.0 stable
Last change on this file since 5b8c49 was 5b8c49, checked in by Frederik Heber <frederik.heber@…>, 6 weeks ago

FIX: fixes QtPotentialList not getting notified about PotentialRegistry changes.

  • requires codepatterns 1.3.3 with virtual (un)registerInstance Registry functions.
  • the issue is that the RegistryDeserializer<T> class directly calls Registry<T> functions and due to missing "virtual" this bypassed the "OBSERVE" calls in the functions in the inheriting PotentialRegistry.
  • Property mode set to 100644
File size: 20.7 KB
RevLine 
[14de469]1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
[425516]5AC_INIT(MoleCuilder, 1.6.1, [bug@molecuilder.de], [molecuilder], [http://www.molecuilder.de/])
[bf4b9f]6AC_CONFIG_AUX_DIR([build-aux])
[14de469]7AC_CONFIG_SRCDIR([src/builder.cpp])
[861874]8AC_CONFIG_HEADER([config.h libmolecuilder_config.h])
9AC_CONFIG_MACRO_DIR([m4])
[4ecb2d]10AC_CONFIG_SUBDIRS([ThirdParty/LinearAlgebra])
[482400e]11AC_CONFIG_SUBDIRS([ThirdParty/mpqc_open])
[14de469]12
[dc322a]13# parallel-tests: use parallel test druver
14# color-tests: us coloring to indicate success/failure when available
15# tar-pax: use newer tar implementation with longer filename (>99 chars)
[3b35e7]16AM_INIT_AUTOMAKE([dist-bzip2 1.5 parallel-tests color-tests tar-pax subdir-objects])
[14de469]17
18# Checks for programs.
19AC_PROG_CXX
[54a746]20AC_PROG_INSTALL
[14de469]21
[0cfc27]22# check for cppunit (taken from svn.apache.org/../xmlbeanscxx)
[f01bb3]23AM_PATH_CPPUNIT(1.9.6,
24 [AM_CONDITIONAL([CPPUNIT], [true])],
25 [
26 PKG_CHECK_MODULES(CPPUNIT, [cppunit >= 1.9.6],
27 [AM_CONDITIONAL([CPPUNIT], [true])],
28 [AM_CONDITIONAL([CPPUNIT], [false])]
29 )
30 ]
31)
[0cfc27]32AM_CONDITIONAL(CONDCPPUNIT, test "$CPPUNIT_LIBS")
33
[c015b3]34dnl Check if we have enable python
[557b39]35# python module-
[c015b3]36AC_MSG_CHECKING(whether to enable python module)
[f99714]37AC_ARG_ENABLE(
38 [python],
39 AS_HELP_STRING([--enable-python],[turn on python module [default=yes]]),
40 enable_python=$enableval,
41 enable_python="yes")
[c015b3]42AC_MSG_RESULT($enable_python)
43AS_IF([test x"$enable_python" != x"no"],[
44 # Python (for boost::python)
45 AM_PATH_PYTHON([2.2])
46 AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."])
47])
[1ca493a]48python_version_major=`echo $PYTHON_VERSION | sed -e "s#\([0-9]\)\..*#\1#"`
[c015b3]49AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"])
[1ca493a]50AS_IF([test x"$python_version_major" = x"2"],[
51 AC_DEFINE(HAVE_PYTHON2, 1, ["using python version 2"])
52],[test x"$python_version_major" = x"3"],[
53 AC_DEFINE(HAVE_PYTHON3, 1, ["using python version 3"])
54])
[c015b3]55AC_SUBST(HAVE_PYTHON)
56
[74459a]57dnl Check whether no extra thread for ActionQueue shall be used
58AC_MSG_CHECKING(whether to enable ActionQueue's run thread)
59AC_ARG_ENABLE(
60 [action_thread],
61 AS_HELP_STRING([--enable-action-thread],[turn on extra run thread for ActionQueue [default=yes]]),
62 enable_action_thread=$enableval,
63 enable_action_thread="no"
64)
65AC_MSG_RESULT($enable_action_thread)
66AS_IF([test x"$enable_action_thread" != x"no"],[
67 AC_DEFINE(HAVE_ACTION_THREAD,1, ["Have extra run thread for ActionQueue."])
68])
69AM_CONDITIONAL([CONDACTIONTHREAD], [test x"$enable_action_thread" != x"no"])
70AC_SUBST(HAVE_ACTION_THREAD)
71
[c015b3]72dnl Check if we have enable qtgui
[e5cec4]73# Qt programs
[c015b3]74AC_MSG_CHECKING(whether to enable Qt-based GUI)
[f99714]75AC_ARG_ENABLE(
76 [qtgui],
77 AS_HELP_STRING([--enable-qtgui],[turn on Qt GUI compilation [default=yes]]),
78 enable_qtgui=$enableval,
79 enable_qtgui="yes")
[c015b3]80AC_MSG_RESULT($enable_qtgui)
81AS_IF([test x"$enable_qtgui" != x"no"],[
[93909a]82 AC_ARG_WITH(
83 [Qt-bin],
84 [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
85 [have_qtgui_path=$withval],
86 have_qtgui_path="")
[196702]87 AS_IF([test x"$have_qtgui_path" != x""],[
88 AC_PATH_PROGS([QT_MOC],
[91793c]89 [moc-qt5 moc],
[196702]90 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
91 [$have_qtgui_path]
92 )
93 AC_PATH_PROGS([QT_RCC],
[91793c]94 [rcc-qt5 rcc],
[196702]95 [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])],
96 [$have_qtgui_path]
97 )
98 AC_PATH_PROGS([QT_UIC],
[91793c]99 [uic-qt5 uic],
[196702]100 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
101 [$have_qtgui_path]
102 )
103 ],[
104 AC_PATH_PROGS([QT_MOC],
[91793c]105 [moc-qt5 moc],
[196702]106 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])]
107 )
108 AC_PATH_PROGS([QT_RCC],
[91793c]109 [rcc-qt5 rcc],
[196702]110 [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])]
111 )
112 AC_PATH_PROGS([QT_UIC],
[91793c]113 [uic-qt5 uic],
[196702]114 [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])]
115 )
116 ])
[91793c]117dnl PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
118dnl :
119dnl ])
[c015b3]120 AC_SUBST([QT_CFLAGS])
121 AC_SUBST([QT_LIBS])
122 AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
[e5cec4]123])
[c015b3]124AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
125AC_SUBST(HAVE_QTGUI)
[e5cec4]126
[3d61c7]127dnl Check whether qtgui captures log or not
128AC_MSG_CHECKING(whether to capture stdout in qtgui)
129AC_ARG_ENABLE(
130 [qtgui_capture_log],
131 AS_HELP_STRING([--enable-qtgui-capture-log],[turn on capturing of log inside qtgui [default=yes]]),
132 enable_qtgui_capture_log=$enableval,
133 enable_qtgui_capture_log="yes"
134)
135AC_MSG_RESULT($enable_qtgui_capture_log)
136AS_IF([test x"$enable_qtgui_capture_log" != x"no"],[
137 AC_DEFINE(QT_CAPTURES_LOG,1, ["Have QtGui capture the stdout."])
138])
139AC_SUBST(QT_CAPTURES_LOG)
140
141
[c76b8b]142# check additionally for QWT to enable plotting of potentials
143AC_MSG_CHECKING(whether to enable Qwt-based plotting)
144#enable_qwt=yes
145AC_ARG_ENABLE(
146 [qwt],
147 AS_HELP_STRING([--enable-qwt],[turn on Qwt compilation [default=yes]]),
148 enable_qwt=$enableval,
149 enable_qwt="yes")
150AC_MSG_RESULT($enable_qwt)
151AS_IF([test x"$enable_qwt" != x"no"],[
152 MOL_AC_HAVE_QWT_IFELSE(
153 [
154 enable_qwt=yes
155 AC_DEFINE(HAVE_QWT,1, ["Build Qwt-based plotting"])
156 ],
157 [
158 enable_qwt=no
159 AC_MSG_WARN([Qwt not found, disabling plotting in QtUI.])
160 ]
161 )
162])
163AM_CONDITIONAL([CONDQWT], [test x"$enable_qwt" != x"no"])
164AC_SUBST(HAVE_QWT)
165
[ec188c]166# use doxygen
167DX_HTML_FEATURE(ON)
168DX_PS_FEATURE(OFF)
169DX_PDF_FEATURE(OFF)
[3158e6]170DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
[ec188c]171
[6029a6]172# use docbook
173AX_CHECK_DOCBOOK
174
[ec188c]175# use libtool
[a0064e]176LT_INIT([static])
[4e8108]177AC_SUBST([LIBTOOL_DEPS])
[861874]178
179# Define these substitions here to keep all version information in one place.
180# For information on how to properly maintain the library version information,
181# refer to the libtool manual, section "Updating library version information":
182# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
[425516]183AC_SUBST([MOLECUILDER_SO_VERSION], [18:0:1])
184AC_SUBST([MOLECUILDER_API_VERSION], [1.6.1])
[06aedc]185
[dc031c]186dnl this macro is used to get the arguments supplied
187dnl to the configure script (./configure --enable-debug)
188dnl Check if we have enable debug support.
189AC_MSG_CHECKING(whether to enable debugging)
190have_debug="no"
[f99714]191AC_ARG_ENABLE(
192 [debug],
193 AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
194 enable_debug=$enableval,
195 enable_debug="no")
196AC_MSG_RESULT($enable_debug)
197AS_IF([test x"$enable_debug" = x"yes"],[
[dc031c]198 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
199 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
200 have_debug="yes"
[f99714]201],[
202 AS_IF([test x"$enable_debug" = x"full"],[
203 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
204 AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
205 AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
[4d6d6a]206 dnl AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
[f99714]207 have_debug="full"
208 ],[
209 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
210 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
[4d6d6a]211 AC_DEFINE(QT_NO_DEBUG_OUTPUT,, ["Disable Qt debug messages."])
[f99714]212 have_debug="no"
213 ])
214])
[dc031c]215AC_SUBST(HAVE_DEBUG)
216
217dnl this macro is used to get the arguments supplied
218dnl to the configure script (./configure --enable-debug)
219dnl Check if we have enable debug support.
[f3b8a5]220AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
[f99714]221AC_ARG_ENABLE(
222 [cache],
223 AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
224 enable_cache=$enableval,
225 enable_cache="yes")
[f3b8a5]226AC_MSG_RESULT($enable_cache)
[f99714]227AS_IF([test x"$enable_cache" != x"no"],[
228 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
229],[
[dc031c]230 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
231 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
[f99714]232])
[dc031c]233AC_SUBST(HAVE_CACHE)
234
[14de469]235# Checks for libraries.
[861874]236AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
[14de469]237
[7d0a4e]238# Pthreads
239ACX_PTHREAD()
240
[f08ae7]241# Boost
[867fb5]242BOOST_REQUIRE([1.64])
[f08ae7]243
244# Boost headers only
245BOOST_ANY
[794bc8]246BOOST_ARRAY
[4f04ab8]247BOOST_BIMAP
[f08ae7]248BOOST_BIND
[503acc1]249BOOST_CAST
[0daef6]250BOOST_CHRONO
[f08ae7]251BOOST_CONVERSION
[79de12]252BOOST_EXCEPTION
[f08ae7]253BOOST_FOREACH
254BOOST_FUNCTION
[619a0e]255BOOST_FUSION
[4f04ab8]256BOOST_GRAPH
[30c753]257BOOST_ITERATOR
[794bc8]258BOOST_MULTIARRAY
[4da4de]259BOOST_MULTIINDEXCONTAINER
[619a0e]260BOOST_MPL
[f08ae7]261BOOST_PREPROCESSOR
262BOOST_RANDOM
263BOOST_SMART_PTR
[7f570c]264BOOST_STRING_ALGO
[f08ae7]265BOOST_TOKENIZER
266
267# Boost headers with libraries
[79de12]268BOOST_FILESYSTEM
[d920b9]269BOOST_IOSTREAMS
[79de12]270BOOST_PROGRAM_OPTIONS
[867fb5]271AS_IF([test x"$enable_python" != x"no"], [
272 BOOST_PYTHON
273 BOOST_NUMPY
274 ])
[d7d022]275BOOST_SERIALIZATION
[79de12]276BOOST_THREADS
[fa861b]277
[f08ae7]278
[e2c2b1]279# CodePatterns library (requiring UnobservedIterator)
[26dc12]280compile_codepatterns="no"
[5b8c49]281AM_PATH_CODEPATTERNS([1.3.3], $have_debug,,[
[26dc12]282 # compile from ThirdParty
283 AC_CONFIG_SUBDIRS([ThirdParty/CodePatterns])
284 compile_codepatterns="yes"
285 [CodePatterns_LDFLAGS='-L$(top_builddir)/ThirdParty/CodePatterns/src']
286 [CodePatterns_CFLAGS='-I$(top_srcdir)/ThirdParty/CodePatterns/src']
287 AS_IF([test x"$enable_debug" != x"no"], [
288 [CodePatterns_LIBS='-lcodepatterns-debug']
289 ],[
290 [CodePatterns_LIBS='-lcodepatterns']
291 ])
292 AC_SUBST(CodePatterns_LDFLAGS)
293 AC_SUBST(CodePatterns_CFLAGS)
294 AC_SUBST(CodePatterns_LIBS)
295 #AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])
296])
[79b089]297AC_MSG_CHECKING(whether to compile codepatterns)
298AC_MSG_RESULT($compile_codepatterns)
[26dc12]299AM_CONDITIONAL([COND_COMPILE_CODEPATTERNS], [test x"$compile_codepatterns" = x"yes"])
[3027f8]300
[004d5c]301# JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
[830adf]302AC_MSG_CHECKING(whether to enable jobmarket)
[004d5c]303AC_ARG_ENABLE(
304 [jobmarket],
305 AS_HELP_STRING([--enable-jobmarket],[turn on JobMarket feature [default=yes]]),
306 enable_jobmarket=$enableval,
307 enable_jobmarket="yes")
308AC_MSG_RESULT($enable_jobmarket)
[2f5562]309compile_jobmarket="no"
[79b089]310AC_MSG_CHECKING(whether to compile jobmarket)
[004d5c]311AS_IF([test x"$enable_jobmarket" != x"no"],[
[b0af1d]312 # the following is only required if we use JobMarket
313 BOOST_ASIO
314 AC_DEFINE(HAVE_JOBMARKET,1, ["use JobMarket to calculate fragment jobs."])
[d6a7b9]315 # JobMarket library (needs SystemCommandJob with suffix)
[b0af1d]316 AM_PATH_JOBMARKET([1.1.6], $have_debug,
317 ,[
[2f5562]318 AC_CONFIG_SUBDIRS([ThirdParty/JobMarket])
319 compile_jobmarket="yes"
320 [JobMarket_CFLAGS='-I$(top_srcdir)/ThirdParty/JobMarket/src']
321 [JobMarket_LDFLAGS='-L$(top_builddir)/ThirdParty/JobMarket/src/JobMarket']
322 [JobMarket_LIBS='-lJobMarket']
323 [JobMarket_Controller_LIBS='-lJobMarketController']
324 [JobMarket_Server_LIBS='-lJobMarketServer']
325 [JobMarket_PoolWorker_LIBS='-lJobMarketPoolWorker']
326 AC_SUBST(JobMarket_CFLAGS)
327 AC_SUBST(JobMarket_LDFLAGS)
328 AC_SUBST(JobMarket_LIBS)
329 AC_SUBST(JobMarket_Controller_LIBS)
330 AC_SUBST(JobMarket_Server_LIBS)
331 AC_SUBST(JobMarket_PoolWorker_LIBS)
[004d5c]332 ])
333]
[79b089]334AC_MSG_RESULT($compile_jobmarket)
[004d5c]335#[
336# AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
337#]
338)
339AC_SUBST(HAVE_JOBMARKET)
[0b738b]340AM_CONDITIONAL([COND_COMPILE_JOBMARKET], [test x"$compile_jobmarket" = x"yes"])
[004d5c]341AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
[3027f8]342
[d2a0f6d]343# VMG library
[79b089]344AC_MSG_CHECKING(whether to compile in long-range support via vmg)
[d2a0f6d]345AC_ARG_ENABLE(
346 [vmg],
347 [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])],
348 [enable_vmg=$enableval],
349 enable_vmg="no")
350AC_MSG_RESULT($enable_vmg)
[79b089]351compile_vmg="no"
352AC_MSG_CHECKING(whether to compile vmg library)
[d2a0f6d]353AS_IF([test x"$enable_vmg" != x"no"],[
[79b089]354 PKG_CHECK_MODULES(VMG, VMG >= 0.1, [enable_vmg="yes"], [enable_vmg="no"])
355 AS_IF([test x"$enable_vmg" = x"no"],[
356 AC_CONFIG_SUBDIRS([ThirdParty/vmg])
357 compile_vmg="yes"
358 enable_vmg="yes"
359 [VMG_CFLAGS='-I$(top_srcdir)/ThirdParty/vmg/src']
360 [VMG_LDFLAGS='-L$(top_builddir)/ThirdParty/vmg/src']
361 [VMG_LIBS='-lvmg']
362 ])
[d2a0f6d]363 AC_SUBST(VMG_CFLAGS)
[79b089]364 AC_SUBST(VMG_LDFLAGS)
[d2a0f6d]365 AC_SUBST(VMG_LIBS)
[69c733]366 AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
[8a8c8c]367
368 # check whether to use mpi
369 AC_ARG_WITH(
370 [vmg-mpi],
371 [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])],
372 [with_vmg_mpi=yes],
373 [with_vmg_mpi=no])
374 AS_IF(
375 [test "x$with_vmg_mpi" != xno],
376 [
377 AC_LANG_SAVE
378 AC_LANG_CPLUSPLUS
379 LX_FIND_MPI
380 AC_LANG_RESTORE
381 AS_IF([test "x$have_CXX_mpi" = xyes],[
382 AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
383 AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
384 AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
385 AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
386 AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])
[27760e]387 #ac_configure_args="$ac_configure_args --with-mpi-thread=single --with-default-parallel=mpi --with-include=\"$MPI_CXXFLAGS\" --with-libs=\"$MPI_CXXLDFLAGS\""
388 ac_configure_args="$ac_configure_args --with-default-parallel=none"
[8a8c8c]389 ])
390 ],
391 [])
[d2a0f6d]392])
[79b089]393AC_MSG_RESULT($compile_vmg)
[d2a0f6d]394AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
[8a8c8c]395AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
[79b089]396AM_CONDITIONAL([COND_COMPILE_VMG], [test x"$compile_vmg" = x"yes"])
[d2a0f6d]397
398
[f06d52]399# Check for Levenberg-Marquardt implementation
[830adf]400AC_MSG_CHECKING(whether to enable function fitting via levmar)
[48d20d]401AC_ARG_ENABLE(
402 [levmar],
403 AS_HELP_STRING([--enable-levmar],[turn on LevMar feature [default=no]]),
404 enable_levmar=$enableval,
405 enable_levmar="no")
[4d5dfa]406AC_MSG_RESULT($enable_levmar)
[b61bd5]407# don't use AS_IF here as it expands (and tests) AC_F77_FUN even if levmar
[4d5dfa]408# is disabled.
[93ea13d]409compile_levmar="no"
[b61bd5]410AS_IF([test x"$enable_levmar" = xyes],[
411 AC_MSG_CHECKING(for levmar presence via given path )
[f06d52]412 AC_ARG_WITH(
413 [levmar],
414 [AS_HELP_STRING([--with-levmar], [give path to LevMar package])],
[b61bd5]415 [have_levmar_path=$withval
416 enable_levmar=yes],
[93ea13d]417 [
418 enable_levmar=no
419 ])
[b61bd5]420 AC_MSG_RESULT($enable_levmar)
421 AS_IF([test -n "$have_levmar_path"],[
422 LEVMAR_CPPFLAGS="-I${have_levmar_path}/include"
423 LEVMAR_LDFLAGS="-L${have_levmar_path}/lib"
[93ea13d]424 LEVMAR_LIBS="-llevmar"],
425 [PKG_CHECK_MODULES([LEVMAR],[levmar],[enable_levmar=yes],[enable_levmar=no])
[b61bd5]426 ])
427 ],[enable_levmar=no]
428)
[93ea13d]429if test x"$enable_levmar" = xyes; then
430 AX_LAPACK([enable_levmar=yes],
431 [enable_levmar=no
432 AC_MSG_WARN(["Missing LAPACK, disabling off levmar"])
433 ]
434 )
435else
436 AC_CONFIG_SUBDIRS([ThirdParty/levmar])
437 compile_levmar="yes"
438 enable_levmar="yes"
439 LEVMAR_CPPFLAGS='-I$(top_srcdir)/ThirdParty/levmar/src'
440 LEVMAR_LDFLAGS='-L$(top_builddir)/ThirdParty/levmar/src'
441 LEVMAR_LIBS='-llevmar'
442fi
[b61bd5]443AC_MSG_CHECKING(for levmar usability)
444AS_IF([test x"$enable_levmar" = xyes],[
[f06d52]445 AC_SUBST(LEVMAR_CPPFLAGS)
446 AC_SUBST(LEVMAR_LDFLAGS)
447 AC_SUBST(LEVMAR_LIBS)
[b61bd5]448 AC_DEFINE(HAVE_LEVMAR,1, ["use levmar for non-linear minimisation/potential fitting."])])
449AC_MSG_RESULT($enable_levmar)
[f06d52]450AM_CONDITIONAL([CONDLEVMAR], [test x"$enable_levmar" = x"yes"])
[93ea13d]451AM_CONDITIONAL([COND_COMPILE_LEVMAR], [test x"$compile_levmar" = x"yes"])
[f06d52]452
[14de469]453# Checks for header files.
454AC_HEADER_STDC
455AC_CHECK_HEADERS([sys/time.h])
456AC_HEADER_STDBOOL
457
[d3a46d]458AC_FUNC_MALLOC
459AC_FUNC_REALLOC
460AC_CHECK_FUNCS([floor pow sqrt strchr])
461
[14de469]462# Checks for typedefs, structures, and compiler characteristics.
463AC_C_CONST
464AC_C_INLINE
465AC_C_RESTRICT
466AC_TYPE_SIZE_T
467
468# Checks for library functions.
469# check for GNU Scientific Library
[bd3e55]470AC_CHECK_HEADERS([gsl/gsl_blas.h])
[db1a72]471AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
472AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
473AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
474#AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
475AC_CHECK_LIB(gsl, main)
[14de469]476
[490038]477# use CppUnit TestRunner or not
[f99714]478AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
479AC_ARG_ENABLE(
480 [ecut],
481 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
482 enable_ecut=$disableval,
483 enable_ecut="no")
484AC_MSG_RESULT($enable_ecut)
485AS_IF([test x"$enable_ecut" = x"yes"],[
[9b6b2f]486 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
487 AC_SUBST(HAVE_ECUT)
[f99714]488])
[fbbcde]489AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
[9b6b2f]490
[490038]491# with valgrinding testsuite or not
[f3b8a5]492AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
[f99714]493AC_ARG_ENABLE(
494 [valgrind],
495 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
496 enable_valgrind=$enableval,
497 enable_valgrind="no")
498AC_MSG_RESULT($enable_valgrind)
499AS_IF([test x"$enable_valgrind" = x"yes"], [
[490038]500 AC_CHECK_HEADER([valgrind/valgrind.h],
501 [
502 # check header
503 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
504 # check path
505 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
506 # set variables
507 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
508 AC_SUBST(VALGRIND)
509 ],
510 [
511 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
512 ]
513 )
[f3b8a5]514])
[490038]515
[14de469]516# Check for "extern inline", using a modified version
517# of the test for AC_C_INLINE from acspecific.mt
518AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
519[ac_cv_c_extern_inline=no
520AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
521extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
522double foo (double x) { return x + 1.0; };],
523[ foo(1.0) ],
524[ac_cv_c_extern_inline="yes"])
525])
526
527if test "$ac_cv_c_inline" != no ; then
528 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
529 AC_SUBST(HAVE_INLINE)
530fi
531
[bd3e55]532#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
[a19da5d]533
[0ca39c]534# test suite
[878044]535
[5079a0]536AC_CONFIG_FILES([
[689639]537 tests/Makefile])
538
[abfc95]539AC_CONFIG_TESTDIR(tests/Calculations)
540AC_CONFIG_FILES([
541 tests/Calculations/atlocal
542 tests/Calculations/Makefile])
543AC_CONFIG_FILES([tests/Calculations/molecuilder], [chmod +x tests/Calculations/molecuilder])
[fbf005]544AC_CONFIG_FILES([tests/Calculations/molecuilder_poolworker], [chmod +x tests/Calculations/molecuilder_poolworker])
[abfc95]545
[689639]546AC_CONFIG_TESTDIR(tests/CodeChecks)
[d0a719]547AC_CONFIG_FILES([
548 tests/CodeChecks/atlocal
549 tests/CodeChecks/Makefile])
[689639]550
[740d40]551AC_CONFIG_TESTDIR(tests/Fragmentations)
[038713]552AC_CONFIG_FILES([
[740d40]553 tests/Fragmentations/atlocal
554 tests/Fragmentations/Makefile])
555AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
[689639]556
[0f0407]557AC_CONFIG_TESTDIR(tests/GuiChecks)
558AC_CONFIG_FILES([
559 tests/GuiChecks/atlocal
560 tests/GuiChecks/Makefile])
561AC_CONFIG_FILES([tests/GuiChecks/molecuilder], [chmod +x tests/GuiChecks/molecuilder])
562AC_CONFIG_FILES([tests/GuiChecks/molecuilderguitest], [chmod +x tests/GuiChecks/molecuilderguitest])
[c66ae6]563AC_CONFIG_FILES([tests/GuiChecks/adjacencymatcher], [chmod +x tests/GuiChecks/adjacencymatcher])
[b10593]564AC_CONFIG_FILES([tests/GuiChecks/difffragmentresultcontainer], [chmod +x tests/GuiChecks/difffragmentresultcontainer])
[42b40a]565AC_CONFIG_FILES([tests/GuiChecks/trianglematcher], [chmod +x tests/GuiChecks/trianglematcher])
[0f0407]566
[004d5c]567AC_CONFIG_TESTDIR(tests/JobMarket)
568AC_CONFIG_FILES([
569 tests/JobMarket/atlocal
570 tests/JobMarket/Makefile])
571AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
572
[83fa5c]573AC_CONFIG_TESTDIR(tests/integration)
574AC_CONFIG_FILES([
575 tests/integration/atlocal
576 tests/integration/Makefile])
577AC_CONFIG_FILES([tests/integration/molecuilder], [chmod +x tests/integration/molecuilder])
[fbf005]578AC_CONFIG_FILES([tests/integration/molecuilder_poolworker], [chmod +x tests/integration/molecuilder_poolworker])
[83fa5c]579
[689639]580AC_CONFIG_TESTDIR(tests/regression)
581AC_CONFIG_FILES([
582 tests/regression/atlocal
583 tests/regression/Makefile])
584AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
[c66ae6]585AC_CONFIG_FILES([tests/regression/adjacencymatcher], [chmod +x tests/regression/adjacencymatcher])
[557b39]586AC_CONFIG_FILES([tests/regression/difffragmentresultcontainer], [chmod +x tests/regression/difffragmentresultcontainer])
[7d146a]587AC_CONFIG_FILES([tests/regression/trianglematcher], [chmod +x tests/regression/trianglematcher])
[893426]588AC_CONFIG_FILES([tests/regression/runpython], [chmod +x tests/regression/runpython])
[689639]589
590AC_CONFIG_TESTDIR(tests/Tesselations)
[5079a0]591AC_CONFIG_FILES([
[a85f45]592 tests/Tesselations/atlocal
593 tests/Tesselations/Makefile])
594AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
[7d146a]595AC_CONFIG_FILES([tests/Tesselations/trianglematcher], [chmod +x tests/Tesselations/trianglematcher])
[689639]596
[4464ef]597AC_CONFIG_TESTDIR(tests/Examples)
598AC_CONFIG_FILES([
599 tests/Examples/atlocal
600 tests/Examples/Makefile])
601AC_CONFIG_FILES([tests/Examples/molecuilder], [chmod +x tests/Examples/molecuilder])
[fbf005]602AC_CONFIG_FILES([tests/Examples/molecuilder_poolworker], [chmod +x tests/Examples/molecuilder_poolworker])
[4464ef]603
[5079a0]604AC_CONFIG_FILES([
605 doc/molecuilder.xml])
[6029a6]606AC_CONFIG_FILES([
607 doc/userguide/catalog.xml:doc/userguide/catalog.xml.in])
[861874]608AC_CONFIG_FILES([
[878044]609 MoleCuilder.pc:MoleCuilder.pc.in])
[5079a0]610AC_CONFIG_FILES([
[ec188c]611 doc/Makefile
[6029a6]612 doc/userguide/Makefile
613])
614AC_CONFIG_FILES([
615 Makefile
[7672284]616 python/Makefile
[938ffd]617 src/Makefile
[c66ae6]618 src/Bond/AdjacencyMatcher/Makefile
[7d146a]619 src/Tesselation/TriangleMatcher/Makefile
[6e12a6]620 ThirdParty/Makefile
[5b991a]621 data/icons/Makefile
[04e1fb]622 utils/Makefile
[85949a]623])
624AC_CONFIG_FILES([
[878044]625 src/unittests/Makefile
[85949a]626])
[d0b3aca]627
[c015b3]628# produce python scripts and tests only when python's present
[24e19e]629AC_CONFIG_TESTDIR([tests/Python])
630AC_CONFIG_FILES([tests/Python/atlocal])
[c015b3]631AM_COND_IF([CONDPYTHON],[
[9fd196]632 AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
633 AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
[c015b3]634 AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
635])
[24e19e]636AC_CONFIG_FILES([tests/Python/Makefile])
[d0b3aca]637
[14de469]638AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.