| 1 | #                                               -*- Autoconf -*-
 | 
|---|
| 2 | # Process this file with autoconf to produce a configure script.
 | 
|---|
| 3 | 
 | 
|---|
| 4 | AC_PREREQ(2.59)
 | 
|---|
| 5 | AC_INIT(MoleCuilder, 1.6.1, [bug@molecuilder.de], [molecuilder], [http://www.molecuilder.de/])
 | 
|---|
| 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([ThirdParty/LinearAlgebra])
 | 
|---|
| 11 | AC_CONFIG_SUBDIRS([ThirdParty/mpqc_open])
 | 
|---|
| 12 | 
 | 
|---|
| 13 | # parallel-tests: use parallel test druver
 | 
|---|
| 14 | # color-tests: us coloring to indicate success/failure when available
 | 
|---|
| 15 | # tar-pax: use newer tar implementation with longer filename (>99 chars)
 | 
|---|
| 16 | AM_INIT_AUTOMAKE([dist-bzip2 1.5 parallel-tests color-tests tar-pax subdir-objects])
 | 
|---|
| 17 | 
 | 
|---|
| 18 | # Checks for programs.
 | 
|---|
| 19 | AC_PROG_CXX
 | 
|---|
| 20 | AC_PROG_INSTALL
 | 
|---|
| 21 | 
 | 
|---|
| 22 | # check for cppunit (taken from svn.apache.org/../xmlbeanscxx)
 | 
|---|
| 23 | AM_PATH_CPPUNIT(1.9.6)
 | 
|---|
| 24 | AM_CONDITIONAL(CONDCPPUNIT, test "$CPPUNIT_LIBS")
 | 
|---|
| 25 | 
 | 
|---|
| 26 | dnl Check if we have enable python
 | 
|---|
| 27 | # python module-
 | 
|---|
| 28 | AC_MSG_CHECKING(whether to enable python module)
 | 
|---|
| 29 | AC_ARG_ENABLE(
 | 
|---|
| 30 |         [python],
 | 
|---|
| 31 |         AS_HELP_STRING([--enable-python],[turn on python module [default=yes]]),
 | 
|---|
| 32 |         enable_python=$enableval,
 | 
|---|
| 33 |         enable_python="yes")
 | 
|---|
| 34 | AC_MSG_RESULT($enable_python)
 | 
|---|
| 35 | AS_IF([test x"$enable_python" != x"no"],[
 | 
|---|
| 36 |   # Python (for boost::python)
 | 
|---|
| 37 |   AM_PATH_PYTHON([2.2])
 | 
|---|
| 38 |   AX_PYTHON
 | 
|---|
| 39 |   AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."])
 | 
|---|
| 40 | ])
 | 
|---|
| 41 | AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"])
 | 
|---|
| 42 | AC_SUBST(HAVE_PYTHON)
 | 
|---|
| 43 | 
 | 
|---|
| 44 | dnl Check whether no extra thread for ActionQueue shall be used
 | 
|---|
| 45 | AC_MSG_CHECKING(whether to enable ActionQueue's run thread)
 | 
|---|
| 46 | AC_ARG_ENABLE(
 | 
|---|
| 47 |         [action_thread],
 | 
|---|
| 48 |         AS_HELP_STRING([--enable-action-thread],[turn on extra run thread for ActionQueue [default=yes]]),
 | 
|---|
| 49 |         enable_action_thread=$enableval,
 | 
|---|
| 50 |         enable_action_thread="no"
 | 
|---|
| 51 | )
 | 
|---|
| 52 | AC_MSG_RESULT($enable_action_thread)
 | 
|---|
| 53 | AS_IF([test x"$enable_action_thread" != x"no"],[
 | 
|---|
| 54 |   AC_DEFINE(HAVE_ACTION_THREAD,1, ["Have extra run thread for ActionQueue."])
 | 
|---|
| 55 | ])
 | 
|---|
| 56 | AM_CONDITIONAL([CONDACTIONTHREAD], [test x"$enable_action_thread" != x"no"])
 | 
|---|
| 57 | AC_SUBST(HAVE_ACTION_THREAD)
 | 
|---|
| 58 | 
 | 
|---|
| 59 | dnl Check if we have enable qtgui
 | 
|---|
| 60 | # Qt programs
 | 
|---|
| 61 | AC_MSG_CHECKING(whether to enable Qt-based GUI)
 | 
|---|
| 62 | AC_ARG_ENABLE(
 | 
|---|
| 63 |         [qtgui], 
 | 
|---|
| 64 |         AS_HELP_STRING([--enable-qtgui],[turn on Qt GUI compilation [default=yes]]),
 | 
|---|
| 65 |         enable_qtgui=$enableval,
 | 
|---|
| 66 |         enable_qtgui="yes")
 | 
|---|
| 67 | AC_MSG_RESULT($enable_qtgui)
 | 
|---|
| 68 | AS_IF([test x"$enable_qtgui" != x"no"],[
 | 
|---|
| 69 |         AC_ARG_WITH(
 | 
|---|
| 70 |                 [Qt-bin],
 | 
|---|
| 71 |                 [AS_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
 | 
|---|
| 72 |                 [have_qtgui_path=$withval],
 | 
|---|
| 73 |                 have_qtgui_path="")
 | 
|---|
| 74 |         AS_IF([test x"$have_qtgui_path" != x""],[
 | 
|---|
| 75 |                 AC_PATH_PROGS([QT_MOC],
 | 
|---|
| 76 |                         [moc-qt4 moc], 
 | 
|---|
| 77 |                         [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
 | 
|---|
| 78 |                         [$have_qtgui_path]
 | 
|---|
| 79 |                 )
 | 
|---|
| 80 |                 AC_PATH_PROGS([QT_RCC],
 | 
|---|
| 81 |                         [rcc-qt4 rcc], 
 | 
|---|
| 82 |                         [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])],
 | 
|---|
| 83 |                         [$have_qtgui_path]
 | 
|---|
| 84 |                 )
 | 
|---|
| 85 |                 AC_PATH_PROGS([QT_UIC], 
 | 
|---|
| 86 |                         [uic-qt4 uic], 
 | 
|---|
| 87 |                         [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
 | 
|---|
| 88 |                         [$have_qtgui_path]
 | 
|---|
| 89 |                 )
 | 
|---|
| 90 |         ],[
 | 
|---|
| 91 |                 AC_PATH_PROGS([QT_MOC],
 | 
|---|
| 92 |                         [moc-qt4 moc], 
 | 
|---|
| 93 |                         [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])]
 | 
|---|
| 94 |                 )
 | 
|---|
| 95 |                 AC_PATH_PROGS([QT_RCC],
 | 
|---|
| 96 |                         [rcc-qt4 rcc], 
 | 
|---|
| 97 |                         [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])]
 | 
|---|
| 98 |                 )
 | 
|---|
| 99 |                 AC_PATH_PROGS([QT_UIC], 
 | 
|---|
| 100 |                         [uic-qt4 uic], 
 | 
|---|
| 101 |                         [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])]
 | 
|---|
| 102 |                 )
 | 
|---|
| 103 |         ])
 | 
|---|
| 104 |         PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
 | 
|---|
| 105 |         :
 | 
|---|
| 106 |         ])
 | 
|---|
| 107 |         AC_SUBST([QT_CFLAGS])
 | 
|---|
| 108 |         AC_SUBST([QT_LIBS])
 | 
|---|
| 109 |         AC_DEFINE(HAVE_QTGUI,1, ["Build Qt-based GUI"])
 | 
|---|
| 110 | ])
 | 
|---|
| 111 | AM_CONDITIONAL([CONDQTGUI], [test x"$enable_qtgui" != x"no"])
 | 
|---|
| 112 | AC_SUBST(HAVE_QTGUI)
 | 
|---|
| 113 | 
 | 
|---|
| 114 | dnl Check whether qtgui captures log or not
 | 
|---|
| 115 | AC_MSG_CHECKING(whether to capture stdout in qtgui)
 | 
|---|
| 116 | AC_ARG_ENABLE(
 | 
|---|
| 117 |         [qtgui_capture_log],
 | 
|---|
| 118 |         AS_HELP_STRING([--enable-qtgui-capture-log],[turn on capturing of log inside qtgui [default=yes]]),
 | 
|---|
| 119 |         enable_qtgui_capture_log=$enableval,
 | 
|---|
| 120 |         enable_qtgui_capture_log="yes"
 | 
|---|
| 121 | )
 | 
|---|
| 122 | AC_MSG_RESULT($enable_qtgui_capture_log)
 | 
|---|
| 123 | AS_IF([test x"$enable_qtgui_capture_log" != x"no"],[
 | 
|---|
| 124 |   AC_DEFINE(QT_CAPTURES_LOG,1, ["Have QtGui capture the stdout."])
 | 
|---|
| 125 | ])
 | 
|---|
| 126 | AC_SUBST(QT_CAPTURES_LOG)
 | 
|---|
| 127 | 
 | 
|---|
| 128 | 
 | 
|---|
| 129 | # check additionally for QWT to enable plotting of potentials
 | 
|---|
| 130 | AC_MSG_CHECKING(whether to enable Qwt-based plotting)
 | 
|---|
| 131 | #enable_qwt=yes
 | 
|---|
| 132 | AC_ARG_ENABLE(
 | 
|---|
| 133 |         [qwt], 
 | 
|---|
| 134 |         AS_HELP_STRING([--enable-qwt],[turn on Qwt compilation [default=yes]]),
 | 
|---|
| 135 |         enable_qwt=$enableval,
 | 
|---|
| 136 |         enable_qwt="yes")
 | 
|---|
| 137 | AC_MSG_RESULT($enable_qwt)
 | 
|---|
| 138 | AS_IF([test x"$enable_qwt" != x"no"],[
 | 
|---|
| 139 |         MOL_AC_HAVE_QWT_IFELSE(
 | 
|---|
| 140 |                 [
 | 
|---|
| 141 |                         enable_qwt=yes
 | 
|---|
| 142 |                         AC_DEFINE(HAVE_QWT,1, ["Build Qwt-based plotting"])
 | 
|---|
| 143 |                 ],
 | 
|---|
| 144 |                 [
 | 
|---|
| 145 |                         enable_qwt=no
 | 
|---|
| 146 |                         AC_MSG_WARN([Qwt not found, disabling plotting in QtUI.])
 | 
|---|
| 147 |                 ]
 | 
|---|
| 148 |         )
 | 
|---|
| 149 | ])
 | 
|---|
| 150 | AM_CONDITIONAL([CONDQWT], [test x"$enable_qwt" != x"no"])
 | 
|---|
| 151 | AC_SUBST(HAVE_QWT)
 | 
|---|
| 152 | 
 | 
|---|
| 153 | # use doxygen
 | 
|---|
| 154 | DX_HTML_FEATURE(ON)
 | 
|---|
| 155 | DX_PS_FEATURE(OFF)
 | 
|---|
| 156 | DX_PDF_FEATURE(OFF)
 | 
|---|
| 157 | DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
 | 
|---|
| 158 | 
 | 
|---|
| 159 | # use docbook
 | 
|---|
| 160 | AX_CHECK_DOCBOOK
 | 
|---|
| 161 | 
 | 
|---|
| 162 | # use libtool
 | 
|---|
| 163 | LT_INIT([static])
 | 
|---|
| 164 | AC_SUBST([LIBTOOL_DEPS])
 | 
|---|
| 165 | 
 | 
|---|
| 166 | # Define these substitions here to keep all version information in one place.
 | 
|---|
| 167 | # For information on how to properly maintain the library version information,
 | 
|---|
| 168 | # refer to the libtool manual, section "Updating library version information":
 | 
|---|
| 169 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 | 
|---|
| 170 | AC_SUBST([MOLECUILDER_SO_VERSION], [18:0:1])
 | 
|---|
| 171 | AC_SUBST([MOLECUILDER_API_VERSION], [1.6.1])
 | 
|---|
| 172 | 
 | 
|---|
| 173 | dnl this macro is used to get the arguments supplied
 | 
|---|
| 174 | dnl to the configure script (./configure --enable-debug)
 | 
|---|
| 175 | dnl Check if we have enable debug support.
 | 
|---|
| 176 | AC_MSG_CHECKING(whether to enable debugging)
 | 
|---|
| 177 | have_debug="no"
 | 
|---|
| 178 | AC_ARG_ENABLE(
 | 
|---|
| 179 |         [debug],
 | 
|---|
| 180 |         AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
 | 
|---|
| 181 |         enable_debug=$enableval,
 | 
|---|
| 182 |         enable_debug="no")
 | 
|---|
| 183 | AC_MSG_RESULT($enable_debug)
 | 
|---|
| 184 | AS_IF([test x"$enable_debug" = x"yes"],[
 | 
|---|
| 185 |   AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
 | 
|---|
| 186 |   AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
 | 
|---|
| 187 |   have_debug="yes"
 | 
|---|
| 188 | ],[
 | 
|---|
| 189 |         AS_IF([test x"$enable_debug" = x"full"],[
 | 
|---|
| 190 |           AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
 | 
|---|
| 191 |           AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
 | 
|---|
| 192 |           AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
 | 
|---|
| 193 |           dnl AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
 | 
|---|
| 194 |           have_debug="full"
 | 
|---|
| 195 |         ],[
 | 
|---|
| 196 |           AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
 | 
|---|
| 197 |           AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
 | 
|---|
| 198 |           AC_DEFINE(QT_NO_DEBUG_OUTPUT,, ["Disable Qt debug messages."])
 | 
|---|
| 199 |           have_debug="no"
 | 
|---|
| 200 |         ])
 | 
|---|
| 201 | ])
 | 
|---|
| 202 | AC_SUBST(HAVE_DEBUG)
 | 
|---|
| 203 | 
 | 
|---|
| 204 | dnl this macro is used to get the arguments supplied
 | 
|---|
| 205 | dnl to the configure script (./configure --enable-debug)
 | 
|---|
| 206 | dnl Check if we have enable debug support.
 | 
|---|
| 207 | AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
 | 
|---|
| 208 | AC_ARG_ENABLE(
 | 
|---|
| 209 |         [cache],
 | 
|---|
| 210 |         AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
 | 
|---|
| 211 |         enable_cache=$enableval,
 | 
|---|
| 212 |         enable_cache="yes")
 | 
|---|
| 213 | AC_MSG_RESULT($enable_cache)
 | 
|---|
| 214 | AS_IF([test x"$enable_cache" != x"no"],[
 | 
|---|
| 215 |   AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
 | 
|---|
| 216 | ],[
 | 
|---|
| 217 |   AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
 | 
|---|
| 218 |   AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
 | 
|---|
| 219 | ])
 | 
|---|
| 220 | AC_SUBST(HAVE_CACHE)
 | 
|---|
| 221 | 
 | 
|---|
| 222 | # Checks for libraries.
 | 
|---|
| 223 | AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
 | 
|---|
| 224 | 
 | 
|---|
| 225 | # Pthreads
 | 
|---|
| 226 | ACX_PTHREAD()
 | 
|---|
| 227 | 
 | 
|---|
| 228 | # Boost
 | 
|---|
| 229 | BOOST_REQUIRE([1.40])
 | 
|---|
| 230 | 
 | 
|---|
| 231 | # Boost headers only
 | 
|---|
| 232 | BOOST_ANY
 | 
|---|
| 233 | BOOST_ARRAY
 | 
|---|
| 234 | BOOST_BIMAP
 | 
|---|
| 235 | BOOST_BIND
 | 
|---|
| 236 | BOOST_CAST
 | 
|---|
| 237 | BOOST_CONVERSION
 | 
|---|
| 238 | BOOST_EXCEPTION
 | 
|---|
| 239 | BOOST_FOREACH
 | 
|---|
| 240 | BOOST_FUNCTION
 | 
|---|
| 241 | BOOST_FUSION
 | 
|---|
| 242 | BOOST_GRAPH
 | 
|---|
| 243 | BOOST_ITERATOR
 | 
|---|
| 244 | BOOST_MULTIARRAY
 | 
|---|
| 245 | BOOST_MULTIINDEXCONTAINER
 | 
|---|
| 246 | BOOST_MPL
 | 
|---|
| 247 | BOOST_PREPROCESSOR
 | 
|---|
| 248 | BOOST_RANDOM
 | 
|---|
| 249 | BOOST_SMART_PTR
 | 
|---|
| 250 | BOOST_STRING_ALGO
 | 
|---|
| 251 | BOOST_TOKENIZER
 | 
|---|
| 252 | 
 | 
|---|
| 253 | # Boost headers with libraries
 | 
|---|
| 254 | BOOST_FILESYSTEM
 | 
|---|
| 255 | BOOST_IOSTREAMS
 | 
|---|
| 256 | BOOST_PROGRAM_OPTIONS
 | 
|---|
| 257 | AS_IF([test x"$enable_python" != x"no"], [BOOST_PYTHON])
 | 
|---|
| 258 | BOOST_SERIALIZATION
 | 
|---|
| 259 | BOOST_THREADS
 | 
|---|
| 260 | 
 | 
|---|
| 261 | 
 | 
|---|
| 262 | # CodePatterns library (requiring UnobservedIterator)
 | 
|---|
| 263 | compile_codepatterns="no"
 | 
|---|
| 264 | AM_PATH_CODEPATTERNS([1.3.2], $have_debug,,[
 | 
|---|
| 265 |         # compile from ThirdParty
 | 
|---|
| 266 |         AC_CONFIG_SUBDIRS([ThirdParty/CodePatterns])
 | 
|---|
| 267 |         compile_codepatterns="yes"
 | 
|---|
| 268 |         [CodePatterns_LDFLAGS='-L$(top_builddir)/ThirdParty/CodePatterns/src']
 | 
|---|
| 269 |         [CodePatterns_CFLAGS='-I$(top_srcdir)/ThirdParty/CodePatterns/src']
 | 
|---|
| 270 |         AS_IF([test x"$enable_debug" != x"no"], [
 | 
|---|
| 271 |                 [CodePatterns_LIBS='-lcodepatterns-debug']
 | 
|---|
| 272 |         ],[
 | 
|---|
| 273 |                 [CodePatterns_LIBS='-lcodepatterns']
 | 
|---|
| 274 |         ])
 | 
|---|
| 275 |         AC_SUBST(CodePatterns_LDFLAGS)
 | 
|---|
| 276 |         AC_SUBST(CodePatterns_CFLAGS)
 | 
|---|
| 277 |         AC_SUBST(CodePatterns_LIBS)
 | 
|---|
| 278 |         #AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])
 | 
|---|
| 279 | ])
 | 
|---|
| 280 | AC_MSG_CHECKING(whether to compile codepatterns)
 | 
|---|
| 281 | AC_MSG_RESULT($compile_codepatterns)
 | 
|---|
| 282 | AM_CONDITIONAL([COND_COMPILE_CODEPATTERNS], [test x"$compile_codepatterns" = x"yes"])
 | 
|---|
| 283 | 
 | 
|---|
| 284 | # JobMarket library (needs boost/archive/iserializer.hpp before MemDebug.hpp)
 | 
|---|
| 285 | AC_MSG_CHECKING(whether to enable jobmarket)
 | 
|---|
| 286 | AC_ARG_ENABLE(
 | 
|---|
| 287 |   [jobmarket],
 | 
|---|
| 288 |   AS_HELP_STRING([--enable-jobmarket],[turn on JobMarket feature [default=yes]]),
 | 
|---|
| 289 |   enable_jobmarket=$enableval,
 | 
|---|
| 290 |   enable_jobmarket="yes")
 | 
|---|
| 291 | AC_MSG_RESULT($enable_jobmarket)
 | 
|---|
| 292 | compile_jobmarket="no"
 | 
|---|
| 293 | AC_MSG_CHECKING(whether to compile jobmarket)
 | 
|---|
| 294 | AS_IF([test x"$enable_jobmarket" != x"no"],[
 | 
|---|
| 295 |   # the following is only required if we use JobMarket
 | 
|---|
| 296 |   BOOST_ASIO
 | 
|---|
| 297 |   AC_DEFINE(HAVE_JOBMARKET,1, ["use JobMarket to calculate fragment jobs."])
 | 
|---|
| 298 |   # JobMarket library (needs SystemCommandJob with suffix)
 | 
|---|
| 299 |   AM_PATH_JOBMARKET([1.1.6], $have_debug,
 | 
|---|
| 300 |     ,[
 | 
|---|
| 301 |         AC_CONFIG_SUBDIRS([ThirdParty/JobMarket])
 | 
|---|
| 302 |         compile_jobmarket="yes"
 | 
|---|
| 303 |         [JobMarket_CFLAGS='-I$(top_srcdir)/ThirdParty/JobMarket/src']
 | 
|---|
| 304 |         [JobMarket_LDFLAGS='-L$(top_builddir)/ThirdParty/JobMarket/src/JobMarket']
 | 
|---|
| 305 |         [JobMarket_LIBS='-lJobMarket']
 | 
|---|
| 306 |         [JobMarket_Controller_LIBS='-lJobMarketController']
 | 
|---|
| 307 |         [JobMarket_Server_LIBS='-lJobMarketServer']
 | 
|---|
| 308 |         [JobMarket_PoolWorker_LIBS='-lJobMarketPoolWorker']
 | 
|---|
| 309 |         AC_SUBST(JobMarket_CFLAGS)
 | 
|---|
| 310 |         AC_SUBST(JobMarket_LDFLAGS)
 | 
|---|
| 311 |         AC_SUBST(JobMarket_LIBS)
 | 
|---|
| 312 |         AC_SUBST(JobMarket_Controller_LIBS)
 | 
|---|
| 313 |         AC_SUBST(JobMarket_Server_LIBS)
 | 
|---|
| 314 |         AC_SUBST(JobMarket_PoolWorker_LIBS)
 | 
|---|
| 315 |     ])
 | 
|---|
| 316 | ]
 | 
|---|
| 317 | AC_MSG_RESULT($compile_jobmarket)
 | 
|---|
| 318 | #[
 | 
|---|
| 319 | #  AC_DEFINE(HAVE_JOBMARKET,0, ["use JobMarket to calculate fragment jobs."])
 | 
|---|
| 320 | #]
 | 
|---|
| 321 | )
 | 
|---|
| 322 | AC_SUBST(HAVE_JOBMARKET)
 | 
|---|
| 323 | AM_CONDITIONAL([COND_COMPILE_JOBMARKET], [test x"$compile_jobmarket" = x"yes"])
 | 
|---|
| 324 | AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
 | 
|---|
| 325 | 
 | 
|---|
| 326 | # VMG library
 | 
|---|
| 327 | AC_MSG_CHECKING(whether to compile in long-range support via vmg)
 | 
|---|
| 328 | AC_ARG_ENABLE(
 | 
|---|
| 329 |   [vmg],
 | 
|---|
| 330 |   [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])],
 | 
|---|
| 331 |   [enable_vmg=$enableval],
 | 
|---|
| 332 |   enable_vmg="no")
 | 
|---|
| 333 | AC_MSG_RESULT($enable_vmg)
 | 
|---|
| 334 | compile_vmg="no"
 | 
|---|
| 335 | AC_MSG_CHECKING(whether to compile vmg library)
 | 
|---|
| 336 | AS_IF([test x"$enable_vmg" != x"no"],[
 | 
|---|
| 337 |   PKG_CHECK_MODULES(VMG, VMG >= 0.1, [enable_vmg="yes"], [enable_vmg="no"])
 | 
|---|
| 338 |   AS_IF([test x"$enable_vmg" = x"no"],[
 | 
|---|
| 339 |         AC_CONFIG_SUBDIRS([ThirdParty/vmg])
 | 
|---|
| 340 |         compile_vmg="yes"
 | 
|---|
| 341 |         enable_vmg="yes"
 | 
|---|
| 342 |         [VMG_CFLAGS='-I$(top_srcdir)/ThirdParty/vmg/src']
 | 
|---|
| 343 |         [VMG_LDFLAGS='-L$(top_builddir)/ThirdParty/vmg/src']
 | 
|---|
| 344 |         [VMG_LIBS='-lvmg']
 | 
|---|
| 345 |   ])
 | 
|---|
| 346 |   AC_SUBST(VMG_CFLAGS)
 | 
|---|
| 347 |   AC_SUBST(VMG_LDFLAGS)
 | 
|---|
| 348 |   AC_SUBST(VMG_LIBS)
 | 
|---|
| 349 |   AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
 | 
|---|
| 350 | 
 | 
|---|
| 351 |   # check whether to use mpi
 | 
|---|
| 352 |   AC_ARG_WITH(
 | 
|---|
| 353 |       [vmg-mpi], 
 | 
|---|
| 354 |       [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])],
 | 
|---|
| 355 |       [with_vmg_mpi=yes],
 | 
|---|
| 356 |       [with_vmg_mpi=no])
 | 
|---|
| 357 |   AS_IF(
 | 
|---|
| 358 |     [test "x$with_vmg_mpi" != xno],
 | 
|---|
| 359 |     [
 | 
|---|
| 360 |       AC_LANG_SAVE
 | 
|---|
| 361 |       AC_LANG_CPLUSPLUS
 | 
|---|
| 362 |       LX_FIND_MPI
 | 
|---|
| 363 |       AC_LANG_RESTORE
 | 
|---|
| 364 |       AS_IF([test "x$have_CXX_mpi" = xyes],[
 | 
|---|
| 365 |             AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
 | 
|---|
| 366 |             AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
 | 
|---|
| 367 |             AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
 | 
|---|
| 368 |             AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
 | 
|---|
| 369 |             AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])
 | 
|---|
| 370 |             #ac_configure_args="$ac_configure_args --with-mpi-thread=single --with-default-parallel=mpi --with-include=\"$MPI_CXXFLAGS\" --with-libs=\"$MPI_CXXLDFLAGS\""
 | 
|---|
| 371 |             ac_configure_args="$ac_configure_args --with-default-parallel=none"
 | 
|---|
| 372 |            ])
 | 
|---|
| 373 |     ],
 | 
|---|
| 374 |     [])
 | 
|---|
| 375 | ])
 | 
|---|
| 376 | AC_MSG_RESULT($compile_vmg)
 | 
|---|
| 377 | AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
 | 
|---|
| 378 | AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
 | 
|---|
| 379 | AM_CONDITIONAL([COND_COMPILE_VMG], [test x"$compile_vmg" = x"yes"])
 | 
|---|
| 380 | 
 | 
|---|
| 381 | 
 | 
|---|
| 382 | # Check for Levenberg-Marquardt implementation
 | 
|---|
| 383 | AC_MSG_CHECKING(whether to enable function fitting via levmar)
 | 
|---|
| 384 | AC_ARG_ENABLE(
 | 
|---|
| 385 |   [levmar],
 | 
|---|
| 386 |   AS_HELP_STRING([--enable-levmar],[turn on LevMar feature [default=no]]),
 | 
|---|
| 387 |   enable_levmar=$enableval,
 | 
|---|
| 388 |   enable_levmar="no")
 | 
|---|
| 389 | AC_MSG_RESULT($enable_levmar)
 | 
|---|
| 390 | # don't use AS_IF here as it expands (and tests) AC_F77_FUN even if levmar
 | 
|---|
| 391 | # is disabled.
 | 
|---|
| 392 | compile_levmar="no"
 | 
|---|
| 393 | AS_IF([test x"$enable_levmar" = xyes],[
 | 
|---|
| 394 |         AC_MSG_CHECKING(for levmar presence via given path )
 | 
|---|
| 395 |         AC_ARG_WITH(
 | 
|---|
| 396 |                 [levmar],
 | 
|---|
| 397 |                 [AS_HELP_STRING([--with-levmar], [give path to LevMar package])],
 | 
|---|
| 398 |                 [have_levmar_path=$withval
 | 
|---|
| 399 |                 enable_levmar=yes],
 | 
|---|
| 400 |         [
 | 
|---|
| 401 |                 enable_levmar=no
 | 
|---|
| 402 |         ])
 | 
|---|
| 403 |         AC_MSG_RESULT($enable_levmar)
 | 
|---|
| 404 |         AS_IF([test -n "$have_levmar_path"],[
 | 
|---|
| 405 |                 LEVMAR_CPPFLAGS="-I${have_levmar_path}/include"
 | 
|---|
| 406 |                 LEVMAR_LDFLAGS="-L${have_levmar_path}/lib"
 | 
|---|
| 407 |                 LEVMAR_LIBS="-llevmar"],
 | 
|---|
| 408 |                 [PKG_CHECK_MODULES([LEVMAR],[levmar],[enable_levmar=yes],[enable_levmar=no])
 | 
|---|
| 409 |         ])
 | 
|---|
| 410 |         ],[enable_levmar=no]
 | 
|---|
| 411 | )
 | 
|---|
| 412 | if test x"$enable_levmar" = xyes; then
 | 
|---|
| 413 |         AX_LAPACK([enable_levmar=yes],
 | 
|---|
| 414 |                 [enable_levmar=no
 | 
|---|
| 415 |                 AC_MSG_WARN(["Missing LAPACK, disabling off levmar"])
 | 
|---|
| 416 |                 ]
 | 
|---|
| 417 |         )
 | 
|---|
| 418 | else
 | 
|---|
| 419 |                         AC_CONFIG_SUBDIRS([ThirdParty/levmar])
 | 
|---|
| 420 |                         compile_levmar="yes"
 | 
|---|
| 421 |                         enable_levmar="yes"
 | 
|---|
| 422 |                         LEVMAR_CPPFLAGS='-I$(top_srcdir)/ThirdParty/levmar/src'
 | 
|---|
| 423 |                         LEVMAR_LDFLAGS='-L$(top_builddir)/ThirdParty/levmar/src'
 | 
|---|
| 424 |                         LEVMAR_LIBS='-llevmar'
 | 
|---|
| 425 | fi
 | 
|---|
| 426 | AC_MSG_CHECKING(for levmar usability)
 | 
|---|
| 427 | AS_IF([test x"$enable_levmar" = xyes],[
 | 
|---|
| 428 |         AC_SUBST(LEVMAR_CPPFLAGS)
 | 
|---|
| 429 |         AC_SUBST(LEVMAR_LDFLAGS)
 | 
|---|
| 430 |         AC_SUBST(LEVMAR_LIBS)
 | 
|---|
| 431 |         AC_DEFINE(HAVE_LEVMAR,1, ["use levmar for non-linear minimisation/potential fitting."])])
 | 
|---|
| 432 | AC_MSG_RESULT($enable_levmar)
 | 
|---|
| 433 | AM_CONDITIONAL([CONDLEVMAR], [test x"$enable_levmar" = x"yes"])
 | 
|---|
| 434 | AM_CONDITIONAL([COND_COMPILE_LEVMAR], [test x"$compile_levmar" = x"yes"])
 | 
|---|
| 435 | 
 | 
|---|
| 436 | # Checks for header files.
 | 
|---|
| 437 | AC_HEADER_STDC
 | 
|---|
| 438 | AC_CHECK_HEADERS([sys/time.h])
 | 
|---|
| 439 | AC_HEADER_STDBOOL
 | 
|---|
| 440 | 
 | 
|---|
| 441 | AC_FUNC_MALLOC
 | 
|---|
| 442 | AC_FUNC_REALLOC
 | 
|---|
| 443 | AC_CHECK_FUNCS([floor pow sqrt strchr])
 | 
|---|
| 444 | 
 | 
|---|
| 445 | # Checks for typedefs, structures, and compiler characteristics.
 | 
|---|
| 446 | AC_C_CONST
 | 
|---|
| 447 | AC_C_INLINE
 | 
|---|
| 448 | AC_C_RESTRICT
 | 
|---|
| 449 | AC_TYPE_SIZE_T
 | 
|---|
| 450 | 
 | 
|---|
| 451 | # Checks for library functions.
 | 
|---|
| 452 | # check for GNU Scientific Library
 | 
|---|
| 453 | AC_CHECK_HEADERS([gsl/gsl_blas.h])
 | 
|---|
| 454 | AC_SEARCH_LIBS(dnrm2, gslblas gslcblas goto blas cblas)
 | 
|---|
| 455 | AC_SEARCH_LIBS(cblas_dnrm2, gslblas gslcblas blas cblas)
 | 
|---|
| 456 | AC_SEARCH_LIBS(gsl_blas_dnrm2,, gsl)
 | 
|---|
| 457 | #AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
 | 
|---|
| 458 | AC_CHECK_LIB(gsl, main)
 | 
|---|
| 459 | 
 | 
|---|
| 460 | # use CppUnit TestRunner or not
 | 
|---|
| 461 | AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
 | 
|---|
| 462 | AC_ARG_ENABLE(
 | 
|---|
| 463 |         [ecut],
 | 
|---|
| 464 |         AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
 | 
|---|
| 465 |         enable_ecut=$disableval,
 | 
|---|
| 466 |         enable_ecut="no")
 | 
|---|
| 467 | AC_MSG_RESULT($enable_ecut)
 | 
|---|
| 468 | AS_IF([test x"$enable_ecut" = x"yes"],[
 | 
|---|
| 469 |   AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
 | 
|---|
| 470 |   AC_SUBST(HAVE_ECUT)
 | 
|---|
| 471 | ])
 | 
|---|
| 472 | AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
 | 
|---|
| 473 | 
 | 
|---|
| 474 | # with valgrinding testsuite or not
 | 
|---|
| 475 | AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
 | 
|---|
| 476 | AC_ARG_ENABLE(
 | 
|---|
| 477 |         [valgrind],
 | 
|---|
| 478 |         AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
 | 
|---|
| 479 |         enable_valgrind=$enableval,
 | 
|---|
| 480 |         enable_valgrind="no")
 | 
|---|
| 481 | AC_MSG_RESULT($enable_valgrind)
 | 
|---|
| 482 | AS_IF([test x"$enable_valgrind" = x"yes"], [
 | 
|---|
| 483 |   AC_CHECK_HEADER([valgrind/valgrind.h],
 | 
|---|
| 484 |     [
 | 
|---|
| 485 |       # check header
 | 
|---|
| 486 |       AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
 | 
|---|
| 487 |       # check path
 | 
|---|
| 488 |       AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
 | 
|---|
| 489 |       # set variables 
 | 
|---|
| 490 |       AC_SUBST(HAVE_VALGRIND_TESTSUITE)
 | 
|---|
| 491 |       AC_SUBST(VALGRIND)
 | 
|---|
| 492 |     ],
 | 
|---|
| 493 |     [
 | 
|---|
| 494 |       AC_MSG_ERROR(["Valgrind support requested but headers not available."])
 | 
|---|
| 495 |     ]
 | 
|---|
| 496 |   )
 | 
|---|
| 497 | ])
 | 
|---|
| 498 | 
 | 
|---|
| 499 | # Check for "extern inline", using a modified version
 | 
|---|
| 500 | # of the test for AC_C_INLINE from acspecific.mt
 | 
|---|
| 501 | AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
 | 
|---|
| 502 | [ac_cv_c_extern_inline=no
 | 
|---|
| 503 | AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
 | 
|---|
| 504 | extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
 | 
|---|
| 505 | double foo (double x) { return x + 1.0; };], 
 | 
|---|
| 506 | [  foo(1.0)  ],
 | 
|---|
| 507 | [ac_cv_c_extern_inline="yes"])
 | 
|---|
| 508 | ])
 | 
|---|
| 509 | 
 | 
|---|
| 510 | if test "$ac_cv_c_inline" != no ; then
 | 
|---|
| 511 |   AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
 | 
|---|
| 512 |   AC_SUBST(HAVE_INLINE)
 | 
|---|
| 513 | fi
 | 
|---|
| 514 | 
 | 
|---|
| 515 | #AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
 | 
|---|
| 516 | 
 | 
|---|
| 517 | # test suite
 | 
|---|
| 518 | 
 | 
|---|
| 519 | AC_CONFIG_FILES([
 | 
|---|
| 520 |         tests/Makefile])
 | 
|---|
| 521 | 
 | 
|---|
| 522 | AC_CONFIG_TESTDIR(tests/Calculations)
 | 
|---|
| 523 | AC_CONFIG_FILES([
 | 
|---|
| 524 |         tests/Calculations/atlocal 
 | 
|---|
| 525 |         tests/Calculations/Makefile])
 | 
|---|
| 526 | AC_CONFIG_FILES([tests/Calculations/molecuilder], [chmod +x tests/Calculations/molecuilder])
 | 
|---|
| 527 | AC_CONFIG_FILES([tests/Calculations/molecuilder_poolworker], [chmod +x tests/Calculations/molecuilder_poolworker])
 | 
|---|
| 528 | 
 | 
|---|
| 529 | AC_CONFIG_TESTDIR(tests/CodeChecks)
 | 
|---|
| 530 | AC_CONFIG_FILES([
 | 
|---|
| 531 |         tests/CodeChecks/atlocal 
 | 
|---|
| 532 |         tests/CodeChecks/Makefile])
 | 
|---|
| 533 | 
 | 
|---|
| 534 | AC_CONFIG_TESTDIR(tests/Fragmentations)
 | 
|---|
| 535 | AC_CONFIG_FILES([
 | 
|---|
| 536 |         tests/Fragmentations/atlocal 
 | 
|---|
| 537 |         tests/Fragmentations/Makefile])
 | 
|---|
| 538 | AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
 | 
|---|
| 539 | 
 | 
|---|
| 540 | AC_CONFIG_TESTDIR(tests/GuiChecks)
 | 
|---|
| 541 | AC_CONFIG_FILES([
 | 
|---|
| 542 |         tests/GuiChecks/atlocal 
 | 
|---|
| 543 |         tests/GuiChecks/Makefile])
 | 
|---|
| 544 | AC_CONFIG_FILES([tests/GuiChecks/molecuilder], [chmod +x tests/GuiChecks/molecuilder])
 | 
|---|
| 545 | AC_CONFIG_FILES([tests/GuiChecks/molecuilderguitest], [chmod +x tests/GuiChecks/molecuilderguitest])
 | 
|---|
| 546 | AC_CONFIG_FILES([tests/GuiChecks/adjacencymatcher], [chmod +x tests/GuiChecks/adjacencymatcher])
 | 
|---|
| 547 | AC_CONFIG_FILES([tests/GuiChecks/difffragmentresultcontainer], [chmod +x tests/GuiChecks/difffragmentresultcontainer])
 | 
|---|
| 548 | AC_CONFIG_FILES([tests/GuiChecks/trianglematcher], [chmod +x tests/GuiChecks/trianglematcher])
 | 
|---|
| 549 | 
 | 
|---|
| 550 | AC_CONFIG_TESTDIR(tests/JobMarket)
 | 
|---|
| 551 | AC_CONFIG_FILES([
 | 
|---|
| 552 |   tests/JobMarket/atlocal 
 | 
|---|
| 553 |   tests/JobMarket/Makefile])
 | 
|---|
| 554 | AC_CONFIG_FILES([tests/JobMarket/molecuilder], [chmod +x tests/JobMarket/molecuilder])
 | 
|---|
| 555 | 
 | 
|---|
| 556 | AC_CONFIG_TESTDIR(tests/integration)
 | 
|---|
| 557 | AC_CONFIG_FILES([
 | 
|---|
| 558 |   tests/integration/atlocal 
 | 
|---|
| 559 |   tests/integration/Makefile])
 | 
|---|
| 560 | AC_CONFIG_FILES([tests/integration/molecuilder], [chmod +x tests/integration/molecuilder])
 | 
|---|
| 561 | AC_CONFIG_FILES([tests/integration/molecuilder_poolworker], [chmod +x tests/integration/molecuilder_poolworker])
 | 
|---|
| 562 | 
 | 
|---|
| 563 | AC_CONFIG_TESTDIR(tests/regression)
 | 
|---|
| 564 | AC_CONFIG_FILES([
 | 
|---|
| 565 |         tests/regression/atlocal 
 | 
|---|
| 566 |         tests/regression/Makefile])
 | 
|---|
| 567 | AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
 | 
|---|
| 568 | AC_CONFIG_FILES([tests/regression/adjacencymatcher], [chmod +x tests/regression/adjacencymatcher])
 | 
|---|
| 569 | AC_CONFIG_FILES([tests/regression/difffragmentresultcontainer], [chmod +x tests/regression/difffragmentresultcontainer])
 | 
|---|
| 570 | AC_CONFIG_FILES([tests/regression/trianglematcher], [chmod +x tests/regression/trianglematcher])
 | 
|---|
| 571 | AC_CONFIG_FILES([tests/regression/runpython], [chmod +x tests/regression/runpython])
 | 
|---|
| 572 | 
 | 
|---|
| 573 | AC_CONFIG_TESTDIR(tests/Tesselations)
 | 
|---|
| 574 | AC_CONFIG_FILES([
 | 
|---|
| 575 |         tests/Tesselations/atlocal 
 | 
|---|
| 576 |         tests/Tesselations/Makefile])
 | 
|---|
| 577 | AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
 | 
|---|
| 578 | AC_CONFIG_FILES([tests/Tesselations/trianglematcher], [chmod +x tests/Tesselations/trianglematcher])
 | 
|---|
| 579 | 
 | 
|---|
| 580 | AC_CONFIG_TESTDIR(tests/Examples)
 | 
|---|
| 581 | AC_CONFIG_FILES([
 | 
|---|
| 582 |         tests/Examples/atlocal 
 | 
|---|
| 583 |         tests/Examples/Makefile])
 | 
|---|
| 584 | AC_CONFIG_FILES([tests/Examples/molecuilder], [chmod +x tests/Examples/molecuilder])
 | 
|---|
| 585 | AC_CONFIG_FILES([tests/Examples/molecuilder_poolworker], [chmod +x tests/Examples/molecuilder_poolworker])
 | 
|---|
| 586 | 
 | 
|---|
| 587 | AC_CONFIG_FILES([
 | 
|---|
| 588 |         doc/molecuilder.xml])
 | 
|---|
| 589 | AC_CONFIG_FILES([
 | 
|---|
| 590 |         doc/userguide/catalog.xml:doc/userguide/catalog.xml.in])
 | 
|---|
| 591 | AC_CONFIG_FILES([
 | 
|---|
| 592 |         MoleCuilder.pc:MoleCuilder.pc.in])
 | 
|---|
| 593 | AC_CONFIG_FILES([
 | 
|---|
| 594 |         doc/Makefile
 | 
|---|
| 595 |         doc/userguide/Makefile
 | 
|---|
| 596 | ])
 | 
|---|
| 597 | AC_CONFIG_FILES([
 | 
|---|
| 598 |         Makefile 
 | 
|---|
| 599 |         python/Makefile
 | 
|---|
| 600 |         src/Makefile
 | 
|---|
| 601 |         src/Bond/AdjacencyMatcher/Makefile
 | 
|---|
| 602 |         src/Tesselation/TriangleMatcher/Makefile
 | 
|---|
| 603 |         ThirdParty/Makefile
 | 
|---|
| 604 |         data/icons/Makefile
 | 
|---|
| 605 |         utils/Makefile
 | 
|---|
| 606 | ])
 | 
|---|
| 607 | AC_CONFIG_FILES([
 | 
|---|
| 608 |         src/unittests/Makefile
 | 
|---|
| 609 | ])
 | 
|---|
| 610 | 
 | 
|---|
| 611 | # produce python scripts and tests only when python's present
 | 
|---|
| 612 | AC_CONFIG_TESTDIR([tests/Python])
 | 
|---|
| 613 | AC_CONFIG_FILES([tests/Python/atlocal])
 | 
|---|
| 614 | AM_COND_IF([CONDPYTHON],[
 | 
|---|
| 615 |         AC_CONFIG_FILES([utils/Python/boxmaker.py:utils/Python/boxmaker.py.in], [chmod +x utils/Python/boxmaker.py])
 | 
|---|
| 616 |         AC_CONFIG_FILES([utils/Python/python_wrapper:utils/Python/python_wrapper.in], [chmod +x utils/Python/python_wrapper])
 | 
|---|
| 617 |         AC_CONFIG_FILES([tests/Python/run], [chmod +x tests/Python/run])
 | 
|---|
| 618 | ])
 | 
|---|
| 619 | AC_CONFIG_FILES([tests/Python/Makefile])
 | 
|---|
| 620 | 
 | 
|---|
| 621 | AC_OUTPUT
 | 
|---|