1 dnl -*- mode: autoconf -*-
4 dnl template for the configuration script for the Alice HLT
5 dnl framework and components
7 dnl ------------------------------------------------------------------
9 dnl Take either the AliRoot tag as version id or the current revision
10 AC_INIT([Alice High Level Trigger] ,
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 \
18 echo -n invalid-version; \
20 [Matthias.Richter@ift.uib.no],
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
27 if test "`dirname $0`" = "." ; then
28 AC_ERROR([please run the script from a separate build directory])
31 dnl ------------------------------------------------------------------
33 AC_PREFIX_DEFAULT(${PWD})
34 AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
35 AM_INIT_AUTOMAKE([-Wno-portability])
43 AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
45 dnl ------------------------------------------------------------------
46 dnl A warning posted into the auto-generated files
47 dnl Does NOT concern this file ;-)
48 AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
49 AC_SUBST([AUTOGENERATED_WARNING])
51 dnl ------------------------------------------------------------------
55 ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
56 AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
58 ROOTBINDIR=`dirname $ROOTEXEC`
59 AC_SUBST([ROOTBINDIR])
61 dnl test for additional required root libraries and headers
63 if test "x$have_root" = "x1"; then
65 save_CPPFLAGS=$CPPFLAGS
68 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
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
76 # - from Jan 07 libESD also depends on libXMLIO
77 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
78 # - libCDB.so depends on libXMLParser since Mar 11 2009 r 31411
79 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer XMLParser'
80 for CHECKLIB in $ROOT_CHECKLIBS ; do
81 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
82 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
83 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
86 # TBuffer.h has been made pure virtual in root v5-15-02 and one
87 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
88 AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE])
90 # TView.h has been made pure virtual right after root v5-15-02 and one
91 # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
92 AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D])
94 CPPFLAGS=$save_CPPFLAGS
100 dnl ------------------------------------------------------------------
101 # TODO: make this configurable through arguments
102 #Define whether you want to run with ALIROOT or only ROOT
103 AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
104 ALIHLT_USEPACKAGE=ALIROOT
105 #ALIHLT_USEPACKAGE=ROOT
106 #ALIHLT_USEPACKAGE=STANDALONE
107 AC_DEFINE(use_aliroot)
109 CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
110 save_CPPFLAGS=$CPPFLAGS
111 save_LDFLAGS=$LDFLAGS
114 dnl ------------------------------------------------------------------
115 dnl check for AliRoot features
118 AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
119 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
122 if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
123 dnl ------------------------------------------------------------------
124 dnl Try to estimate the system architecture
125 case $host_os:$host_cpu in
126 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
127 linux*) alice_target='linux' ;;
128 *) alice_target='unknown' ;;
130 if test "x$alice_target" = "xunknown" ; then
131 if test -z $ALICE_TARGET ; then
132 AC_MSG_ERROR([Can not estimate system architecture.
133 To avoid the problem, set the ALICE_TARGET variable appropriately.
134 Please send the following information to Matthias.Richter@ift.uib.no:
135 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
137 AC_MSG_NOTICE([Unknown system architecture.
138 Please send the following information to Matthias.Richter@ift.uib.no:
139 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
142 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
143 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
144 overriding $ALICE_TARGET by $alice_target])
146 ALICE_TARGET=$alice_target
148 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
149 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
150 ALIROOTINCDIR=${ALICE_ROOT}/include
151 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
152 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
153 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
156 AC_MSG_CHECKING([for AliRoot])
157 if test "x$ALICE_ROOT" != "x" \
158 && test -d ${ALIROOTBINDIR} \
159 && test -d ${ALIROOTLIBDIR} \
160 && test -d ${ALIROOTINCDIR}; then
161 have_aliroot=$ALICE_ROOT
167 AC_MSG_RESULT([$have_aliroot])
169 if test ! "x$have_aliroot" = "xno" ; then
170 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
171 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
172 ALIROOT_LIBS="$ADD_ROOTLIBS"
173 save_CPPFLAGS=$CPPFLAGS
174 save_LDFLAGS=$LDFLAGS
176 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
177 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
179 # check for certain AliRoot libraries/files/features
180 # libSTEERBase present since Aug 7 2007
181 # ###########################################
182 # temporary workaround for circular dependency libSTEERbase libSTEER
183 # https://savannah.cern.ch/bugs/index.php?49914
184 # disable the sequence of checks and load libraries in parallel
185 ALIROOT_LIBS="$ALIROOT_LIBS -lAOD -lCDB -lRAWDatabase -lRAWDatarec -lESD -lSTEER"
186 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
188 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
190 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
192 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
194 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
195 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
197 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
199 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
201 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
203 AC_CHECK_LIB([$CHECKLIB],[_init],
204 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
205 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lESD -lSTEER"
207 AC_CHECK_LIB([$CHECKLIB],[_init],
208 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
209 have_alirawdata=$CHECKLIB])],
210 [# second pass with -RAWData
212 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
213 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
214 #include <AliRawReaderFile.h>
215 #include <AliRawReaderDate.h>
216 #include <AliRawReaderRoot.h>],
217 [AliRawReaderMemory mreader;
218 AliRawReaderFile freader;
219 AliRawReaderDate dreader(NULL,0);
220 AliRawReaderRoot rreader(NULL,0);])],
221 [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
222 have_alirawdata=$CHECKLIB],
223 [have_alirawdata=no])
224 ]) dnl AC_CHECK_LIB RAWDatabase
225 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
226 AC_MSG_RESULT([$have_alirawdata])
228 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
230 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
232 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
234 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
237 dnl check whether AliLog supports notification callback
238 dnl 2010-03-03: revision 38921 introduces AliLog::GetRootLogger in order to make AliLog
239 dnl a pure sigleton, introduce a 2-level check here
241 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
242 have_alilog_notification=no
243 if test ! "x$have_aliroot" = "xno" ; then
244 AC_MSG_CHECKING([whether AliLog supports notification callback])
245 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
246 [AliLog* logger=AliLog::GetRootLogger();])],
247 [have_alilog_notification=yes],
248 [AC_DEFINE(NO_ALILOG_GETROOTLOGGER)
249 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
250 [AliLog::AliLogNotification fct])],
251 [have_alilog_notification=yes],
252 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
254 AC_MSG_RESULT([$have_alilog_notification])
257 if test "x$have_aliroot" = "xno" ; then
258 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
259 # but library dependencies might not be resolved completely
261 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
262 This can happen from time to time due to development in AliRoot. You can
263 force compilation of detector libs by --enable-<detector>, but be aware
264 of unresolved references at runtime.])
265 AC_MSG_WARN([ ------------------------------------------ ])
266 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
267 AC_MSG_WARN([ please include config.log ])
268 AC_MSG_WARN([ ------------------------------------------ ])
274 dnl ESD supports non-std content
277 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>
278 #include <AliExternalTrackParam.h>
280 #include <TClonesArray.h>],
282 esd.CreateStdContent();
283 TTree* tree=new TTree("esdTree", "Tree with HLT ESD objects");
284 TClonesArray* a=new TClonesArray("AliExternalTrackParam");
285 a->SetName("SomeObject");
287 esd.WriteToTree(tree);
288 if (!tree->FindBranch("SomeObject")) return 1;
290 [have_esd_nonstd=yes],
291 [AC_DEFINE(HAVE_NOT_ESD_NONSTD)])
292 AC_MSG_CHECKING(whether ESD supports non standard content)
293 AC_MSG_RESULT([$have_esd_nonstd])
296 dnl ESD copy function added May 9 2008 rev 25667
298 if test "x$have_esd_nonstd" != "xyes"; then
300 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>],
305 [AC_DEFINE(HAVE_NOT_ESD_COPY)])
306 AC_MSG_CHECKING(for ESD assignment operator)
307 AC_MSG_RESULT([$have_esd_copy])
311 dnl AliRawReaderMemory support for multiple buffers added
312 dnl revision 26829 Jun 2008
314 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW"
315 have_rawreadermemory_multbuffers=no
316 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>],
317 [AliRawReaderMemory rr;
318 rr.AddBuffer(NULL, 0, 0);])],
319 [have_rawreadermemory_multbuffers=yes],
320 [AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)])
321 AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers)
322 AC_MSG_RESULT([$have_rawreadermemory_multbuffers])
325 dnl Changes in the magnetic field implementation
326 dnl revision 30848 Feb 1 2009
328 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
330 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMagF.h>],
331 [int test=AliMagF::k5kG;])],
332 [have_alimagf30848=yes],
333 [AC_DEFINE(HAVE_NOT_ALIMAGF30848)])
334 AC_MSG_CHECKING(AliMagF contains field definitions)
335 AC_MSG_RESULT([$have_alimagf30848])
338 dnl Cleanup of the RunLoader implementation
339 dnl revision 30859 Feb 2 2009
341 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
342 have_alirunloader30859=no
343 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRunLoader.h>],
344 [AliRunLoader* rl=AliRunLoader::Instance();])],
345 [have_alirunloader30859=yes],
346 [AC_DEFINE(HAVE_NOT_ALIRUNLOADER30859)])
347 AC_MSG_CHECKING(AliRunLoader::Instance)
348 AC_MSG_RESULT([$have_alirunloader30859])
351 AC_CHECK_HEADER([AliQAv1.h], [have_aliqav1=yes], [])
352 AM_CONDITIONAL(EN_HLT_QA, test x$have_aliqav1 = xyes)
353 AC_CHECK_HEADER([AliESDHLTDecision.h], [], [AC_DEFINE(HAVE_NOT_ALIESDHLTDECISION)])
356 dnl required header files and libraries for modules
360 dnl Check for the interface of AliExternalTrackParam which has been changed
361 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
363 externaltrackparam_version=1
364 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
365 [AliExternalTrackParam trackparam;
366 Double_t param[[5]]; Double_t covar[[15]];
367 trackparam.Set(0., 0., param, covar);])],
368 [externaltrackparam_version=2],
369 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
370 AC_MSG_CHECKING(for version of AliExternalTrackParam)
371 AC_MSG_RESULT($externaltrackparam_version)
373 dnl The AliShuttleInterface was changed in rev 29388. Some return types
374 dnl had been const, now changed according to gcc 4.3 warnings
375 AC_MSG_CHECKING(for version of AliShuttleInterface.h)
376 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/"
377 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
378 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
379 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliShuttleInterface.h>],
380 [class dummy : public AliShuttleInterface {
382 const UInt_t GetStartTimeDCSQuery() {;}
384 [AC_DEFINE(SHUTTLE_PRE_REV29388_INTERFACE)
385 alishuttleinterface_version=pre.rev.29388],
386 [alishuttleinterface_version=up.to.date])
387 AC_MSG_RESULT([$alishuttleinterface_version])
389 CPPFLAGS=$save_CPPFLAGS
390 LDFLAGS=$save_LDFLAGS
392 fi # if test ! "x$have_aliroot" = "xno"
395 AC_SUBST([ALICE_ROOT])
396 AC_SUBST([ALIROOT_CPPFLAGS])
397 AC_SUBST([ALIROOT_LDFLAGS])
398 AC_SUBST([ALIROOTBINDIR])
399 AC_SUBST([ALIROOTLIBDIR])
401 ALIROOT_LIBS="$ALIROOT_LIBS $ADD_ROOTLIBS"
402 AC_SUBST([ALIROOT_LIBS])
403 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
405 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
407 AC_SUBST([HLTBASE_CPPFLAGS])
408 AC_SUBST([HLTBASE_LDFLAGS])
410 dnl ------------------------------------------------------------------
411 dnl check for the HLT PubSub Framework
412 dnl namely for the existence of the HOMER library
413 dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
414 dnl package. It os though possible to choose an external. library
415 dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
416 dnl got the name libAliHLTHOMER
417 AC_MSG_CHECKING([for HLT PubSub Framework])
418 AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
420 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
421 if test -z $with_pubsub || ! test -d $with_pubsub ; then
424 AC_MSG_RESULT([$with_pubsub])
428 AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
429 if test "x$with_pubsub" != "xno" ; then
430 save_CPPFLAGS=$CPPFLAGS
431 save_LDFLAGS=$LDFLAGS
433 # currently the different versions of the HLT PubSub framework have a different
435 if test -d ${with_pubsub}/include/HOMER ; then
436 # the 'early' location of the include files with separated HOMER sub dirs
437 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
438 elif test -d ${with_pubsub}/include/Util/HOMER ; then
439 # location for HLT Framework versions after Sep 2006
440 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
441 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
442 # fall back if include files were not installed (versions after Sep 06)
443 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
445 # fall back if include files were not installed (versions before Sep 06)
446 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
448 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
450 AC_ARG_ENABLE(pubsub-debug,
451 [AC_HELP_STRING([--disable-pubsub-debug],
452 [force the production version of the PubSub framework])],
453 [],[enable_pubsub_debug=yes])
455 HOMER_TARGET="`uname -s`-`uname -m`"
456 AC_MSG_CHECKING([for HLT PubSub Framework release type])
457 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
458 homer_type="production"
459 HOMER_TARGET="${HOMER_TARGET}-release"
460 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
462 HOMER_TARGET="${HOMER_TARGET}-debug"
464 AC_MSG_RESULT([${homer_type}])
465 HOMERREADER_HEADER=HOMERReader.h
466 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
467 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
468 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
469 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
470 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
474 AC_CHECK_HEADER([$HOMERREADER_HEADER],
475 [ AC_CHECK_LIB([HOMER],[_init],
477 HOMER_LIBS="-lHOMER"],
478 [ AC_CHECK_LIB([HOMERReader],[_init],
480 HOMER_LIBS="-lHOMERReader"])])
481 LIBS="$LIBS $HOMER_LIBS"
482 AC_MSG_CHECKING([version of HOMER library])
483 dnl The Homer library has no versioning, so we do our own
484 dnl version description
485 dnl ----------------------------------------------------------------------
486 dnl 1 inintial version
487 dnl 2 GetBlockStatusFlags added to the interface
488 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
489 [HOMERReader reader("dummy", 0);
490 reader.GetBlockStatusFlags(0);])],
493 AC_MSG_RESULT([$HOMER_VERSION])
495 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
499 dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
501 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
502 HOMERREADER_HEADER=AliHLTHOMERReader.h
503 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
509 if test "x$with_homer" = "xno" ; then
514 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
515 AC_DEFINE(HAVE_HOMERREADER)
517 CPPFLAGS="$save_CPPFLAGS"
518 LDFLAGS="$save_LDFLAGS"
521 AC_SUBST([HOMERREADER_HEADER])
522 AC_SUBST([HOMER_INBUILT_LIB])
523 AC_SUBST([HOMER_CPPFLAGS])
524 AC_SUBST([HOMER_LDFLAGS])
525 AC_SUBST([HOMER_LIBDIR])
526 AC_SUBST([HOMER_BINDIR])
527 AC_SUBST([HOMER_LIBS])
529 dnl ------------------------------------------------------------------
531 [AC_HELP_STRING([--disable-all],
532 [disable all detector modules, individual modules can be switched on by --enable-det])],
533 [disable_all=yes],[])
535 dnl ------------------------------------------------------------------
536 AC_MSG_CHECKING([whether to impose strict coding conventions])
537 AC_ARG_ENABLE(strict,
538 [AC_HELP_STRING([--disable-strict],
539 [disable coding convention checks ])],
540 [],[enable_strict=yes])
541 if test "x$enable_strict" = "xyes" ; then
542 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
544 AC_MSG_RESULT([$enable_strict])
546 dnl ------------------------------------------------------------------
547 AC_MSG_CHECKING([whether to enable component statistics])
548 AC_ARG_ENABLE(component-stat,
549 [AC_HELP_STRING([--enable-component-stat],
550 [enable component statistics ])],
553 dnl enable component statistics if not explicitely disabled
554 if test "x$enable_component_stat" != "xno" &&
555 test "x$enable_debug" = "xyes" ; then
556 enable_component_stat=yes.debug
559 if test "x$enable_component_stat" = "x" ; then
560 enable_component_stat=no
563 if test "x$enable_component_stat" != "xno" ; then
564 AC_DEFINE(HLT_COMPONENT_STATISTICS)
566 AC_MSG_RESULT([$enable_component_stat])
568 dnl ------------------------------------------------------------------
569 dnl ---- module checks
570 dnl ------------------------------------------------------------------
571 save_CPPFLAGS=$CPPFLAGS
572 save_LDFLAGS=$LDFLAGS
575 dnl ------------------------------------------------------------------
576 AC_MSG_NOTICE([-------------------------------------------------])
577 AC_MSG_NOTICE([checking dependencies for HLTbase library])
578 HLTBASE_CHECKLIBS='XMLParser'
579 for CHECKLIB in $HLTBASE_CHECKLIBS ; do
580 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
581 LIBS="$save_LIBS $ROOTLIBS $ALIHLTBASE_LIBS"
582 AC_CHECK_LIB([$CHECKLIB],[_init], [ALIHLTBASE_LIBS="$ALIHLTBASE_LIBS -l$CHECKLIB"])
584 AC_SUBST([ALIHLTBASE_LIBS])
586 dnl ------------------------------------------------------------------
587 AC_MSG_CHECKING([whether to compile sample library])
588 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
589 AC_ARG_ENABLE(sample,
590 [AC_HELP_STRING([--disable-sample],
591 [compile the sample library ])],
593 [if test "x$have_aliroot" = "xno" ; then
594 enable_sample="no...requires.AliRoot"
600 if test "x$enable_sample" = "xyes" ; then
601 AC_DEFINE(HLT_SAMPLE)
603 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
604 AC_MSG_RESULT([$enable_sample])
606 dnl ------------------------------------------------------------------
607 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
609 CHECK_HLTMODULE([util],
611 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/RAW -I$ALICE_ROOT/PYTHIA6],
612 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
613 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
614 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
616 if test "x$enable_module" = "xmissheader"; then
617 enable_module="no...missing.headers"
618 enable_util=$enable_module
619 elif test "x$enable_module" = "xforce"; then
622 enable_util=$enable_module
624 if test "x$enable_util" = "xyes" ; then
626 ALIUTIL_LIBS=$ALIHLTMODULE_LIBS
628 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
629 AC_MSG_CHECKING([whether to compile Util library])
630 AC_MSG_RESULT([$enable_module])
631 AC_SUBST([ALIUTIL_LIBS])
633 dnl ------------------------------------------------------------------
634 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
637 CHECK_HLTMODULE([tpc],
639 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
640 [Gui ANALYSIS STAT], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
641 [TPCbase TPCrec TPCcalib], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
642 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
644 if test "x$enable_module" = "xmissheader"; then
645 enable_module="no...missing.headers"
646 enable_tpc=$enable_module
647 elif test "x$enable_module" = "xforce"; then
650 enable_tpc=$enable_module
653 if test "x$enable_tpc" = "xyes" ; then
656 ALITPC_LIBS=$ALIHLTMODULE_LIBS
658 dnl Check for functionality in the TPC reconstruction required for online
661 have_tpc_hltoffline_rec=no
662 AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
663 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
664 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
665 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
666 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
667 #include <AliTPCclustererMI.h>
668 #include <TObjArray.h>],
669 [AliTPCtrackerMI tracker;
670 TObjArray* array=NULL;
671 tracker.LoadClusters(array);
672 AliTPCclustererMI cl(NULL, NULL);
673 cl.GetOutputClonesArray();])],
674 [have_tpc_hltoffline_rec=yes],
675 [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
676 AC_MSG_RESULT([$have_tpc_hltoffline_rec])
678 have_alitpcclusterparam_r40128=no
679 AC_MSG_CHECKING([checking for AliTPCClusterParam r40128])
680 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTPCClusterParam.h>],
681 [AliTPCClusterParam param;
682 float test=param.ParamS0Par(0,0,0)]);],
683 [have_alitpcclusterparam_r40128=yes],
684 [AC_DEFINE(HAVE_NOT_ALITPCCLUSTERPARAM_r40128)])
685 AC_MSG_RESULT([$have_alitpcclusterparam_r40128])
690 AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
691 AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
692 AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)])
695 if test ! "x$have_aliroot" = "xno" ; then
696 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
697 # which is stored in the TPC/mapping/Patchx.data files from
698 # AliRoot version v4-04-Release (May 2006)
699 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
700 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
701 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
702 [have_tpc_mapping=yes
703 AC_SUBST(TPC_PAD_MAPPING_PATH)
704 AC_DEFINE(HAVE_TPC_MAPPING)],
708 AC_MSG_CHECKING([for TPC mapping layout])
709 AC_MSG_RESULT([$have_tpc_mapping])
713 enable_module=$enable_tpc
715 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
716 AC_MSG_CHECKING([whether to compile TPC library])
717 AC_MSG_RESULT([$enable_module])
718 AC_SUBST([ALITPC_LIBS])
720 dnl ------------------------------------------------------------------
721 AH_TEMPLATE([HLT_RCU],[hlt rcu library])
723 CHECK_HLTMODULE([rcu],
725 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
726 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
727 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
728 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
730 if test "x$enable_module" = "xmissheader"; then
731 enable_module="no...missing.headers"
732 enable_rcu=$enable_module
733 elif test "x$enable_module" = "xforce"; then
737 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
738 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
739 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
740 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>],
741 [AliAltroDecoder decoder;
742 decoder.CopyBackward(NULL, 0);])],
743 [enable_rcu=$enable_module],
744 [enable_module="no...requires.AliRoot>v4-10-Release"
745 enable_rcu="no...requires.AliRoot>v4-10-Release"])
746 CPPFLAGS=$save_CPPFLAGS
747 LDFLAGS=$save_LDFLAGS
752 if test "x$enable_rcu" = "xyes" ; then
755 enable_module=$enable_rcu
757 AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
758 AC_MSG_CHECKING([whether to compile RCU library])
759 AC_MSG_RESULT([$enable_module])
760 AC_SUBST([ALIRCU_LIBS])
762 dnl ------------------------------------------------------------------
763 AH_TEMPLATE([HLT_CALO],[hlt calo(rimeter) library])
766 CHECK_HLTMODULE([calo],
767 [], [$ALIROOT_CPPFLAGS],
768 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
769 [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
770 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
772 if test "x$enable_module" = "xmissheader"; then
773 enable_module="no...missing.headers"
774 enable_calo=$enable_module
775 elif test "x$enable_module" = "xforce"; then
778 have_alicalorawstream=no
779 if test ! "x$have_aliroot" = "xno" ; then
781 save_CPPFLAGS="$CPPFLAGS"
782 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
783 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
784 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
785 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
786 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
787 #include <AliCaloRawStream.h>],
789 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
790 have_alicalorawstream=yes],
792 AC_MSG_RESULT([$have_alicalorawstream])
794 CPPFLAGS="$save_CPPFLAGS"
796 if test "x$have_alicalorawstream" != "xyes"; then
797 enable_calo="no...requires.AliRoot>v4-05-07"
799 enable_calo=$enable_module
803 if test "x$enable_calo" = "xyes" ; then
805 ALICALO_LIBS=$ALIHLTMODULE_LIBS
807 enable_module=$enable_calo
809 AM_CONDITIONAL(EN_HLT_CALO, test x$enable_calo = xyes)
810 AC_MSG_CHECKING([whether to compile CALO library])
811 AC_MSG_RESULT([$enable_module])
812 AC_SUBST([ALICALO_LIBS])
814 dnl ------------------------------------------------------------------
815 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
818 CHECK_HLTMODULE([phos],
819 [], [$ALIROOT_CPPFLAGS],
820 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
821 [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
822 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
824 if test "x$enable_module" = "xmissheader"; then
825 enable_module="no...requires.AliRoot>v4-05-07"
826 enable_phos=$enable_module
827 elif test "x$enable_module" = "xforce"; then
830 have_alicalorawstream=no
831 if test ! "x$have_aliroot" = "xno" ; then
833 save_CPPFLAGS="$CPPFLAGS"
834 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
835 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
836 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
837 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
838 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
839 #include <AliCaloRawStream.h>],
841 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
842 have_alicalorawstream=yes],
844 AC_MSG_RESULT([$have_alicalorawstream])
845 AC_MSG_CHECKING([for required EMC functionality in AliPHOSRecoParam.h ])
846 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliPHOSRecoParam.h>],
847 [AliPHOSRecoParam param;
848 param.GetEMCClusteringThreshold()])],
849 [have_aliphosrecoparam=yes],
850 [AC_DEFINE(HAVE_NOT_PHOSRECOPARAMEMC)])
851 AC_MSG_RESULT([$have_aliphosrecoparam])
853 CPPFLAGS="$save_CPPFLAGS"
855 if test "x$have_alicalorawstream" != "xyes"; then
856 enable_phos="no...requires.AliRoot>v4-05-07"
858 enable_phos=$enable_module
862 if test "x$enable_phos" = "xyes" ; then
864 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
866 enable_module=$enable_phos
868 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
869 AC_MSG_CHECKING([whether to compile PHOS library])
870 AC_MSG_RESULT([$enable_module])
871 AC_SUBST([ALIPHOS_LIBS])
873 dnl ------------------------------------------------------------------
874 AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
877 CHECK_HLTMODULE([emcal],
878 [], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/EMCAL -I$ALICE_ROOT/VZERO],
879 [RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
880 [EMCALrec EMCALsim EMCALbase EMCALUtils VZERObase], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
881 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
883 if test "x$enable_module" = "xmissheader"; then
884 enable_module="no...header.missing"
885 enable_emcal=$enable_module
886 elif test "x$enable_module" = "xforce"; then
889 enable_emcal=$enable_module
892 if test "x$enable_emcal" = "xyes" ; then
894 ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
896 enable_module=$enable_emcal
898 AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
899 AC_MSG_CHECKING([whether to compile EMCAL library])
900 AC_MSG_RESULT([$enable_module])
901 AC_SUBST([ALIEMCAL_LIBS])
903 dnl ------------------------------------------------------------------
904 AH_TEMPLATE([HLT_TRD],[hlt trd library])
907 CHECK_HLTMODULE([trd],
909 [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
910 [STAT TRDbase TRDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
911 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
913 if test "x$enable_module" = "xmissheader"; then
914 enable_module="no...requires.AliRoot>v4-07-Release"
915 enable_trd=$enable_module
916 elif test "x$enable_module" = "xforce"; then
919 enable_trd=$enable_module
920 if test "x$enable_trd" = "xyes" ; then
922 save_CPPFLAGS="$CPPFLAGS"
923 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
924 # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release
925 # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008
926 # changed to AliTRDReconstructor::SetStreamLevel() due to revision 27797, Tue Aug 5 2008
927 # changed to AliTRDReconstructor::SetClusters() according to revision 28069, Mon Aug 18 2008
928 # changed to AliTRDCluster according to revision 30461, Thu Dec 18 2008
929 # changed to AliTRDclusterizer::GetAddedClusters according to revision 31299, Wed Mar 4 2009
930 # changed to AliTRDclusterizer::GetNTimeBins according to revision 37102 Sun Nov 22 2009
931 AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
932 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
933 [AliTRDclusterizer c;
936 [enable_trd="no...requires.AliRoot>v4-18-Release"])
937 AC_MSG_RESULT([$enable_trd])
939 if test "x$enable_trd" = "xyes" ; then
940 have_alitrdseedv1_r39693=no
941 AC_MSG_CHECKING([checking for AliTRDseedV1 r39693])
942 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDseedV1.h>],
944 seed.SetC(0.0, 1)]);],
945 [have_alitrdseedv1_r39693=yes],
946 [AC_DEFINE(HAVE_NOT_ALITRD_SEEDV1_r39693)])
947 AC_MSG_RESULT([$have_alitrdseedv1_r39693])
949 have_alitrdrawstream_r39608=no
950 AC_MSG_CHECKING([checking for AliTRDrawStream r39608])
951 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDrawStreamBase.h>],
952 [AliTRDrawStreamBase::SetRawStreamVersion(AliTRDrawStreamBase::kTRDdefaultStream)]);],
953 [have_alitrdrawstream_r39608=yes],
954 [AC_DEFINE(HAVE_NOT_ALITRD_RAWSTREAM_r39608)])
955 AC_MSG_RESULT([$have_alitrdrawstream_r39608])
959 CPPFLAGS="$save_CPPFLAGS"
963 if test "x$enable_trd" = "xyes" ; then
965 ALITRD_LIBS=$ALIHLTMODULE_LIBS
967 enable_module=$enable_trd
969 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
970 AC_MSG_CHECKING([whether to compile TRD library])
971 AC_MSG_RESULT([$enable_module])
972 AC_SUBST([ALITRD_LIBS])
974 dnl ------------------------------------------------------------------
975 AH_TEMPLATE([HLT_FMD],[hlt fmd library])
977 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
978 CHECK_HLTMODULE([fmd],
980 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
981 [FMDbase FMDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
982 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
984 if test "x$enable_module" = "xmissheader"; then
985 enable_module="no...missing.headers"
986 enable_fmd=$enable_module
987 elif test "x$enable_module" = "xforce"; then
990 enable_fmd=$enable_module
993 if test "x$enable_fmd" = "xyes" ; then
995 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
997 enable_module=$enable_fmd
999 AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
1000 AC_MSG_CHECKING([whether to compile FMD library])
1001 AC_MSG_RESULT([$enable_module])
1002 AC_SUBST([ALIFMD_LIBS])
1004 dnl ------------------------------------------------------------------
1005 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
1008 CHECK_HLTMODULE([dimuon],
1009 [AliMpExMap.h AliMUONTriggerIO.h],
1010 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
1011 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1012 [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1013 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1015 if test "x$enable_module" = "xmissheader"; then
1016 enable_module="no...requires.AliRoot>=v4-08-Release"
1017 enable_muon=$enable_module
1018 elif test "x$enable_module" = "xforce"; then
1021 enable_muon=$enable_module
1024 if test "x$enable_muon" = "xyes" ; then
1026 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
1028 save_CPPFLAGS="$CPPFLAGS"
1031 dnl Check for functionality GetRawStream AliMUONDigitMaker.h
1033 have_muon_digitmaker_getrawstream=no
1034 AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker)
1035 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON"
1036 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
1037 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
1038 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>],
1039 [AliMUONDigitMaker dm;
1040 dm.GetRawStreamTracker();])],
1041 [have_muon_digitmaker_getrawstream=yes],
1042 [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
1044 AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
1047 dnl Check for AliMpPad::GetPositionX/Y
1048 dnl change of implementation in MUON code
1049 dnl revision 31769, Wed Apr 1 2009
1051 have_muon_alimppad_getposition=no
1052 AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
1053 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
1054 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
1055 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
1056 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>],
1058 pad.GetPositionX();])],
1059 [have_muon_alimppad_getposition=yes],
1060 [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
1062 AC_MSG_RESULT([$have_muon_alimppad_getposition])
1064 CPPFLAGS="$save_CPPFLAGS"
1068 enable_module=$enable_muon
1070 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
1071 AC_MSG_CHECKING([whether to compile MUON library])
1072 AC_MSG_RESULT([$enable_module])
1073 AC_SUBST([ALIMUON_LIBS])
1075 dnl ------------------------------------------------------------------
1076 AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
1079 CHECK_HLTMODULE([trigger],
1080 [], [$ALIROOT_CPPFLAGS],
1081 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1082 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1083 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1085 if test "x$enable_module" = "xmissheader"; then
1086 enable_module="no...header.missing"
1087 enable_trigger=$enable_module
1088 elif test "x$enable_module" = "xforce"; then
1089 enable_trigger="yes"
1091 enable_trigger=$enable_module
1094 if test "x$enable_trigger" = "xyes" ; then
1095 AC_DEFINE(HLT_TRIGGER)
1096 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
1098 enable_module=$enable_trigger
1100 AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
1101 AC_MSG_CHECKING([whether to compile Trigger library])
1102 AC_MSG_RESULT([$enable_module])
1103 AC_SUBST([ALITRIGGER_LIBS])
1105 dnl ------------------------------------------------------------------
1106 AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
1109 CHECK_HLTMODULE([global],
1110 [], [$ALIROOT_CPPFLAGS],
1111 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1112 [PHOSUtils ], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1113 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1115 if test "x$enable_module" = "xmissheader"; then
1116 enable_module="no...header.missing"
1117 enable_global=$enable_module
1118 elif test "x$enable_module" = "xforce"; then
1121 enable_global=$enable_module
1122 if test "x$enable_global" = "xyes" ; then
1124 save_CPPFLAGS="$CPPFLAGS"
1125 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
1126 AC_MSG_CHECKING([for required functions in AliESDtrack])
1127 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliESDtrack.h>],
1129 t.SetGlobalChi2(0)])],
1131 [enable_global="no...requires.AliRoot>v4-17-Release"])
1132 AC_MSG_RESULT([$enable_global])
1134 CPPFLAGS="$save_CPPFLAGS"
1138 if test "x$enable_global" = "xyes" ; then
1139 AC_DEFINE(HLT_GLOBAL)
1140 ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
1142 enable_module=$enable_global
1144 AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
1145 AC_MSG_CHECKING([whether to compile Global library])
1146 AC_MSG_RESULT([$enable_module])
1147 AC_SUBST([ALIGLOBAL_LIBS])
1149 dnl ------------------------------------------------------------------
1150 AH_TEMPLATE([HLT_JET],[hlt jet library])
1153 ALIFASTJET_INCFLAGS=
1156 AC_ARG_WITH(fastjet, [installation path of the FASTJET package],
1157 [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet],
1158 [ test -n $FASTJET && with_fastjet=$FASTJET ])
1160 if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then
1161 ALIFASTJET_INCFLAGS="-I${with_fastjet}/include"
1162 ALIFASTJET_HEADER="fastjet/PseudoJet.hh"
1163 ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib"
1164 ALIFASTJET_LIBS="CGAL fastjet"
1169 CHECK_HLTMODULE([jet],
1170 [$ALIFASTJET_HEADER], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/JETAN $ALIFASTJET_INCFLAGS],
1171 [$ALIFASTJET_LIBS], [$ROOTLIBDIR $ALIFASTJET_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS],
1172 [AOD ESD ANALYSIS ANALYSISalice JETAN],
1173 [-L$ROOTLIBDIR $ALIROOT_LDFLAGS $ALIFASTJET_LDFLAGS -L$ALICE_ROOT/lib/tgt_$ALICE_TARGET],
1174 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1176 if test "x$enable_module" = "xmissheader"; then
1177 enable_module="no...header.missing"
1178 enable_jet=$enable_module
1179 elif test "x$enable_module" = "xforce"; then
1182 enable_jet=$enable_module
1185 if test "x$enable_jet" = "xyes" ; then
1187 ALIJET_LIBS="$ALIHLTMODULE_LIBS"
1189 if test "x$with_fastjet" != "xno"; then
1190 AC_DEFINE(HAVE_FASTJET)
1191 AC_DEFINE(WITHFASTJET)
1192 ALIJET_LIBS="$ALIJET_LIBS $FASTJET_LDFLAGS"
1194 AC_MSG_CHECKING([compilation with FASTJET package])
1195 AC_MSG_RESULT($with_fastjet)
1198 enable_module=$enable_jet
1201 AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
1202 AC_MSG_CHECKING([whether to compile Jet library])
1203 AC_MSG_RESULT([$enable_module])
1204 AC_SUBST([ALIJET_LIBS])
1206 dnl ------------------------------------------------------------------
1207 AH_TEMPLATE([HLT_ITS],[hlt its library])
1210 CHECK_HLTMODULE([its],
1211 [AliITSCompressRawDataSDD.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS],
1212 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1213 [ITSbase ITSrec ITSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1214 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1216 if test "x$enable_module" = "xmissheader"; then
1217 enable_module="no...header.missing"
1218 enable_its=$enable_module
1219 elif test "x$enable_module" = "xforce"; then
1222 enable_its=$enable_module
1223 if test "x$enable_its" = "xyes" ; then
1225 save_CPPFLAGS="$CPPFLAGS"
1226 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS"
1227 # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008
1228 # require AliVertexer::GetNominalPos()
1229 AC_MSG_CHECKING([for required functions in AliITSVertexer])
1230 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>],
1232 v.GetNominalPos()])],
1234 [enable_its="no...requires.AliRoot>v4-13-Release"])
1235 AC_MSG_RESULT([$enable_its])
1237 CPPFLAGS="$save_CPPFLAGS"
1241 if test "x$enable_its" = "xyes" ; then
1243 ALIITS_LIBS=$ALIHLTMODULE_LIBS
1245 enable_module=$enable_its
1247 AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
1248 AC_MSG_CHECKING([whether to compile ITS library])
1249 AC_MSG_RESULT([$enable_module])
1250 AC_SUBST([ALIITS_LIBS])
1252 dnl ------------------------------------------------------------------
1253 AH_TEMPLATE([HLT_COMP],[hlt comp library])
1256 CHECK_HLTMODULE([comp],
1257 [], [$ALIROOT_CPPFLAGS],
1258 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1259 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1260 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1262 if test "x$enable_module" = "xmissheader"; then
1263 enable_module="no...header.missing"
1264 enable_comp=$enable_module
1265 elif test "x$enable_module" = "xforce"; then
1268 enable_comp=$enable_module
1271 if test "x$enable_comp" = "xyes" ; then
1273 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
1275 enable_module=$enable_comp
1277 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
1278 AC_MSG_CHECKING([whether to compile comp library])
1279 AC_MSG_RESULT([$enable_module])
1280 AC_SUBST([ALICOMP_LIBS])
1282 dnl ------------------------------------------------------------------
1283 AC_MSG_CHECKING([whether to disable AliRoot logging])
1284 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
1285 AC_ARG_ENABLE(aliroot-logging,
1286 [AC_HELP_STRING([--disable-aliroot-logging],
1287 [disable logging through AliRoot logging methods])],
1288 [],[enable_aliroot_logging=no])
1289 if test "x$have_aliroot" = "xno" ; then
1290 enable_aliroot_logging=yes # this means 'disable'
1292 if test "x$enable_aliroot_logging" != "xno" ; then
1293 AC_DEFINE(NOALIROOT_LOGGING)
1295 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
1296 AC_MSG_RESULT([$enable_aliroot_logging])
1298 dnl ------------------------------------------------------------------
1299 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
1300 AH_TEMPLATE([DOMC],[MC saving])
1301 AC_ARG_ENABLE(mc-saving,
1302 [AC_HELP_STRING([--enable-mc-saving],
1303 [enable saving MC data through the chain])],
1304 [],[enable_mc_saving=no])
1305 if test "x$enable_mc_saving" = "xyes" ; then
1308 AC_MSG_RESULT([$enable_mc_saving])
1310 dnl ------------------------------------------------------------------
1311 dnl certainly something old, but we keep the define
1312 AC_MSG_CHECKING([whether to use ROWHOUGH])
1313 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
1314 AC_ARG_ENABLE(rowhough,
1315 [AC_HELP_STRING([--enable-rowhough],
1317 [],[enable_rowhough=no])
1318 if test "x$enable_rowhough" = "xyes" ; then
1319 AC_DEFINE(USEROWHOUGH)
1321 AC_MSG_RESULT([$enable_rowhough])
1323 dnl ------------------------------------------------------------------
1324 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
1325 dnl stand-alone build system. This is most likely something old we can
1326 dnl get rid off later, or do something more reasonable. Since the define
1327 dnl needs the quotes they have to be escaped. This works well for the
1328 dnl Makefile but not for the configure script. So we have to add the
1329 dnl defines after all the other checks.
1330 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
1331 if test ! "x$have_aliroot" = "xno" ; then
1332 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
1335 dnl ------------------------------------------------------------------
1339 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
1340 AC_PATH_PROG(PERL, perl)
1341 AC_PATH_PROG(DOXYGEN, doxygen)
1343 [AC_HELP_STRING([--enable-dot],
1344 [enable dot documentation generator])],
1348 AC_PATH_PROG(DOT, dot)
1349 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
1351 DOT_PATH=`dirname $DOT`
1354 AC_MSG_CHECKING([for documentation mode])
1356 [AC_HELP_STRING([--disable-doc],
1357 [disable documentation build; monolithic build --enable-doc=mono ])],
1358 [],[enable_doc=modules])
1360 if test "x$DOXYGEN" = "x" ; then
1361 enable_doc=no.doxygen
1362 elif test "x$enable_doc" = "xyes" ; then
1364 elif test ! "x$enable_doc" = "xmono" && \
1365 test ! "x$enable_doc" = "xmodules" && \
1366 test ! "x$enable_doc" = "xno"; then
1368 AC_MSG_WARN([unknown option])
1370 if test "x$enable_doc" = "xno" ; then
1375 AC_MSG_RESULT([$enable_doc])
1376 AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
1377 AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
1378 AC_SUBST([HAVE_DOT])
1379 AC_SUBST([DOT_PATH])
1381 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
1382 dnl echo $HAVE_SRC_SUBDIR
1383 dnl if ! test -d $HAVE_SRC_SUBDIR; then
1384 dnl HAVE_SRC_SUBDIR=
1386 dnl AC_SUBST([HAVE_SRC_SUBDIR])
1388 dnl ------------------------------------------------------------------
1389 AC_MSG_NOTICE([---------------------------------------------- ])
1390 AC_MSG_NOTICE([ build summary ])
1391 AC_MSG_NOTICE([---------------------------------------------- ])
1393 AC_CONFIG_FILES([Makefile
1399 BASE/util/test/Makefile
1400 BASE/interface/Makefile
1402 BASE/interface/test/Makefile
1405 doc/doxymodule.conf])
1407 dnl AliRoot and installation directory for libraries
1409 AC_MSG_NOTICE([AliRoot: $have_aliroot])
1410 AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
1411 if test "x$have_aliroot" != "xno"; then
1412 AC_CONFIG_FILES([sim/Makefile
1415 rec/startAliEVE-barrel-tracks.sh
1422 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1423 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1424 AC_MSG_NOTICE([libdir set to $libdir])
1427 AC_MSG_NOTICE([compile sample library: $enable_sample])
1428 if test "x$enable_sample" = "xyes"; then
1429 AC_CONFIG_FILES([SampleLib/Makefile])
1432 AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1433 if test "x$enable_rcu" = "xyes"; then
1434 AC_CONFIG_FILES([RCU/Makefile
1439 AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1440 if test "x$enable_tpc" = "xyes"; then
1441 AC_CONFIG_FILES([TPCLib/Makefile
1442 TPCLib/test/Makefile
1443 TPCLib/mapping2array.cxx
1445 TPCLib/calibration/Makefile
1449 AC_MSG_NOTICE([compile CALO library: $enable_calo])
1450 if test "x$enable_calo" = "xyes"; then
1451 AC_CONFIG_FILES([CALO/Makefile
1452 CALO/test/Makefile])
1455 AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1456 if test "x$enable_phos" = "xyes"; then
1457 AC_CONFIG_FILES([PHOS/Makefile])
1460 AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1461 if test "x$enable_emcal" = "xyes"; then
1462 AC_CONFIG_FILES([EMCAL/Makefile])
1465 AC_MSG_NOTICE([compile TRD library: $enable_trd])
1466 if test "x$enable_trd" = "xyes"; then
1467 AC_CONFIG_FILES([TRD/Makefile])
1470 AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1471 if test "x$enable_fmd" = "xyes"; then
1472 AC_CONFIG_FILES([FMD/Makefile])
1475 AC_MSG_NOTICE([compile MUON library: $enable_muon])
1476 if test "x$enable_muon" = "xyes"; then
1477 AC_CONFIG_FILES([MUON/Makefile])
1480 AC_MSG_NOTICE([compile ITS library: $enable_its])
1481 if test "x$enable_its" = "xyes"; then
1482 AC_CONFIG_FILES([ITS/Makefile])
1485 AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1486 if test "x$enable_trigger" = "xyes"; then
1487 AC_CONFIG_FILES([trigger/Makefile
1488 trigger/test/Makefile])
1491 AC_MSG_NOTICE([compile global library: $enable_global])
1492 if test "x$enable_global" = "xyes"; then
1493 AC_CONFIG_FILES([global/Makefile])
1496 AC_MSG_NOTICE([compile jet library: $enable_jet])
1497 if test "x$enable_jet" = "xyes"; then
1498 AC_CONFIG_FILES([JET/Makefile])
1501 AC_MSG_NOTICE([compile comp library: $enable_comp])
1502 if test "x$enable_comp" = "xyes"; then
1503 AC_CONFIG_FILES([comp/Makefile])