b521659f |
1 | dnl -*- mode: autoconf -*- |
2 | dnl |
3 | dnl $Id$ |
4 | dnl template for the configuration script for the Alice HLT |
5 | dnl framework and components |
6 | dnl |
7 | dnl ------------------------------------------------------------------ |
c018a1bd |
8 | AC_INIT([Alice High Level Trigger] , [0.8-dev], [Matthias.Richter@ift.uib.no], alice-hlt) |
b521659f |
9 | |
10 | dnl ------------------------------------------------------------------ |
11 | dnl the package from CVS contains the old Makefiles as well. In order to |
12 | dnl prevent them from becoming overwritten, we require a separate build |
13 | dnl directory |
14 | if test "`dirname $0`" = "." ; then |
15 | AC_ERROR([please run the script from a separate build directory]) |
16 | fi |
17 | |
18 | dnl ------------------------------------------------------------------ |
19 | AC_CANONICAL_SYSTEM |
20 | AC_PREFIX_DEFAULT(${PWD}) |
21 | AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx) |
22 | AM_INIT_AUTOMAKE |
23 | AC_PROG_CC |
24 | AC_PROG_CXX |
25 | AC_PROG_LIBTOOL |
26 | |
27 | AC_DEBUG |
28 | AC_OPTIMIZATION |
dc8f7cb7 |
29 | AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 ) |
30 | |
31 | dnl ------------------------------------------------------------------ |
32 | dnl A warning posted into the auto-generated files |
33 | dnl Does NOT concern this file ;-) |
34 | AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!" |
35 | AC_SUBST([AUTOGENERATED_WARNING]) |
b521659f |
36 | |
37 | dnl ------------------------------------------------------------------ |
38 | dnl |
39 | dnl Check for ROOT |
40 | dnl |
41 | ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])]) |
42 | AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" ) |
53feaef5 |
43 | AC_SUBST([ROOTSYS]) |
dc8f7cb7 |
44 | ROOTBINDIR=`dirname $ROOTEXEC` |
45 | AC_SUBST([ROOTBINDIR]) |
46 | |
dfaa582a |
47 | dnl test for additional required root libraries and headers |
48 | LIBS='-ldl' |
49 | if test "x$have_root" = "x1"; then |
50 | AC_LANG_PUSH(C++) |
51 | save_CPPFLAGS=$CPPFLAGS |
52 | save_LDFLAGS=$LDFLAGS |
53 | save_LIBS=$LIBS |
54 | CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done` |
55 | |
dc8f7cb7 |
56 | # we check for the libSTEER library which is linked to |
57 | # - the ROOT libs libGeom libMinuit libVMC libEG |
58 | # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07) |
59 | # - ROOT libCint needs also libdl |
60 | # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires |
61 | # libTreePlayer.so |
62 | # - from Jan 07 libESD also depends on libXMLIO |
fbf4d793 |
63 | # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release) |
64 | ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer' |
dc8f7cb7 |
65 | for CHECKLIB in $ROOT_CHECKLIBS ; do |
dc8f7cb7 |
66 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}" |
67 | LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS" |
68 | AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"]) |
69 | done |
dfaa582a |
70 | |
71 | # TBuffer.h has been made pure virtual in root v5-15-02 and one |
72 | # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h) |
73 | AC_CHECK_HEADERS([TBufferFile.h]) |
74 | |
0b6c2560 |
75 | # TView.h has been made pure virtual right after root v5-15-02 and one |
76 | # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D) |
77 | AC_CHECK_HEADERS([TView3D.h]) |
78 | |
dc8f7cb7 |
79 | CPPFLAGS=$save_CPPFLAGS |
80 | LDFLAGS=$save_LDFLAGS |
81 | LIBS=$save_LIBS |
dfaa582a |
82 | AC_LANG_POP(C++) |
dc8f7cb7 |
83 | fi |
b521659f |
84 | |
85 | dnl ------------------------------------------------------------------ |
86 | # TODO: make this configurable through arguments |
87 | #Define whether you want to run with ALIROOT or only ROOT |
88 | AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment]) |
89 | ALIHLT_USEPACKAGE=ALIROOT |
90 | #ALIHLT_USEPACKAGE=ROOT |
91 | #ALIHLT_USEPACKAGE=STANDALONE |
92 | AC_DEFINE(use_aliroot) |
93 | AC_DEFINE(use_root) |
85869391 |
94 | CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}" |
85869391 |
95 | |
96 | dnl ------------------------------------------------------------------ |
74c73e5a |
97 | dnl check for AliRoot features |
98 | AC_LANG_PUSH(C++) |
74c73e5a |
99 | have_aliroot=no |
2bbbadd1 |
100 | AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation], |
101 | [test -d $with_aliroot && ALICE_ROOT=$with_aliroot], |
102 | []) |
103 | |
104 | if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then |
105 | dnl ------------------------------------------------------------------ |
106 | dnl Try to estimate the system architecture |
107 | case $host_os:$host_cpu in |
108 | linux*:x86_64*) alice_target='linuxx8664gcc' ;; |
109 | linux*) alice_target='linux' ;; |
110 | *) alice_target='unknown' ;; |
111 | esac |
112 | if test "x$alice_target" = "xunknown" ; then |
113 | if test -z $ALICE_TARGET ; then |
114 | AC_MSG_ERROR([Can not estimate system architecture. |
115 | To avoid the problem, set the ALICE_TARGET variable appropriately. |
116 | Please send the following information to Matthias.Richter@ift.uib.no: |
117 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) |
118 | else |
119 | AC_MSG_NOTICE([Unknown system architecture. |
120 | Please send the following information to Matthias.Richter@ift.uib.no: |
121 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) |
122 | fi |
123 | else |
124 | if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then |
125 | AC_MSG_WARN([The ALICE_TARGET variable does not match your current system |
126 | overriding $ALICE_TARGET by $alice_target]) |
127 | fi |
128 | ALICE_TARGET=$alice_target |
129 | fi |
dc8f7cb7 |
130 | ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET} |
74c73e5a |
131 | ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET} |
132 | ALIROOTINCDIR=${ALICE_ROOT}/include |
dc8f7cb7 |
133 | test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR]) |
2bbbadd1 |
134 | test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR]) |
135 | test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR]) |
74c73e5a |
136 | fi |
2bbbadd1 |
137 | |
138 | AC_MSG_CHECKING([for AliRoot]) |
74c73e5a |
139 | if test "x$ALICE_ROOT" != "x" \ |
dc8f7cb7 |
140 | && test -d ${ALIROOTBINDIR} \ |
74c73e5a |
141 | && test -d ${ALIROOTLIBDIR} \ |
142 | && test -d ${ALIROOTINCDIR}; then |
143 | have_aliroot=$ALICE_ROOT |
144 | else |
dc8f7cb7 |
145 | ALIROOTBINDIR= |
74c73e5a |
146 | ALIROOTLIBDIR= |
147 | ALIROOTINCDIR= |
148 | fi |
149 | AC_MSG_RESULT([$have_aliroot]) |
150 | |
151 | if test ! "x$have_aliroot" = "xno" ; then |
74c73e5a |
152 | ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW" |
153 | ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}" |
dc8f7cb7 |
154 | ALIROOT_LIBS="-lESD $ADD_ROOTLIBS" |
74c73e5a |
155 | save_CPPFLAGS=$CPPFLAGS |
156 | save_LDFLAGS=$LDFLAGS |
157 | save_LIBS=$LIBS |
158 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" |
db16520a |
159 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" |
2bbbadd1 |
160 | |
f8c5e339 |
161 | # check for certain AliRoot libraries/files/features |
c018a1bd |
162 | # libSTEERBase present since Aug 7 2007 |
163 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
164 | CHECKLIB=STEERBase |
165 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) |
166 | |
f5bf5fc3 |
167 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
168 | CHECKLIB=AOD |
169 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) |
170 | |
2bbbadd1 |
171 | # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006) |
172 | have_alirawdata=no |
173 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
174 | CHECKLIB=RAWDatabase |
175 | AC_CHECK_LIB([$CHECKLIB],[_init], |
176 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" |
177 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
178 | CHECKLIB=RAWDatarec |
179 | AC_CHECK_LIB([$CHECKLIB],[_init], |
180 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" |
181 | AC_DEFINE(HAVE_ALIRAWDATA) |
182 | have_alirawdata=$CHECKLIB])], |
183 | [# second pass with -RAWData |
184 | CHECKLIB="-lRAWData" |
185 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER" |
186 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h> |
187 | #include <AliRawReaderFile.h> |
188 | #include <AliRawReaderDate.h> |
189 | #include <AliRawReaderRoot.h>], |
190 | [AliRawReaderMemory mreader; |
191 | AliRawReaderFile freader; |
192 | AliRawReaderDate dreader(NULL,0); |
193 | AliRawReaderRoot rreader(NULL,0);])], |
194 | [AC_DEFINE(HAVE_ALIRAWDATA) |
195 | ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB" |
196 | have_alirawdata=$CHECKLIB], |
197 | [have_alirawdata=no]) |
198 | ]) dnl AC_CHECK_LIB RAWDatabase |
fa274626 |
199 | AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries]) |
200 | AC_MSG_RESULT([$have_alirawdata]) |
201 | |
fbf4d793 |
202 | # CBD library is present since AliRoot version v4-05-00 (02.06.2006) |
203 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER" |
204 | CHECKLIB=CDB |
205 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) |
206 | |
207 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
208 | CHECKLIB=STEER |
209 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no]) |
210 | |
211 | dnl |
212 | dnl check whether AliLog supports notification callback |
213 | dnl |
214 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
215 | have_alilog_notification=no |
216 | if test ! "x$have_aliroot" = "xno" ; then |
217 | AC_MSG_CHECKING([whether AliLog supports notification callback]) |
218 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], |
219 | [AliLog::AliLogNotification fct])], |
220 | [have_alilog_notification=yes], |
221 | [AC_DEFINE(NO_ALILOG_NOTIFICATION)]) |
222 | AC_MSG_RESULT([$have_alilog_notification]) |
223 | fi |
224 | |
225 | if test "x$have_aliroot" = "xno" ; then |
226 | # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation |
227 | # but library dependencies might not be resolved completely |
228 | #ALIROOT_CPPFLAGS= |
229 | AC_MSG_WARN([some of the AliRoot library dependencies are not resolved. |
230 | This can happen from time to time due to development in AliRoot. You can |
231 | force compilation of detector libs by --enable-<detector>, but be aware |
232 | of unresolved references at runtime.]) |
233 | AC_MSG_WARN([ ------------------------------------------ ]) |
234 | AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ]) |
235 | AC_MSG_WARN([ please include config.log ]) |
236 | AC_MSG_WARN([ ------------------------------------------ ]) |
237 | ALIROOT_LDFLAGS= |
238 | ALIROOT_LIBS= |
239 | fi |
240 | |
f5bf5fc3 |
241 | dnl |
fbf4d793 |
242 | dnl required header files and libraries for modules |
f5bf5fc3 |
243 | dnl |
244 | if test ! "x$have_aliroot" = "xno" ; then |
245 | # the HLTTPCLib needs to link agains TPCbase and TPCrec |
246 | # TPC library for AliTPCParam and AliSimDigits used in |
247 | # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx |
248 | # fram May 07 TPCbase depends on libGui.so |
249 | saveALIROOT_CPPFLAGS="$ALIROOT_CPPFLAGS" |
250 | ALIROOT_CPPFLAGS="$saveALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC" |
251 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" |
252 | have_alitpc=yes |
253 | AC_MSG_CHECKING(for required classes in TPC libraries) |
254 | if test ! "x$have_alitpc" = "xno" ; then |
255 | save_ALIROOT_LIBS=$ALIROOT_LIBS |
256 | ALIROOT_LIBS="$save_ALIROOT_LIBS -lTPCbase -lTPCrec -lGui -lSTEER" |
257 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
258 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h> |
259 | #include <AliTPCParam.h> |
260 | #include <AliTPCParamSR.h> |
261 | #include <AliTPCDigitsArray.h> |
262 | #include <AliTPCClustersArray.h> |
263 | #include <AliTPCcluster.h> |
264 | #include <AliTPCClustersRow.h>], |
265 | [AliSimDigits dig; |
266 | AliTPCParam param; |
267 | AliTPCParamSR paramsr; |
268 | AliTPCDigitsArray digarray; |
269 | AliTPCClustersArray clustarray; |
270 | AliTPCcluster clust; |
271 | AliTPCClustersRow row])], |
272 | [AC_DEFINE(HAVE_ALITPC) |
273 | saveALIROOT_CPPFLAGS=$ALIROOT_CPPFLAGS |
274 | saveALIROOT_LIBS=$ALIROOT_LIBS], |
275 | [have_alitpc=no |
276 | ALIROOT_CPPFLAGS=$saveALIROOT_CPPFLAGS |
277 | ALIROOT_LIBS=$saveALIROOT_LIBS]) |
278 | fi |
279 | AC_MSG_RESULT($have_alitpc) |
280 | fi |
33e463e1 |
281 | AC_CHECK_HEADERS([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)]) |
282 | AC_CHECK_HEADERS([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)]) |
675d662a |
283 | |
04dbc9e4 |
284 | dnl |
285 | dnl Check for the interface of AliExternalTrackParam which has been changed |
286 | dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04 |
287 | dnl or higher) |
288 | externaltrackparam_version=1 |
289 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>], |
290 | [AliExternalTrackParam trackparam; |
291 | Double_t param[[5]]; Double_t covar[[15]]; |
292 | trackparam.Set(0., 0., param, covar);])], |
293 | [externaltrackparam_version=2], |
294 | [AC_DEFINE(EXTERNALTRACKPARAM_V1)]) |
295 | AC_MSG_CHECKING(for version of AliExternalTrackParam) |
296 | AC_MSG_RESULT($externaltrackparam_version) |
297 | |
5894eaa5 |
298 | dnl |
299 | dnl required header files and libraries for the AliHLTPHOS library |
300 | dnl |
301 | have_alicalorawstream=no |
302 | if test ! "x$have_aliroot" = "xno" ; then |
303 | # this can not be used as AliCaloRawStream.h indirectly depends on TString.h |
304 | #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes]) |
305 | AC_MSG_CHECKING([for AliCaloRawStream.h usability]) |
306 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <TString.h> |
307 | #include <AliCaloRawStream.h>], |
308 | [int i])], |
309 | [AC_DEFINE(HAVE_ALICALORAWSTREAM) |
310 | have_alicalorawstream=yes], |
311 | []) |
312 | AC_MSG_RESULT([$have_alicalorawstream]) |
313 | fi |
314 | |
315 | dnl |
316 | dnl required header files and libraries for the AliHLTTRD library |
317 | dnl |
318 | AC_CHECK_HEADERS([AliGeomManager.h], [], [AC_DEFINE([HAVNT_ALIGEOMMANAGER])]) |
319 | |
74c73e5a |
320 | if test ! "x$have_alirawdata" = "xno" ; then |
321 | # check for header files needed by the TPCLib/AliHLTTPCDigitReaderPacket |
322 | # the header file has been moved to the TPC module |
323 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" |
324 | # AliRawReaderMemory.h AliRawReaderFile.h already checked |
325 | #AC_CHECK_HEADERS([AliRawReaderMemory.h AliRawReaderFile.h AliTPCRawStream.h]) |
326 | AC_CHECK_HEADERS([AliTPCRawStream.h]) |
327 | fi |
85869391 |
328 | |
db16520a |
329 | have_tpc_mapping=no |
330 | if test ! "x$have_aliroot" = "xno" ; then |
04dbc9e4 |
331 | # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC |
db16520a |
332 | # which is stored in the TPC/mapping/Patchx.data files from |
333 | # AliRoot version v4-04-Release (May 2006) |
334 | AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available]) |
335 | TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping |
336 | AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data], |
337 | [have_tpc_mapping=yes |
338 | AC_SUBST(TPC_PAD_MAPPING_PATH) |
339 | AC_DEFINE(HAVE_TPC_MAPPING)], |
340 | []) |
341 | |
342 | fi |
343 | AC_MSG_CHECKING([for TPC mapping layout]) |
db16520a |
344 | AC_MSG_RESULT([$have_tpc_mapping]) |
04dbc9e4 |
345 | |
74c73e5a |
346 | CPPFLAGS=$save_CPPFLAGS |
347 | LDFLAGS=$save_LDFLAGS |
348 | LIBS=$save_LIBS |
74c73e5a |
349 | fi |
350 | AC_LANG_POP(C++) |
5f5b708b |
351 | AC_SUBST([ALICE_ROOT]) |
74c73e5a |
352 | AC_SUBST([ALIROOT_CPPFLAGS]) |
353 | AC_SUBST([ALIROOT_LDFLAGS]) |
dc8f7cb7 |
354 | AC_SUBST([ALIROOTBINDIR]) |
53feaef5 |
355 | AC_SUBST([ALIROOTLIBDIR]) |
74c73e5a |
356 | AC_SUBST([ALIROOT_LIBS]) |
0f51f5b8 |
357 | AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes) |
85869391 |
358 | |
6c1a9d9e |
359 | HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE' |
360 | HLTBASE_LDFLAGS= |
361 | AC_SUBST([HLTBASE_CPPFLAGS]) |
362 | AC_SUBST([HLTBASE_LDFLAGS]) |
363 | |
78b557c2 |
364 | dnl ------------------------------------------------------------------ |
365 | dnl check for the HLT PubSub Framework |
f8c5e339 |
366 | dnl namely for the existence of the HOMER library |
367 | dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt |
368 | dnl package. It os though possible to choose an external. library |
369 | dnl In order to make the origni of the HOMER lib clear, the one in AliRoot |
370 | dnl got the name libAliHLTHOMER |
78b557c2 |
371 | AC_MSG_CHECKING([for HLT PubSub Framework]) |
372 | AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework], |
373 | [], |
374 | [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ]) |
375 | if test -z $with_pubsub || ! test -d $with_pubsub ; then |
376 | with_pubsub=no |
377 | fi |
378 | AC_MSG_RESULT([$with_pubsub]) |
f8c5e339 |
379 | HOMER_VERSION=2 |
5f1685a0 |
380 | HOMER_LIBS= |
78b557c2 |
381 | |
382 | AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface]) |
383 | if test "x$with_pubsub" != "xno" ; then |
384 | save_CPPFLAGS=$CPPFLAGS |
385 | save_LDFLAGS=$LDFLAGS |
386 | save_LIBS=$LIBS |
4a6b4894 |
387 | # currently the different versions of the HLT PubSub framework have a different |
388 | # directory layout |
20b6dd9a |
389 | if test -d ${with_pubsub}/include/HOMER ; then |
5235c3e9 |
390 | # the 'early' location of the include files with separated HOMER sub dirs |
9ce4bf4a |
391 | HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader" |
5235c3e9 |
392 | elif test -d ${with_pubsub}/include/Util/HOMER ; then |
393 | # location for HLT Framework versions after Sep 2006 |
9ce4bf4a |
394 | HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER" |
5235c3e9 |
395 | elif test -d ${with_pubsub}/src/Util/HOMER/include ; then |
396 | # fall back if include files were not installed (versions after Sep 06) |
9ce4bf4a |
397 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include" |
4a6b4894 |
398 | else |
5235c3e9 |
399 | # fall back if include files were not installed (versions before Sep 06) |
9ce4bf4a |
400 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include" |
4a6b4894 |
401 | fi |
9ce4bf4a |
402 | HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done` |
5894eaa5 |
403 | |
404 | AC_ARG_ENABLE(pubsub-debug, |
405 | [AC_HELP_STRING([--disable-pubsub-debug], |
406 | [force the production version of the PubSub framework])], |
407 | [],[enable_pubsub_debug=yes]) |
408 | homer_type="none" |
409 | HOMER_TARGET="`uname -s`-`uname -m`" |
410 | AC_MSG_CHECKING([for HLT PubSub Framework release type]) |
411 | if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then |
412 | homer_type="production" |
413 | HOMER_TARGET="${HOMER_TARGET}-release" |
414 | elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then |
415 | homer_type="debug" |
416 | HOMER_TARGET="${HOMER_TARGET}-debug" |
417 | fi |
418 | AC_MSG_RESULT([${homer_type}]) |
f8c5e339 |
419 | HOMERREADER_HEADER=HOMERReader.h |
5894eaa5 |
420 | HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}" |
421 | HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}" |
53feaef5 |
422 | HOMER_LDFLAGS="-L${HOMER_LIBDIR}" |
78b557c2 |
423 | CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS" |
424 | LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS" |
425 | LIBS="$save_LIBS " |
426 | with_homer=no |
427 | AC_LANG_PUSH(C++) |
f8c5e339 |
428 | AC_CHECK_HEADER([$HOMERREADER_HEADER], |
5f1685a0 |
429 | [ AC_CHECK_LIB([HOMER],[_init], |
430 | [with_homer=yes |
431 | HOMER_LIBS="-lHOMER"], |
432 | [ AC_CHECK_LIB([HOMERReader],[_init], |
433 | [with_homer=yes |
434 | HOMER_LIBS="-lHOMERReader"])]) |
435 | LIBS="$LIBS $HOMER_LIBS" |
9ce4bf4a |
436 | AC_MSG_CHECKING([version of HOMER library]) |
5f1685a0 |
437 | dnl The Homer library has no versioning, so we do our own |
438 | dnl version description |
439 | dnl ---------------------------------------------------------------------- |
440 | dnl 1 inintial version |
441 | dnl 2 GetBlockStatusFlags added to the interface |
442 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>], |
443 | [HOMERReader reader("dummy", 0); |
444 | reader.GetBlockStatusFlags(0);])], |
f8c5e339 |
445 | [], |
446 | [HOMER_VERSION=1]) |
5f1685a0 |
447 | AC_MSG_RESULT([$HOMER_VERSION]) |
f8c5e339 |
448 | ], |
449 | [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER]) |
78b557c2 |
450 | AC_LANG_POP(C++) |
f8c5e339 |
451 | HOMER_INBUILT_LIB= |
452 | else |
453 | dnl no pubsub version defined, check if the HOMER lib is available in AliRoot |
454 | topdir=`dirname $0` |
455 | HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER" |
456 | HOMERREADER_HEADER=AliHLTHOMERReader.h |
457 | HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la |
458 | HOMER_BINDIR= |
459 | HOMER_LIBDIR= |
460 | HOMER_LDFLAGS= |
461 | fi |
462 | |
78b557c2 |
463 | if test "x$with_homer" = "xno" ; then |
464 | HOMER_CPPFLAGS= |
465 | HOMER_LDFLAGS= |
5f1685a0 |
466 | HOMER_LIBS= |
78b557c2 |
467 | else |
5f1685a0 |
468 | HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION" |
78b557c2 |
469 | AC_DEFINE(HAVE_HOMERREADER) |
470 | fi |
471 | CPPFLAGS="$save_CPPFLAGS" |
472 | LDFLAGS="$save_LDFLAGS" |
473 | LIBS="$save_LIBS" |
f8c5e339 |
474 | |
475 | AC_SUBST([HOMERREADER_HEADER]) |
476 | AC_SUBST([HOMER_INBUILT_LIB]) |
78b557c2 |
477 | AC_SUBST([HOMER_CPPFLAGS]) |
478 | AC_SUBST([HOMER_LDFLAGS]) |
53feaef5 |
479 | AC_SUBST([HOMER_LIBDIR]) |
480 | AC_SUBST([HOMER_BINDIR]) |
5f1685a0 |
481 | AC_SUBST([HOMER_LIBS]) |
78b557c2 |
482 | |
85869391 |
483 | dnl ------------------------------------------------------------------ |
484 | AC_MSG_CHECKING([whether to impose strict coding conventions]) |
485 | AC_ARG_ENABLE(strict, |
486 | [AC_HELP_STRING([--enable-strict], |
487 | [enable coding convention checks ])], |
488 | [],[enable_strict=no]) |
489 | if test "x$enable_strict" = "xyes" ; then |
490 | CPPFLAGS="$CPPFLAGS -Weffc++" |
491 | fi |
492 | AC_MSG_RESULT([$enable_strict]) |
b521659f |
493 | |
494 | dnl ------------------------------------------------------------------ |
495 | AC_MSG_CHECKING([whether to compile sample library]) |
496 | AH_TEMPLATE([HLT_SAMPLE],[hlt sample library]) |
497 | AC_ARG_ENABLE(sample, |
c018a1bd |
498 | [AC_HELP_STRING([--disable-sample], |
b521659f |
499 | [compile the sample library ])], |
2e742d30 |
500 | [], |
501 | [if test "x$have_aliroot" = "xno" ; then |
502 | enable_sample="no...requires.AliRoot" |
503 | else |
504 | enable_sample=yes |
505 | fi |
506 | ]) |
507 | |
b521659f |
508 | if test "x$enable_sample" = "xyes" ; then |
509 | AC_DEFINE(HLT_SAMPLE) |
510 | fi |
511 | AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes) |
512 | AC_MSG_RESULT([$enable_sample]) |
513 | |
c018a1bd |
514 | dnl ------------------------------------------------------------------ |
515 | AC_MSG_CHECKING([whether to compile util library]) |
516 | AH_TEMPLATE([HLT_UTIL],[HLT utility library]) |
517 | AC_ARG_ENABLE(util, |
518 | [AC_HELP_STRING([--disable-util], |
519 | [compile the util library ])], |
2e742d30 |
520 | [], |
521 | [if test "x$have_aliroot" = "xno" ; then |
522 | enable_util="no...requires.AliRoot" |
523 | else |
524 | enable_util=yes |
525 | fi |
526 | ]) |
c018a1bd |
527 | |
528 | if test "x$enable_util" = "xyes" ; then |
529 | AC_DEFINE(HLT_UTIL) |
530 | fi |
531 | AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes) |
532 | AC_MSG_RESULT([$enable_util]) |
533 | |
b521659f |
534 | dnl ------------------------------------------------------------------ |
535 | AC_MSG_CHECKING([whether to compile tpc library]) |
536 | AH_TEMPLATE([HLT_TPC],[hlt tpc library]) |
537 | AC_ARG_ENABLE(tpc, |
c018a1bd |
538 | [AC_HELP_STRING([--disable-tpc], |
b521659f |
539 | [compile the tpc library ])], |
2e742d30 |
540 | [], |
541 | [if test "x$have_aliroot" = "xno" ; then |
542 | enable_tpc="no...requires.AliRoot" |
543 | elif test "x$have_alitpc" = "xno" ; then |
544 | enable_tpc="no...requires.AliRoot.TPC.libraries" |
545 | else |
546 | enable_tpc=yes |
547 | fi |
548 | ]) |
549 | |
b521659f |
550 | if test "x$enable_tpc" = "xyes" ; then |
551 | AC_DEFINE(HLT_TPC) |
552 | fi |
553 | AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes) |
554 | AC_MSG_RESULT([$enable_tpc]) |
555 | |
c160eda8 |
556 | dnl ------------------------------------------------------------------ |
557 | AC_MSG_CHECKING([whether to compile phos library]) |
558 | AH_TEMPLATE([HLT_PHOS],[hlt phos library]) |
559 | AC_ARG_ENABLE(phos, |
c018a1bd |
560 | [AC_HELP_STRING([--disable-phos], |
c160eda8 |
561 | [compile the phos library ])], |
2e742d30 |
562 | [], |
563 | [if test "x$have_aliroot" = "xno" ; then |
564 | enable_phos="no...requires.AliRoot" |
565 | elif ! test "x$have_alicalorawstream" = "xyes"; then |
566 | enable_phos="no...requires.AliRoot>v4-05-07" |
567 | else |
568 | enable_phos=yes |
569 | fi |
570 | ]) |
571 | |
c160eda8 |
572 | if test "x$enable_phos" = "xyes" ; then |
573 | AC_DEFINE(HLT_PHOS) |
574 | fi |
575 | AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes) |
576 | AC_MSG_RESULT([$enable_phos]) |
577 | |
0f51f5b8 |
578 | dnl ------------------------------------------------------------------ |
579 | AC_MSG_CHECKING([whether to compile trd library]) |
580 | AH_TEMPLATE([HLT_TRD],[hlt trd library]) |
581 | AC_ARG_ENABLE(trd, |
c018a1bd |
582 | [AC_HELP_STRING([--disable-trd], |
0f51f5b8 |
583 | [compile the trd library ])], |
2e742d30 |
584 | [], |
585 | [if test "x$have_aliroot" = "xno" ; then |
586 | enable_trd="no...requires.AliRoot" |
587 | else |
588 | enable_trd=yes |
589 | fi |
590 | ]) |
591 | |
0f51f5b8 |
592 | if test "x$enable_trd" = "xyes" ; then |
593 | AC_DEFINE(HLT_TRD) |
594 | fi |
595 | AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes) |
596 | AC_MSG_RESULT([$enable_trd]) |
597 | |
94cc9aab |
598 | dnl ------------------------------------------------------------------ |
599 | AC_MSG_CHECKING([whether to compile dimuon library]) |
600 | AH_TEMPLATE([HLT_MUON],[hlt dimuon library]) |
601 | AC_ARG_ENABLE(dimuon, |
c018a1bd |
602 | [AC_HELP_STRING([--disable-dimuon], |
94cc9aab |
603 | [compile the dimuon library ])], |
2e742d30 |
604 | [], |
605 | [if test "x$have_aliroot" = "xno" ; then |
606 | enable_dimuon="no...requires.AliRoot" |
607 | else |
608 | enable_dimuon=yes |
609 | fi |
610 | ]) |
611 | |
94cc9aab |
612 | if test "x$enable_dimuon" = "xyes" ; then |
613 | AC_DEFINE(HLT_MUON) |
614 | fi |
615 | AM_CONDITIONAL(EN_HLT_MUON, test x$enable_dimuon = xyes) |
616 | AC_MSG_RESULT([$enable_dimuon]) |
617 | |
b521659f |
618 | dnl ------------------------------------------------------------------ |
fc455fba |
619 | AC_MSG_CHECKING([whether to disable AliRoot logging]) |
620 | AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging]) |
621 | AC_ARG_ENABLE(aliroot-logging, |
622 | [AC_HELP_STRING([--disable-aliroot-logging], |
623 | [disable logging through AliRoot logging methods])], |
624 | [],[enable_aliroot_logging=no]) |
c018a1bd |
625 | if test "x$have_aliroot" = "xno" ; then |
626 | enable_aliroot_logging=yes # this means 'disable' |
627 | fi |
fc455fba |
628 | if test "x$enable_aliroot_logging" != "xno" ; then |
629 | AC_DEFINE(NOALIROOT_LOGGING) |
b521659f |
630 | fi |
fc455fba |
631 | AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no) |
632 | AC_MSG_RESULT([$enable_aliroot_logging]) |
b521659f |
633 | |
634 | dnl ------------------------------------------------------------------ |
635 | AC_MSG_CHECKING([whether to enable saving MC data through the chain]) |
636 | AH_TEMPLATE([DOMC],[MC saving]) |
637 | AC_ARG_ENABLE(mc-saving, |
638 | [AC_HELP_STRING([--enable-mc-saving], |
639 | [enable saving MC data through the chain])], |
640 | [],[enable_mc_saving=no]) |
641 | if test "x$enable_mc_saving" = "xyes" ; then |
642 | AC_DEFINE(DOMC) |
643 | fi |
644 | AC_MSG_RESULT([$enable_mc_saving]) |
645 | |
b521659f |
646 | dnl ------------------------------------------------------------------ |
b521659f |
647 | dnl certainly something old, but we keep the define |
648 | AC_MSG_CHECKING([whether to use ROWHOUGH]) |
649 | AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH]) |
650 | AC_ARG_ENABLE(rowhough, |
651 | [AC_HELP_STRING([--enable-rowhough], |
652 | [use ROWHOUGH ])], |
653 | [],[enable_rowhough=no]) |
654 | if test "x$enable_rowhough" = "xyes" ; then |
655 | AC_DEFINE(USEROWHOUGH) |
656 | fi |
657 | AC_MSG_RESULT([$enable_rowhough]) |
658 | |
53feaef5 |
659 | dnl ------------------------------------------------------------------ |
660 | dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old |
661 | dnl stand-alone build system. This is most likely something old we can |
662 | dnl get rid off later, or do something more reasonable. Since the define |
663 | dnl needs the quotes they have to be escaped. This works well for the |
664 | dnl Makefile but not for the configure script. So we have to add the |
665 | dnl defines after all the other checks. |
666 | CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" |
667 | if test ! "x$have_aliroot" = "xno" ; then |
668 | CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" |
669 | fi |
670 | |
b521659f |
671 | dnl ------------------------------------------------------------------ |
672 | dnl |
673 | dnl Documentation |
674 | dnl |
675 | AC_ARG_VAR(DOXYGEN, The Documentation Generator) |
676 | AC_PATH_PROG(PERL, perl) |
677 | AC_PATH_PROG(DOXYGEN, doxygen) |
678 | AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x") |
5894eaa5 |
679 | AC_ARG_ENABLE(dot, |
680 | [AC_HELP_STRING([--enable-dot], |
681 | [enable dot documentation generator])], |
682 | [],[enable_dot=no]) |
b521659f |
683 | HAVE_DOT=NO |
684 | DOT_PATH= |
685 | AC_PATH_PROG(DOT, dot) |
5894eaa5 |
686 | if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then |
b521659f |
687 | HAVE_DOT=YES |
688 | DOT_PATH=`dirname $DOT` |
689 | fi |
690 | AC_SUBST([HAVE_DOT]) |
691 | AC_SUBST([DOT_PATH]) |
692 | |
90ebac25 |
693 | dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src |
694 | dnl echo $HAVE_SRC_SUBDIR |
695 | dnl if ! test -d $HAVE_SRC_SUBDIR; then |
696 | dnl HAVE_SRC_SUBDIR= |
697 | dnl fi |
698 | dnl AC_SUBST([HAVE_SRC_SUBDIR]) |
699 | |
2bbbadd1 |
700 | dnl ------------------------------------------------------------------ |
701 | dnl inatallation directory for libraries |
702 | dnl |
703 | if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then |
704 | libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET |
705 | AC_MSG_NOTICE([libdir set to $libdir]) |
706 | fi |
b521659f |
707 | dnl ------------------------------------------------------------------ |
708 | AC_CONFIG_FILES([Makefile |
709 | BASE/Makefile |
53feaef5 |
710 | BASE/setenv.sh |
711 | BASE/setenv.csh |
2be16a33 |
712 | BASE/HOMER/Makefile |
242bb794 |
713 | BASE/util/Makefile |
d098ebd4 |
714 | BASE/interface/Makefile |
4cbaf07b |
715 | sim/Makefile |
716 | rec/Makefile |
b521659f |
717 | SampleLib/Makefile |
718 | TPCLib/Makefile |
db16520a |
719 | TPCLib/mapping2array.cxx |
78b557c2 |
720 | TPCLib/OnlineDisplay/Makefile |
c160eda8 |
721 | PHOS/Makefile |
0f51f5b8 |
722 | TRD/Makefile |
94cc9aab |
723 | MUON/Makefile |
b521659f |
724 | doc/Makefile |
725 | doc/doxygen.conf]) |
726 | |
727 | |
728 | AC_OUTPUT |
729 | dnl |
730 | dnl EOF |
731 | dnl |
732 | |