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