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