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