source: configure.ac

Candidate_v1.6.1
Last change on this file was a844d8, checked in by Frederik Heber <frederik.heber@…>, 6 years ago

FIX: PKG_CHECK_MODULES used empty fail action.

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