source: configure.ac@ 1ca493a

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

Allowing python3 usage.

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