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