[14de469] | 1 | # -*- Autoconf -*-
|
---|
| 2 | # Process this file with autoconf to produce a configure script.
|
---|
| 3 |
|
---|
| 4 | AC_PREREQ(2.59)
|
---|
[5a2d98] | 5 | AC_INIT(MoleCuilder, 1.4.4, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
|
---|
[bf4b9f] | 6 | AC_CONFIG_AUX_DIR([build-aux])
|
---|
[14de469] | 7 | AC_CONFIG_SRCDIR([src/builder.cpp])
|
---|
[861874] | 8 | AC_CONFIG_HEADER([config.h libmolecuilder_config.h])
|
---|
| 9 | AC_CONFIG_MACRO_DIR([m4])
|
---|
[bf4b9f] | 10 | AC_CONFIG_SUBDIRS([LinearAlgebra])
|
---|
[14de469] | 11 |
|
---|
[dc322a] | 12 | # parallel-tests: use parallel test druver
|
---|
| 13 | # color-tests: us coloring to indicate success/failure when available
|
---|
| 14 | # tar-pax: use newer tar implementation with longer filename (>99 chars)
|
---|
[4cf35ac] | 15 | AM_INIT_AUTOMAKE([dist-bzip2 1.5 parallel-tests color-tests tar-pax])
|
---|
[14de469] | 16 |
|
---|
| 17 | # Checks for programs.
|
---|
| 18 | AC_PROG_CXX
|
---|
[54a746] | 19 | AC_PROG_INSTALL
|
---|
[14de469] | 20 |
|
---|
[0cfc27] | 21 | # check for cppunit (taken from svn.apache.org/../xmlbeanscxx)
|
---|
| 22 | AM_PATH_CPPUNIT(1.9.6)
|
---|
| 23 | AM_CONDITIONAL(CONDCPPUNIT, test "$CPPUNIT_LIBS")
|
---|
| 24 |
|
---|
[c015b3] | 25 | dnl Check if we have enable python
|
---|
| 26 | # python module
|
---|
| 27 | AC_MSG_CHECKING(whether to enable python module)
|
---|
[f99714] | 28 | AC_ARG_ENABLE(
|
---|
| 29 | [python],
|
---|
| 30 | AS_HELP_STRING([--enable-python],[turn on python module [default=yes]]),
|
---|
| 31 | enable_python=$enableval,
|
---|
| 32 | enable_python="yes")
|
---|
[c015b3] | 33 | AC_MSG_RESULT($enable_python)
|
---|
| 34 | AS_IF([test x"$enable_python" != x"no"],[
|
---|
| 35 | # Python (for boost::python)
|
---|
| 36 | AM_PATH_PYTHON([2.2])
|
---|
| 37 | AX_PYTHON
|
---|
| 38 | AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."])
|
---|
| 39 | ])
|
---|
| 40 | AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"])
|
---|
| 41 | AC_SUBST(HAVE_PYTHON)
|
---|
| 42 |
|
---|
| 43 | dnl Check if we have enable qtgui
|
---|
[e5cec4] | 44 | # Qt programs
|
---|
[c015b3] | 45 | AC_MSG_CHECKING(whether to enable Qt-based GUI)
|
---|
[f99714] | 46 | AC_ARG_ENABLE(
|
---|
| 47 | [qtgui],
|
---|
| 48 | AS_HELP_STRING([--enable-qtgui],[turn on Qt GUI compilation [default=yes]]),
|
---|
| 49 | enable_qtgui=$enableval,
|
---|
| 50 | enable_qtgui="yes")
|
---|
[c015b3] | 51 | AC_MSG_RESULT($enable_qtgui)
|
---|
| 52 | AS_IF([test x"$enable_qtgui" != x"no"],[
|
---|
[93909a] | 53 | AC_ARG_WITH(
|
---|
| 54 | [Qt-bin],
|
---|
| 55 | [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
|
---|
| 56 | [have_qtgui_path=$withval],
|
---|
| 57 | have_qtgui_path="")
|
---|
[c015b3] | 58 | AC_PATH_PROGS([QT_MOC],
|
---|
[e5cec4] | 59 | [moc-qt4 moc],
|
---|
| 60 | [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
|
---|
[c015b3] | 61 | [$have_qtgui_path]
|
---|
[e5cec4] | 62 | )
|
---|
[5b991a] | 63 | AC_PATH_PROGS([QT_RCC],
|
---|
| 64 | [rcc-qt4 rcc],
|
---|
| 65 | [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])],
|
---|
| 66 | [$have_qtgui_path]
|
---|
| 67 | )
|
---|
[e5cec4] | 68 | AC_PATH_PROGS([QT_UIC],
|
---|
| 69 | [uic-qt4 uic],
|
---|
| 70 | [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
|
---|
[c015b3] | 71 | [$have_qtgui_path]
|
---|
[e5cec4] | 72 | )
|
---|
[c015b3] | 73 | PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
|
---|
| 74 | ])
|
---|
| 75 | AC_SUBST([QT_CFLAGS])
|
---|
| 76 | AC_SUBST([QT_LIBS])
|
---|
| 77 | AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
|
---|
[e5cec4] | 78 | ])
|
---|
[c015b3] | 79 | AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
|
---|
| 80 | AC_SUBST(HAVE_QTGUI)
|
---|
[e5cec4] | 81 |
|
---|
[c76b8b] | 82 | # check additionally for QWT to enable plotting of potentials
|
---|
| 83 | AC_MSG_CHECKING(whether to enable Qwt-based plotting)
|
---|
| 84 | #enable_qwt=yes
|
---|
| 85 | AC_ARG_ENABLE(
|
---|
| 86 | [qwt],
|
---|
| 87 | AS_HELP_STRING([--enable-qwt],[turn on Qwt compilation [default=yes]]),
|
---|
| 88 | enable_qwt=$enableval,
|
---|
| 89 | enable_qwt="yes")
|
---|
| 90 | AC_MSG_RESULT($enable_qwt)
|
---|
| 91 | AS_IF([test x"$enable_qwt" != x"no"],[
|
---|
| 92 | MOL_AC_HAVE_QWT_IFELSE(
|
---|
| 93 | [
|
---|
| 94 | enable_qwt=yes
|
---|
| 95 | AC_DEFINE(HAVE_QWT,1, ["Build Qwt-based plotting"])
|
---|
| 96 | ],
|
---|
| 97 | [
|
---|
| 98 | enable_qwt=no
|
---|
| 99 | AC_MSG_WARN([Qwt not found, disabling plotting in QtUI.])
|
---|
| 100 | ]
|
---|
| 101 | )
|
---|
| 102 | ])
|
---|
| 103 | AM_CONDITIONAL([CONDQWT], [test x"$enable_qwt" != x"no"])
|
---|
| 104 | AC_SUBST(HAVE_QWT)
|
---|
| 105 |
|
---|
[ec188c] | 106 | # use doxygen
|
---|
| 107 | DX_HTML_FEATURE(ON)
|
---|
| 108 | DX_PS_FEATURE(OFF)
|
---|
| 109 | DX_PDF_FEATURE(OFF)
|
---|
[3158e6] | 110 | DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
|
---|
[ec188c] | 111 |
|
---|
| 112 | # use libtool
|
---|
[a0064e] | 113 | LT_INIT([static])
|
---|
[861874] | 114 |
|
---|
| 115 | # Define these substitions here to keep all version information in one place.
|
---|
| 116 | # For information on how to properly maintain the library version information,
|
---|
| 117 | # refer to the libtool manual, section "Updating library version information":
|
---|
| 118 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
---|
[5a2d98] | 119 | AC_SUBST([MOLECUILDER_SO_VERSION], [13:2:1])
|
---|
| 120 | AC_SUBST([MOLECUILDER_API_VERSION], [1.4.4])
|
---|
[06aedc] | 121 |
|
---|
[dc031c] | 122 | dnl this macro is used to get the arguments supplied
|
---|
| 123 | dnl to the configure script (./configure --enable-debug)
|
---|
| 124 | dnl Check if we have enable debug support.
|
---|
| 125 | AC_MSG_CHECKING(whether to enable debugging)
|
---|
| 126 | have_debug="no"
|
---|
[f99714] | 127 | AC_ARG_ENABLE(
|
---|
| 128 | [debug],
|
---|
| 129 | AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
|
---|
| 130 | enable_debug=$enableval,
|
---|
| 131 | enable_debug="no")
|
---|
| 132 | AC_MSG_RESULT($enable_debug)
|
---|
| 133 | AS_IF([test x"$enable_debug" = x"yes"],[
|
---|
[dc031c] | 134 | AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
|
---|
| 135 | AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
|
---|
| 136 | have_debug="yes"
|
---|
[f99714] | 137 | ],[
|
---|
| 138 | AS_IF([test x"$enable_debug" = x"full"],[
|
---|
| 139 | AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
|
---|
| 140 | AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
|
---|
| 141 | AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
|
---|
| 142 | AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
|
---|
| 143 | have_debug="full"
|
---|
| 144 | ],[
|
---|
| 145 | AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
|
---|
| 146 | AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
|
---|
| 147 | AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
|
---|
| 148 | have_debug="no"
|
---|
| 149 | ])
|
---|
| 150 | ])
|
---|
[dc031c] | 151 | AC_SUBST(HAVE_DEBUG)
|
---|
| 152 |
|
---|
| 153 | dnl this macro is used to get the arguments supplied
|
---|
| 154 | dnl to the configure script (./configure --enable-debug)
|
---|
| 155 | dnl Check if we have enable debug support.
|
---|
[f3b8a5] | 156 | AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
|
---|
[f99714] | 157 | AC_ARG_ENABLE(
|
---|
| 158 | [cache],
|
---|
| 159 | AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
|
---|
| 160 | enable_cache=$enableval,
|
---|
| 161 | enable_cache="yes")
|
---|
[f3b8a5] | 162 | AC_MSG_RESULT($enable_cache)
|
---|
[f99714] | 163 | AS_IF([test x"$enable_cache" != x"no"],[
|
---|
| 164 | AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
|
---|
| 165 | ],[
|
---|
[dc031c] | 166 | AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
|
---|
| 167 | AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
|
---|
[f99714] | 168 | ])
|
---|
[dc031c] | 169 | AC_SUBST(HAVE_CACHE)
|
---|
| 170 |
|
---|
[14de469] | 171 | # Checks for libraries.
|
---|
[861874] | 172 | AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
|
---|
[14de469] | 173 |
|
---|
[f08ae7] | 174 | # Boost
|
---|
[79de12] | 175 | BOOST_REQUIRE([1.40])
|
---|
[f08ae7] | 176 |
|
---|
| 177 | # Boost headers only
|
---|
| 178 | BOOST_ANY
|
---|
[794bc8] | 179 | BOOST_ARRAY
|
---|
[4f04ab8] | 180 | BOOST_BIMAP
|
---|
[f08ae7] | 181 | BOOST_BIND
|
---|
[503acc1] | 182 | BOOST_CAST
|
---|
[f08ae7] | 183 | BOOST_CONVERSION
|
---|
[79de12] | 184 | BOOST_EXCEPTION
|
---|
[f08ae7] | 185 | BOOST_FOREACH
|
---|
| 186 | BOOST_FUNCTION
|
---|
[619a0e] | 187 | BOOST_FUSION
|
---|
[4f04ab8] | 188 | BOOST_GRAPH
|
---|
[30c753] | 189 | BOOST_ITERATOR
|
---|
[794bc8] | 190 | BOOST_MULTIARRAY
|
---|
[619a0e] | 191 | BOOST_MPL
|
---|
[f08ae7] | 192 | BOOST_PREPROCESSOR
|
---|
| 193 | BOOST_RANDOM
|
---|
| 194 | BOOST_SMART_PTR
|
---|
[7f570c] | 195 | BOOST_STRING_ALGO
|
---|
[f08ae7] | 196 | BOOST_TOKENIZER
|
---|
| 197 |
|
---|
| 198 | # Boost headers with libraries
|
---|
[79de12] | 199 | BOOST_FILESYSTEM
|
---|
[d920b9] | 200 | BOOST_IOSTREAMS
|
---|
[79de12] | 201 | BOOST_PROGRAM_OPTIONS
|
---|
[c015b3] | 202 | AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
|
---|
[d7d022] | 203 | BOOST_SERIALIZATION
|
---|
[79de12] | 204 | BOOST_THREADS
|
---|
[fa861b] | 205 |
|
---|
[f08ae7] | 206 |
|
---|
[51e0e3] | 207 | # CodePatterns library (extended toString.hpp)
|
---|
| 208 | AM_PATH_CODEPATTERNS([1.2.7], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
|
---|
[3027f8] | 209 |
|
---|
[004d5c] | 210 | # JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
|
---|
[830adf] | 211 | AC_MSG_CHECKING(whether to enable jobmarket)
|
---|
[004d5c] | 212 | AC_ARG_ENABLE(
|
---|
| 213 | [jobmarket],
|
---|
| 214 | AS_HELP_STRING([--enable-jobmarket],[turn on JobMarket feature [default=yes]]),
|
---|
| 215 | enable_jobmarket=$enableval,
|
---|
| 216 | enable_jobmarket="yes")
|
---|
| 217 | AC_MSG_RESULT($enable_jobmarket)
|
---|
| 218 | AS_IF([test x"$enable_jobmarket" != x"no"],[
|
---|
[a953c4] | 219 | # JobMarket library (needs priorizing of jobs)
|
---|
| 220 | AM_PATH_JOBMARKET([1.1.4], $have_debug,[
|
---|
[004d5c] | 221 | # the following is only required if we have JobMarket
|
---|
| 222 | BOOST_ASIO
|
---|
| 223 | AC_DEFINE(HAVE_JOBMARKET,1, ["use JobMarket to calculate fragment jobs."])
|
---|
| 224 | ],[
|
---|
| 225 | enable_jobmarket="no"
|
---|
| 226 | ])
|
---|
| 227 | ]
|
---|
| 228 | #[
|
---|
| 229 | # AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
|
---|
| 230 | #]
|
---|
| 231 | )
|
---|
| 232 | AC_SUBST(HAVE_JOBMARKET)
|
---|
| 233 | AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
|
---|
[3027f8] | 234 |
|
---|
[d2a0f6d] | 235 | # VMG library
|
---|
| 236 | AC_MSG_CHECKING(whether to compile in long-range support via VMG)
|
---|
| 237 | AC_ARG_ENABLE(
|
---|
| 238 | [vmg],
|
---|
| 239 | [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])],
|
---|
| 240 | [enable_vmg=$enableval],
|
---|
| 241 | enable_vmg="no")
|
---|
| 242 | AC_MSG_RESULT($enable_vmg)
|
---|
| 243 | AS_IF([test x"$enable_vmg" != x"no"],[
|
---|
| 244 | PKG_CHECK_MODULES(VMG, VMG >= 0.1)
|
---|
| 245 | AC_SUBST(VMG_CFLAGS)
|
---|
| 246 | AC_SUBST(VMG_LIBS)
|
---|
[69c733] | 247 | AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
|
---|
[8a8c8c] | 248 |
|
---|
| 249 | # check whether to use mpi
|
---|
| 250 | AC_ARG_WITH(
|
---|
| 251 | [vmg-mpi],
|
---|
| 252 | [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])],
|
---|
| 253 | [with_vmg_mpi=yes],
|
---|
| 254 | [with_vmg_mpi=no])
|
---|
| 255 | AS_IF(
|
---|
| 256 | [test "x$with_vmg_mpi" != xno],
|
---|
| 257 | [
|
---|
| 258 | AC_LANG_SAVE
|
---|
| 259 | AC_LANG_CPLUSPLUS
|
---|
| 260 | LX_FIND_MPI
|
---|
| 261 | AC_LANG_RESTORE
|
---|
| 262 | AS_IF([test "x$have_CXX_mpi" = xyes],[
|
---|
| 263 | AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
|
---|
| 264 | AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
|
---|
| 265 | AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
|
---|
| 266 | AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
|
---|
| 267 | AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])
|
---|
| 268 | ])
|
---|
| 269 | ],
|
---|
| 270 | [])
|
---|
[d2a0f6d] | 271 | ])
|
---|
| 272 | AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
|
---|
[8a8c8c] | 273 | AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
|
---|
[d2a0f6d] | 274 |
|
---|
| 275 |
|
---|
[f06d52] | 276 | # Check for Levenberg-Marquardt implementation
|
---|
[830adf] | 277 | AC_MSG_CHECKING(whether to enable function fitting via levmar)
|
---|
[48d20d] | 278 | AC_ARG_ENABLE(
|
---|
| 279 | [levmar],
|
---|
| 280 | AS_HELP_STRING([--enable-levmar],[turn on LevMar feature [default=no]]),
|
---|
| 281 | enable_levmar=$enableval,
|
---|
| 282 | enable_levmar="no")
|
---|
[4d5dfa] | 283 | AC_MSG_RESULT($enable_levmar)
|
---|
| 284 | # don't use AS_IF here as it expands (and tests) AC_F77_FUN evene if levmar
|
---|
| 285 | # is disabled.
|
---|
| 286 | if test x"$enable_levmar" = x"yes"; then
|
---|
| 287 | AX_LAPACK([enable_levmar=yes],[enable_levmar=no])
|
---|
| 288 | fi
|
---|
[f06d52] | 289 | AS_IF([test x"$enable_levmar" = x"yes"],[
|
---|
| 290 | AC_ARG_WITH(
|
---|
| 291 | [levmar],
|
---|
| 292 | [AS_HELP_STRING([--with-levmar], [give path to LevMar package])],
|
---|
| 293 | [have_levmar_path=$withval],
|
---|
| 294 | [enable_levmar=no])
|
---|
| 295 | ],[enable_levmar=no])
|
---|
| 296 | AS_IF([test x"$enable_levmar" = x"yes"],[
|
---|
| 297 | LEVMAR_CPPFLAGS="-I${have_levmar_path}/include"
|
---|
| 298 | LEVMAR_LDFLAGS="-L${have_levmar_path}/lib"
|
---|
| 299 | LEVMAR_LIBS="-llevmar"
|
---|
| 300 | AC_SUBST(LEVMAR_CPPFLAGS)
|
---|
| 301 | AC_SUBST(LEVMAR_LDFLAGS)
|
---|
| 302 | AC_SUBST(LEVMAR_LIBS)
|
---|
[24ac59] | 303 | AC_DEFINE(HAVE_LEVMAR,1, ["use levmar for non-linear minimisation/potential fitting."])
|
---|
[830adf] | 304 | ],[AC_MSG_WARN(["Missing LAPACK, disabling off levmar"])])
|
---|
[f06d52] | 305 | AM_CONDITIONAL([CONDLEVMAR], [test x"$enable_levmar" = x"yes"])
|
---|
| 306 |
|
---|
[14de469] | 307 | # Checks for header files.
|
---|
| 308 | AC_HEADER_STDC
|
---|
| 309 | AC_CHECK_HEADERS([sys/time.h])
|
---|
| 310 | AC_HEADER_STDBOOL
|
---|
| 311 |
|
---|
[d3a46d] | 312 | AC_FUNC_MALLOC
|
---|
| 313 | AC_FUNC_REALLOC
|
---|
| 314 | AC_CHECK_FUNCS([floor pow sqrt strchr])
|
---|
| 315 |
|
---|
[14de469] | 316 | # Checks for typedefs, structures, and compiler characteristics.
|
---|
| 317 | AC_C_CONST
|
---|
| 318 | AC_C_INLINE
|
---|
| 319 | AC_C_RESTRICT
|
---|
| 320 | AC_TYPE_SIZE_T
|
---|
| 321 |
|
---|
| 322 | # Checks for library functions.
|
---|
| 323 | # check for GNU Scientific Library
|
---|
[bd3e55] | 324 | AC_CHECK_HEADERS([gsl/gsl_blas.h])
|
---|
[db1a72] | 325 | AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
|
---|
| 326 | AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
|
---|
| 327 | AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
|
---|
| 328 | #AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
|
---|
| 329 | AC_CHECK_LIB(gsl, main)
|
---|
[14de469] | 330 |
|
---|
[490038] | 331 | # use CppUnit TestRunner or not
|
---|
[f99714] | 332 | AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
|
---|
| 333 | AC_ARG_ENABLE(
|
---|
| 334 | [ecut],
|
---|
| 335 | AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
|
---|
| 336 | enable_ecut=$disableval,
|
---|
| 337 | enable_ecut="no")
|
---|
| 338 | AC_MSG_RESULT($enable_ecut)
|
---|
| 339 | AS_IF([test x"$enable_ecut" = x"yes"],[
|
---|
[9b6b2f] | 340 | AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
|
---|
| 341 | AC_SUBST(HAVE_ECUT)
|
---|
[f99714] | 342 | ])
|
---|
[fbbcde] | 343 | AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
|
---|
[9b6b2f] | 344 |
|
---|
[490038] | 345 | # with valgrinding testsuite or not
|
---|
[f3b8a5] | 346 | AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
|
---|
[f99714] | 347 | AC_ARG_ENABLE(
|
---|
| 348 | [valgrind],
|
---|
| 349 | AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
|
---|
| 350 | enable_valgrind=$enableval,
|
---|
| 351 | enable_valgrind="no")
|
---|
| 352 | AC_MSG_RESULT($enable_valgrind)
|
---|
| 353 | AS_IF([test x"$enable_valgrind" = x"yes"], [
|
---|
[490038] | 354 | AC_CHECK_HEADER([valgrind/valgrind.h],
|
---|
| 355 | [
|
---|
| 356 | # check header
|
---|
| 357 | AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
|
---|
| 358 | # check path
|
---|
| 359 | AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
|
---|
| 360 | # set variables
|
---|
| 361 | AC_SUBST(HAVE_VALGRIND_TESTSUITE)
|
---|
| 362 | AC_SUBST(VALGRIND)
|
---|
| 363 | ],
|
---|
| 364 | [
|
---|
| 365 | AC_MSG_ERROR(["Valgrind support requested but headers not available."])
|
---|
| 366 | ]
|
---|
| 367 | )
|
---|
[f3b8a5] | 368 | ])
|
---|
[490038] | 369 |
|
---|
[14de469] | 370 | # Check for "extern inline", using a modified version
|
---|
| 371 | # of the test for AC_C_INLINE from acspecific.mt
|
---|
| 372 | AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
|
---|
| 373 | [ac_cv_c_extern_inline=no
|
---|
| 374 | AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
|
---|
| 375 | extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
|
---|
| 376 | double foo (double x) { return x + 1.0; };],
|
---|
| 377 | [ foo(1.0) ],
|
---|
| 378 | [ac_cv_c_extern_inline="yes"])
|
---|
| 379 | ])
|
---|
| 380 |
|
---|
| 381 | if test "$ac_cv_c_inline" != no ; then
|
---|
| 382 | AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
|
---|
| 383 | AC_SUBST(HAVE_INLINE)
|
---|
| 384 | fi
|
---|
| 385 |
|
---|
[bd3e55] | 386 | #AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
|
---|
[a19da5d] | 387 |
|
---|
[0ca39c] | 388 | # test suite
|
---|
[878044] | 389 |
|
---|
[5079a0] | 390 | AC_CONFIG_FILES([
|
---|
[689639] | 391 | tests/Makefile])
|
---|
| 392 |
|
---|
| 393 | AC_CONFIG_TESTDIR(tests/CodeChecks)
|
---|
[d0a719] | 394 | AC_CONFIG_FILES([
|
---|
| 395 | tests/CodeChecks/atlocal
|
---|
| 396 | tests/CodeChecks/Makefile])
|
---|
[689639] | 397 |
|
---|
[740d40] | 398 | AC_CONFIG_TESTDIR(tests/Fragmentations)
|
---|
[038713] | 399 | AC_CONFIG_FILES([
|
---|
[740d40] | 400 | tests/Fragmentations/atlocal
|
---|
| 401 | tests/Fragmentations/Makefile])
|
---|
[878044] | 402 | AC_CONFIG_FILES([tests/Fragmentations/analyzer], [chmod +x tests/Fragmentations/analyzer])
|
---|
| 403 | AC_CONFIG_FILES([tests/Fragmentations/joiner], [chmod +x tests/Fragmentations/joiner])
|
---|
[740d40] | 404 | AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
|
---|
[689639] | 405 |
|
---|
[004d5c] | 406 | AC_CONFIG_TESTDIR(tests/JobMarket)
|
---|
| 407 | AC_CONFIG_FILES([
|
---|
| 408 | tests/JobMarket/atlocal
|
---|
| 409 | tests/JobMarket/Makefile])
|
---|
| 410 | AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
|
---|
| 411 |
|
---|
[689639] | 412 | AC_CONFIG_TESTDIR(tests/regression)
|
---|
| 413 | AC_CONFIG_FILES([
|
---|
| 414 | tests/regression/atlocal
|
---|
| 415 | tests/regression/Makefile])
|
---|
| 416 | AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
|
---|
[893426] | 417 | AC_CONFIG_FILES([tests/regression/runpython], [chmod +x tests/regression/runpython])
|
---|
[689639] | 418 |
|
---|
| 419 | AC_CONFIG_TESTDIR(tests/Tesselations)
|
---|
[5079a0] | 420 | AC_CONFIG_FILES([
|
---|
[a85f45] | 421 | tests/Tesselations/atlocal
|
---|
| 422 | tests/Tesselations/Makefile])
|
---|
| 423 | AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
|
---|
[689639] | 424 |
|
---|
[5079a0] | 425 | AC_CONFIG_FILES([
|
---|
| 426 | doc/molecuilder.xml])
|
---|
[861874] | 427 | AC_CONFIG_FILES([
|
---|
[878044] | 428 | MoleCuilder.pc:MoleCuilder.pc.in])
|
---|
[5079a0] | 429 | AC_CONFIG_FILES([
|
---|
| 430 | Makefile
|
---|
[ec188c] | 431 | doc/Makefile
|
---|
[938ffd] | 432 | src/Makefile
|
---|
[5b991a] | 433 | data/icons/Makefile
|
---|
[04e1fb] | 434 | utils/Makefile
|
---|
[85949a] | 435 | ])
|
---|
| 436 | AC_CONFIG_FILES([
|
---|
[878044] | 437 | src/unittests/Makefile
|
---|
[85949a] | 438 | ])
|
---|
[d0b3aca] | 439 |
|
---|
[c015b3] | 440 | # produce python scripts and tests only when python's present
|
---|
[24e19e] | 441 | AC_CONFIG_TESTDIR([tests/Python])
|
---|
| 442 | AC_CONFIG_FILES([tests/Python/atlocal])
|
---|
[c015b3] | 443 | AM_COND_IF([CONDPYTHON],[
|
---|
[9fd196] | 444 | AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
|
---|
| 445 | AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
|
---|
[c015b3] | 446 | AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
|
---|
| 447 | ])
|
---|
[24e19e] | 448 | AC_CONFIG_FILES([tests/Python/Makefile])
|
---|
[d0b3aca] | 449 |
|
---|
[14de469] | 450 | AC_OUTPUT
|
---|