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