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])
42 AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
44 dnl ------------------------------------------------------------------
45 dnl A warning posted into the auto-generated files
46 dnl Does NOT concern this file ;-)
47 AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
48 AC_SUBST([AUTOGENERATED_WARNING])
50 dnl ------------------------------------------------------------------
54 ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
55 AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
57 ROOTBINDIR=`dirname $ROOTEXEC`
58 AC_SUBST([ROOTBINDIR])
60 dnl test for additional required root libraries and headers
62 if test "x$have_root" = "x1"; then
64 save_CPPFLAGS=$CPPFLAGS
67 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
69 # we check for the libSTEER library which is linked to
70 # - the ROOT libs libGeom libMinuit libVMC libEG
71 # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
72 # - ROOT libCint needs also libdl
73 # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
75 # - from Jan 07 libESD also depends on libXMLIO
76 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
77 # - libCDB.so depends on libXMLParser since Mar 11 2009 r 31411
78 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer XMLParser'
79 for CHECKLIB in $ROOT_CHECKLIBS ; do
80 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
81 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
82 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
85 # TBuffer.h has been made pure virtual in root v5-15-02 and one
86 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
87 AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE])
89 # TView.h has been made pure virtual right after root v5-15-02 and one
90 # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
91 AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D])
93 CPPFLAGS=$save_CPPFLAGS
99 dnl ------------------------------------------------------------------
100 # TODO: make this configurable through arguments
101 #Define whether you want to run with ALIROOT or only ROOT
102 AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
103 ALIHLT_USEPACKAGE=ALIROOT
104 #ALIHLT_USEPACKAGE=ROOT
105 #ALIHLT_USEPACKAGE=STANDALONE
106 AC_DEFINE(use_aliroot)
108 CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
109 save_CPPFLAGS=$CPPFLAGS
110 save_LDFLAGS=$LDFLAGS
113 dnl ------------------------------------------------------------------
114 dnl check for AliRoot features
117 AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
118 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
121 if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
122 dnl ------------------------------------------------------------------
123 dnl Try to estimate the system architecture
124 case $host_os:$host_cpu in
125 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
126 linux*) alice_target='linux' ;;
127 *) alice_target='unknown' ;;
129 if test "x$alice_target" = "xunknown" ; then
130 if test -z $ALICE_TARGET ; then
131 AC_MSG_ERROR([Can not estimate system architecture.
132 To avoid the problem, set the ALICE_TARGET variable appropriately.
133 Please send the following information to Matthias.Richter@ift.uib.no:
134 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
136 AC_MSG_NOTICE([Unknown system architecture.
137 Please send the following information to Matthias.Richter@ift.uib.no:
138 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
141 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
142 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
143 overriding $ALICE_TARGET by $alice_target])
145 ALICE_TARGET=$alice_target
147 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
148 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
149 ALIROOTINCDIR=${ALICE_ROOT}/include
150 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
151 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
152 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
155 AC_MSG_CHECKING([for AliRoot])
156 if test "x$ALICE_ROOT" != "x" \
157 && test -d ${ALIROOTBINDIR} \
158 && test -d ${ALIROOTLIBDIR} \
159 && test -d ${ALIROOTINCDIR}; then
160 have_aliroot=$ALICE_ROOT
166 AC_MSG_RESULT([$have_aliroot])
168 if test ! "x$have_aliroot" = "xno" ; then
169 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
170 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
171 ALIROOT_LIBS="$ADD_ROOTLIBS"
172 save_CPPFLAGS=$CPPFLAGS
173 save_LDFLAGS=$LDFLAGS
175 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
176 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
178 # check for certain AliRoot libraries/files/features
179 # libSTEERBase present since Aug 7 2007
180 # ###########################################
181 # temporary workaround for circular dependency libSTEERbase libSTEER
182 # https://savannah.cern.ch/bugs/index.php?49914
183 # disable the sequence of checks and load libraries in parallel
184 ALIROOT_LIBS="$ALIROOT_LIBS -lAOD -lCDB -lRAWDatabase -lRAWDatarec -lESD -lSTEER"
185 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
187 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
189 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
191 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
193 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
194 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
196 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
198 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
200 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
202 AC_CHECK_LIB([$CHECKLIB],[_init],
203 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
204 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lESD -lSTEER"
206 AC_CHECK_LIB([$CHECKLIB],[_init],
207 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
208 have_alirawdata=$CHECKLIB])],
209 [# second pass with -RAWData
211 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
212 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
213 #include <AliRawReaderFile.h>
214 #include <AliRawReaderDate.h>
215 #include <AliRawReaderRoot.h>],
216 [AliRawReaderMemory mreader;
217 AliRawReaderFile freader;
218 AliRawReaderDate dreader(NULL,0);
219 AliRawReaderRoot rreader(NULL,0);])],
220 [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
221 have_alirawdata=$CHECKLIB],
222 [have_alirawdata=no])
223 ]) dnl AC_CHECK_LIB RAWDatabase
224 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
225 AC_MSG_RESULT([$have_alirawdata])
227 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
229 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
231 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
233 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
236 dnl check whether AliLog supports notification callback
238 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
239 have_alilog_notification=no
240 if test ! "x$have_aliroot" = "xno" ; then
241 AC_MSG_CHECKING([whether AliLog supports notification callback])
242 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
243 [AliLog::AliLogNotification fct])],
244 [have_alilog_notification=yes],
245 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
246 AC_MSG_RESULT([$have_alilog_notification])
249 if test "x$have_aliroot" = "xno" ; then
250 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
251 # but library dependencies might not be resolved completely
253 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
254 This can happen from time to time due to development in AliRoot. You can
255 force compilation of detector libs by --enable-<detector>, but be aware
256 of unresolved references at runtime.])
257 AC_MSG_WARN([ ------------------------------------------ ])
258 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
259 AC_MSG_WARN([ please include config.log ])
260 AC_MSG_WARN([ ------------------------------------------ ])
266 dnl ESD supports non-std content
269 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>
270 #include <AliExternalTrackParam.h>
272 #include <TClonesArray.h>],
274 esd.CreateStdContent();
275 TTree* tree=new TTree("esdTree", "Tree with HLT ESD objects");
276 TClonesArray* a=new TClonesArray("AliExternalTrackParam");
277 a->SetName("SomeObject");
279 esd.WriteToTree(tree);
280 if (!tree->FindBranch("SomeObject")) return 1;
282 [have_esd_nonstd=yes],
283 [AC_DEFINE(HAVE_NOT_ESD_NONSTD)])
284 AC_MSG_CHECKING(whether ESD supports non standard content)
285 AC_MSG_RESULT([$have_esd_nonstd])
288 dnl ESD copy function added May 9 2008 rev 25667
290 if test "x$have_esd_nonstd" != "xyes"; then
292 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>],
297 [AC_DEFINE(HAVE_NOT_ESD_COPY)])
298 AC_MSG_CHECKING(for ESD assignment operator)
299 AC_MSG_RESULT([$have_esd_copy])
303 dnl AliRawReaderMemory support for multiple buffers added
304 dnl revision 26829 Jun 2008
306 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW"
307 have_rawreadermemory_multbuffers=no
308 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>],
309 [AliRawReaderMemory rr;
310 rr.AddBuffer(NULL, 0, 0);])],
311 [have_rawreadermemory_multbuffers=yes],
312 [AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)])
313 AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers)
314 AC_MSG_RESULT([$have_rawreadermemory_multbuffers])
317 dnl Changes in the magnetic field implementation
318 dnl revision 30848 Feb 1 2009
320 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
322 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMagF.h>],
323 [int test=AliMagF::k5kG;])],
324 [have_alimagf30848=yes],
325 [AC_DEFINE(HAVE_NOT_ALIMAGF30848)])
326 AC_MSG_CHECKING(AliMagF contains field definitions)
327 AC_MSG_RESULT([$have_alimagf30848])
330 dnl Cleanup of the RunLoader implementation
331 dnl revision 30859 Feb 2 2009
333 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
334 have_alirunloader30859=no
335 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRunLoader.h>],
336 [AliRunLoader* rl=AliRunLoader::Instance();])],
337 [have_alirunloader30859=yes],
338 [AC_DEFINE(HAVE_NOT_ALIRUNLOADER30859)])
339 AC_MSG_CHECKING(AliRunLoader::Instance)
340 AC_MSG_RESULT([$have_alirunloader30859])
343 AC_CHECK_HEADER([AliQAv1.h], [have_aliqav1=yes], [])
344 AM_CONDITIONAL(EN_HLT_QA, test x$have_aliqav1 = xyes)
347 dnl required header files and libraries for modules
351 dnl Check for the interface of AliExternalTrackParam which has been changed
352 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
354 externaltrackparam_version=1
355 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
356 [AliExternalTrackParam trackparam;
357 Double_t param[[5]]; Double_t covar[[15]];
358 trackparam.Set(0., 0., param, covar);])],
359 [externaltrackparam_version=2],
360 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
361 AC_MSG_CHECKING(for version of AliExternalTrackParam)
362 AC_MSG_RESULT($externaltrackparam_version)
364 dnl The AliShuttleInterface was changed in rev 29388. Some return types
365 dnl had been const, now changed according to gcc 4.3 warnings
366 AC_MSG_CHECKING(for version of AliShuttleInterface.h)
367 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/"
368 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
369 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
370 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliShuttleInterface.h>],
371 [class dummy : public AliShuttleInterface {
373 const UInt_t GetStartTimeDCSQuery() {;}
375 [AC_DEFINE(SHUTTLE_PRE_REV29388_INTERFACE)
376 alishuttleinterface_version=pre.rev.29388],
377 [alishuttleinterface_version=up.to.date])
378 AC_MSG_RESULT([$alishuttleinterface_version])
380 CPPFLAGS=$save_CPPFLAGS
381 LDFLAGS=$save_LDFLAGS
383 fi # if test ! "x$have_aliroot" = "xno"
386 AC_SUBST([ALICE_ROOT])
387 AC_SUBST([ALIROOT_CPPFLAGS])
388 AC_SUBST([ALIROOT_LDFLAGS])
389 AC_SUBST([ALIROOTBINDIR])
390 AC_SUBST([ALIROOTLIBDIR])
391 AC_SUBST([ALIROOT_LIBS])
392 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
394 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
396 AC_SUBST([HLTBASE_CPPFLAGS])
397 AC_SUBST([HLTBASE_LDFLAGS])
399 dnl ------------------------------------------------------------------
400 dnl check for the HLT PubSub Framework
401 dnl namely for the existence of the HOMER library
402 dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
403 dnl package. It os though possible to choose an external. library
404 dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
405 dnl got the name libAliHLTHOMER
406 AC_MSG_CHECKING([for HLT PubSub Framework])
407 AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
409 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
410 if test -z $with_pubsub || ! test -d $with_pubsub ; then
413 AC_MSG_RESULT([$with_pubsub])
417 AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
418 if test "x$with_pubsub" != "xno" ; then
419 save_CPPFLAGS=$CPPFLAGS
420 save_LDFLAGS=$LDFLAGS
422 # currently the different versions of the HLT PubSub framework have a different
424 if test -d ${with_pubsub}/include/HOMER ; then
425 # the 'early' location of the include files with separated HOMER sub dirs
426 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
427 elif test -d ${with_pubsub}/include/Util/HOMER ; then
428 # location for HLT Framework versions after Sep 2006
429 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
430 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
431 # fall back if include files were not installed (versions after Sep 06)
432 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
434 # fall back if include files were not installed (versions before Sep 06)
435 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
437 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
439 AC_ARG_ENABLE(pubsub-debug,
440 [AC_HELP_STRING([--disable-pubsub-debug],
441 [force the production version of the PubSub framework])],
442 [],[enable_pubsub_debug=yes])
444 HOMER_TARGET="`uname -s`-`uname -m`"
445 AC_MSG_CHECKING([for HLT PubSub Framework release type])
446 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
447 homer_type="production"
448 HOMER_TARGET="${HOMER_TARGET}-release"
449 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
451 HOMER_TARGET="${HOMER_TARGET}-debug"
453 AC_MSG_RESULT([${homer_type}])
454 HOMERREADER_HEADER=HOMERReader.h
455 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
456 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
457 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
458 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
459 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
463 AC_CHECK_HEADER([$HOMERREADER_HEADER],
464 [ AC_CHECK_LIB([HOMER],[_init],
466 HOMER_LIBS="-lHOMER"],
467 [ AC_CHECK_LIB([HOMERReader],[_init],
469 HOMER_LIBS="-lHOMERReader"])])
470 LIBS="$LIBS $HOMER_LIBS"
471 AC_MSG_CHECKING([version of HOMER library])
472 dnl The Homer library has no versioning, so we do our own
473 dnl version description
474 dnl ----------------------------------------------------------------------
475 dnl 1 inintial version
476 dnl 2 GetBlockStatusFlags added to the interface
477 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
478 [HOMERReader reader("dummy", 0);
479 reader.GetBlockStatusFlags(0);])],
482 AC_MSG_RESULT([$HOMER_VERSION])
484 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
488 dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
490 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
491 HOMERREADER_HEADER=AliHLTHOMERReader.h
492 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
498 if test "x$with_homer" = "xno" ; then
503 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
504 AC_DEFINE(HAVE_HOMERREADER)
506 CPPFLAGS="$save_CPPFLAGS"
507 LDFLAGS="$save_LDFLAGS"
510 AC_SUBST([HOMERREADER_HEADER])
511 AC_SUBST([HOMER_INBUILT_LIB])
512 AC_SUBST([HOMER_CPPFLAGS])
513 AC_SUBST([HOMER_LDFLAGS])
514 AC_SUBST([HOMER_LIBDIR])
515 AC_SUBST([HOMER_BINDIR])
516 AC_SUBST([HOMER_LIBS])
518 dnl ------------------------------------------------------------------
520 [AC_HELP_STRING([--disable-all],
521 [disable all detector modules, individual modules can be switched on by --enable-det])],
522 [disable_all=yes],[])
524 dnl ------------------------------------------------------------------
525 AC_MSG_CHECKING([whether to impose strict coding conventions])
526 AC_ARG_ENABLE(strict,
527 [AC_HELP_STRING([--disable-strict],
528 [disable coding convention checks ])],
529 [],[enable_strict=yes])
530 if test "x$enable_strict" = "xyes" ; then
531 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
533 AC_MSG_RESULT([$enable_strict])
535 dnl ------------------------------------------------------------------
536 AC_MSG_CHECKING([whether to enable component statistics])
537 AC_ARG_ENABLE(component-stat,
538 [AC_HELP_STRING([--enable-component-stat],
539 [enable component statistics ])],
540 [],[enable_component_stat=no])
541 if test "x$enable_component_stat" = "xyes" ; then
542 AC_DEFINE(HLT_COMPONENT_STATISTICS)
544 AC_MSG_RESULT([$enable_component_stat])
546 dnl ------------------------------------------------------------------
547 dnl ---- module checks
548 dnl ------------------------------------------------------------------
549 save_CPPFLAGS=$CPPFLAGS
550 save_LDFLAGS=$LDFLAGS
553 dnl ------------------------------------------------------------------
554 AC_MSG_CHECKING([whether to compile sample library])
555 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
556 AC_ARG_ENABLE(sample,
557 [AC_HELP_STRING([--disable-sample],
558 [compile the sample library ])],
560 [if test "x$have_aliroot" = "xno" ; then
561 enable_sample="no...requires.AliRoot"
567 if test "x$enable_sample" = "xyes" ; then
568 AC_DEFINE(HLT_SAMPLE)
570 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
571 AC_MSG_RESULT([$enable_sample])
573 dnl ------------------------------------------------------------------
574 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
576 CHECK_HLTMODULE([util],
578 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/RAW -I$ALICE_ROOT/PYTHIA6],
579 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
580 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
581 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
583 if test "x$enable_module" = "xmissheader"; then
584 enable_module="no...missing.headers"
585 enable_util=$enable_module
586 elif test "x$enable_module" = "xforce"; then
589 enable_util=$enable_module
591 if test "x$enable_util" = "xyes" ; then
593 ALIUTIL_LIBS=$ALIHLTMODULE_LIBS
595 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
596 AC_MSG_CHECKING([whether to compile Util library])
597 AC_MSG_RESULT([$enable_module])
598 AC_SUBST([ALIUTIL_LIBS])
600 dnl ------------------------------------------------------------------
601 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
604 CHECK_HLTMODULE([tpc],
606 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
607 [Gui ANALYSIS STAT], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
608 [TPCbase TPCrec TPCcalib], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
609 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
611 if test "x$enable_module" = "xmissheader"; then
612 enable_module="no...missing.headers"
613 enable_tpc=$enable_module
614 elif test "x$enable_module" = "xforce"; then
617 enable_tpc=$enable_module
620 if test "x$enable_tpc" = "xyes" ; then
623 ALITPC_LIBS=$ALIHLTMODULE_LIBS
625 dnl Check for functionality in the TPC reconstruction required for online
628 have_tpc_hltoffline_rec=no
629 AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
630 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
631 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
632 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
633 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
634 #include <AliTPCclustererMI.h>
635 #include <TObjArray.h>],
636 [AliTPCtrackerMI tracker;
637 TObjArray* array=NULL;
638 tracker.LoadClusters(array);
639 AliTPCclustererMI cl(NULL, NULL);
640 cl.GetOutputClonesArray();])],
641 [have_tpc_hltoffline_rec=yes],
642 [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
644 AC_MSG_RESULT([$have_tpc_hltoffline_rec])
646 AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
647 AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
648 AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)])
651 if test ! "x$have_aliroot" = "xno" ; then
652 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
653 # which is stored in the TPC/mapping/Patchx.data files from
654 # AliRoot version v4-04-Release (May 2006)
655 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
656 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
657 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
658 [have_tpc_mapping=yes
659 AC_SUBST(TPC_PAD_MAPPING_PATH)
660 AC_DEFINE(HAVE_TPC_MAPPING)],
664 AC_MSG_CHECKING([for TPC mapping layout])
665 AC_MSG_RESULT([$have_tpc_mapping])
669 enable_module=$enable_tpc
671 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
672 AC_MSG_CHECKING([whether to compile TPC library])
673 AC_MSG_RESULT([$enable_module])
674 AC_SUBST([ALITPC_LIBS])
676 dnl ------------------------------------------------------------------
677 AH_TEMPLATE([HLT_RCU],[hlt rcu library])
679 CHECK_HLTMODULE([rcu],
681 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
682 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
683 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
684 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
686 if test "x$enable_module" = "xmissheader"; then
687 enable_module="no...missing.headers"
688 enable_rcu=$enable_module
689 elif test "x$enable_module" = "xforce"; then
693 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
694 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
695 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
696 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>],
697 [AliAltroDecoder decoder;
698 decoder.CopyBackward(NULL, 0);])],
699 [enable_rcu=$enable_module],
700 [enable_module="no...requires.AliRoot>v4-10-Release"
701 enable_rcu="no...requires.AliRoot>v4-10-Release"])
702 CPPFLAGS=$save_CPPFLAGS
703 LDFLAGS=$save_LDFLAGS
708 if test "x$enable_rcu" = "xyes" ; then
711 enable_module=$enable_rcu
713 AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
714 AC_MSG_CHECKING([whether to compile RCU library])
715 AC_MSG_RESULT([$enable_module])
716 AC_SUBST([ALIRCU_LIBS])
718 dnl ------------------------------------------------------------------
719 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
722 CHECK_HLTMODULE([phos],
723 [], [$ALIROOT_CPPFLAGS],
724 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
725 [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
726 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
728 if test "x$enable_module" = "xmissheader"; then
729 enable_module="no...requires.AliRoot>v4-05-07"
730 enable_phos=$enable_module
731 elif test "x$enable_module" = "xforce"; then
734 have_alicalorawstream=no
735 if test ! "x$have_aliroot" = "xno" ; then
737 save_CPPFLAGS="$CPPFLAGS"
738 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
739 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
740 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
741 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
742 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
743 #include <AliCaloRawStream.h>],
745 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
746 have_alicalorawstream=yes],
748 AC_MSG_RESULT([$have_aliphosrecoparam])
749 AC_MSG_CHECKING([for required EMC functionality in AliPHOSRecoParam.h ])
750 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliPHOSRecoParam.h>],
751 [AliPHOSRecoParam param;
752 param.GetEMCClusteringThreshold()])],
753 [have_aliphosrecoparam=yes],
754 [AC_DEFINE(HAVE_NOT_PHOSRECOPARAMEMC)])
755 AC_MSG_RESULT([$have_alicalorawstream])
757 CPPFLAGS="$save_CPPFLAGS"
759 if test "x$have_alicalorawstream" != "xyes"; then
760 enable_phos="no...requires.AliRoot>v4-05-07"
762 enable_phos=$enable_module
766 if test "x$enable_phos" = "xyes" ; then
768 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
770 enable_module=$enable_phos
772 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
773 AC_MSG_CHECKING([whether to compile PHOS library])
774 AC_MSG_RESULT([$enable_module])
775 AC_SUBST([ALIPHOS_LIBS])
777 dnl ------------------------------------------------------------------
778 AH_TEMPLATE([HLT_TRD],[hlt trd library])
781 CHECK_HLTMODULE([trd],
783 [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
784 [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
785 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
787 if test "x$enable_module" = "xmissheader"; then
788 enable_module="no...requires.AliRoot>v4-07-Release"
789 enable_trd=$enable_module
790 elif test "x$enable_module" = "xforce"; then
793 enable_trd=$enable_module
794 if test "x$enable_trd" = "xyes" ; then
796 save_CPPFLAGS="$CPPFLAGS"
797 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
798 # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release
799 # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008
800 # changed to AliTRDReconstructor::SetStreamLevel() due to revision 27797, Tue Aug 5 2008
801 # changed to AliTRDReconstructor::SetClusters() according to revision 28069, Mon Aug 18 2008
802 # changed to AliTRDCluster according to revision 30461, Thu Dec 18 2008
803 # changed to AliTRDclusterizer::GetAddedClusters according to revision 31299, Wed Mar 4 2009
804 AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
805 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
806 [AliTRDclusterizer c;
807 c.GetAddedClusters()])],
809 [enable_trd="no...requires.AliRoot>v4-16-Release"])
810 AC_MSG_RESULT([$enable_trd])
812 CPPFLAGS="$save_CPPFLAGS"
816 if test "x$enable_trd" = "xyes" ; then
818 ALITRD_LIBS=$ALIHLTMODULE_LIBS
820 enable_module=$enable_trd
822 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
823 AC_MSG_CHECKING([whether to compile TRD library])
824 AC_MSG_RESULT([$enable_module])
825 AC_SUBST([ALITRD_LIBS])
827 dnl ------------------------------------------------------------------
828 AH_TEMPLATE([HLT_FMD],[hlt fmd library])
830 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
831 CHECK_HLTMODULE([fmd],
833 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
834 [FMDbase FMDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
835 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
837 if test "x$enable_module" = "xmissheader"; then
838 enable_module="no...missing.headers"
839 enable_fmd=$enable_module
840 elif test "x$enable_module" = "xforce"; then
843 enable_fmd=$enable_module
846 if test "x$enable_fmd" = "xyes" ; then
848 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
850 enable_module=$enable_fmd
852 AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
853 AC_MSG_CHECKING([whether to compile FMD library])
854 AC_MSG_RESULT([$enable_module])
855 AC_SUBST([ALIFMD_LIBS])
857 dnl ------------------------------------------------------------------
858 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
861 CHECK_HLTMODULE([dimuon],
862 [AliMpExMap.h AliMUONTriggerIO.h],
863 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
864 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
865 [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
866 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
868 if test "x$enable_module" = "xmissheader"; then
869 enable_module="no...requires.AliRoot>=v4-08-Release"
870 enable_muon=$enable_module
871 elif test "x$enable_module" = "xforce"; then
874 enable_muon=$enable_module
877 if test "x$enable_muon" = "xyes" ; then
879 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
881 save_CPPFLAGS="$CPPFLAGS"
884 dnl Check for functionality GetRawStream AliMUONDigitMaker.h
886 have_muon_digitmaker_getrawstream=no
887 AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker)
888 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON"
889 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
890 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
891 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>],
892 [AliMUONDigitMaker dm;
893 dm.GetRawStreamTracker();])],
894 [have_muon_digitmaker_getrawstream=yes],
895 [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
897 AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
900 dnl Check for AliMpPad::GetPositionX/Y
901 dnl change of implementation in MUON code
902 dnl revision 31769, Wed Apr 1 2009
904 have_muon_alimppad_getposition=no
905 AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
906 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
907 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
908 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
909 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>],
911 pad.GetPositionX();])],
912 [have_muon_alimppad_getposition=yes],
913 [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
915 AC_MSG_RESULT([$have_muon_alimppad_getposition])
917 CPPFLAGS="$save_CPPFLAGS"
921 enable_module=$enable_muon
923 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
924 AC_MSG_CHECKING([whether to compile MUON library])
925 AC_MSG_RESULT([$enable_module])
926 AC_SUBST([ALIMUON_LIBS])
928 dnl ------------------------------------------------------------------
929 AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
932 CHECK_HLTMODULE([trigger],
933 [], [$ALIROOT_CPPFLAGS],
934 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
935 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
936 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
938 if test "x$enable_module" = "xmissheader"; then
939 enable_module="no...header.missing"
940 enable_trigger=$enable_module
941 elif test "x$enable_module" = "xforce"; then
944 enable_trigger=$enable_module
947 if test "x$enable_trigger" = "xyes" ; then
948 AC_DEFINE(HLT_TRIGGER)
949 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
951 enable_module=$enable_trigger
953 AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
954 AC_MSG_CHECKING([whether to compile Trigger library])
955 AC_MSG_RESULT([$enable_module])
956 AC_SUBST([ALITRIGGER_LIBS])
958 dnl ------------------------------------------------------------------
959 AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
962 CHECK_HLTMODULE([global],
963 [], [$ALIROOT_CPPFLAGS],
964 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
965 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
966 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
968 if test "x$enable_module" = "xmissheader"; then
969 enable_module="no...header.missing"
970 enable_global=$enable_module
971 elif test "x$enable_module" = "xforce"; then
974 enable_global=$enable_module
975 if test "x$enable_global" = "xyes" ; then
977 save_CPPFLAGS="$CPPFLAGS"
978 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
979 AC_MSG_CHECKING([for required functions in AliESDtrack])
980 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliESDtrack.h>],
982 t.SetGlobalChi2(0)])],
984 [enable_global="no...requires.AliRoot>v4-17-Release"])
985 AC_MSG_RESULT([$enable_global])
987 CPPFLAGS="$save_CPPFLAGS"
991 if test "x$enable_global" = "xyes" ; then
992 AC_DEFINE(HLT_GLOBAL)
993 ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
995 enable_module=$enable_global
997 AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
998 AC_MSG_CHECKING([whether to compile Global library])
999 AC_MSG_RESULT([$enable_module])
1000 AC_SUBST([ALIGLOBAL_LIBS])
1002 dnl ------------------------------------------------------------------
1003 AH_TEMPLATE([HLT_JET],[hlt jet library])
1006 ALIFASTJET_INCFLAGS=
1009 AC_ARG_WITH(fastjet, [installation path of the FASTJET package],
1010 [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet],
1011 [ test -n $FASTJET && with_fastjet=$FASTJET ])
1013 if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then
1014 ALIFASTJET_INCFLAGS="-I${with_fastjet}/include"
1015 ALIFASTJET_HEADER="PseudoJet.hh"
1016 ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib"
1017 ALIFASTJET_LIBS="CGAL fastjet"
1022 CHECK_HLTMODULE([jet],
1023 [$ALIFASTJET_HEADER], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/JETAN $ALIFASTJET_INCFLAGS],
1024 [$ALIFASTJET_LIBS], [-L$ROOTLIBDIR $ALIFASTJET_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS],
1025 [AOD ESD ANALYSIS ANALYSISalice JETAN JETANMC],
1026 [-L$ROOTLIBDIR $ALIROOT_LDFLAGS -L$ALICE_ROOT/lib/tgt_$ALICE_TARGET],
1027 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1029 if test "x$enable_module" = "xmissheader"; then
1030 enable_module="no...header.missing"
1031 enable_jet=$enable_module
1032 elif test "x$enable_module" = "xforce"; then
1035 enable_jet=$enable_module
1038 if test "x$enable_jet" = "xyes" ; then
1040 ALIJET_LIBS="$ALIHLTMODULE_LIBS"
1042 if test "x$with_fastjet" != "xno"; then
1043 AC_DEFINE(HAVE_FASTJET)
1044 AC_DEFINE(WITHFASTJET)
1045 ALIJET_LIBS="$ALIJET_LIBS -L$FASTJET_LDFLAGS"
1047 AC_MSG_CHECKING([compilation with FASTJET package])
1048 AC_MSG_RESULT($with_fastjet)
1051 enable_module=$enable_jet
1054 AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
1055 AC_MSG_CHECKING([whether to compile Jet library])
1056 AC_MSG_RESULT([$enable_module])
1057 AC_SUBST([ALIJET_LIBS])
1059 dnl ------------------------------------------------------------------
1060 AH_TEMPLATE([HLT_ITS],[hlt its library])
1063 CHECK_HLTMODULE([its],
1064 [AliITSCompressRawDataSDD.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS],
1065 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1066 [ITSbase ITSrec ITSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1067 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1069 if test "x$enable_module" = "xmissheader"; then
1070 enable_module="no...header.missing"
1071 enable_its=$enable_module
1072 elif test "x$enable_module" = "xforce"; then
1075 enable_its=$enable_module
1076 if test "x$enable_its" = "xyes" ; then
1078 save_CPPFLAGS="$CPPFLAGS"
1079 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS"
1080 # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008
1081 # require AliVertexer::GetNominalPos()
1082 AC_MSG_CHECKING([for required functions in AliITSVertexer])
1083 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>],
1085 v.GetNominalPos()])],
1087 [enable_its="no...requires.AliRoot>v4-13-Release"])
1088 AC_MSG_RESULT([$enable_its])
1090 CPPFLAGS="$save_CPPFLAGS"
1094 if test "x$enable_its" = "xyes" ; then
1096 ALIITS_LIBS=$ALIHLTMODULE_LIBS
1098 enable_module=$enable_its
1100 AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
1101 AC_MSG_CHECKING([whether to compile ITS library])
1102 AC_MSG_RESULT([$enable_module])
1103 AC_SUBST([ALIITS_LIBS])
1105 dnl ------------------------------------------------------------------
1106 AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
1109 CHECK_HLTMODULE([emcal],
1110 [], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/EMCAL],
1111 [RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1112 [EMCALrec EMCALsim EMCALbase], [-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_emcal=$enable_module
1118 elif test "x$enable_module" = "xforce"; then
1121 enable_emcal=$enable_module
1124 if test "x$enable_emcal" = "xyes" ; then
1125 AC_DEFINE(HLT_EMCAL)
1126 ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
1128 enable_module=$enable_emcal
1130 AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
1131 AC_MSG_CHECKING([whether to compile EMCAL library])
1132 AC_MSG_RESULT([$enable_module])
1133 AC_SUBST([ALIEMCAL_LIBS])
1135 dnl ------------------------------------------------------------------
1136 AH_TEMPLATE([HLT_COMP],[hlt comp library])
1139 CHECK_HLTMODULE([comp],
1140 [], [$ALIROOT_CPPFLAGS],
1141 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1142 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1143 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1145 if test "x$enable_module" = "xmissheader"; then
1146 enable_module="no...header.missing"
1147 enable_comp=$enable_module
1148 elif test "x$enable_module" = "xforce"; then
1151 enable_comp=$enable_module
1154 if test "x$enable_comp" = "xyes" ; then
1156 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
1158 enable_module=$enable_comp
1160 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
1161 AC_MSG_CHECKING([whether to compile comp library])
1162 AC_MSG_RESULT([$enable_module])
1163 AC_SUBST([ALICOMP_LIBS])
1165 dnl ------------------------------------------------------------------
1166 AC_MSG_CHECKING([whether to disable AliRoot logging])
1167 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
1168 AC_ARG_ENABLE(aliroot-logging,
1169 [AC_HELP_STRING([--disable-aliroot-logging],
1170 [disable logging through AliRoot logging methods])],
1171 [],[enable_aliroot_logging=no])
1172 if test "x$have_aliroot" = "xno" ; then
1173 enable_aliroot_logging=yes # this means 'disable'
1175 if test "x$enable_aliroot_logging" != "xno" ; then
1176 AC_DEFINE(NOALIROOT_LOGGING)
1178 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
1179 AC_MSG_RESULT([$enable_aliroot_logging])
1181 dnl ------------------------------------------------------------------
1182 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
1183 AH_TEMPLATE([DOMC],[MC saving])
1184 AC_ARG_ENABLE(mc-saving,
1185 [AC_HELP_STRING([--enable-mc-saving],
1186 [enable saving MC data through the chain])],
1187 [],[enable_mc_saving=no])
1188 if test "x$enable_mc_saving" = "xyes" ; then
1191 AC_MSG_RESULT([$enable_mc_saving])
1193 dnl ------------------------------------------------------------------
1194 dnl certainly something old, but we keep the define
1195 AC_MSG_CHECKING([whether to use ROWHOUGH])
1196 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
1197 AC_ARG_ENABLE(rowhough,
1198 [AC_HELP_STRING([--enable-rowhough],
1200 [],[enable_rowhough=no])
1201 if test "x$enable_rowhough" = "xyes" ; then
1202 AC_DEFINE(USEROWHOUGH)
1204 AC_MSG_RESULT([$enable_rowhough])
1206 dnl ------------------------------------------------------------------
1207 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
1208 dnl stand-alone build system. This is most likely something old we can
1209 dnl get rid off later, or do something more reasonable. Since the define
1210 dnl needs the quotes they have to be escaped. This works well for the
1211 dnl Makefile but not for the configure script. So we have to add the
1212 dnl defines after all the other checks.
1213 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
1214 if test ! "x$have_aliroot" = "xno" ; then
1215 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
1218 dnl ------------------------------------------------------------------
1222 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
1223 AC_PATH_PROG(PERL, perl)
1224 AC_PATH_PROG(DOXYGEN, doxygen)
1226 [AC_HELP_STRING([--enable-dot],
1227 [enable dot documentation generator])],
1231 AC_PATH_PROG(DOT, dot)
1232 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
1234 DOT_PATH=`dirname $DOT`
1237 AC_MSG_CHECKING([for documentation mode])
1239 [AC_HELP_STRING([--disable-doc],
1240 [disable documentation build; monolithic build --enable-doc=mono ])],
1241 [],[enable_doc=modules])
1243 if test "x$DOXYGEN" = "x" ; then
1244 enable_doc=no.doxygen
1245 elif test "x$enable_doc" = "xyes" ; then
1247 elif test ! "x$enable_doc" = "xmono" && \
1248 test ! "x$enable_doc" = "xmodules" && \
1249 test ! "x$enable_doc" = "xno"; then
1251 AC_MSG_WARN([unknown option])
1253 if test "x$enable_doc" = "xno" ; then
1258 AC_MSG_RESULT([$enable_doc])
1259 AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
1260 AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
1261 AC_SUBST([HAVE_DOT])
1262 AC_SUBST([DOT_PATH])
1264 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
1265 dnl echo $HAVE_SRC_SUBDIR
1266 dnl if ! test -d $HAVE_SRC_SUBDIR; then
1267 dnl HAVE_SRC_SUBDIR=
1269 dnl AC_SUBST([HAVE_SRC_SUBDIR])
1271 dnl ------------------------------------------------------------------
1272 AC_MSG_NOTICE([---------------------------------------------- ])
1273 AC_MSG_NOTICE([ build summary ])
1274 AC_MSG_NOTICE([---------------------------------------------- ])
1276 AC_CONFIG_FILES([Makefile
1282 BASE/util/test/Makefile
1283 BASE/interface/Makefile
1285 BASE/interface/test/Makefile
1288 doc/doxymodule.conf])
1290 dnl AliRoot and installation directory for libraries
1292 AC_MSG_NOTICE([AliRoot: $have_aliroot])
1293 AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
1294 if test "x$have_aliroot" != "xno"; then
1295 AC_CONFIG_FILES([sim/Makefile
1298 rec/startAliEVE-barrel-tracks.sh
1305 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1306 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1307 AC_MSG_NOTICE([libdir set to $libdir])
1310 AC_MSG_NOTICE([compile sample library: $enable_sample])
1311 if test "x$enable_sample" = "xyes"; then
1312 AC_CONFIG_FILES([SampleLib/Makefile])
1315 AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1316 if test "x$enable_rcu" = "xyes"; then
1317 AC_CONFIG_FILES([RCU/Makefile
1322 AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1323 if test "x$enable_tpc" = "xyes"; then
1324 AC_CONFIG_FILES([TPCLib/Makefile
1325 TPCLib/test/Makefile
1326 TPCLib/mapping2array.cxx
1331 AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1332 if test "x$enable_phos" = "xyes"; then
1333 AC_CONFIG_FILES([PHOS/Makefile])
1336 AC_MSG_NOTICE([compile TRD library: $enable_trd])
1337 if test "x$enable_trd" = "xyes"; then
1338 AC_CONFIG_FILES([TRD/Makefile])
1341 AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1342 if test "x$enable_fmd" = "xyes"; then
1343 AC_CONFIG_FILES([FMD/Makefile])
1346 AC_MSG_NOTICE([compile MUON library: $enable_muon])
1347 if test "x$enable_muon" = "xyes"; then
1348 AC_CONFIG_FILES([MUON/Makefile])
1351 AC_MSG_NOTICE([compile ITS library: $enable_its])
1352 if test "x$enable_its" = "xyes"; then
1353 AC_CONFIG_FILES([ITS/Makefile])
1356 AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1357 if test "x$enable_emcal" = "xyes"; then
1358 AC_CONFIG_FILES([EMCAL/Makefile])
1361 AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1362 if test "x$enable_trigger" = "xyes"; then
1363 AC_CONFIG_FILES([trigger/Makefile
1364 trigger/test/Makefile])
1367 AC_MSG_NOTICE([compile global library: $enable_global])
1368 if test "x$enable_global" = "xyes"; then
1369 AC_CONFIG_FILES([global/Makefile])
1372 AC_MSG_NOTICE([compile jet library: $enable_jet])
1373 if test "x$enable_jet" = "xyes"; then
1374 AC_CONFIG_FILES([JET/Makefile])
1377 AC_MSG_NOTICE([compile comp library: $enable_comp])
1378 if test "x$enable_comp" = "xyes"; then
1379 AC_CONFIG_FILES([comp/Makefile])