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)
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 dnl required header files and libraries for modules
347 dnl Check for the interface of AliExternalTrackParam which has been changed
348 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
350 externaltrackparam_version=1
351 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
352 [AliExternalTrackParam trackparam;
353 Double_t param[[5]]; Double_t covar[[15]];
354 trackparam.Set(0., 0., param, covar);])],
355 [externaltrackparam_version=2],
356 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
357 AC_MSG_CHECKING(for version of AliExternalTrackParam)
358 AC_MSG_RESULT($externaltrackparam_version)
360 dnl The AliShuttleInterface was changed in rev 29388. Some return types
361 dnl had been const, now changed according to gcc 4.3 warnings
362 AC_MSG_CHECKING(for version of AliShuttleInterface.h)
363 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/"
364 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
365 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
366 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliShuttleInterface.h>],
367 [class dummy : public AliShuttleInterface {
369 const UInt_t GetStartTimeDCSQuery() {;}
371 [AC_DEFINE(SHUTTLE_PRE_REV29388_INTERFACE)
372 alishuttleinterface_version=pre.rev.29388],
373 [alishuttleinterface_version=up.to.date])
374 AC_MSG_RESULT([$alishuttleinterface_version])
376 CPPFLAGS=$save_CPPFLAGS
377 LDFLAGS=$save_LDFLAGS
379 fi # if test ! "x$have_aliroot" = "xno"
382 AC_SUBST([ALICE_ROOT])
383 AC_SUBST([ALIROOT_CPPFLAGS])
384 AC_SUBST([ALIROOT_LDFLAGS])
385 AC_SUBST([ALIROOTBINDIR])
386 AC_SUBST([ALIROOTLIBDIR])
387 AC_SUBST([ALIROOT_LIBS])
388 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
390 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
392 AC_SUBST([HLTBASE_CPPFLAGS])
393 AC_SUBST([HLTBASE_LDFLAGS])
395 dnl ------------------------------------------------------------------
396 dnl check for the HLT PubSub Framework
397 dnl namely for the existence of the HOMER library
398 dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
399 dnl package. It os though possible to choose an external. library
400 dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
401 dnl got the name libAliHLTHOMER
402 AC_MSG_CHECKING([for HLT PubSub Framework])
403 AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
405 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
406 if test -z $with_pubsub || ! test -d $with_pubsub ; then
409 AC_MSG_RESULT([$with_pubsub])
413 AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
414 if test "x$with_pubsub" != "xno" ; then
415 save_CPPFLAGS=$CPPFLAGS
416 save_LDFLAGS=$LDFLAGS
418 # currently the different versions of the HLT PubSub framework have a different
420 if test -d ${with_pubsub}/include/HOMER ; then
421 # the 'early' location of the include files with separated HOMER sub dirs
422 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
423 elif test -d ${with_pubsub}/include/Util/HOMER ; then
424 # location for HLT Framework versions after Sep 2006
425 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
426 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
427 # fall back if include files were not installed (versions after Sep 06)
428 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
430 # fall back if include files were not installed (versions before Sep 06)
431 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
433 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
435 AC_ARG_ENABLE(pubsub-debug,
436 [AC_HELP_STRING([--disable-pubsub-debug],
437 [force the production version of the PubSub framework])],
438 [],[enable_pubsub_debug=yes])
440 HOMER_TARGET="`uname -s`-`uname -m`"
441 AC_MSG_CHECKING([for HLT PubSub Framework release type])
442 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
443 homer_type="production"
444 HOMER_TARGET="${HOMER_TARGET}-release"
445 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
447 HOMER_TARGET="${HOMER_TARGET}-debug"
449 AC_MSG_RESULT([${homer_type}])
450 HOMERREADER_HEADER=HOMERReader.h
451 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
452 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
453 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
454 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
455 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
459 AC_CHECK_HEADER([$HOMERREADER_HEADER],
460 [ AC_CHECK_LIB([HOMER],[_init],
462 HOMER_LIBS="-lHOMER"],
463 [ AC_CHECK_LIB([HOMERReader],[_init],
465 HOMER_LIBS="-lHOMERReader"])])
466 LIBS="$LIBS $HOMER_LIBS"
467 AC_MSG_CHECKING([version of HOMER library])
468 dnl The Homer library has no versioning, so we do our own
469 dnl version description
470 dnl ----------------------------------------------------------------------
471 dnl 1 inintial version
472 dnl 2 GetBlockStatusFlags added to the interface
473 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
474 [HOMERReader reader("dummy", 0);
475 reader.GetBlockStatusFlags(0);])],
478 AC_MSG_RESULT([$HOMER_VERSION])
480 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
484 dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
486 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
487 HOMERREADER_HEADER=AliHLTHOMERReader.h
488 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
494 if test "x$with_homer" = "xno" ; then
499 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
500 AC_DEFINE(HAVE_HOMERREADER)
502 CPPFLAGS="$save_CPPFLAGS"
503 LDFLAGS="$save_LDFLAGS"
506 AC_SUBST([HOMERREADER_HEADER])
507 AC_SUBST([HOMER_INBUILT_LIB])
508 AC_SUBST([HOMER_CPPFLAGS])
509 AC_SUBST([HOMER_LDFLAGS])
510 AC_SUBST([HOMER_LIBDIR])
511 AC_SUBST([HOMER_BINDIR])
512 AC_SUBST([HOMER_LIBS])
514 dnl ------------------------------------------------------------------
516 [AC_HELP_STRING([--disable-all],
517 [disable all detector modules, individual modules can be switched on by --enable-det])],
518 [disable_all=yes],[])
520 dnl ------------------------------------------------------------------
521 AC_MSG_CHECKING([whether to impose strict coding conventions])
522 AC_ARG_ENABLE(strict,
523 [AC_HELP_STRING([--disable-strict],
524 [disable coding convention checks ])],
525 [],[enable_strict=yes])
526 if test "x$enable_strict" = "xyes" ; then
527 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
529 AC_MSG_RESULT([$enable_strict])
531 dnl ------------------------------------------------------------------
532 AC_MSG_CHECKING([whether to enable component statistics])
533 AC_ARG_ENABLE(component-stat,
534 [AC_HELP_STRING([--enable-component-stat],
535 [enable component statistics ])],
536 [],[enable_component_stat=no])
537 if test "x$enable_component_stat" = "xyes" ; then
538 AC_DEFINE(HLT_COMPONENT_STATISTICS)
540 AC_MSG_RESULT([$enable_component_stat])
542 dnl ------------------------------------------------------------------
543 dnl ---- module checks
544 dnl ------------------------------------------------------------------
545 save_CPPFLAGS=$CPPFLAGS
546 save_LDFLAGS=$LDFLAGS
549 dnl ------------------------------------------------------------------
550 AC_MSG_CHECKING([whether to compile sample library])
551 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
552 AC_ARG_ENABLE(sample,
553 [AC_HELP_STRING([--disable-sample],
554 [compile the sample library ])],
556 [if test "x$have_aliroot" = "xno" ; then
557 enable_sample="no...requires.AliRoot"
563 if test "x$enable_sample" = "xyes" ; then
564 AC_DEFINE(HLT_SAMPLE)
566 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
567 AC_MSG_RESULT([$enable_sample])
569 dnl ------------------------------------------------------------------
570 AC_MSG_CHECKING([whether to compile util library])
571 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
573 [AC_HELP_STRING([--disable-util],
574 [compile the util library ])],
576 [if test "x$have_aliroot" = "xno" ; then
577 enable_util="no...requires.AliRoot"
583 if test "x$enable_util" = "xyes" ; then
586 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
587 AC_MSG_RESULT([$enable_util])
589 dnl ------------------------------------------------------------------
590 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
593 CHECK_HLTMODULE([tpc],
595 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
596 [Gui ANALYSIS STAT], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
597 [TPCbase TPCrec TPCcalib], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
598 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
600 if test "x$enable_module" = "xmissheader"; then
601 enable_module="no...missing.headers"
602 enable_tpc=$enable_module
603 elif test "x$enable_module" = "xforce"; then
606 enable_tpc=$enable_module
609 if test "x$enable_tpc" = "xyes" ; then
612 ALITPC_LIBS=$ALIHLTMODULE_LIBS
614 dnl Check for functionality in the TPC reconstruction required for online
617 have_tpc_hltoffline_rec=no
618 AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
619 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
620 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
621 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
622 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
623 #include <AliTPCclustererMI.h>
624 #include <TObjArray.h>],
625 [AliTPCtrackerMI tracker;
626 TObjArray* array=NULL;
627 tracker.LoadClusters(array);
628 AliTPCclustererMI cl(NULL, NULL);
629 cl.GetOutputClonesArray();])],
630 [have_tpc_hltoffline_rec=yes],
631 [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
633 AC_MSG_RESULT([$have_tpc_hltoffline_rec])
635 AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
636 AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
637 AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)])
640 if test ! "x$have_aliroot" = "xno" ; then
641 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
642 # which is stored in the TPC/mapping/Patchx.data files from
643 # AliRoot version v4-04-Release (May 2006)
644 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
645 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
646 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
647 [have_tpc_mapping=yes
648 AC_SUBST(TPC_PAD_MAPPING_PATH)
649 AC_DEFINE(HAVE_TPC_MAPPING)],
653 AC_MSG_CHECKING([for TPC mapping layout])
654 AC_MSG_RESULT([$have_tpc_mapping])
658 enable_module=$enable_tpc
660 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
661 AC_MSG_CHECKING([whether to compile TPC library])
662 AC_MSG_RESULT([$enable_module])
663 AC_SUBST([ALITPC_LIBS])
665 dnl ------------------------------------------------------------------
666 AH_TEMPLATE([HLT_RCU],[hlt rcu library])
668 CHECK_HLTMODULE([rcu],
670 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
671 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
672 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
673 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
675 if test "x$enable_module" = "xmissheader"; then
676 enable_module="no...missing.headers"
677 enable_rcu=$enable_module
678 elif test "x$enable_module" = "xforce"; then
682 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
683 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
684 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
685 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>],
686 [AliAltroDecoder decoder;
687 decoder.CopyBackward(NULL, 0);])],
688 [enable_rcu=$enable_module],
689 [enable_module="no...requires.AliRoot>v4-10-Release"
690 enable_rcu="no...requires.AliRoot>v4-10-Release"])
691 CPPFLAGS=$save_CPPFLAGS
692 LDFLAGS=$save_LDFLAGS
697 if test "x$enable_rcu" = "xyes" ; then
700 enable_module=$enable_rcu
702 AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
703 AC_MSG_CHECKING([whether to compile RCU library])
704 AC_MSG_RESULT([$enable_module])
705 AC_SUBST([ALIRCU_LIBS])
707 dnl ------------------------------------------------------------------
708 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
711 CHECK_HLTMODULE([phos],
712 [], [$ALIROOT_CPPFLAGS],
713 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
714 [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
715 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
717 if test "x$enable_module" = "xmissheader"; then
718 enable_module="no...requires.AliRoot>v4-05-07"
719 enable_phos=$enable_module
720 elif test "x$enable_module" = "xforce"; then
723 have_alicalorawstream=no
724 if test ! "x$have_aliroot" = "xno" ; then
726 save_CPPFLAGS="$CPPFLAGS"
727 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
728 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
729 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
730 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
731 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
732 #include <AliCaloRawStream.h>],
734 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
735 have_alicalorawstream=yes],
737 AC_MSG_RESULT([$have_aliphosrecoparam])
738 AC_MSG_CHECKING([for required EMC functionality in AliPHOSRecoParam.h ])
739 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliPHOSRecoParam.h>],
740 [AliPHOSRecoParam param;
741 param.GetEMCClusteringThreshold()])],
742 [have_aliphosrecoparam=yes],
743 [AC_DEFINE(HAVE_NOT_PHOSRECOPARAMEMC)])
744 AC_MSG_RESULT([$have_alicalorawstream])
746 CPPFLAGS="$save_CPPFLAGS"
748 if test "x$have_alicalorawstream" != "xyes"; then
749 enable_phos="no...requires.AliRoot>v4-05-07"
751 enable_phos=$enable_module
755 if test "x$enable_phos" = "xyes" ; then
757 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
759 enable_module=$enable_phos
761 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
762 AC_MSG_CHECKING([whether to compile PHOS library])
763 AC_MSG_RESULT([$enable_module])
764 AC_SUBST([ALIPHOS_LIBS])
766 dnl ------------------------------------------------------------------
767 AH_TEMPLATE([HLT_TRD],[hlt trd library])
770 CHECK_HLTMODULE([trd],
772 [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
773 [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
774 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
776 if test "x$enable_module" = "xmissheader"; then
777 enable_module="no...requires.AliRoot>v4-07-Release"
778 enable_trd=$enable_module
779 elif test "x$enable_module" = "xforce"; then
782 enable_trd=$enable_module
783 if test "x$enable_trd" = "xyes" ; then
785 save_CPPFLAGS="$CPPFLAGS"
786 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
787 # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release
788 # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008
789 # changed to AliTRDReconstructor::SetStreamLevel() due to revision 27797, Tue Aug 5 2008
790 # changed to AliTRDReconstructor::SetClusters() according to revision 28069, Mon Aug 18 2008
791 # changed to AliTRDCluster according to revision 30461, Thu Dec 18 2008
792 # changed to AliTRDclusterizer::GetAddedClusters according to revision 31299, Wed Mar 4 2009
793 AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
794 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
795 [AliTRDclusterizer c;
796 c.GetAddedClusters()])],
798 [enable_trd="no...requires.AliRoot>v4-16-Release"])
799 AC_MSG_RESULT([$enable_trd])
801 CPPFLAGS="$save_CPPFLAGS"
805 if test "x$enable_trd" = "xyes" ; then
807 ALITRD_LIBS=$ALIHLTMODULE_LIBS
809 enable_module=$enable_trd
811 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
812 AC_MSG_CHECKING([whether to compile TRD library])
813 AC_MSG_RESULT([$enable_module])
814 AC_SUBST([ALITRD_LIBS])
816 dnl ------------------------------------------------------------------
817 AH_TEMPLATE([HLT_FMD],[hlt fmd library])
819 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
820 CHECK_HLTMODULE([fmd],
822 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
823 [FMDbase FMDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
824 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
826 if test "x$enable_module" = "xmissheader"; then
827 enable_module="no...missing.headers"
828 enable_fmd=$enable_module
829 elif test "x$enable_module" = "xforce"; then
832 enable_fmd=$enable_module
835 if test "x$enable_fmd" = "xyes" ; then
837 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
839 enable_module=$enable_fmd
841 AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
842 AC_MSG_CHECKING([whether to compile FMD library])
843 AC_MSG_RESULT([$enable_module])
844 AC_SUBST([ALIFMD_LIBS])
846 dnl ------------------------------------------------------------------
847 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
850 CHECK_HLTMODULE([dimuon],
851 [AliMpExMap.h AliMUONTriggerIO.h],
852 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
853 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
854 [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
855 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
857 if test "x$enable_module" = "xmissheader"; then
858 enable_module="no...requires.AliRoot>=v4-08-Release"
859 enable_muon=$enable_module
860 elif test "x$enable_module" = "xforce"; then
863 enable_muon=$enable_module
866 if test "x$enable_muon" = "xyes" ; then
868 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
870 save_CPPFLAGS="$CPPFLAGS"
873 dnl Check for functionality GetRawStream AliMUONDigitMaker.h
875 have_muon_digitmaker_getrawstream=no
876 AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker)
877 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON"
878 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
879 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
880 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>],
881 [AliMUONDigitMaker dm;
882 dm.GetRawStreamTracker();])],
883 [have_muon_digitmaker_getrawstream=yes],
884 [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
886 AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
889 dnl Check for AliMpPad::GetPositionX/Y
890 dnl change of implementation in MUON code
891 dnl revision 31769, Wed Apr 1 2009
893 have_muon_alimppad_getposition=no
894 AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
895 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
896 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
897 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
898 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>],
900 pad.GetPositionX();])],
901 [have_muon_alimppad_getposition=yes],
902 [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
904 AC_MSG_RESULT([$have_muon_alimppad_getposition])
906 CPPFLAGS="$save_CPPFLAGS"
910 enable_module=$enable_muon
912 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
913 AC_MSG_CHECKING([whether to compile MUON library])
914 AC_MSG_RESULT([$enable_module])
915 AC_SUBST([ALIMUON_LIBS])
917 dnl ------------------------------------------------------------------
918 AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
921 CHECK_HLTMODULE([trigger],
922 [], [$ALIROOT_CPPFLAGS],
923 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
924 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
925 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
927 if test "x$enable_module" = "xmissheader"; then
928 enable_module="no...header.missing"
929 enable_trigger=$enable_module
930 elif test "x$enable_module" = "xforce"; then
933 enable_trigger=$enable_module
936 if test "x$enable_trigger" = "xyes" ; then
937 AC_DEFINE(HLT_TRIGGER)
938 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
940 enable_module=$enable_trigger
942 AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
943 AC_MSG_CHECKING([whether to compile Trigger library])
944 AC_MSG_RESULT([$enable_module])
945 AC_SUBST([ALITRIGGER_LIBS])
947 dnl ------------------------------------------------------------------
948 AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
951 CHECK_HLTMODULE([global],
952 [], [$ALIROOT_CPPFLAGS],
953 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
954 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
955 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
957 if test "x$enable_module" = "xmissheader"; then
958 enable_module="no...header.missing"
959 enable_global=$enable_module
960 elif test "x$enable_module" = "xforce"; then
963 enable_global=$enable_module
964 if test "x$enable_global" = "xyes" ; then
966 save_CPPFLAGS="$CPPFLAGS"
967 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
968 AC_MSG_CHECKING([for required functions in AliESDtrack])
969 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliESDtrack.h>],
971 t.SetGlobalChi2(0)])],
973 [enable_global="no...requires.AliRoot>v4-17-Release"])
974 AC_MSG_RESULT([$enable_global])
976 CPPFLAGS="$save_CPPFLAGS"
980 if test "x$enable_global" = "xyes" ; then
981 AC_DEFINE(HLT_GLOBAL)
982 ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
984 enable_module=$enable_global
986 AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
987 AC_MSG_CHECKING([whether to compile Global library])
988 AC_MSG_RESULT([$enable_module])
989 AC_SUBST([ALIGLOBAL_LIBS])
991 dnl ------------------------------------------------------------------
992 AH_TEMPLATE([HLT_JET],[hlt jet library])
998 AC_ARG_WITH(fastjet, [installation path of the FASTJET package],
999 [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet],
1000 [ test -n $FASTJET && with_fastjet=$FASTJET ])
1002 if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then
1003 ALIFASTJET_INCFLAGS="-I${with_fastjet}/include"
1004 ALIFASTJET_HEADER="PseudoJet.hh"
1005 ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib"
1006 ALIFASTJET_LIBS="CGAL fastjet"
1011 CHECK_HLTMODULE([jet],
1012 [$ALIFASTJET_HEADER], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/JETAN $ALIFASTJET_INCFLAGS],
1013 [$ALIFASTJET_LIBS], [-L$ROOTLIBDIR $ALIFASTJET_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS],
1014 [AOD ESD ANALYSIS ANALYSISalice JETAN JETANMC],
1015 [-L$ROOTLIBDIR $ALIROOT_LDFLAGS -L$ALICE_ROOT/lib/tgt_$ALICE_TARGET],
1016 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1018 if test "x$enable_module" = "xmissheader"; then
1019 enable_module="no...header.missing"
1020 enable_jet=$enable_module
1021 elif test "x$enable_module" = "xforce"; then
1024 enable_jet=$enable_module
1027 if test "x$enable_jet" = "xyes" ; then
1029 ALIJET_LIBS="$ALIHLTMODULE_LIBS"
1031 if test "x$with_fastjet" != "xno"; then
1032 AC_DEFINE(HAVE_FASTJET)
1033 AC_DEFINE(WITHFASTJET)
1034 ALIJET_LIBS="$ALIJET_LIBS -L$FASTJET_LDFLAGS"
1036 AC_MSG_CHECKING([compilation with FASTJET package])
1037 AC_MSG_RESULT($with_fastjet)
1040 enable_module=$enable_jet
1043 AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
1044 AC_MSG_CHECKING([whether to compile Jet library])
1045 AC_MSG_RESULT([$enable_module])
1046 AC_SUBST([ALIJET_LIBS])
1048 dnl ------------------------------------------------------------------
1049 AH_TEMPLATE([HLT_ITS],[hlt its library])
1052 CHECK_HLTMODULE([its],
1053 [AliITSCompressRawDataSDD.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS],
1054 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1055 [ITSbase ITSrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1056 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1058 if test "x$enable_module" = "xmissheader"; then
1059 enable_module="no...header.missing"
1060 enable_its=$enable_module
1061 elif test "x$enable_module" = "xforce"; then
1064 enable_its=$enable_module
1065 if test "x$enable_its" = "xyes" ; then
1067 save_CPPFLAGS="$CPPFLAGS"
1068 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS"
1069 # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008
1070 # require AliVertexer::GetNominalPos()
1071 AC_MSG_CHECKING([for required functions in AliITSVertexer])
1072 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>],
1074 v.GetNominalPos()])],
1076 [enable_its="no...requires.AliRoot>v4-13-Release"])
1077 AC_MSG_RESULT([$enable_its])
1079 CPPFLAGS="$save_CPPFLAGS"
1083 if test "x$enable_its" = "xyes" ; then
1085 ALIITS_LIBS=$ALIHLTMODULE_LIBS
1087 enable_module=$enable_its
1089 AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
1090 AC_MSG_CHECKING([whether to compile ITS library])
1091 AC_MSG_RESULT([$enable_module])
1092 AC_SUBST([ALIITS_LIBS])
1094 dnl ------------------------------------------------------------------
1095 AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
1098 CHECK_HLTMODULE([emcal],
1099 [], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/EMCAL],
1100 [RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1101 [EMCALrec EMCALsim EMCALbase], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1102 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1104 if test "x$enable_module" = "xmissheader"; then
1105 enable_module="no...header.missing"
1106 enable_emcal=$enable_module
1107 elif test "x$enable_module" = "xforce"; then
1110 enable_emcal=$enable_module
1113 if test "x$enable_emcal" = "xyes" ; then
1114 AC_DEFINE(HLT_EMCAL)
1115 ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
1117 enable_module=$enable_emcal
1119 AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
1120 AC_MSG_CHECKING([whether to compile EMCAL library])
1121 AC_MSG_RESULT([$enable_module])
1122 AC_SUBST([ALIEMCAL_LIBS])
1124 dnl ------------------------------------------------------------------
1125 AH_TEMPLATE([HLT_COMP],[hlt comp library])
1128 CHECK_HLTMODULE([comp],
1129 [], [$ALIROOT_CPPFLAGS],
1130 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1131 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1132 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1134 if test "x$enable_module" = "xmissheader"; then
1135 enable_module="no...header.missing"
1136 enable_comp=$enable_module
1137 elif test "x$enable_module" = "xforce"; then
1140 enable_comp=$enable_module
1143 if test "x$enable_comp" = "xyes" ; then
1145 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
1147 enable_module=$enable_comp
1149 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
1150 AC_MSG_CHECKING([whether to compile comp library])
1151 AC_MSG_RESULT([$enable_module])
1152 AC_SUBST([ALICOMP_LIBS])
1154 dnl ------------------------------------------------------------------
1155 AC_MSG_CHECKING([whether to disable AliRoot logging])
1156 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
1157 AC_ARG_ENABLE(aliroot-logging,
1158 [AC_HELP_STRING([--disable-aliroot-logging],
1159 [disable logging through AliRoot logging methods])],
1160 [],[enable_aliroot_logging=no])
1161 if test "x$have_aliroot" = "xno" ; then
1162 enable_aliroot_logging=yes # this means 'disable'
1164 if test "x$enable_aliroot_logging" != "xno" ; then
1165 AC_DEFINE(NOALIROOT_LOGGING)
1167 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
1168 AC_MSG_RESULT([$enable_aliroot_logging])
1170 dnl ------------------------------------------------------------------
1171 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
1172 AH_TEMPLATE([DOMC],[MC saving])
1173 AC_ARG_ENABLE(mc-saving,
1174 [AC_HELP_STRING([--enable-mc-saving],
1175 [enable saving MC data through the chain])],
1176 [],[enable_mc_saving=no])
1177 if test "x$enable_mc_saving" = "xyes" ; then
1180 AC_MSG_RESULT([$enable_mc_saving])
1182 dnl ------------------------------------------------------------------
1183 dnl certainly something old, but we keep the define
1184 AC_MSG_CHECKING([whether to use ROWHOUGH])
1185 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
1186 AC_ARG_ENABLE(rowhough,
1187 [AC_HELP_STRING([--enable-rowhough],
1189 [],[enable_rowhough=no])
1190 if test "x$enable_rowhough" = "xyes" ; then
1191 AC_DEFINE(USEROWHOUGH)
1193 AC_MSG_RESULT([$enable_rowhough])
1195 dnl ------------------------------------------------------------------
1196 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
1197 dnl stand-alone build system. This is most likely something old we can
1198 dnl get rid off later, or do something more reasonable. Since the define
1199 dnl needs the quotes they have to be escaped. This works well for the
1200 dnl Makefile but not for the configure script. So we have to add the
1201 dnl defines after all the other checks.
1202 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
1203 if test ! "x$have_aliroot" = "xno" ; then
1204 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
1207 dnl ------------------------------------------------------------------
1211 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
1212 AC_PATH_PROG(PERL, perl)
1213 AC_PATH_PROG(DOXYGEN, doxygen)
1215 [AC_HELP_STRING([--enable-dot],
1216 [enable dot documentation generator])],
1220 AC_PATH_PROG(DOT, dot)
1221 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
1223 DOT_PATH=`dirname $DOT`
1226 AC_MSG_CHECKING([for documentation mode])
1228 [AC_HELP_STRING([--disable-doc],
1229 [disable documentation build; monolithic build --enable-doc=mono ])],
1230 [],[enable_doc=modules])
1232 if test "x$DOXYGEN" = "x" ; then
1233 enable_doc=no.doxygen
1234 elif test "x$enable_doc" = "xyes" ; then
1236 elif test ! "x$enable_doc" = "xmono" && \
1237 test ! "x$enable_doc" = "xmodules" && \
1238 test ! "x$enable_doc" = "xno"; then
1240 AC_MSG_WARN([unknown option])
1242 if test "x$enable_doc" = "xno" ; then
1247 AC_MSG_RESULT([$enable_doc])
1248 AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
1249 AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
1250 AC_SUBST([HAVE_DOT])
1251 AC_SUBST([DOT_PATH])
1253 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
1254 dnl echo $HAVE_SRC_SUBDIR
1255 dnl if ! test -d $HAVE_SRC_SUBDIR; then
1256 dnl HAVE_SRC_SUBDIR=
1258 dnl AC_SUBST([HAVE_SRC_SUBDIR])
1260 dnl ------------------------------------------------------------------
1261 AC_MSG_NOTICE([---------------------------------------------- ])
1262 AC_MSG_NOTICE([ build summary ])
1263 AC_MSG_NOTICE([---------------------------------------------- ])
1265 AC_CONFIG_FILES([Makefile
1271 BASE/util/test/Makefile
1272 BASE/interface/Makefile
1274 BASE/interface/test/Makefile
1277 doc/doxymodule.conf])
1279 dnl AliRoot and installation directory for libraries
1281 AC_MSG_NOTICE([AliRoot: $have_aliroot])
1282 AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
1283 if test "x$have_aliroot" != "xno"; then
1284 AC_CONFIG_FILES([sim/Makefile
1287 rec/startAliEVE-barrel-tracks.sh
1294 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1295 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1296 AC_MSG_NOTICE([libdir set to $libdir])
1299 AC_MSG_NOTICE([compile sample library: $enable_sample])
1300 if test "x$enable_sample" = "xyes"; then
1301 AC_CONFIG_FILES([SampleLib/Makefile])
1304 AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1305 if test "x$enable_rcu" = "xyes"; then
1306 AC_CONFIG_FILES([RCU/Makefile
1311 AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1312 if test "x$enable_tpc" = "xyes"; then
1313 AC_CONFIG_FILES([TPCLib/Makefile
1314 TPCLib/test/Makefile
1315 TPCLib/mapping2array.cxx
1320 AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1321 if test "x$enable_phos" = "xyes"; then
1322 AC_CONFIG_FILES([PHOS/Makefile])
1325 AC_MSG_NOTICE([compile TRD library: $enable_trd])
1326 if test "x$enable_trd" = "xyes"; then
1327 AC_CONFIG_FILES([TRD/Makefile])
1330 AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1331 if test "x$enable_fmd" = "xyes"; then
1332 AC_CONFIG_FILES([FMD/Makefile])
1335 AC_MSG_NOTICE([compile MUON library: $enable_muon])
1336 if test "x$enable_muon" = "xyes"; then
1337 AC_CONFIG_FILES([MUON/Makefile])
1340 AC_MSG_NOTICE([compile ITS library: $enable_its])
1341 if test "x$enable_its" = "xyes"; then
1342 AC_CONFIG_FILES([ITS/Makefile])
1345 AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1346 if test "x$enable_emcal" = "xyes"; then
1347 AC_CONFIG_FILES([EMCAL/Makefile])
1350 AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1351 if test "x$enable_trigger" = "xyes"; then
1352 AC_CONFIG_FILES([trigger/Makefile
1353 trigger/test/Makefile])
1356 AC_MSG_NOTICE([compile global library: $enable_global])
1357 if test "x$enable_global" = "xyes"; then
1358 AC_CONFIG_FILES([global/Makefile])
1361 AC_MSG_NOTICE([compile jet library: $enable_jet])
1362 if test "x$enable_jet" = "xyes"; then
1363 AC_CONFIG_FILES([JET/Makefile])
1366 AC_MSG_NOTICE([compile comp library: $enable_comp])
1367 if test "x$enable_comp" = "xyes"; then
1368 AC_CONFIG_FILES([comp/Makefile])