source: ThirdParty/JobMarket/configure.ac@ 0bc2c6

Candidate_v1.6.1
Last change on this file since 0bc2c6 was 4e8108, checked in by Frederik Heber <heber@…>, 8 years ago

Libtool consolidates and updates itself through LIBTOOL_DEPS for all packages.

  • Property mode set to 100644
File size: 6.9 KB
Line 
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT(JobMarket, 1.1.6, [foo@mastercontrolprogramm.de], [jobmarket], [https://www.molecuilder.com/])
6AC_CONFIG_AUX_DIR([build-aux])
7AC_CONFIG_SRCDIR([src/JobMarket/JobId.hpp])
8AC_CONFIG_HEADER([config.h libJobMarket_config.h])
9AC_CONFIG_MACRO_DIR([m4])
10
11# parallel-tests: use parallel test druver
12# color-tests: us coloring to indicate success/failure when available
13# tar-pax: use newer tar implementation with longer filename (>99 chars)
14AM_INIT_AUTOMAKE([dist-bzip2 1.11 parallel-tests color-tests tar-pax subdir-objects])
15
16# Checks for programs.
17AM_PATH_CPPUNIT(1.9.6)
18AC_PROG_CXX
19AC_PROG_CC
20AC_PROG_MAKE_SET
21AC_PROG_INSTALL
22
23DX_HTML_FEATURE(ON)
24DX_PS_FEATURE(OFF)
25DX_PDF_FEATURE(OFF)
26DX_INIT_DOXYGEN(JobMarket, Doxyfile, ${docdir})
27
28LT_INIT([static])
29AC_SUBST([LIBTOOL_DEPS])
30
31# Define these substitions here to keep all version information in one place.
32# For information on how to properly maintain the library version information,
33# refer to the libtool manual, section "Updating library version information":
34# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
35AC_SUBST([JOBMARKET_SO_VERSION], [5:0:0])
36AC_SUBST([JOBMARKET_API_VERSION], [1.1.6])
37
38dnl this macro is used to get the arguments supplied
39dnl to the configure script (./configure --enable-debug)
40dnl Check if we have enable debug support.
41AC_MSG_CHECKING(whether to enable debugging)
42have_debug="no"
43AC_ARG_ENABLE(
44 [debug],
45 AS_HELP_STRING([--enable-debug],[turn on debugging [default=no]]),
46 enable_debug=$enableval,
47 enable_debug="no")
48AC_MSG_RESULT($enable_debug)
49AS_IF([test x"$enable_debug" = x"yes"],[
50 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
51 AC_DEFINE(HAVE_DEBUG,1, ["Use debug setting to compile code."])
52 have_debug="yes"
53],[
54 AS_IF([test x"$enable_debug" = x"full"],[
55 AC_DEFINE(MEMDEBUG,1, ["Use memory debugger."])
56 AC_DEFINE(LOG_OBSERVER,1, ["Use observer log."])
57 AC_DEFINE(HAVE_DEBUG,2, ["Use debug setting to compile code."])
58 AC_DEFINE(QT_DEBUG,, ["Enable Qt debug messages."])
59 have_debug="full"
60 ],[
61 AC_DEFINE(NDEBUG,1, ["Don't compile in debugging code."])
62 AC_DEFINE(HAVE_DEBUG,0, ["Use debug setting to compile code."])
63 AC_DEFINE(QT_NO_DEBUG,, ["Disable Qt debug messages."])
64 have_debug="no"
65 ])
66])
67AC_SUBST(HAVE_DEBUG)
68
69dnl this macro is used to get the arguments supplied
70dnl to the configure script (./configure --enable-debug)
71dnl Check if we have enable debug support.
72AC_MSG_CHECKING(whether to enable internal caching/lazy evaluation)
73AC_ARG_ENABLE(
74 [cache],
75 AS_HELP_STRING([--enable-cache],[turn on internal lazy evaluation [default=yes]]),
76 enable_cache=$enableval,
77 enable_cache="yes")
78AC_MSG_RESULT($enable_cache)
79AS_IF([test x"$enable_cache" != x"no"],[
80 AC_DEFINE(HAVE_CACHE,1, ["cache variables to speed up the code."])
81],[
82 AC_DEFINE(NO_CACHING,1, ["Don't use caching code."])
83 AC_DEFINE(HAVE_CACHE,0, ["cache variables to speed up the code."])
84])
85AC_SUBST(HAVE_CACHE)
86
87# CodePatterns library (requires new global NotificationChannel functions)
88AM_PATH_CODEPATTERNS([1.3.2], $have_debug,,[
89 # compile from ThirdParty
90 [CodePatterns_LDFLAGS='-L$(top_builddir)/../CodePatterns/src']
91 [CodePatterns_CFLAGS='-I$(top_srcdir)/../CodePatterns/src']
92 AS_IF([test x"$enable_debug" != x"no"], [
93 [CodePatterns_LIBS='-lcodepatterns-debug']
94 ],[
95 [CodePatterns_LIBS='-lcodepatterns']
96 ])
97 AC_SUBST(CodePatterns_LDFLAGS)
98 AC_SUBST(CodePatterns_CFLAGS)
99 AC_SUBST(CodePatterns_LIBS)
100 #AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])
101])
102
103# boost
104BOOST_REQUIRE([1.40])
105
106# boost headers
107BOOST_BIND
108BOOST_FOREACH
109BOOST_EXCEPTION
110
111# boost libraries
112BOOST_ASIO
113BOOST_FILESYSTEM
114BOOST_IOSTREAMS
115BOOST_PROGRAM_OPTIONS
116BOOST_SERIALIZATION
117
118# Checks for header files.
119AC_HEADER_STDC
120AC_CHECK_HEADERS([unistd.h])
121
122
123# Checks for function
124AC_CHECK_FUNCS([atexit])
125AC_CHECK_FUNCS([gethostname])
126AC_CHECK_FUNCS([socket])
127AC_FUNC_MALLOC
128AC_FUNC_REALLOC
129AC_FUNC_ERROR_AT_LINE
130
131# Checks for typedefs, structures, and compiler characteristics.
132AC_HEADER_STDBOOL
133AC_TYPE_SIZE_T
134
135# use CppUnit TestRunner or not
136AC_MSG_CHECKING(whether to enable ECut TestRunnerClient)
137AC_ARG_ENABLE(
138 [ecut],
139 AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient [default=no]]),
140 enable_ecut=$disableval,
141 enable_ecut="no")
142AC_MSG_RESULT($enable_ecut)
143AS_IF([test x"$enable_ecut" = x"yes"],[
144 AC_DEFINE(HAVE_ECUT,1, ["Use ECut TestRunnerClient instead of our own."])
145 AC_SUBST(HAVE_ECUT)
146])
147AM_CONDITIONAL([CONDECUT], [test x"$enable_ecut" = x"yes"])
148
149# with valgrinding testsuite or not
150AC_MSG_CHECKING(whether to enable valgrind memory checking in testsuite)
151AC_ARG_ENABLE(
152 [valgrind],
153 AS_HELP_STRING([--enable-valgrind],[Use Valgrind on the testsuite [default=no]]),
154 enable_valgrind=$enableval,
155 enable_valgrind="no")
156AC_MSG_RESULT($enable_valgrind)
157AS_IF([test x"$enable_valgrind" = x"yes"], [
158 AC_CHECK_HEADER([valgrind/valgrind.h],
159 [
160 # check header
161 AC_DEFINE(HAVE_VALGRIND_TESTSUITE,1, ["Use Valgrind to check the testsuite."])
162 # check path
163 AC_PATH_PROG(VALGRIND, [valgrind], [/bin/false])
164 # set variables
165 AC_SUBST(HAVE_VALGRIND_TESTSUITE)
166 AC_SUBST(VALGRIND)
167 ],
168 [
169 AC_MSG_ERROR(["Valgrind support requested but headers not available."])
170 ]
171 )
172])
173
174# Check for "extern inline", using a modified version
175# of the test for AC_C_INLINE from acspecific.mt
176AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
177[ac_cv_c_extern_inline=no
178AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
179extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
180double foo (double x) { return x + 1.0; };],
181[ foo(1.0) ],
182[ac_cv_c_extern_inline="yes"])
183])
184
185if test "$ac_cv_c_inline" != no ; then
186 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
187 AC_SUBST(HAVE_INLINE)
188fi
189
190#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
191
192# test suite
193AC_CONFIG_FILES([tests/Makefile])
194
195AC_CONFIG_TESTDIR(tests/CodeChecks)
196AC_CONFIG_FILES([
197 tests/CodeChecks/atlocal
198 tests/CodeChecks/Makefile])
199
200AC_CONFIG_TESTDIR(tests/regression)
201AC_CONFIG_FILES([
202 tests/regression/atlocal
203 tests/regression/Makefile])
204
205AC_CONFIG_FILES([
206 JobMarket.pc:JobMarket.pc.in
207 JobMarket-debug.pc:JobMarket-debug.pc.in
208 JobMarketController.pc:JobMarketController.pc.in
209 JobMarketController-debug.pc:JobMarketController-debug.pc.in
210 JobMarketPoolWorker.pc:JobMarketPoolWorker.pc.in
211 JobMarketPoolWorker-debug.pc:JobMarketPoolWorker-debug.pc.in
212 JobMarketServer.pc:JobMarketServer.pc.in
213 JobMarketServer-debug.pc:JobMarketServer-debug.pc.in
214])
215
216AC_CONFIG_FILES([
217 Makefile
218 doc/Makefile
219 src/JobMarket/Makefile
220 src/unittests/Makefile
221])
222
223AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.