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
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 AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."])
39])
[1ca493a]40python_version_major=`echo $PYTHON_VERSION | sed -e "s#\([0-9]\)\..*#\1#"`
[c015b3]41AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"])
[1ca493a]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])
[c015b3]47AC_SUBST(HAVE_PYTHON)
48
[74459a]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
[c015b3]64dnl Check if we have enable qtgui
[e5cec4]65# Qt programs
[c015b3]66AC_MSG_CHECKING(whether to enable Qt-based GUI)
[f99714]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")
[c015b3]72AC_MSG_RESULT($enable_qtgui)
73AS_IF([test x"$enable_qtgui" != x"no"],[
[93909a]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="")
[196702]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 ])
[c015b3]109 PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
[a844d8]110 :
[c015b3]111 ])
112 AC_SUBST([QT_CFLAGS])
113 AC_SUBST([QT_LIBS])
114 AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
[e5cec4]115])
[c015b3]116AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
117AC_SUBST(HAVE_QTGUI)
[e5cec4]118
[3d61c7]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
[c76b8b]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
[ec188c]158# use doxygen
159DX_HTML_FEATURE(ON)
160DX_PS_FEATURE(OFF)
161DX_PDF_FEATURE(OFF)
[3158e6]162DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
[ec188c]163
[6029a6]164# use docbook
165AX_CHECK_DOCBOOK
166
[ec188c]167# use libtool
[a0064e]168LT_INIT([static])
[4e8108]169AC_SUBST([LIBTOOL_DEPS])
[861874]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
[425516]175AC_SUBST([MOLECUILDER_SO_VERSION], [18:0:1])
176AC_SUBST([MOLECUILDER_API_VERSION], [1.6.1])
[06aedc]177
[dc031c]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"
[f99714]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"],[
[dc031c]190 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
191 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
192 have_debug="yes"
[f99714]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."])
[4d6d6a]198 dnl AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
[f99714]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."])
[4d6d6a]203 AC_DEFINE(QT_NO_DEBUG_OUTPUT,, ["Disable Qt debug messages."])
[f99714]204 have_debug="no"
205 ])
206])
[dc031c]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.
[f3b8a5]212AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
[f99714]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")
[f3b8a5]218AC_MSG_RESULT($enable_cache)
[f99714]219AS_IF([test x"$enable_cache" != x"no"],[
220 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
221],[
[dc031c]222 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
223 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
[f99714]224])
[dc031c]225AC_SUBST(HAVE_CACHE)
226
[14de469]227# Checks for libraries.
[861874]228AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
[14de469]229
[7d0a4e]230# Pthreads
231ACX_PTHREAD()
232
[f08ae7]233# Boost
[79de12]234BOOST_REQUIRE([1.40])
[f08ae7]235
236# Boost headers only
237BOOST_ANY
[794bc8]238BOOST_ARRAY
[4f04ab8]239BOOST_BIMAP
[f08ae7]240BOOST_BIND
[503acc1]241BOOST_CAST
[f08ae7]242BOOST_CONVERSION
[79de12]243BOOST_EXCEPTION
[f08ae7]244BOOST_FOREACH
245BOOST_FUNCTION
[619a0e]246BOOST_FUSION
[4f04ab8]247BOOST_GRAPH
[30c753]248BOOST_ITERATOR
[794bc8]249BOOST_MULTIARRAY
[4da4de]250BOOST_MULTIINDEXCONTAINER
[619a0e]251BOOST_MPL
[f08ae7]252BOOST_PREPROCESSOR
253BOOST_RANDOM
254BOOST_SMART_PTR
[7f570c]255BOOST_STRING_ALGO
[f08ae7]256BOOST_TOKENIZER
257
258# Boost headers with libraries
[79de12]259BOOST_FILESYSTEM
[d920b9]260BOOST_IOSTREAMS
[79de12]261BOOST_PROGRAM_OPTIONS
[c015b3]262AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
[d7d022]263BOOST_SERIALIZATION
[79de12]264BOOST_THREADS
[fa861b]265
[f08ae7]266
[e2c2b1]267# CodePatterns library (requiring UnobservedIterator)
[26dc12]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])
[79b089]285AC_MSG_CHECKING(whether to compile codepatterns)
286AC_MSG_RESULT($compile_codepatterns)
[26dc12]287AM_CONDITIONAL([COND_COMPILE_CODEPATTERNS], [test x"$compile_codepatterns" = x"yes"])
[3027f8]288
[004d5c]289# JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
[830adf]290AC_MSG_CHECKING(whether to enable jobmarket)
[004d5c]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)
[2f5562]297compile_jobmarket="no"
[79b089]298AC_MSG_CHECKING(whether to compile jobmarket)
[004d5c]299AS_IF([test x"$enable_jobmarket" != x"no"],[
[b0af1d]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."])
[d6a7b9]303 # JobMarket library (needs SystemCommandJob with suffix)
[b0af1d]304 AM_PATH_JOBMARKET([1.1.6], $have_debug,
305 ,[
[2f5562]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)
[004d5c]320 ])
321]
[79b089]322AC_MSG_RESULT($compile_jobmarket)
[004d5c]323#[
324# AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
325#]
326)
327AC_SUBST(HAVE_JOBMARKET)
[0b738b]328AM_CONDITIONAL([COND_COMPILE_JOBMARKET], [test x"$compile_jobmarket" = x"yes"])
[004d5c]329AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
[3027f8]330
[d2a0f6d]331# VMG library
[79b089]332AC_MSG_CHECKING(whether to compile in long-range support via vmg)
[d2a0f6d]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)
[79b089]339compile_vmg="no"
340AC_MSG_CHECKING(whether to compile vmg library)
[d2a0f6d]341AS_IF([test x"$enable_vmg" != x"no"],[
[79b089]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 ])
[d2a0f6d]351 AC_SUBST(VMG_CFLAGS)
[79b089]352 AC_SUBST(VMG_LDFLAGS)
[d2a0f6d]353 AC_SUBST(VMG_LIBS)
[69c733]354 AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
[8a8c8c]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])
[27760e]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"
[8a8c8c]377 ])
378 ],
379 [])
[d2a0f6d]380])
[79b089]381AC_MSG_RESULT($compile_vmg)
[d2a0f6d]382AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
[8a8c8c]383AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
[79b089]384AM_CONDITIONAL([COND_COMPILE_VMG], [test x"$compile_vmg" = x"yes"])
[d2a0f6d]385
386
[f06d52]387# Check for Levenberg-Marquardt implementation
[830adf]388AC_MSG_CHECKING(whether to enable function fitting via levmar)
[48d20d]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")
[4d5dfa]394AC_MSG_RESULT($enable_levmar)
[b61bd5]395# don't use AS_IF here as it expands (and tests) AC_F77_FUN even if levmar
[4d5dfa]396# is disabled.
[93ea13d]397compile_levmar="no"
[b61bd5]398AS_IF([test x"$enable_levmar" = xyes],[
399 AC_MSG_CHECKING(for levmar presence via given path )
[f06d52]400 AC_ARG_WITH(
401 [levmar],
402 [AS_HELP_STRING([--with-levmar], [give path to LevMar package])],
[b61bd5]403 [have_levmar_path=$withval
404 enable_levmar=yes],
[93ea13d]405 [
406 enable_levmar=no
407 ])
[b61bd5]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"
[93ea13d]412 LEVMAR_LIBS="-llevmar"],
413 [PKG_CHECK_MODULES([LEVMAR],[levmar],[enable_levmar=yes],[enable_levmar=no])
[b61bd5]414 ])
415 ],[enable_levmar=no]
416)
[93ea13d]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
[b61bd5]431AC_MSG_CHECKING(for levmar usability)
432AS_IF([test x"$enable_levmar" = xyes],[
[f06d52]433 AC_SUBST(LEVMAR_CPPFLAGS)
434 AC_SUBST(LEVMAR_LDFLAGS)
435 AC_SUBST(LEVMAR_LIBS)
[b61bd5]436 AC_DEFINE(HAVE_LEVMAR,1, ["use levmar for non-linear minimisation/potential fitting."])])
437AC_MSG_RESULT($enable_levmar)
[f06d52]438AM_CONDITIONAL([CONDLEVMAR], [test x"$enable_levmar" = x"yes"])
[93ea13d]439AM_CONDITIONAL([COND_COMPILE_LEVMAR], [test x"$compile_levmar" = x"yes"])
[f06d52]440
[14de469]441# Checks for header files.
442AC_HEADER_STDC
443AC_CHECK_HEADERS([sys/time.h])
444AC_HEADER_STDBOOL
445
[d3a46d]446AC_FUNC_MALLOC
447AC_FUNC_REALLOC
448AC_CHECK_FUNCS([floor pow sqrt strchr])
449
[14de469]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
[bd3e55]458AC_CHECK_HEADERS([gsl/gsl_blas.h])
[db1a72]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)
[14de469]464
[490038]465# use CppUnit TestRunner or not
[f99714]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"],[
[9b6b2f]474 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
475 AC_SUBST(HAVE_ECUT)
[f99714]476])
[fbbcde]477AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
[9b6b2f]478
[490038]479# with valgrinding testsuite or not
[f3b8a5]480AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
[f99714]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"], [
[490038]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 )
[f3b8a5]502])
[490038]503
[14de469]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
[bd3e55]520#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
[a19da5d]521
[0ca39c]522# test suite
[878044]523
[5079a0]524AC_CONFIG_FILES([
[689639]525 tests/Makefile])
526
[abfc95]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])
[fbf005]532AC_CONFIG_FILES([tests/Calculations/molecuilder_poolworker], [chmod +x tests/Calculations/molecuilder_poolworker])
[abfc95]533
[689639]534AC_CONFIG_TESTDIR(tests/CodeChecks)
[d0a719]535AC_CONFIG_FILES([
536 tests/CodeChecks/atlocal
537 tests/CodeChecks/Makefile])
[689639]538
[740d40]539AC_CONFIG_TESTDIR(tests/Fragmentations)
[038713]540AC_CONFIG_FILES([
[740d40]541 tests/Fragmentations/atlocal
542 tests/Fragmentations/Makefile])
543AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
[689639]544
[0f0407]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])
[c66ae6]551AC_CONFIG_FILES([tests/GuiChecks/adjacencymatcher], [chmod +x tests/GuiChecks/adjacencymatcher])
[b10593]552AC_CONFIG_FILES([tests/GuiChecks/difffragmentresultcontainer], [chmod +x tests/GuiChecks/difffragmentresultcontainer])
[42b40a]553AC_CONFIG_FILES([tests/GuiChecks/trianglematcher], [chmod +x tests/GuiChecks/trianglematcher])
[0f0407]554
[004d5c]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
[83fa5c]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])
[fbf005]566AC_CONFIG_FILES([tests/integration/molecuilder_poolworker], [chmod +x tests/integration/molecuilder_poolworker])
[83fa5c]567
[689639]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])
[c66ae6]573AC_CONFIG_FILES([tests/regression/adjacencymatcher], [chmod +x tests/regression/adjacencymatcher])
[557b39]574AC_CONFIG_FILES([tests/regression/difffragmentresultcontainer], [chmod +x tests/regression/difffragmentresultcontainer])
[7d146a]575AC_CONFIG_FILES([tests/regression/trianglematcher], [chmod +x tests/regression/trianglematcher])
[893426]576AC_CONFIG_FILES([tests/regression/runpython], [chmod +x tests/regression/runpython])
[689639]577
578AC_CONFIG_TESTDIR(tests/Tesselations)
[5079a0]579AC_CONFIG_FILES([
[a85f45]580 tests/Tesselations/atlocal
581 tests/Tesselations/Makefile])
582AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
[7d146a]583AC_CONFIG_FILES([tests/Tesselations/trianglematcher], [chmod +x tests/Tesselations/trianglematcher])
[689639]584
[4464ef]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])
[fbf005]590AC_CONFIG_FILES([tests/Examples/molecuilder_poolworker], [chmod +x tests/Examples/molecuilder_poolworker])
[4464ef]591
[5079a0]592AC_CONFIG_FILES([
593 doc/molecuilder.xml])
[6029a6]594AC_CONFIG_FILES([
595 doc/userguide/catalog.xml:doc/userguide/catalog.xml.in])
[861874]596AC_CONFIG_FILES([
[878044]597 MoleCuilder.pc:MoleCuilder.pc.in])
[5079a0]598AC_CONFIG_FILES([
[ec188c]599 doc/Makefile
[6029a6]600 doc/userguide/Makefile
601])
602AC_CONFIG_FILES([
603 Makefile
[7672284]604 python/Makefile
[938ffd]605 src/Makefile
[c66ae6]606 src/Bond/AdjacencyMatcher/Makefile
[7d146a]607 src/Tesselation/TriangleMatcher/Makefile
[6e12a6]608 ThirdParty/Makefile
[5b991a]609 data/icons/Makefile
[04e1fb]610 utils/Makefile
[85949a]611])
612AC_CONFIG_FILES([
[878044]613 src/unittests/Makefile
[85949a]614])
[d0b3aca]615
[c015b3]616# produce python scripts and tests only when python's present
[24e19e]617AC_CONFIG_TESTDIR([tests/Python])
618AC_CONFIG_FILES([tests/Python/atlocal])
[c015b3]619AM_COND_IF([CONDPYTHON],[
[9fd196]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])
[c015b3]622 AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
623])
[24e19e]624AC_CONFIG_FILES([tests/Python/Makefile])
[d0b3aca]625
[14de469]626AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.