]>
Commit | Line | Data |
---|---|---|
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 ------------------------------------------------------------------ | |
408c5899 | 8 | |
9 | dnl Take either the AliRoot tag as version id or the current revision | |
10 | AC_INIT([Alice High Level Trigger] , | |
7233bc62 | 11 | m4_esyscmd([url=`svn info 2> /dev/null | grep "URL:" | cut -d: -f3 | sed -e 's|[/]*HLT[/]*$||' | sed -e 's|^[/]*||g' | cut -d '/' -f 4`; \ |
12 | revision=`svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | cut -d '/' -f 4`; \ | |
13 | if test "x$url" != "x"; then echo -n $url; \ | |
14 | elif test "x$revision" != "x"; then echo -n $revision ; \ | |
15 | elif test -e .revision && test x`cat .revision` != x; then \ | |
16 | cat .revision; \ | |
17 | else \ | |
18 | echo -n invalid-version; \ | |
19 | fi]), | |
408c5899 | 20 | [Matthias.Richter@ift.uib.no], |
21 | [alice-hlt]) | |
b521659f | 22 | |
23 | dnl ------------------------------------------------------------------ | |
24 | dnl the package from CVS contains the old Makefiles as well. In order to | |
25 | dnl prevent them from becoming overwritten, we require a separate build | |
26 | dnl directory | |
27 | if test "`dirname $0`" = "." ; then | |
28 | AC_ERROR([please run the script from a separate build directory]) | |
29 | fi | |
30 | ||
31 | dnl ------------------------------------------------------------------ | |
32 | AC_CANONICAL_SYSTEM | |
33 | AC_PREFIX_DEFAULT(${PWD}) | |
34 | AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx) | |
b59c004b | 35 | AM_INIT_AUTOMAKE([-Wno-portability]) |
b521659f | 36 | AC_PROG_CC |
37 | AC_PROG_CXX | |
38 | AC_PROG_LIBTOOL | |
39 | ||
40 | AC_DEBUG | |
41 | AC_OPTIMIZATION | |
dc8f7cb7 | 42 | AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 ) |
43 | ||
44 | dnl ------------------------------------------------------------------ | |
45 | dnl A warning posted into the auto-generated files | |
46 | dnl Does NOT concern this file ;-) | |
47 | AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!" | |
48 | AC_SUBST([AUTOGENERATED_WARNING]) | |
b521659f | 49 | |
50 | dnl ------------------------------------------------------------------ | |
51 | dnl | |
52 | dnl Check for ROOT | |
53 | dnl | |
54 | ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])]) | |
55 | AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" ) | |
53feaef5 | 56 | AC_SUBST([ROOTSYS]) |
dc8f7cb7 | 57 | ROOTBINDIR=`dirname $ROOTEXEC` |
58 | AC_SUBST([ROOTBINDIR]) | |
59 | ||
dfaa582a | 60 | dnl test for additional required root libraries and headers |
61 | LIBS='-ldl' | |
62 | if test "x$have_root" = "x1"; then | |
63 | AC_LANG_PUSH(C++) | |
64 | save_CPPFLAGS=$CPPFLAGS | |
65 | save_LDFLAGS=$LDFLAGS | |
66 | save_LIBS=$LIBS | |
67 | CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done` | |
68 | ||
dc8f7cb7 | 69 | # we check for the libSTEER library which is linked to |
70 | # - the ROOT libs libGeom libMinuit libVMC libEG | |
71 | # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07) | |
72 | # - ROOT libCint needs also libdl | |
73 | # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires | |
74 | # libTreePlayer.so | |
75 | # - from Jan 07 libESD also depends on libXMLIO | |
fbf4d793 | 76 | # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release) |
0776a74c | 77 | # - libCDB.so depends on libXMLParser since Mar 11 2009 r 31411 |
78 | ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer XMLParser' | |
dc8f7cb7 | 79 | for CHECKLIB in $ROOT_CHECKLIBS ; do |
dc8f7cb7 | 80 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}" |
81 | LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS" | |
82 | AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"]) | |
83 | done | |
dfaa582a | 84 | |
85 | # TBuffer.h has been made pure virtual in root v5-15-02 and one | |
86 | # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h) | |
ba4b0dd7 | 87 | AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE]) |
dfaa582a | 88 | |
0b6c2560 | 89 | # TView.h has been made pure virtual right after root v5-15-02 and one |
90 | # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D) | |
ba4b0dd7 | 91 | AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D]) |
0b6c2560 | 92 | |
dc8f7cb7 | 93 | CPPFLAGS=$save_CPPFLAGS |
94 | LDFLAGS=$save_LDFLAGS | |
95 | LIBS=$save_LIBS | |
dfaa582a | 96 | AC_LANG_POP(C++) |
dc8f7cb7 | 97 | fi |
b521659f | 98 | |
99 | dnl ------------------------------------------------------------------ | |
100 | # TODO: make this configurable through arguments | |
101 | #Define whether you want to run with ALIROOT or only ROOT | |
102 | AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment]) | |
103 | ALIHLT_USEPACKAGE=ALIROOT | |
104 | #ALIHLT_USEPACKAGE=ROOT | |
105 | #ALIHLT_USEPACKAGE=STANDALONE | |
106 | AC_DEFINE(use_aliroot) | |
107 | AC_DEFINE(use_root) | |
85869391 | 108 | CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}" |
7233bc62 | 109 | save_CPPFLAGS=$CPPFLAGS |
110 | save_LDFLAGS=$LDFLAGS | |
111 | save_LIBS=$LIBS | |
85869391 | 112 | |
113 | dnl ------------------------------------------------------------------ | |
74c73e5a | 114 | dnl check for AliRoot features |
115 | AC_LANG_PUSH(C++) | |
74c73e5a | 116 | have_aliroot=no |
2bbbadd1 | 117 | AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation], |
118 | [test -d $with_aliroot && ALICE_ROOT=$with_aliroot], | |
119 | []) | |
120 | ||
121 | if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then | |
122 | dnl ------------------------------------------------------------------ | |
123 | dnl Try to estimate the system architecture | |
124 | case $host_os:$host_cpu in | |
125 | linux*:x86_64*) alice_target='linuxx8664gcc' ;; | |
126 | linux*) alice_target='linux' ;; | |
127 | *) alice_target='unknown' ;; | |
128 | esac | |
129 | if test "x$alice_target" = "xunknown" ; then | |
130 | if test -z $ALICE_TARGET ; then | |
131 | AC_MSG_ERROR([Can not estimate system architecture. | |
132 | To avoid the problem, set the ALICE_TARGET variable appropriately. | |
133 | Please send the following information to Matthias.Richter@ift.uib.no: | |
134 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) | |
135 | else | |
136 | AC_MSG_NOTICE([Unknown system architecture. | |
137 | Please send the following information to Matthias.Richter@ift.uib.no: | |
138 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) | |
139 | fi | |
140 | else | |
141 | if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then | |
142 | AC_MSG_WARN([The ALICE_TARGET variable does not match your current system | |
143 | overriding $ALICE_TARGET by $alice_target]) | |
144 | fi | |
145 | ALICE_TARGET=$alice_target | |
146 | fi | |
dc8f7cb7 | 147 | ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET} |
74c73e5a | 148 | ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET} |
149 | ALIROOTINCDIR=${ALICE_ROOT}/include | |
dc8f7cb7 | 150 | test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR]) |
2bbbadd1 | 151 | test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR]) |
152 | test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR]) | |
74c73e5a | 153 | fi |
2bbbadd1 | 154 | |
155 | AC_MSG_CHECKING([for AliRoot]) | |
74c73e5a | 156 | if test "x$ALICE_ROOT" != "x" \ |
dc8f7cb7 | 157 | && test -d ${ALIROOTBINDIR} \ |
74c73e5a | 158 | && test -d ${ALIROOTLIBDIR} \ |
159 | && test -d ${ALIROOTINCDIR}; then | |
160 | have_aliroot=$ALICE_ROOT | |
161 | else | |
dc8f7cb7 | 162 | ALIROOTBINDIR= |
74c73e5a | 163 | ALIROOTLIBDIR= |
164 | ALIROOTINCDIR= | |
165 | fi | |
166 | AC_MSG_RESULT([$have_aliroot]) | |
167 | ||
168 | if test ! "x$have_aliroot" = "xno" ; then | |
74c73e5a | 169 | ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW" |
170 | ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}" | |
cef8ce36 | 171 | ALIROOT_LIBS="$ADD_ROOTLIBS" |
74c73e5a | 172 | save_CPPFLAGS=$CPPFLAGS |
173 | save_LDFLAGS=$LDFLAGS | |
174 | save_LIBS=$LIBS | |
175 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
db16520a | 176 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" |
2bbbadd1 | 177 | |
f8c5e339 | 178 | # check for certain AliRoot libraries/files/features |
c018a1bd | 179 | # libSTEERBase present since Aug 7 2007 |
1df31a70 | 180 | # ########################################### |
181 | # temporary workaround for circular dependency libSTEERbase libSTEER | |
182 | # https://savannah.cern.ch/bugs/index.php?49914 | |
183 | # disable the sequence of checks and load libraries in parallel | |
184 | ALIROOT_LIBS="$ALIROOT_LIBS -lAOD -lCDB -lRAWDatabase -lRAWDatarec -lESD -lSTEER" | |
98a0e47f | 185 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
c018a1bd | 186 | CHECKLIB=STEERBase |
187 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
188 | ||
98a0e47f | 189 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
f5bf5fc3 | 190 | CHECKLIB=AOD |
191 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
192 | ||
cef8ce36 | 193 | # CBD library is present since AliRoot version v4-05-00 (02.06.2006) |
98a0e47f | 194 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
cef8ce36 | 195 | CHECKLIB=CDB |
196 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
197 | ||
2bbbadd1 | 198 | # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006) |
199 | have_alirawdata=no | |
200 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
201 | CHECKLIB=RAWDatabase | |
202 | AC_CHECK_LIB([$CHECKLIB],[_init], | |
203 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" | |
cef8ce36 | 204 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lESD -lSTEER" |
2bbbadd1 | 205 | CHECKLIB=RAWDatarec |
206 | AC_CHECK_LIB([$CHECKLIB],[_init], | |
207 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" | |
2bbbadd1 | 208 | have_alirawdata=$CHECKLIB])], |
209 | [# second pass with -RAWData | |
210 | CHECKLIB="-lRAWData" | |
211 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER" | |
212 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h> | |
213 | #include <AliRawReaderFile.h> | |
214 | #include <AliRawReaderDate.h> | |
215 | #include <AliRawReaderRoot.h>], | |
216 | [AliRawReaderMemory mreader; | |
217 | AliRawReaderFile freader; | |
218 | AliRawReaderDate dreader(NULL,0); | |
219 | AliRawReaderRoot rreader(NULL,0);])], | |
e962f438 | 220 | [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB" |
2bbbadd1 | 221 | have_alirawdata=$CHECKLIB], |
222 | [have_alirawdata=no]) | |
223 | ]) dnl AC_CHECK_LIB RAWDatabase | |
fa274626 | 224 | AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries]) |
225 | AC_MSG_RESULT([$have_alirawdata]) | |
226 | ||
fbf4d793 | 227 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER" |
cef8ce36 | 228 | CHECKLIB=ESD |
fbf4d793 | 229 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) |
230 | ||
231 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
232 | CHECKLIB=STEER | |
233 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no]) | |
234 | ||
235 | dnl | |
236 | dnl check whether AliLog supports notification callback | |
237 | dnl | |
238 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
239 | have_alilog_notification=no | |
240 | if test ! "x$have_aliroot" = "xno" ; then | |
241 | AC_MSG_CHECKING([whether AliLog supports notification callback]) | |
242 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], | |
243 | [AliLog::AliLogNotification fct])], | |
244 | [have_alilog_notification=yes], | |
245 | [AC_DEFINE(NO_ALILOG_NOTIFICATION)]) | |
246 | AC_MSG_RESULT([$have_alilog_notification]) | |
247 | fi | |
248 | ||
249 | if test "x$have_aliroot" = "xno" ; then | |
250 | # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation | |
251 | # but library dependencies might not be resolved completely | |
252 | #ALIROOT_CPPFLAGS= | |
253 | AC_MSG_WARN([some of the AliRoot library dependencies are not resolved. | |
254 | This can happen from time to time due to development in AliRoot. You can | |
255 | force compilation of detector libs by --enable-<detector>, but be aware | |
256 | of unresolved references at runtime.]) | |
257 | AC_MSG_WARN([ ------------------------------------------ ]) | |
258 | AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ]) | |
259 | AC_MSG_WARN([ please include config.log ]) | |
260 | AC_MSG_WARN([ ------------------------------------------ ]) | |
261 | ALIROOT_LDFLAGS= | |
262 | ALIROOT_LIBS= | |
263 | fi | |
264 | ||
f527516f | 265 | dnl |
266 | dnl ESD supports non-std content | |
267 | dnl | |
268 | have_esd_nonstd=no | |
269 | AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h> | |
270 | #include <AliExternalTrackParam.h> | |
271 | #include <TTree.h> | |
272 | #include <TClonesArray.h>], | |
273 | [AliESDEvent esd; | |
274 | esd.CreateStdContent(); | |
275 | TTree* tree=new TTree("esdTree", "Tree with HLT ESD objects"); | |
f527516f | 276 | TClonesArray* a=new TClonesArray("AliExternalTrackParam"); |
277 | a->SetName("SomeObject"); | |
278 | esd.AddObject(a); | |
50a3793d | 279 | esd.WriteToTree(tree); |
f527516f | 280 | if (!tree->FindBranch("SomeObject")) return 1; |
281 | return 0;])], | |
282 | [have_esd_nonstd=yes], | |
283 | [AC_DEFINE(HAVE_NOT_ESD_NONSTD)]) | |
284 | AC_MSG_CHECKING(whether ESD supports non standard content) | |
285 | AC_MSG_RESULT([$have_esd_nonstd]) | |
286 | ||
83cb7e1d | 287 | dnl |
288 | dnl ESD copy function added May 9 2008 rev 25667 | |
289 | dnl | |
f527516f | 290 | if test "x$have_esd_nonstd" != "xyes"; then |
83cb7e1d | 291 | have_esd_copy=no |
292 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>], | |
293 | [AliESDEvent esd1; | |
294 | AliESDEvent esd2; | |
295 | esd2=esd1;])], | |
9877121c | 296 | [have_esd_copy=yes], |
297 | [AC_DEFINE(HAVE_NOT_ESD_COPY)]) | |
83cb7e1d | 298 | AC_MSG_CHECKING(for ESD assignment operator) |
299 | AC_MSG_RESULT([$have_esd_copy]) | |
f527516f | 300 | fi |
83cb7e1d | 301 | |
296b5188 | 302 | dnl |
303 | dnl AliRawReaderMemory support for multiple buffers added | |
c03e064d | 304 | dnl revision 26829 Jun 2008 |
296b5188 | 305 | dnl |
306 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW" | |
307 | have_rawreadermemory_multbuffers=no | |
308 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>], | |
309 | [AliRawReaderMemory rr; | |
310 | rr.AddBuffer(NULL, 0, 0);])], | |
311 | [have_rawreadermemory_multbuffers=yes], | |
312 | [AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)]) | |
c03e064d | 313 | AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers) |
296b5188 | 314 | AC_MSG_RESULT([$have_rawreadermemory_multbuffers]) |
315 | ||
a553c904 | 316 | dnl |
317 | dnl Changes in the magnetic field implementation | |
318 | dnl revision 30848 Feb 1 2009 | |
319 | dnl | |
320 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER" | |
321 | have_alimagf30848=no | |
322 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMagF.h>], | |
323 | [int test=AliMagF::k5kG;])], | |
324 | [have_alimagf30848=yes], | |
325 | [AC_DEFINE(HAVE_NOT_ALIMAGF30848)]) | |
326 | AC_MSG_CHECKING(AliMagF contains field definitions) | |
327 | AC_MSG_RESULT([$have_alimagf30848]) | |
328 | ||
329 | dnl | |
330 | dnl Cleanup of the RunLoader implementation | |
331 | dnl revision 30859 Feb 2 2009 | |
332 | dnl | |
333 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER" | |
334 | have_alirunloader30859=no | |
335 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRunLoader.h>], | |
336 | [AliRunLoader* rl=AliRunLoader::Instance();])], | |
337 | [have_alirunloader30859=yes], | |
338 | [AC_DEFINE(HAVE_NOT_ALIRUNLOADER30859)]) | |
339 | AC_MSG_CHECKING(AliRunLoader::Instance) | |
340 | AC_MSG_RESULT([$have_alirunloader30859]) | |
341 | ||
73c1ebf5 | 342 | have_aliqav1=no |
343 | AC_CHECK_HEADER([AliQAv1.h], [have_aliqav1=yes], []) | |
344 | AM_CONDITIONAL(EN_HLT_QA, test x$have_aliqav1 = xyes) | |
95ea76b5 | 345 | AC_CHECK_HEADER([AliESDHLTDecision.h], [], [AC_DEFINE(HAVE_NOT_ALIESDHLTDECISION)]) |
73c1ebf5 | 346 | |
f5bf5fc3 | 347 | dnl |
fbf4d793 | 348 | dnl required header files and libraries for modules |
f5bf5fc3 | 349 | dnl |
04dbc9e4 | 350 | |
f59fee6d | 351 | dnl |
352 | dnl Check for the interface of AliExternalTrackParam which has been changed | |
353 | dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04 | |
354 | dnl or higher) | |
355 | externaltrackparam_version=1 | |
356 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>], | |
357 | [AliExternalTrackParam trackparam; | |
358 | Double_t param[[5]]; Double_t covar[[15]]; | |
359 | trackparam.Set(0., 0., param, covar);])], | |
360 | [externaltrackparam_version=2], | |
361 | [AC_DEFINE(EXTERNALTRACKPARAM_V1)]) | |
362 | AC_MSG_CHECKING(for version of AliExternalTrackParam) | |
363 | AC_MSG_RESULT($externaltrackparam_version) | |
364 | ||
4646c6e3 | 365 | dnl The AliShuttleInterface was changed in rev 29388. Some return types |
366 | dnl had been const, now changed according to gcc 4.3 warnings | |
367 | AC_MSG_CHECKING(for version of AliShuttleInterface.h) | |
368 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/" | |
369 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" | |
370 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS" | |
371 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliShuttleInterface.h>], | |
372 | [class dummy : public AliShuttleInterface { | |
373 | public: | |
374 | const UInt_t GetStartTimeDCSQuery() {;} | |
375 | };])], | |
376 | [AC_DEFINE(SHUTTLE_PRE_REV29388_INTERFACE) | |
377 | alishuttleinterface_version=pre.rev.29388], | |
378 | [alishuttleinterface_version=up.to.date]) | |
379 | AC_MSG_RESULT([$alishuttleinterface_version]) | |
380 | ||
74c73e5a | 381 | CPPFLAGS=$save_CPPFLAGS |
382 | LDFLAGS=$save_LDFLAGS | |
383 | LIBS=$save_LIBS | |
7233bc62 | 384 | fi # if test ! "x$have_aliroot" = "xno" |
f59fee6d | 385 | |
74c73e5a | 386 | AC_LANG_POP(C++) |
5f5b708b | 387 | AC_SUBST([ALICE_ROOT]) |
74c73e5a | 388 | AC_SUBST([ALIROOT_CPPFLAGS]) |
389 | AC_SUBST([ALIROOT_LDFLAGS]) | |
dc8f7cb7 | 390 | AC_SUBST([ALIROOTBINDIR]) |
53feaef5 | 391 | AC_SUBST([ALIROOTLIBDIR]) |
593a08ea | 392 | |
393 | ALIROOT_LIBS="$ALIROOT_LIBS $ADD_ROOTLIBS" | |
74c73e5a | 394 | AC_SUBST([ALIROOT_LIBS]) |
0f51f5b8 | 395 | AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes) |
85869391 | 396 | |
6c1a9d9e | 397 | HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE' |
398 | HLTBASE_LDFLAGS= | |
399 | AC_SUBST([HLTBASE_CPPFLAGS]) | |
400 | AC_SUBST([HLTBASE_LDFLAGS]) | |
401 | ||
78b557c2 | 402 | dnl ------------------------------------------------------------------ |
403 | dnl check for the HLT PubSub Framework | |
f8c5e339 | 404 | dnl namely for the existence of the HOMER library |
405 | dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt | |
406 | dnl package. It os though possible to choose an external. library | |
407 | dnl In order to make the origni of the HOMER lib clear, the one in AliRoot | |
408 | dnl got the name libAliHLTHOMER | |
78b557c2 | 409 | AC_MSG_CHECKING([for HLT PubSub Framework]) |
410 | AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework], | |
411 | [], | |
412 | [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ]) | |
413 | if test -z $with_pubsub || ! test -d $with_pubsub ; then | |
414 | with_pubsub=no | |
415 | fi | |
416 | AC_MSG_RESULT([$with_pubsub]) | |
f8c5e339 | 417 | HOMER_VERSION=2 |
5f1685a0 | 418 | HOMER_LIBS= |
78b557c2 | 419 | |
420 | AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface]) | |
421 | if test "x$with_pubsub" != "xno" ; then | |
422 | save_CPPFLAGS=$CPPFLAGS | |
423 | save_LDFLAGS=$LDFLAGS | |
424 | save_LIBS=$LIBS | |
4a6b4894 | 425 | # currently the different versions of the HLT PubSub framework have a different |
426 | # directory layout | |
20b6dd9a | 427 | if test -d ${with_pubsub}/include/HOMER ; then |
5235c3e9 | 428 | # the 'early' location of the include files with separated HOMER sub dirs |
9ce4bf4a | 429 | HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader" |
5235c3e9 | 430 | elif test -d ${with_pubsub}/include/Util/HOMER ; then |
431 | # location for HLT Framework versions after Sep 2006 | |
9ce4bf4a | 432 | HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER" |
5235c3e9 | 433 | elif test -d ${with_pubsub}/src/Util/HOMER/include ; then |
434 | # fall back if include files were not installed (versions after Sep 06) | |
9ce4bf4a | 435 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include" |
4a6b4894 | 436 | else |
5235c3e9 | 437 | # fall back if include files were not installed (versions before Sep 06) |
9ce4bf4a | 438 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include" |
4a6b4894 | 439 | fi |
9ce4bf4a | 440 | HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done` |
5894eaa5 | 441 | |
442 | AC_ARG_ENABLE(pubsub-debug, | |
443 | [AC_HELP_STRING([--disable-pubsub-debug], | |
444 | [force the production version of the PubSub framework])], | |
445 | [],[enable_pubsub_debug=yes]) | |
446 | homer_type="none" | |
447 | HOMER_TARGET="`uname -s`-`uname -m`" | |
448 | AC_MSG_CHECKING([for HLT PubSub Framework release type]) | |
449 | if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then | |
450 | homer_type="production" | |
451 | HOMER_TARGET="${HOMER_TARGET}-release" | |
452 | elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then | |
453 | homer_type="debug" | |
454 | HOMER_TARGET="${HOMER_TARGET}-debug" | |
455 | fi | |
456 | AC_MSG_RESULT([${homer_type}]) | |
f8c5e339 | 457 | HOMERREADER_HEADER=HOMERReader.h |
5894eaa5 | 458 | HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}" |
459 | HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}" | |
53feaef5 | 460 | HOMER_LDFLAGS="-L${HOMER_LIBDIR}" |
78b557c2 | 461 | CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS" |
462 | LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS" | |
463 | LIBS="$save_LIBS " | |
464 | with_homer=no | |
465 | AC_LANG_PUSH(C++) | |
f8c5e339 | 466 | AC_CHECK_HEADER([$HOMERREADER_HEADER], |
5f1685a0 | 467 | [ AC_CHECK_LIB([HOMER],[_init], |
468 | [with_homer=yes | |
469 | HOMER_LIBS="-lHOMER"], | |
470 | [ AC_CHECK_LIB([HOMERReader],[_init], | |
471 | [with_homer=yes | |
472 | HOMER_LIBS="-lHOMERReader"])]) | |
473 | LIBS="$LIBS $HOMER_LIBS" | |
9ce4bf4a | 474 | AC_MSG_CHECKING([version of HOMER library]) |
5f1685a0 | 475 | dnl The Homer library has no versioning, so we do our own |
476 | dnl version description | |
477 | dnl ---------------------------------------------------------------------- | |
478 | dnl 1 inintial version | |
479 | dnl 2 GetBlockStatusFlags added to the interface | |
480 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>], | |
481 | [HOMERReader reader("dummy", 0); | |
482 | reader.GetBlockStatusFlags(0);])], | |
f8c5e339 | 483 | [], |
484 | [HOMER_VERSION=1]) | |
5f1685a0 | 485 | AC_MSG_RESULT([$HOMER_VERSION]) |
f8c5e339 | 486 | ], |
487 | [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER]) | |
78b557c2 | 488 | AC_LANG_POP(C++) |
f8c5e339 | 489 | HOMER_INBUILT_LIB= |
490 | else | |
491 | dnl no pubsub version defined, check if the HOMER lib is available in AliRoot | |
492 | topdir=`dirname $0` | |
493 | HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER" | |
494 | HOMERREADER_HEADER=AliHLTHOMERReader.h | |
495 | HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la | |
496 | HOMER_BINDIR= | |
497 | HOMER_LIBDIR= | |
498 | HOMER_LDFLAGS= | |
499 | fi | |
500 | ||
78b557c2 | 501 | if test "x$with_homer" = "xno" ; then |
502 | HOMER_CPPFLAGS= | |
503 | HOMER_LDFLAGS= | |
5f1685a0 | 504 | HOMER_LIBS= |
78b557c2 | 505 | else |
5f1685a0 | 506 | HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION" |
78b557c2 | 507 | AC_DEFINE(HAVE_HOMERREADER) |
508 | fi | |
509 | CPPFLAGS="$save_CPPFLAGS" | |
510 | LDFLAGS="$save_LDFLAGS" | |
511 | LIBS="$save_LIBS" | |
f8c5e339 | 512 | |
513 | AC_SUBST([HOMERREADER_HEADER]) | |
514 | AC_SUBST([HOMER_INBUILT_LIB]) | |
78b557c2 | 515 | AC_SUBST([HOMER_CPPFLAGS]) |
516 | AC_SUBST([HOMER_LDFLAGS]) | |
53feaef5 | 517 | AC_SUBST([HOMER_LIBDIR]) |
518 | AC_SUBST([HOMER_BINDIR]) | |
5f1685a0 | 519 | AC_SUBST([HOMER_LIBS]) |
78b557c2 | 520 | |
7233bc62 | 521 | dnl ------------------------------------------------------------------ |
522 | AC_ARG_ENABLE(all, | |
523 | [AC_HELP_STRING([--disable-all], | |
524 | [disable all detector modules, individual modules can be switched on by --enable-det])], | |
525 | [disable_all=yes],[]) | |
526 | ||
85869391 | 527 | dnl ------------------------------------------------------------------ |
528 | AC_MSG_CHECKING([whether to impose strict coding conventions]) | |
529 | AC_ARG_ENABLE(strict, | |
2028353f | 530 | [AC_HELP_STRING([--disable-strict], |
531 | [disable coding convention checks ])], | |
532 | [],[enable_strict=yes]) | |
85869391 | 533 | if test "x$enable_strict" = "xyes" ; then |
f7561f8d | 534 | CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow" |
85869391 | 535 | fi |
536 | AC_MSG_RESULT([$enable_strict]) | |
b521659f | 537 | |
5b6ab198 | 538 | dnl ------------------------------------------------------------------ |
539 | AC_MSG_CHECKING([whether to enable component statistics]) | |
540 | AC_ARG_ENABLE(component-stat, | |
541 | [AC_HELP_STRING([--enable-component-stat], | |
542 | [enable component statistics ])], | |
543 | [],[enable_component_stat=no]) | |
544 | if test "x$enable_component_stat" = "xyes" ; then | |
545 | AC_DEFINE(HLT_COMPONENT_STATISTICS) | |
546 | fi | |
547 | AC_MSG_RESULT([$enable_component_stat]) | |
548 | ||
cad2d06c | 549 | dnl ------------------------------------------------------------------ |
550 | dnl ---- module checks | |
551 | dnl ------------------------------------------------------------------ | |
552 | save_CPPFLAGS=$CPPFLAGS | |
553 | save_LDFLAGS=$LDFLAGS | |
554 | save_LIBS=$LIBS | |
555 | ||
c8500eef | 556 | dnl ------------------------------------------------------------------ |
557 | AC_MSG_NOTICE([-------------------------------------------------]) | |
558 | AC_MSG_NOTICE([checking dependencies for HLTbase library]) | |
559 | HLTBASE_CHECKLIBS='XMLParser' | |
560 | for CHECKLIB in $HLTBASE_CHECKLIBS ; do | |
561 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}" | |
562 | LIBS="$save_LIBS $ROOTLIBS $ALIHLTBASE_LIBS" | |
563 | AC_CHECK_LIB([$CHECKLIB],[_init], [ALIHLTBASE_LIBS="$ALIHLTBASE_LIBS -l$CHECKLIB"]) | |
564 | done | |
565 | AC_SUBST([ALIHLTBASE_LIBS]) | |
566 | ||
b521659f | 567 | dnl ------------------------------------------------------------------ |
568 | AC_MSG_CHECKING([whether to compile sample library]) | |
569 | AH_TEMPLATE([HLT_SAMPLE],[hlt sample library]) | |
570 | AC_ARG_ENABLE(sample, | |
c018a1bd | 571 | [AC_HELP_STRING([--disable-sample], |
b521659f | 572 | [compile the sample library ])], |
2e742d30 | 573 | [], |
574 | [if test "x$have_aliroot" = "xno" ; then | |
575 | enable_sample="no...requires.AliRoot" | |
576 | else | |
577 | enable_sample=yes | |
578 | fi | |
579 | ]) | |
580 | ||
b521659f | 581 | if test "x$enable_sample" = "xyes" ; then |
582 | AC_DEFINE(HLT_SAMPLE) | |
583 | fi | |
584 | AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes) | |
585 | AC_MSG_RESULT([$enable_sample]) | |
586 | ||
c018a1bd | 587 | dnl ------------------------------------------------------------------ |
c018a1bd | 588 | AH_TEMPLATE([HLT_UTIL],[HLT utility library]) |
b59c004b | 589 | ALIUTIL_LIBS= |
590 | CHECK_HLTMODULE([util], | |
591 | [], | |
592 | [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/RAW -I$ALICE_ROOT/PYTHIA6], | |
593 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS], | |
594 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], | |
595 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) | |
596 | ||
597 | if test "x$enable_module" = "xmissheader"; then | |
598 | enable_module="no...missing.headers" | |
599 | enable_util=$enable_module | |
600 | elif test "x$enable_module" = "xforce"; then | |
601 | enable_util="yes" | |
602 | else | |
603 | enable_util=$enable_module | |
604 | fi | |
c018a1bd | 605 | if test "x$enable_util" = "xyes" ; then |
606 | AC_DEFINE(HLT_UTIL) | |
b59c004b | 607 | ALIUTIL_LIBS=$ALIHLTMODULE_LIBS |
c018a1bd | 608 | fi |
609 | AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes) | |
b59c004b | 610 | AC_MSG_CHECKING([whether to compile Util library]) |
611 | AC_MSG_RESULT([$enable_module]) | |
612 | AC_SUBST([ALIUTIL_LIBS]) | |
c018a1bd | 613 | |
b521659f | 614 | dnl ------------------------------------------------------------------ |
b521659f | 615 | AH_TEMPLATE([HLT_TPC],[hlt tpc library]) |
f59fee6d | 616 | |
e642ae99 | 617 | ALITPC_LIBS= |
f59fee6d | 618 | CHECK_HLTMODULE([tpc], |
e962f438 | 619 | [AliTPCRawStream.h], |
620 | [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC], | |
70d00903 | 621 | [Gui ANALYSIS STAT], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS], |
e642ae99 | 622 | [TPCbase TPCrec TPCcalib], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
f59fee6d | 623 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
624 | ||
c6b46c3f | 625 | if test "x$enable_module" = "xmissheader"; then |
626 | enable_module="no...missing.headers" | |
50a3793d | 627 | enable_tpc=$enable_module |
c6b46c3f | 628 | elif test "x$enable_module" = "xforce"; then |
629 | enable_tpc="yes" | |
f59fee6d | 630 | else |
631 | enable_tpc=$enable_module | |
632 | fi | |
2e742d30 | 633 | |
b521659f | 634 | if test "x$enable_tpc" = "xyes" ; then |
e642ae99 | 635 | AC_LANG_PUSH(C++) |
b521659f | 636 | AC_DEFINE(HLT_TPC) |
e642ae99 | 637 | ALITPC_LIBS=$ALIHLTMODULE_LIBS |
638 | dnl | |
639 | dnl Check for functionality in the TPC reconstruction required for online | |
640 | dnl processing | |
641 | dnl | |
642 | have_tpc_hltoffline_rec=no | |
643 | AC_MSG_CHECKING(for on-line features of TPC offline reconstruction) | |
644 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC" | |
645 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" | |
646 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS" | |
647 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h> | |
648 | #include <AliTPCclustererMI.h> | |
649 | #include <TObjArray.h>], | |
650 | [AliTPCtrackerMI tracker; | |
651 | TObjArray* array=NULL; | |
652 | tracker.LoadClusters(array); | |
653 | AliTPCclustererMI cl(NULL, NULL); | |
89c2e505 | 654 | cl.GetOutputClonesArray();])], |
e642ae99 | 655 | [have_tpc_hltoffline_rec=yes], |
656 | [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)]) | |
cad2d06c | 657 | LIBS=$save_LIBS |
e642ae99 | 658 | AC_MSG_RESULT([$have_tpc_hltoffline_rec]) |
659 | ||
660 | AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)]) | |
661 | AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)]) | |
a553c904 | 662 | AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)]) |
e642ae99 | 663 | |
664 | have_tpc_mapping=no | |
665 | if test ! "x$have_aliroot" = "xno" ; then | |
666 | # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC | |
667 | # which is stored in the TPC/mapping/Patchx.data files from | |
668 | # AliRoot version v4-04-Release (May 2006) | |
669 | AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available]) | |
670 | TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping | |
671 | AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data], | |
672 | [have_tpc_mapping=yes | |
673 | AC_SUBST(TPC_PAD_MAPPING_PATH) | |
674 | AC_DEFINE(HAVE_TPC_MAPPING)], | |
675 | []) | |
676 | ||
677 | fi | |
678 | AC_MSG_CHECKING([for TPC mapping layout]) | |
679 | AC_MSG_RESULT([$have_tpc_mapping]) | |
680 | AC_LANG_POP(C++) | |
681 | ||
adec4ad4 | 682 | else |
683 | enable_module=$enable_tpc | |
b521659f | 684 | fi |
685 | AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes) | |
d6e2c707 | 686 | AC_MSG_CHECKING([whether to compile TPC library]) |
c6b46c3f | 687 | AC_MSG_RESULT([$enable_module]) |
f59fee6d | 688 | AC_SUBST([ALITPC_LIBS]) |
b521659f | 689 | |
5e3820e2 | 690 | dnl ------------------------------------------------------------------ |
691 | AH_TEMPLATE([HLT_RCU],[hlt rcu library]) | |
692 | ||
693 | CHECK_HLTMODULE([rcu], | |
694 | [AliAltroDecoder.h], | |
695 | [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW], | |
696 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], | |
697 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], | |
698 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) | |
699 | ||
700 | if test "x$enable_module" = "xmissheader"; then | |
701 | enable_module="no...missing.headers" | |
50a3793d | 702 | enable_rcu=$enable_module |
5e3820e2 | 703 | elif test "x$enable_module" = "xforce"; then |
704 | enable_rcu="yes" | |
705 | else | |
706 | AC_LANG_PUSH(C++) | |
5e3820e2 | 707 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" |
708 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" | |
709 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
710 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>], | |
711 | [AliAltroDecoder decoder; | |
712 | decoder.CopyBackward(NULL, 0);])], | |
713 | [enable_rcu=$enable_module], | |
714 | [enable_module="no...requires.AliRoot>v4-10-Release" | |
715 | enable_rcu="no...requires.AliRoot>v4-10-Release"]) | |
716 | CPPFLAGS=$save_CPPFLAGS | |
717 | LDFLAGS=$save_LDFLAGS | |
718 | LIBS=$save_LIBS | |
719 | AC_LANG_POP(C++) | |
720 | fi | |
721 | ||
722 | if test "x$enable_rcu" = "xyes" ; then | |
723 | AC_DEFINE(HLT_RCU) | |
adec4ad4 | 724 | else |
725 | enable_module=$enable_rcu | |
5e3820e2 | 726 | fi |
727 | AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes) | |
d6e2c707 | 728 | AC_MSG_CHECKING([whether to compile RCU library]) |
5e3820e2 | 729 | AC_MSG_RESULT([$enable_module]) |
730 | AC_SUBST([ALIRCU_LIBS]) | |
731 | ||
fe8738cf | 732 | dnl ------------------------------------------------------------------ |
733 | AH_TEMPLATE([HLT_CALO],[hlt calo(rimeter) library]) | |
734 | ||
735 | ALICALO_LIBS= | |
736 | CHECK_HLTMODULE([calo], | |
737 | [], [$ALIROOT_CPPFLAGS], | |
738 | [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS], | |
739 | [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], | |
740 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) | |
741 | ||
742 | if test "x$enable_module" = "xmissheader"; then | |
743 | enable_module="no...missing.headers" | |
744 | enable_calo=$enable_module | |
745 | elif test "x$enable_module" = "xforce"; then | |
746 | enable_calo="yes" | |
747 | else | |
748 | have_alicalorawstream=no | |
749 | if test ! "x$have_aliroot" = "xno" ; then | |
750 | AC_LANG_PUSH(C++) | |
751 | save_CPPFLAGS="$CPPFLAGS" | |
752 | # this can not be used as AliCaloRawStream.h indirectly depends on TString.h | |
753 | #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes]) | |
754 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS" | |
755 | AC_MSG_CHECKING([for AliCaloRawStream.h usability]) | |
756 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h> | |
757 | #include <AliCaloRawStream.h>], | |
758 | [int i])], | |
759 | [AC_DEFINE(HAVE_ALICALORAWSTREAM) | |
760 | have_alicalorawstream=yes], | |
761 | []) | |
762 | AC_MSG_RESULT([$have_alicalorawstream]) | |
763 | AC_LANG_POP(C++) | |
764 | CPPFLAGS="$save_CPPFLAGS" | |
765 | fi | |
766 | if test "x$have_alicalorawstream" != "xyes"; then | |
767 | enable_calo="no...requires.AliRoot>v4-05-07" | |
768 | else | |
769 | enable_calo=$enable_module | |
770 | fi | |
771 | fi | |
772 | ||
773 | if test "x$enable_calo" = "xyes" ; then | |
774 | AC_DEFINE(HLT_CALO) | |
775 | ALICALO_LIBS=$ALIHLTMODULE_LIBS | |
776 | else | |
777 | enable_module=$enable_calo | |
778 | fi | |
779 | AM_CONDITIONAL(EN_HLT_CALO, test x$enable_calo = xyes) | |
780 | AC_MSG_CHECKING([whether to compile CALO library]) | |
781 | AC_MSG_RESULT([$enable_module]) | |
782 | AC_SUBST([ALICALO_LIBS]) | |
783 | ||
c160eda8 | 784 | dnl ------------------------------------------------------------------ |
c160eda8 | 785 | AH_TEMPLATE([HLT_PHOS],[hlt phos library]) |
f59fee6d | 786 | |
787 | ALIPHOS_LIBS= | |
788 | CHECK_HLTMODULE([phos], | |
789 | [], [$ALIROOT_CPPFLAGS], | |
790 | [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS], | |
70979a80 | 791 | [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
f59fee6d | 792 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
793 | ||
c6b46c3f | 794 | if test "x$enable_module" = "xmissheader"; then |
795 | enable_module="no...requires.AliRoot>v4-05-07" | |
50a3793d | 796 | enable_phos=$enable_module |
c6b46c3f | 797 | elif test "x$enable_module" = "xforce"; then |
798 | enable_phos="yes" | |
f59fee6d | 799 | else |
800 | have_alicalorawstream=no | |
801 | if test ! "x$have_aliroot" = "xno" ; then | |
802 | AC_LANG_PUSH(C++) | |
803 | save_CPPFLAGS="$CPPFLAGS" | |
804 | # this can not be used as AliCaloRawStream.h indirectly depends on TString.h | |
805 | #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes]) | |
56584e00 | 806 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS" |
f59fee6d | 807 | AC_MSG_CHECKING([for AliCaloRawStream.h usability]) |
808 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h> | |
809 | #include <AliCaloRawStream.h>], | |
810 | [int i])], | |
811 | [AC_DEFINE(HAVE_ALICALORAWSTREAM) | |
812 | have_alicalorawstream=yes], | |
813 | []) | |
fe8738cf | 814 | AC_MSG_RESULT([$have_alicalorawstream]) |
ae1c1854 | 815 | AC_MSG_CHECKING([for required EMC functionality in AliPHOSRecoParam.h ]) |
816 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliPHOSRecoParam.h>], | |
817 | [AliPHOSRecoParam param; | |
818 | param.GetEMCClusteringThreshold()])], | |
819 | [have_aliphosrecoparam=yes], | |
820 | [AC_DEFINE(HAVE_NOT_PHOSRECOPARAMEMC)]) | |
fe8738cf | 821 | AC_MSG_RESULT([$have_aliphosrecoparam]) |
f59fee6d | 822 | AC_LANG_POP(C++) |
823 | CPPFLAGS="$save_CPPFLAGS" | |
824 | fi | |
825 | if test "x$have_alicalorawstream" != "xyes"; then | |
826 | enable_phos="no...requires.AliRoot>v4-05-07" | |
827 | else | |
828 | enable_phos=$enable_module | |
829 | fi | |
830 | fi | |
2e742d30 | 831 | |
c160eda8 | 832 | if test "x$enable_phos" = "xyes" ; then |
833 | AC_DEFINE(HLT_PHOS) | |
f59fee6d | 834 | ALIPHOS_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 | 835 | else |
836 | enable_module=$enable_phos | |
c160eda8 | 837 | fi |
838 | AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes) | |
d6e2c707 | 839 | AC_MSG_CHECKING([whether to compile PHOS library]) |
c6b46c3f | 840 | AC_MSG_RESULT([$enable_module]) |
f59fee6d | 841 | AC_SUBST([ALIPHOS_LIBS]) |
c160eda8 | 842 | |
fe8738cf | 843 | dnl ------------------------------------------------------------------ |
844 | AH_TEMPLATE([HLT_EMCAL],[hlt emcal library]) | |
845 | ||
846 | ALIEMCAL_LIBS= | |
847 | CHECK_HLTMODULE([emcal], | |
848 | [], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/EMCAL], | |
849 | [RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], | |
593a08ea | 850 | [EMCALrec EMCALsim EMCALbase EMCALUtils], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
fe8738cf | 851 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
852 | ||
853 | if test "x$enable_module" = "xmissheader"; then | |
854 | enable_module="no...header.missing" | |
855 | enable_emcal=$enable_module | |
856 | elif test "x$enable_module" = "xforce"; then | |
857 | enable_emcal="yes" | |
858 | else | |
859 | enable_emcal=$enable_module | |
860 | fi | |
861 | ||
862 | if test "x$enable_emcal" = "xyes" ; then | |
863 | AC_DEFINE(HLT_EMCAL) | |
864 | ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS | |
865 | else | |
866 | enable_module=$enable_emcal | |
867 | fi | |
868 | AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes) | |
869 | AC_MSG_CHECKING([whether to compile EMCAL library]) | |
870 | AC_MSG_RESULT([$enable_module]) | |
871 | AC_SUBST([ALIEMCAL_LIBS]) | |
872 | ||
c6b46c3f | 873 | dnl ------------------------------------------------------------------ |
874 | AH_TEMPLATE([HLT_TRD],[hlt trd library]) | |
875 | ||
f59fee6d | 876 | ALITRD_LIBS= |
877 | CHECK_HLTMODULE([trd], | |
878 | [], [], | |
b3f74118 | 879 | [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
5ef7d54f | 880 | [STAT TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
f59fee6d | 881 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
882 | ||
c6b46c3f | 883 | if test "x$enable_module" = "xmissheader"; then |
884 | enable_module="no...requires.AliRoot>v4-07-Release" | |
50a3793d | 885 | enable_trd=$enable_module |
c6b46c3f | 886 | elif test "x$enable_module" = "xforce"; then |
887 | enable_trd="yes" | |
f59fee6d | 888 | else |
889 | enable_trd=$enable_module | |
890 | if test "x$enable_trd" = "xyes" ; then | |
891 | AC_LANG_PUSH(C++) | |
892 | save_CPPFLAGS="$CPPFLAGS" | |
893 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD" | |
adec4ad4 | 894 | # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release |
895 | # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008 | |
0d66dbf5 | 896 | # changed to AliTRDReconstructor::SetStreamLevel() due to revision 27797, Tue Aug 5 2008 |
ae5bf1dd | 897 | # changed to AliTRDReconstructor::SetClusters() according to revision 28069, Mon Aug 18 2008 |
cef8ce36 | 898 | # changed to AliTRDCluster according to revision 30461, Thu Dec 18 2008 |
53eb3786 | 899 | # changed to AliTRDclusterizer::GetAddedClusters according to revision 31299, Wed Mar 4 2009 |
900 | AC_MSG_CHECKING([for required functions in AliTRDclusterizer]) | |
901 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>], | |
902 | [AliTRDclusterizer c; | |
903 | c.GetAddedClusters()])], | |
f59fee6d | 904 | [], |
cef8ce36 | 905 | [enable_trd="no...requires.AliRoot>v4-16-Release"]) |
f59fee6d | 906 | AC_MSG_RESULT([$enable_trd]) |
2fc8c061 | 907 | |
908 | if test "x$enable_trd" = "xyes" ; then | |
909 | have_alitrdrecoparam_r34995=no | |
910 | AC_MSG_CHECKING([checking for AliTRDrecoParam r34995]) | |
911 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDrecoParam.h>], | |
912 | [AliTRDrecoParam param; | |
913 | param.SetPIDNeuralNetwork(kFALSE)]);], | |
914 | [have_alitrdrecoparam_r34995=yes], | |
915 | [AC_DEFINE(HAVE_NOT_ALITRDRECOPARAM_r34995)]) | |
916 | AC_MSG_RESULT([$have_alitrdrecoparam_r34995]) | |
917 | ||
918 | fi | |
919 | ||
f59fee6d | 920 | AC_LANG_POP(C++) |
921 | CPPFLAGS="$save_CPPFLAGS" | |
922 | fi | |
923 | fi | |
2e742d30 | 924 | |
0f51f5b8 | 925 | if test "x$enable_trd" = "xyes" ; then |
926 | AC_DEFINE(HLT_TRD) | |
f59fee6d | 927 | ALITRD_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 | 928 | else |
929 | enable_module=$enable_trd | |
0f51f5b8 | 930 | fi |
931 | AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes) | |
d6e2c707 | 932 | AC_MSG_CHECKING([whether to compile TRD library]) |
c6b46c3f | 933 | AC_MSG_RESULT([$enable_module]) |
f59fee6d | 934 | AC_SUBST([ALITRD_LIBS]) |
0f51f5b8 | 935 | |
629266d1 | 936 | dnl ------------------------------------------------------------------ |
937 | AH_TEMPLATE([HLT_FMD],[hlt fmd library]) | |
938 | ||
939 | ALIFMD_LIBS=$ALIHLTMODULE_LIBS | |
940 | CHECK_HLTMODULE([fmd], | |
941 | [], [], | |
942 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], | |
50a3793d | 943 | [FMDbase FMDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
629266d1 | 944 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
945 | ||
946 | if test "x$enable_module" = "xmissheader"; then | |
50a3793d | 947 | enable_module="no...missing.headers" |
948 | enable_fmd=$enable_module | |
629266d1 | 949 | elif test "x$enable_module" = "xforce"; then |
950 | enable_fmd="yes" | |
951 | else | |
952 | enable_fmd=$enable_module | |
629266d1 | 953 | fi |
954 | ||
955 | if test "x$enable_fmd" = "xyes" ; then | |
956 | AC_DEFINE(HLT_FMD) | |
957 | ALIFMD_LIBS=$ALIHLTMODULE_LIBS | |
958 | else | |
959 | enable_module=$enable_fmd | |
960 | fi | |
961 | AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes) | |
962 | AC_MSG_CHECKING([whether to compile FMD library]) | |
963 | AC_MSG_RESULT([$enable_module]) | |
964 | AC_SUBST([ALIFMD_LIBS]) | |
965 | ||
94cc9aab | 966 | dnl ------------------------------------------------------------------ |
94cc9aab | 967 | AH_TEMPLATE([HLT_MUON],[hlt dimuon library]) |
2e742d30 | 968 | |
f59fee6d | 969 | ALIMUON_LIBS= |
e89e6b23 | 970 | CHECK_HLTMODULE([dimuon], |
41f99620 | 971 | [AliMpExMap.h AliMUONTriggerIO.h], |
972 | [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping], | |
b3f74118 | 973 | [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
974 | [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], | |
f59fee6d | 975 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
976 | ||
977 | if test "x$enable_module" = "xmissheader"; then | |
a853a794 | 978 | enable_module="no...requires.AliRoot>=v4-08-Release" |
50a3793d | 979 | enable_muon=$enable_module |
c6b46c3f | 980 | elif test "x$enable_module" = "xforce"; then |
981 | enable_muon="yes" | |
f59fee6d | 982 | else |
983 | enable_muon=$enable_module | |
984 | fi | |
985 | ||
986 | if test "x$enable_muon" = "xyes" ; then | |
94cc9aab | 987 | AC_DEFINE(HLT_MUON) |
f59fee6d | 988 | ALIMUON_LIBS=$ALIHLTMODULE_LIBS |
6ed1b948 | 989 | AC_LANG_PUSH(C++) |
accd4c8f | 990 | save_CPPFLAGS="$CPPFLAGS" |
991 | ||
6ed1b948 | 992 | dnl |
993 | dnl Check for functionality GetRawStream AliMUONDigitMaker.h | |
994 | dnl | |
995 | have_muon_digitmaker_getrawstream=no | |
996 | AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker) | |
997 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON" | |
998 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" | |
999 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS" | |
1000 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>], | |
1001 | [AliMUONDigitMaker dm; | |
1002 | dm.GetRawStreamTracker();])], | |
1003 | [have_muon_digitmaker_getrawstream=yes], | |
1004 | [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)]) | |
1005 | LIBS=$save_LIBS | |
1006 | AC_MSG_RESULT([$have_muon_digitmaker_getrawstream]) | |
53eb3786 | 1007 | |
1008 | dnl | |
1009 | dnl Check for AliMpPad::GetPositionX/Y | |
1010 | dnl change of implementation in MUON code | |
1011 | dnl revision 31769, Wed Apr 1 2009 | |
1012 | dnl | |
1013 | have_muon_alimppad_getposition=no | |
1014 | AC_MSG_CHECKING(for GetPosition methods of AliMpPad) | |
1015 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping" | |
1016 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" | |
1017 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS" | |
1018 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>], | |
1019 | [AliMpPad pad; | |
1020 | pad.GetPositionX();])], | |
1021 | [have_muon_alimppad_getposition=yes], | |
1022 | [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)]) | |
1023 | LIBS=$save_LIBS | |
1024 | AC_MSG_RESULT([$have_muon_alimppad_getposition]) | |
1025 | ||
accd4c8f | 1026 | CPPFLAGS="$save_CPPFLAGS" |
6ed1b948 | 1027 | |
1028 | AC_LANG_POP(C++) | |
adec4ad4 | 1029 | else |
1030 | enable_module=$enable_muon | |
94cc9aab | 1031 | fi |
f59fee6d | 1032 | AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes) |
d6e2c707 | 1033 | AC_MSG_CHECKING([whether to compile MUON library]) |
c6b46c3f | 1034 | AC_MSG_RESULT([$enable_module]) |
f59fee6d | 1035 | AC_SUBST([ALIMUON_LIBS]) |
94cc9aab | 1036 | |
d6e2c707 | 1037 | dnl ------------------------------------------------------------------ |
1038 | AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library]) | |
1039 | ||
1040 | ALITRIGGER_LIBS= | |
1041 | CHECK_HLTMODULE([trigger], | |
1042 | [], [$ALIROOT_CPPFLAGS], | |
1043 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], | |
1044 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], | |
1045 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) | |
1046 | ||
1047 | if test "x$enable_module" = "xmissheader"; then | |
1048 | enable_module="no...header.missing" | |
50a3793d | 1049 | enable_trigger=$enable_module |
d6e2c707 | 1050 | elif test "x$enable_module" = "xforce"; then |
1051 | enable_trigger="yes" | |
1052 | else | |
1053 | enable_trigger=$enable_module | |
1054 | fi | |
1055 | ||
1056 | if test "x$enable_trigger" = "xyes" ; then | |
1057 | AC_DEFINE(HLT_TRIGGER) | |
1058 | ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS | |
adec4ad4 | 1059 | else |
1060 | enable_module=$enable_trigger | |
d6e2c707 | 1061 | fi |
1062 | AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes) | |
1063 | AC_MSG_CHECKING([whether to compile Trigger library]) | |
1064 | AC_MSG_RESULT([$enable_module]) | |
1065 | AC_SUBST([ALITRIGGER_LIBS]) | |
1066 | ||
ec6160d5 | 1067 | dnl ------------------------------------------------------------------ |
1068 | AH_TEMPLATE([HLT_GLOBAL],[hlt global library]) | |
1069 | ||
1070 | ALIGLOBAL_LIBS= | |
1071 | CHECK_HLTMODULE([global], | |
1072 | [], [$ALIROOT_CPPFLAGS], | |
1073 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], | |
f4b540e9 | 1074 | [PHOSUtils ], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
ec6160d5 | 1075 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
1076 | ||
1077 | if test "x$enable_module" = "xmissheader"; then | |
1078 | enable_module="no...header.missing" | |
1079 | enable_global=$enable_module | |
1080 | elif test "x$enable_module" = "xforce"; then | |
1081 | enable_global="yes" | |
1082 | else | |
1083 | enable_global=$enable_module | |
1084 | if test "x$enable_global" = "xyes" ; then | |
1085 | AC_LANG_PUSH(C++) | |
1086 | save_CPPFLAGS="$CPPFLAGS" | |
1087 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
1088 | AC_MSG_CHECKING([for required functions in AliESDtrack]) | |
1089 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliESDtrack.h>], | |
1090 | [AliESDtrack t; | |
1091 | t.SetGlobalChi2(0)])], | |
1092 | [], | |
1093 | [enable_global="no...requires.AliRoot>v4-17-Release"]) | |
1094 | AC_MSG_RESULT([$enable_global]) | |
1095 | AC_LANG_POP(C++) | |
1096 | CPPFLAGS="$save_CPPFLAGS" | |
1097 | fi | |
1098 | fi | |
1099 | ||
1100 | if test "x$enable_global" = "xyes" ; then | |
1101 | AC_DEFINE(HLT_GLOBAL) | |
1102 | ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS | |
1103 | else | |
1104 | enable_module=$enable_global | |
1105 | fi | |
1106 | AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes) | |
1107 | AC_MSG_CHECKING([whether to compile Global library]) | |
1108 | AC_MSG_RESULT([$enable_module]) | |
1109 | AC_SUBST([ALIGLOBAL_LIBS]) | |
1110 | ||
33daad3d | 1111 | dnl ------------------------------------------------------------------ |
1112 | AH_TEMPLATE([HLT_JET],[hlt jet library]) | |
1113 | ||
04cbe3ac | 1114 | ALIFASTJET_HEADER= |
1115 | ALIFASTJET_INCFLAGS= | |
1116 | ALIFASTJET_LIBS= | |
1117 | ALIFASTJET_LDFLAGS= | |
1118 | AC_ARG_WITH(fastjet, [installation path of the FASTJET package], | |
1119 | [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet], | |
1120 | [ test -n $FASTJET && with_fastjet=$FASTJET ]) | |
1121 | ||
1122 | if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then | |
1123 | ALIFASTJET_INCFLAGS="-I${with_fastjet}/include" | |
1124 | ALIFASTJET_HEADER="PseudoJet.hh" | |
1125 | ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib" | |
1126 | ALIFASTJET_LIBS="CGAL fastjet" | |
33daad3d | 1127 | else |
04cbe3ac | 1128 | with_fastjet=no |
33daad3d | 1129 | fi |
1130 | ||
04cbe3ac | 1131 | CHECK_HLTMODULE([jet], |
1132 | [$ALIFASTJET_HEADER], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/JETAN $ALIFASTJET_INCFLAGS], | |
1133 | [$ALIFASTJET_LIBS], [-L$ROOTLIBDIR $ALIFASTJET_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS], | |
593a08ea | 1134 | [AOD ESD ANALYSIS ANALYSISalice JETAN], |
04cbe3ac | 1135 | [-L$ROOTLIBDIR $ALIROOT_LDFLAGS -L$ALICE_ROOT/lib/tgt_$ALICE_TARGET], |
1136 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) | |
33daad3d | 1137 | |
1138 | if test "x$enable_module" = "xmissheader"; then | |
1139 | enable_module="no...header.missing" | |
1140 | enable_jet=$enable_module | |
1141 | elif test "x$enable_module" = "xforce"; then | |
1142 | enable_jet="yes" | |
1143 | else | |
1144 | enable_jet=$enable_module | |
1145 | fi | |
1146 | ||
04cbe3ac | 1147 | if test "x$enable_jet" = "xyes" ; then |
33daad3d | 1148 | AC_DEFINE(HLT_JET) |
1149 | ALIJET_LIBS="$ALIHLTMODULE_LIBS" | |
04cbe3ac | 1150 | |
1151 | if test "x$with_fastjet" != "xno"; then | |
1152 | AC_DEFINE(HAVE_FASTJET) | |
1153 | AC_DEFINE(WITHFASTJET) | |
1154 | ALIJET_LIBS="$ALIJET_LIBS -L$FASTJET_LDFLAGS" | |
1155 | fi | |
1156 | AC_MSG_CHECKING([compilation with FASTJET package]) | |
1157 | AC_MSG_RESULT($with_fastjet) | |
1158 | ||
33daad3d | 1159 | else |
1160 | enable_module=$enable_jet | |
1161 | fi | |
1162 | ||
33daad3d | 1163 | AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes) |
1164 | AC_MSG_CHECKING([whether to compile Jet library]) | |
1165 | AC_MSG_RESULT([$enable_module]) | |
1166 | AC_SUBST([ALIJET_LIBS]) | |
1167 | ||
d6e2c707 | 1168 | dnl ------------------------------------------------------------------ |
1169 | AH_TEMPLATE([HLT_ITS],[hlt its library]) | |
1170 | ||
1171 | ALIITS_LIBS= | |
1172 | CHECK_HLTMODULE([its], | |
ae5bf1dd | 1173 | [AliITSCompressRawDataSDD.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS], |
cad2d06c | 1174 | [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
b3ac448a | 1175 | [ITSbase ITSrec ITSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
d6e2c707 | 1176 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
1177 | ||
1178 | if test "x$enable_module" = "xmissheader"; then | |
1179 | enable_module="no...header.missing" | |
50a3793d | 1180 | enable_its=$enable_module |
d6e2c707 | 1181 | elif test "x$enable_module" = "xforce"; then |
1182 | enable_its="yes" | |
1183 | else | |
1184 | enable_its=$enable_module | |
adec4ad4 | 1185 | if test "x$enable_its" = "xyes" ; then |
1186 | AC_LANG_PUSH(C++) | |
1187 | save_CPPFLAGS="$CPPFLAGS" | |
1188 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS" | |
1189 | # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008 | |
1190 | # require AliVertexer::GetNominalPos() | |
1191 | AC_MSG_CHECKING([for required functions in AliITSVertexer]) | |
1192 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>], | |
1193 | [AliITSVertexerZ v; | |
1194 | v.GetNominalPos()])], | |
1195 | [], | |
1196 | [enable_its="no...requires.AliRoot>v4-13-Release"]) | |
1197 | AC_MSG_RESULT([$enable_its]) | |
1198 | AC_LANG_POP(C++) | |
1199 | CPPFLAGS="$save_CPPFLAGS" | |
1200 | fi | |
d6e2c707 | 1201 | fi |
1202 | ||
1203 | if test "x$enable_its" = "xyes" ; then | |
1204 | AC_DEFINE(HLT_ITS) | |
1205 | ALIITS_LIBS=$ALIHLTMODULE_LIBS | |
adec4ad4 | 1206 | else |
1207 | enable_module=$enable_its | |
d6e2c707 | 1208 | fi |
1209 | AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes) | |
1210 | AC_MSG_CHECKING([whether to compile ITS library]) | |
1211 | AC_MSG_RESULT([$enable_module]) | |
1212 | AC_SUBST([ALIITS_LIBS]) | |
1213 | ||
e89e6b23 | 1214 | dnl ------------------------------------------------------------------ |
1215 | AH_TEMPLATE([HLT_COMP],[hlt comp library]) | |
1216 | ||
1217 | ALICOMP_LIBS= | |
1218 | CHECK_HLTMODULE([comp], | |
1219 | [], [$ALIROOT_CPPFLAGS], | |
1220 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], | |
1221 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], | |
1222 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) | |
1223 | ||
1224 | if test "x$enable_module" = "xmissheader"; then | |
c6b46c3f | 1225 | enable_module="no...header.missing" |
50a3793d | 1226 | enable_comp=$enable_module |
c6b46c3f | 1227 | elif test "x$enable_module" = "xforce"; then |
1228 | enable_comp="yes" | |
e89e6b23 | 1229 | else |
1230 | enable_comp=$enable_module | |
1231 | fi | |
1232 | ||
1233 | if test "x$enable_comp" = "xyes" ; then | |
1234 | AC_DEFINE(HLT_COMP) | |
1235 | ALICOMP_LIBS=$ALIHLTMODULE_LIBS | |
adec4ad4 | 1236 | else |
1237 | enable_module=$enable_comp | |
e89e6b23 | 1238 | fi |
1239 | AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes) | |
1240 | AC_MSG_CHECKING([whether to compile comp library]) | |
c6b46c3f | 1241 | AC_MSG_RESULT([$enable_module]) |
e89e6b23 | 1242 | AC_SUBST([ALICOMP_LIBS]) |
1243 | ||
b521659f | 1244 | dnl ------------------------------------------------------------------ |
fc455fba | 1245 | AC_MSG_CHECKING([whether to disable AliRoot logging]) |
1246 | AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging]) | |
1247 | AC_ARG_ENABLE(aliroot-logging, | |
1248 | [AC_HELP_STRING([--disable-aliroot-logging], | |
1249 | [disable logging through AliRoot logging methods])], | |
1250 | [],[enable_aliroot_logging=no]) | |
c018a1bd | 1251 | if test "x$have_aliroot" = "xno" ; then |
1252 | enable_aliroot_logging=yes # this means 'disable' | |
1253 | fi | |
fc455fba | 1254 | if test "x$enable_aliroot_logging" != "xno" ; then |
1255 | AC_DEFINE(NOALIROOT_LOGGING) | |
b521659f | 1256 | fi |
fc455fba | 1257 | AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no) |
1258 | AC_MSG_RESULT([$enable_aliroot_logging]) | |
b521659f | 1259 | |
1260 | dnl ------------------------------------------------------------------ | |
1261 | AC_MSG_CHECKING([whether to enable saving MC data through the chain]) | |
1262 | AH_TEMPLATE([DOMC],[MC saving]) | |
1263 | AC_ARG_ENABLE(mc-saving, | |
1264 | [AC_HELP_STRING([--enable-mc-saving], | |
1265 | [enable saving MC data through the chain])], | |
1266 | [],[enable_mc_saving=no]) | |
1267 | if test "x$enable_mc_saving" = "xyes" ; then | |
1268 | AC_DEFINE(DOMC) | |
1269 | fi | |
1270 | AC_MSG_RESULT([$enable_mc_saving]) | |
1271 | ||
b521659f | 1272 | dnl ------------------------------------------------------------------ |
b521659f | 1273 | dnl certainly something old, but we keep the define |
1274 | AC_MSG_CHECKING([whether to use ROWHOUGH]) | |
1275 | AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH]) | |
1276 | AC_ARG_ENABLE(rowhough, | |
1277 | [AC_HELP_STRING([--enable-rowhough], | |
1278 | [use ROWHOUGH ])], | |
1279 | [],[enable_rowhough=no]) | |
1280 | if test "x$enable_rowhough" = "xyes" ; then | |
1281 | AC_DEFINE(USEROWHOUGH) | |
1282 | fi | |
1283 | AC_MSG_RESULT([$enable_rowhough]) | |
1284 | ||
53feaef5 | 1285 | dnl ------------------------------------------------------------------ |
1286 | dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old | |
1287 | dnl stand-alone build system. This is most likely something old we can | |
1288 | dnl get rid off later, or do something more reasonable. Since the define | |
1289 | dnl needs the quotes they have to be escaped. This works well for the | |
1290 | dnl Makefile but not for the configure script. So we have to add the | |
1291 | dnl defines after all the other checks. | |
1292 | CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" | |
1293 | if test ! "x$have_aliroot" = "xno" ; then | |
1294 | CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" | |
1295 | fi | |
1296 | ||
b521659f | 1297 | dnl ------------------------------------------------------------------ |
1298 | dnl | |
1299 | dnl Documentation | |
1300 | dnl | |
1301 | AC_ARG_VAR(DOXYGEN, The Documentation Generator) | |
1302 | AC_PATH_PROG(PERL, perl) | |
1303 | AC_PATH_PROG(DOXYGEN, doxygen) | |
5894eaa5 | 1304 | AC_ARG_ENABLE(dot, |
1305 | [AC_HELP_STRING([--enable-dot], | |
1306 | [enable dot documentation generator])], | |
1307 | [],[enable_dot=no]) | |
b521659f | 1308 | HAVE_DOT=NO |
1309 | DOT_PATH= | |
1310 | AC_PATH_PROG(DOT, dot) | |
5894eaa5 | 1311 | if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then |
b521659f | 1312 | HAVE_DOT=YES |
1313 | DOT_PATH=`dirname $DOT` | |
1314 | fi | |
ae1c1854 | 1315 | |
1316 | AC_MSG_CHECKING([for documentation mode]) | |
1317 | AC_ARG_ENABLE(doc, | |
1318 | [AC_HELP_STRING([--disable-doc], | |
1319 | [disable documentation build; monolithic build --enable-doc=mono ])], | |
1320 | [],[enable_doc=modules]) | |
fb345ed7 | 1321 | |
ae1c1854 | 1322 | if test "x$DOXYGEN" = "x" ; then |
1323 | enable_doc=no.doxygen | |
fb345ed7 | 1324 | elif test "x$enable_doc" = "xyes" ; then |
1325 | enable_doc=yes | |
ae1c1854 | 1326 | elif test ! "x$enable_doc" = "xmono" && \ |
1327 | test ! "x$enable_doc" = "xmodules" && \ | |
1328 | test ! "x$enable_doc" = "xno"; then | |
1329 | enable_doc=no | |
1330 | AC_MSG_WARN([unknown option]) | |
1331 | fi | |
1332 | if test "x$enable_doc" = "xno" ; then | |
1333 | enable_doc=off | |
1334 | DOXYGEN= | |
1335 | fi | |
1336 | ||
1337 | AC_MSG_RESULT([$enable_doc]) | |
1338 | AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono") | |
1339 | AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x") | |
b521659f | 1340 | AC_SUBST([HAVE_DOT]) |
1341 | AC_SUBST([DOT_PATH]) | |
1342 | ||
90ebac25 | 1343 | dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src |
1344 | dnl echo $HAVE_SRC_SUBDIR | |
1345 | dnl if ! test -d $HAVE_SRC_SUBDIR; then | |
1346 | dnl HAVE_SRC_SUBDIR= | |
1347 | dnl fi | |
1348 | dnl AC_SUBST([HAVE_SRC_SUBDIR]) | |
1349 | ||
2bbbadd1 | 1350 | dnl ------------------------------------------------------------------ |
7233bc62 | 1351 | AC_MSG_NOTICE([---------------------------------------------- ]) |
1352 | AC_MSG_NOTICE([ build summary ]) | |
1353 | AC_MSG_NOTICE([---------------------------------------------- ]) | |
1354 | ||
b521659f | 1355 | AC_CONFIG_FILES([Makefile |
1356 | BASE/Makefile | |
53feaef5 | 1357 | BASE/setenv.sh |
1358 | BASE/setenv.csh | |
2be16a33 | 1359 | BASE/HOMER/Makefile |
242bb794 | 1360 | BASE/util/Makefile |
4b31e06b | 1361 | BASE/util/test/Makefile |
d098ebd4 | 1362 | BASE/interface/Makefile |
853121af | 1363 | BASE/test/Makefile |
1a21074a | 1364 | BASE/interface/test/Makefile |
b521659f | 1365 | doc/Makefile |
2efb85be | 1366 | doc/doxygen.conf |
1367 | doc/doxymodule.conf]) | |
b521659f | 1368 | |
7233bc62 | 1369 | dnl AliRoot and installation directory for libraries |
1370 | dnl | |
1371 | AC_MSG_NOTICE([AliRoot: $have_aliroot]) | |
1372 | AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" ) | |
1373 | if test "x$have_aliroot" != "xno"; then | |
1374 | AC_CONFIG_FILES([sim/Makefile | |
1375 | rec/Makefile | |
652cf9d2 | 1376 | rec/test/Makefile |
436c2d0c | 1377 | rec/startAliEVE-barrel-tracks.sh |
7233bc62 | 1378 | shuttle/Makefile |
ff4edcee | 1379 | pendolino/Makefile |
ce5f90bf | 1380 | benchmark/Makefile |
ed292d06 | 1381 | QA/Makefile |
7233bc62 | 1382 | ]) |
1383 | fi | |
1384 | if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then | |
1385 | libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET | |
1386 | AC_MSG_NOTICE([libdir set to $libdir]) | |
1387 | fi | |
1388 | ||
1389 | AC_MSG_NOTICE([compile sample library: $enable_sample]) | |
1390 | if test "x$enable_sample" = "xyes"; then | |
1391 | AC_CONFIG_FILES([SampleLib/Makefile]) | |
1392 | fi | |
1393 | ||
652cf9d2 | 1394 | AC_MSG_NOTICE([compile RCU library: $enable_rcu]) |
1395 | if test "x$enable_rcu" = "xyes"; then | |
1396 | AC_CONFIG_FILES([RCU/Makefile | |
1397 | RCU/test/Makefile | |
1398 | ]) | |
1399 | fi | |
1400 | ||
7233bc62 | 1401 | AC_MSG_NOTICE([compile TPC library: $enable_tpc]) |
1402 | if test "x$enable_tpc" = "xyes"; then | |
1403 | AC_CONFIG_FILES([TPCLib/Makefile | |
1404 | TPCLib/test/Makefile | |
1405 | TPCLib/mapping2array.cxx | |
b658d7e4 | 1406 | TPCLib/EVE/Makefile |
32e0c022 | 1407 | TPCLib/calibration/Makefile |
7233bc62 | 1408 | ]) |
1409 | fi | |
1410 | ||
fe8738cf | 1411 | AC_MSG_NOTICE([compile CALO library: $enable_calo]) |
1412 | if test "x$enable_calo" = "xyes"; then | |
1413 | AC_CONFIG_FILES([CALO/Makefile | |
1414 | CALO/test/Makefile]) | |
1415 | fi | |
1416 | ||
7233bc62 | 1417 | AC_MSG_NOTICE([compile PHOS library: $enable_phos]) |
1418 | if test "x$enable_phos" = "xyes"; then | |
1419 | AC_CONFIG_FILES([PHOS/Makefile]) | |
1420 | fi | |
1421 | ||
fe8738cf | 1422 | AC_MSG_NOTICE([compile EMCAL library: $enable_emcal]) |
1423 | if test "x$enable_emcal" = "xyes"; then | |
1424 | AC_CONFIG_FILES([EMCAL/Makefile]) | |
1425 | fi | |
1426 | ||
7233bc62 | 1427 | AC_MSG_NOTICE([compile TRD library: $enable_trd]) |
1428 | if test "x$enable_trd" = "xyes"; then | |
1429 | AC_CONFIG_FILES([TRD/Makefile]) | |
1430 | fi | |
1431 | ||
50a3793d | 1432 | AC_MSG_NOTICE([compile FMD library: $enable_fmd]) |
1433 | if test "x$enable_fmd" = "xyes"; then | |
1434 | AC_CONFIG_FILES([FMD/Makefile]) | |
1435 | fi | |
1436 | ||
7233bc62 | 1437 | AC_MSG_NOTICE([compile MUON library: $enable_muon]) |
1438 | if test "x$enable_muon" = "xyes"; then | |
1439 | AC_CONFIG_FILES([MUON/Makefile]) | |
1440 | fi | |
1441 | ||
1442 | AC_MSG_NOTICE([compile ITS library: $enable_its]) | |
1443 | if test "x$enable_its" = "xyes"; then | |
1444 | AC_CONFIG_FILES([ITS/Makefile]) | |
1445 | fi | |
1446 | ||
1447 | AC_MSG_NOTICE([compile trigger library: $enable_trigger]) | |
1448 | if test "x$enable_trigger" = "xyes"; then | |
0a76630e | 1449 | AC_CONFIG_FILES([trigger/Makefile |
1450 | trigger/test/Makefile]) | |
7233bc62 | 1451 | fi |
1452 | ||
ec6160d5 | 1453 | AC_MSG_NOTICE([compile global library: $enable_global]) |
1454 | if test "x$enable_global" = "xyes"; then | |
1455 | AC_CONFIG_FILES([global/Makefile]) | |
1456 | fi | |
1457 | ||
33daad3d | 1458 | AC_MSG_NOTICE([compile jet library: $enable_jet]) |
1459 | if test "x$enable_jet" = "xyes"; then | |
1460 | AC_CONFIG_FILES([JET/Makefile]) | |
1461 | fi | |
1462 | ||
7233bc62 | 1463 | AC_MSG_NOTICE([compile comp library: $enable_comp]) |
1464 | if test "x$enable_comp" = "xyes"; then | |
1465 | AC_CONFIG_FILES([comp/Makefile]) | |
1466 | fi | |
b521659f | 1467 | |
1468 | AC_OUTPUT | |
1469 | dnl | |
1470 | dnl EOF | |
1471 | dnl | |
1472 |