[14de469] | 1 | # -*- Autoconf -*-
|
---|
| 2 | # Process this file with autoconf to produce a configure script.
|
---|
| 3 |
|
---|
| 4 | AC_PREREQ(2.59)
|
---|
[bf3379] | 5 | AC_INIT(MoleCuilder, 1.1.6, [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.
|
---|
[54a746] | 18 | AM_PATH_CPPUNIT(1.9.6)
|
---|
[14de469] | 19 | AC_PROG_CXX
|
---|
| 20 | AC_PROG_CC
|
---|
[54a746] | 21 | AC_PROG_INSTALL
|
---|
[14de469] | 22 |
|
---|
[e5cec4] | 23 | # Qt programs
|
---|
| 24 | AC_ARG_WITH([Qt-bin],
|
---|
| 25 | [AC_HELP_STRING([--with-Qt-bin], [give path to Qt binaries])],
|
---|
| 26 | echo "Looking for binaries in $withval ... "
|
---|
| 27 | [AC_PATH_PROGS([QT_MOC],
|
---|
| 28 | [moc-qt4 moc],
|
---|
| 29 | [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
|
---|
| 30 | [$withval]
|
---|
| 31 | )
|
---|
| 32 | AC_PATH_PROGS([QT_UIC],
|
---|
| 33 | [uic-qt4 uic],
|
---|
| 34 | [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])],
|
---|
| 35 | [$withval]
|
---|
| 36 | )],
|
---|
| 37 | [AC_PATH_PROGS([QT_MOC],
|
---|
| 38 | [moc-qt4 moc],
|
---|
| 39 | [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])]
|
---|
| 40 | )
|
---|
| 41 | AC_PATH_PROGS([QT_UIC],
|
---|
| 42 | [uic-qt4 uic],
|
---|
| 43 | [AC_MSG_ERROR(["Qts uic not found, please use --with-Qt-bin."])]
|
---|
| 44 | )]
|
---|
| 45 | )
|
---|
| 46 | PKG_CHECK_MODULES([QT], [QtCore QtGui Qt3D], [
|
---|
| 47 | ])
|
---|
| 48 | AC_SUBST([QT_CFLAGS])
|
---|
| 49 | AC_SUBST([QT_LIBS])
|
---|
| 50 |
|
---|
[ec188c] | 51 | # use doxygen
|
---|
| 52 | DX_HTML_FEATURE(ON)
|
---|
| 53 | DX_PS_FEATURE(OFF)
|
---|
| 54 | DX_PDF_FEATURE(OFF)
|
---|
[3158e6] | 55 | DX_INIT_DOXYGEN(MoleCuilder, Doxyfile, ${docdir})
|
---|
[ec188c] | 56 |
|
---|
[715085] | 57 | # Python (for boost::python)
|
---|
[2d31e1] | 58 | AM_PATH_PYTHON([2.2])
|
---|
[715085] | 59 | AX_PYTHON
|
---|
| 60 |
|
---|
[ec188c] | 61 | # use libtool
|
---|
[a0064e] | 62 | LT_INIT([static])
|
---|
[861874] | 63 |
|
---|
| 64 | # Define these substitions here to keep all version information in one place.
|
---|
| 65 | # For information on how to properly maintain the library version information,
|
---|
| 66 | # refer to the libtool manual, section "Updating library version information":
|
---|
| 67 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
---|
[bf3379] | 68 | AC_SUBST([MOLECUILDER_SO_VERSION], [5:2:0])
|
---|
| 69 | AC_SUBST([MOLECUILDER_API_VERSION], [1.1.6])
|
---|
[06aedc] | 70 |
|
---|
[dc031c] | 71 | dnl this macro is used to get the arguments supplied
|
---|
| 72 | dnl to the configure script (./configure --enable-debug)
|
---|
| 73 | dnl Check if we have enable debug support.
|
---|
| 74 | AC_MSG_CHECKING(whether to enable debugging)
|
---|
| 75 | default="no"
|
---|
| 76 | have_debug="no"
|
---|
| 77 | AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes/full] turn on debugging
|
---|
| 78 | [default=$default]],, enable_debug=$default)
|
---|
| 79 | if test "x$enable_debug" = "xyes"; then
|
---|
| 80 | AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
|
---|
| 81 | AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
|
---|
| 82 | have_debug="yes"
|
---|
| 83 | elif test "x$enable_debug" = "xfull"; then
|
---|
| 84 | AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
|
---|
| 85 | AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
|
---|
| 86 | AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
|
---|
[060ba4] | 87 | AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
|
---|
[dc031c] | 88 | have_debug="full"
|
---|
| 89 | else
|
---|
| 90 | AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
|
---|
| 91 | AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
|
---|
[060ba4] | 92 | AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
|
---|
[dc031c] | 93 | have_debug="no"
|
---|
| 94 | fi
|
---|
| 95 | AC_MSG_RESULT($have_debug)
|
---|
| 96 | AC_SUBST(HAVE_DEBUG)
|
---|
| 97 |
|
---|
| 98 | dnl this macro is used to get the arguments supplied
|
---|
| 99 | dnl to the configure script (./configure --enable-debug)
|
---|
| 100 | dnl Check if we have enable debug support.
|
---|
| 101 | AC_MSG_CHECKING([whether to enable internal caching of values (speedup!)])
|
---|
| 102 | default="yes"
|
---|
| 103 | AC_ARG_ENABLE(cache, [ --enable-cache=[no/yes] turn on caching
|
---|
| 104 | [default=$default]],, enable_cache=$default)
|
---|
| 105 | if test "x$enable_cache" = "xno"; then
|
---|
| 106 | AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
|
---|
| 107 | AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
|
---|
| 108 | AC_MSG_RESULT(no)
|
---|
| 109 | else
|
---|
| 110 | AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
|
---|
| 111 | AC_MSG_RESULT(yes)
|
---|
| 112 | fi
|
---|
| 113 | AC_SUBST(HAVE_CACHE)
|
---|
| 114 |
|
---|
| 115 | #AC_MSG_CHECKING(whether to enable profiling)
|
---|
| 116 | #default="no"
|
---|
| 117 | #AC_ARG_ENABLE(debug, [ --enable-profile=[no/yes] turn on profiling
|
---|
| 118 | # [default=$default]],, enable_profile=$default)
|
---|
| 119 | #if test "x$enable_profile" = "xyes"; then
|
---|
| 120 | # CXXFLAGS="$CXXFLAGS -g -DDEBUG -pg"
|
---|
| 121 | # DEBUG=-pg;
|
---|
| 122 | # AC_MSG_RESULT(yes)
|
---|
| 123 | #else
|
---|
| 124 | # AC_MSG_RESULT(no)
|
---|
| 125 | #fi
|
---|
| 126 |
|
---|
| 127 | #AC_MSG_CHECKING(whether to enable serialization)
|
---|
| 128 | #default="no"
|
---|
| 129 | #AC_ARG_ENABLE(debug, [ --enable-serialization=[no/yes] turn on serialization support
|
---|
| 130 | # [default=$default]],, enable_serialization=$default)
|
---|
| 131 | #if test "x$enable_serialization" = "xyes"; then
|
---|
| 132 | # CXXFLAGS="$CXXFLAGS -DSERIALIZATION"
|
---|
| 133 | # serialization=yes;
|
---|
| 134 | # AC_MSG_RESULT(yes)
|
---|
| 135 | #else
|
---|
| 136 | # serialization=no;
|
---|
| 137 | # AC_MSG_RESULT(no)
|
---|
| 138 | #fi
|
---|
| 139 |
|
---|
[14de469] | 140 | # Checks for libraries.
|
---|
[861874] | 141 | AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
|
---|
[14de469] | 142 |
|
---|
[f08ae7] | 143 | # Boost
|
---|
[79de12] | 144 | BOOST_REQUIRE([1.40])
|
---|
[f08ae7] | 145 |
|
---|
| 146 | # Boost headers only
|
---|
| 147 | BOOST_ANY
|
---|
| 148 | BOOST_BIND
|
---|
| 149 | BOOST_CONVERSION
|
---|
[79de12] | 150 | BOOST_EXCEPTION
|
---|
[f08ae7] | 151 | BOOST_FOREACH
|
---|
| 152 | BOOST_FUNCTION
|
---|
| 153 | BOOST_PREPROCESSOR
|
---|
| 154 | BOOST_RANDOM
|
---|
| 155 | BOOST_SMART_PTR
|
---|
[7f570c] | 156 | BOOST_STRING_ALGO
|
---|
[f08ae7] | 157 | BOOST_TOKENIZER
|
---|
| 158 |
|
---|
| 159 | # Boost headers with libraries
|
---|
[79de12] | 160 | BOOST_FILESYSTEM
|
---|
| 161 | BOOST_PROGRAM_OPTIONS
|
---|
[715085] | 162 | BOOST_PYTHON
|
---|
[d7d022] | 163 | BOOST_SERIALIZATION
|
---|
[79de12] | 164 | BOOST_THREADS
|
---|
[fa861b] | 165 |
|
---|
[f08ae7] | 166 |
|
---|
[22db89] | 167 | # CodePatterns library (needs corrected ax_codepatterns.m4 for boost compile flags in test)
|
---|
| 168 | AM_PATH_CODEPATTERNS([1.1.7], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
|
---|
[3027f8] | 169 |
|
---|
[14de469] | 170 | # Checks for header files.
|
---|
| 171 | AC_HEADER_STDC
|
---|
| 172 | AC_CHECK_HEADERS([sys/time.h])
|
---|
| 173 | AC_HEADER_STDBOOL
|
---|
| 174 |
|
---|
[d3a46d] | 175 | AC_FUNC_MALLOC
|
---|
| 176 | AC_FUNC_REALLOC
|
---|
| 177 | AC_CHECK_FUNCS([floor pow sqrt strchr])
|
---|
| 178 |
|
---|
[14de469] | 179 | # Checks for typedefs, structures, and compiler characteristics.
|
---|
| 180 | AC_C_CONST
|
---|
| 181 | AC_C_INLINE
|
---|
| 182 | AC_C_RESTRICT
|
---|
| 183 | AC_TYPE_SIZE_T
|
---|
| 184 |
|
---|
| 185 | # Checks for library functions.
|
---|
| 186 | # check for GNU Scientific Library
|
---|
[bd3e55] | 187 | AC_CHECK_HEADERS([gsl/gsl_blas.h])
|
---|
| 188 | AC_SEARCH_LIBS(dnrm2, goto blas cblas gslblas gslcblas)
|
---|
| 189 | AC_CHECK_LIB(gsl, main, [],
|
---|
| 190 | [AC_SEARCH_LIBS(cblas_dnrm2, blas cblas gslblas gslcblas)])
|
---|
| 191 | AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
|
---|
[14de469] | 192 |
|
---|
[490038] | 193 | # use CppUnit TestRunner or not
|
---|
[6ac15b] | 194 | AC_ARG_ENABLE([ecut],AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient (default is no)]),
|
---|
| 195 | [enable_ecut=$enableval], [enable_ecut=no])
|
---|
[9b6b2f] | 196 | if test x"$enable_ecut" = xyes; then
|
---|
| 197 | AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
|
---|
| 198 | AC_SUBST(HAVE_ECUT)
|
---|
| 199 | fi
|
---|
| 200 |
|
---|
[490038] | 201 | # with valgrinding testsuite or not
|
---|
| 202 | AC_ARG_WITH([valgrind],AS_HELP_STRING([--with-valgrind],[Use Valgrind on the testsuite (default is no)]),
|
---|
| 203 | [with_valgrind=$withval], [with_valgrind=no])
|
---|
| 204 | if test x"$with_valgrind" = xyes; then
|
---|
| 205 | AC_CHECK_HEADER([valgrind/valgrind.h],
|
---|
| 206 | [
|
---|
| 207 | # check header
|
---|
| 208 | AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
|
---|
| 209 | # check path
|
---|
| 210 | AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
|
---|
| 211 | # set variables
|
---|
| 212 | AC_SUBST(HAVE_VALGRIND_TESTSUITE)
|
---|
| 213 | AC_SUBST(VALGRIND)
|
---|
| 214 | ],
|
---|
| 215 | [
|
---|
| 216 | AC_MSG_ERROR(["Valgrind support requested but headers not available."])
|
---|
| 217 | ]
|
---|
| 218 | )
|
---|
| 219 | fi
|
---|
| 220 |
|
---|
[14de469] | 221 | # Check for "extern inline", using a modified version
|
---|
| 222 | # of the test for AC_C_INLINE from acspecific.mt
|
---|
| 223 | AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
|
---|
| 224 | [ac_cv_c_extern_inline=no
|
---|
| 225 | AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
|
---|
| 226 | extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
|
---|
| 227 | double foo (double x) { return x + 1.0; };],
|
---|
| 228 | [ foo(1.0) ],
|
---|
| 229 | [ac_cv_c_extern_inline="yes"])
|
---|
| 230 | ])
|
---|
| 231 |
|
---|
| 232 | if test "$ac_cv_c_inline" != no ; then
|
---|
| 233 | AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
|
---|
| 234 | AC_SUBST(HAVE_INLINE)
|
---|
| 235 | fi
|
---|
| 236 |
|
---|
[bd3e55] | 237 | #AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
|
---|
[a19da5d] | 238 |
|
---|
[0ca39c] | 239 | # test suite
|
---|
[878044] | 240 |
|
---|
[5079a0] | 241 | AC_CONFIG_FILES([
|
---|
[689639] | 242 | tests/Makefile])
|
---|
| 243 |
|
---|
| 244 | AC_CONFIG_TESTDIR(tests/CodeChecks)
|
---|
[d0a719] | 245 | AC_CONFIG_FILES([
|
---|
| 246 | tests/CodeChecks/atlocal
|
---|
| 247 | tests/CodeChecks/Makefile])
|
---|
[689639] | 248 |
|
---|
[740d40] | 249 | AC_CONFIG_TESTDIR(tests/Fragmentations)
|
---|
[038713] | 250 | AC_CONFIG_FILES([
|
---|
[740d40] | 251 | tests/Fragmentations/atlocal
|
---|
| 252 | tests/Fragmentations/Makefile])
|
---|
[878044] | 253 | AC_CONFIG_FILES([tests/Fragmentations/analyzer], [chmod +x tests/Fragmentations/analyzer])
|
---|
| 254 | AC_CONFIG_FILES([tests/Fragmentations/joiner], [chmod +x tests/Fragmentations/joiner])
|
---|
[740d40] | 255 | AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
|
---|
[689639] | 256 |
|
---|
| 257 | AC_CONFIG_TESTDIR(tests/regression)
|
---|
| 258 | AC_CONFIG_FILES([
|
---|
| 259 | tests/regression/atlocal
|
---|
| 260 | tests/regression/Makefile])
|
---|
[2d31e1] | 261 | AC_CONFIG_FILES([tests/regression/Python/run], [chmod +x tests/regression/Python/run])
|
---|
[689639] | 262 | AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
|
---|
| 263 |
|
---|
| 264 | AC_CONFIG_TESTDIR(tests/Tesselations)
|
---|
[5079a0] | 265 | AC_CONFIG_FILES([
|
---|
[a85f45] | 266 | tests/Tesselations/atlocal
|
---|
| 267 | tests/Tesselations/Makefile])
|
---|
| 268 | AC_CONFIG_FILES([tests/Tesselations/molecuilder], [chmod +x tests/Tesselations/molecuilder])
|
---|
[689639] | 269 |
|
---|
[5079a0] | 270 | AC_CONFIG_FILES([
|
---|
| 271 | doc/molecuilder.xml])
|
---|
[861874] | 272 | AC_CONFIG_FILES([
|
---|
[878044] | 273 | MoleCuilder.pc:MoleCuilder.pc.in])
|
---|
[5079a0] | 274 | AC_CONFIG_FILES([
|
---|
| 275 | Makefile
|
---|
[ec188c] | 276 | doc/Makefile
|
---|
[5079a0] | 277 | src/Makefile
|
---|
[85949a] | 278 | ])
|
---|
| 279 | AC_CONFIG_FILES([
|
---|
[878044] | 280 | src/unittests/Makefile
|
---|
[85949a] | 281 | ])
|
---|
[14de469] | 282 | AC_OUTPUT
|
---|