# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(JobMarket, 1.1.6, [foo@mastercontrolprogramm.de], [jobmarket], [https://www.molecuilder.com/]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/JobMarket/JobId.hpp]) AC_CONFIG_HEADER([config.h libJobMarket_config.h]) AC_CONFIG_MACRO_DIR([m4]) # parallel-tests: use parallel test druver # color-tests: us coloring to indicate success/failure when available # tar-pax: use newer tar implementation with longer filename (>99 chars) AM_INIT_AUTOMAKE([dist-bzip2 1.11 parallel-tests color-tests tar-pax subdir-objects]) # Checks for programs. AM_PATH_CPPUNIT(1.9.6) AC_PROG_CXX AC_PROG_CC AC_PROG_MAKE_SET AC_PROG_INSTALL DX_HTML_FEATURE(ON) DX_PS_FEATURE(OFF) DX_PDF_FEATURE(OFF) DX_INIT_DOXYGEN(JobMarket, Doxyfile, ${docdir}) LT_INIT([static]) # Define these substitions here to keep all version information in one place. # For information on how to properly maintain the library version information, # refer to the libtool manual, section "Updating library version information": # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html AC_SUBST([JOBMARKET_SO_VERSION], [5:0:0]) AC_SUBST([JOBMARKET_API_VERSION], [1.1.6]) dnl this macro is used to get the arguments supplied dnl to the configure script (./configure --enable-debug) dnl Check if we have enable debug support. AC_MSG_CHECKING(whether to enable debugging) have_debug="no" AC_ARG_ENABLE( [debug], AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]), enable_debug=$enableval, enable_debug="no") AC_MSG_RESULT($enable_debug) AS_IF([test x"$enable_debug" = x"yes"],[ AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."]) AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."]) have_debug="yes" ],[ AS_IF([test x"$enable_debug" = x"full"],[ AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."]) AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."]) AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."]) AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."]) have_debug="full" ],[ AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."]) AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."]) AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."]) have_debug="no" ]) ]) AC_SUBST(HAVE_DEBUG) dnl this macro is used to get the arguments supplied dnl to the configure script (./configure --enable-debug) dnl Check if we have enable debug support. AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation) AC_ARG_ENABLE( [cache], AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]), enable_cache=$enableval, enable_cache="yes") AC_MSG_RESULT($enable_cache) AS_IF([test x"$enable_cache" != x"no"],[ AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."]) ],[ AC_DEFINE(NO_CACHING,1, ["Don't use caching code."]) AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."]) ]) AC_SUBST(HAVE_CACHE) # CodePatterns library (requires new global NotificationChannel functions) AM_PATH_CODEPATTERNS([1.3.0], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])]) # boost BOOST_REQUIRE([1.40]) # boost headers BOOST_BIND BOOST_FOREACH BOOST_EXCEPTION # boost libraries BOOST_ASIO BOOST_FILESYSTEM BOOST_IOSTREAMS BOOST_PROGRAM_OPTIONS BOOST_SERIALIZATION # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([unistd.h]) # Checks for function AC_CHECK_FUNCS([atexit]) AC_CHECK_FUNCS([gethostname]) AC_CHECK_FUNCS([socket]) AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_ERROR_AT_LINE # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T # use CppUnit TestRunner or not AC_MSG_CHECKING(whether to enable ECut TestRunnerClient) AC_ARG_ENABLE( [ecut], AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]), enable_ecut=$disableval, enable_ecut="no") AC_MSG_RESULT($enable_ecut) AS_IF([test x"$enable_ecut" = x"yes"],[ AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."]) AC_SUBST(HAVE_ECUT) ]) AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"]) # with valgrinding testsuite or not AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite) AC_ARG_ENABLE( [valgrind], AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]), enable_valgrind=$enableval, enable_valgrind="no") AC_MSG_RESULT($enable_valgrind) AS_IF([test x"$enable_valgrind" = x"yes"], [ AC_CHECK_HEADER([valgrind/valgrind.h], [ # check header AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."]) # check path AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false]) # set variables AC_SUBST(HAVE_VALGRIND_TESTSUITE) AC_SUBST(VALGRIND) ], [ AC_MSG_ERROR(["Valgrind support requested but headers not available."]) ] ) ]) # Check for "extern inline", using a modified version # of the test for AC_C_INLINE from acspecific.mt AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline, [ac_cv_c_extern_inline=no AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x); extern $ac_cv_c_inline double foo(double x) { return x+1.0; }; double foo (double x) { return x + 1.0; };], [ foo(1.0) ], [ac_cv_c_extern_inline="yes"]) ]) if test "$ac_cv_c_inline" != no ; then AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"]) AC_SUBST(HAVE_INLINE) fi #AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"]) # test suite AC_CONFIG_FILES([tests/Makefile]) AC_CONFIG_TESTDIR(tests/CodeChecks) AC_CONFIG_FILES([ tests/CodeChecks/atlocal tests/CodeChecks/Makefile]) AC_CONFIG_TESTDIR(tests/regression) AC_CONFIG_FILES([ tests/regression/atlocal tests/regression/Makefile]) AC_CONFIG_FILES([ JobMarket.pc:JobMarket.pc.in JobMarket-debug.pc:JobMarket-debug.pc.in JobMarketController.pc:JobMarketController.pc.in JobMarketController-debug.pc:JobMarketController-debug.pc.in JobMarketPoolWorker.pc:JobMarketPoolWorker.pc.in JobMarketPoolWorker-debug.pc:JobMarketPoolWorker-debug.pc.in JobMarketServer.pc:JobMarketServer.pc.in JobMarketServer-debug.pc:JobMarketServer-debug.pc.in ]) AC_CONFIG_FILES([ Makefile doc/Makefile src/JobMarket/Makefile src/unittests/Makefile ]) AC_OUTPUT