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 # - libCDB.so depends on libGui.so since May 14 2010 r 41238
80 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer XMLParser Gui'
81 for CHECKLIB in $ROOT_CHECKLIBS ; do
82 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
83 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
84 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
87 # TBuffer.h has been made pure virtual in root v5-15-02 and one
88 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
89 AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE])
91 # TView.h has been made pure virtual right after root v5-15-02 and one
92 # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
93 AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D])
95 CPPFLAGS=$save_CPPFLAGS
101 dnl ------------------------------------------------------------------
102 # TODO: make this configurable through arguments
103 #Define whether you want to run with ALIROOT or only ROOT
104 AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
105 ALIHLT_USEPACKAGE=ALIROOT
106 #ALIHLT_USEPACKAGE=ROOT
107 #ALIHLT_USEPACKAGE=STANDALONE
108 AC_DEFINE(use_aliroot)
110 CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
111 save_CPPFLAGS=$CPPFLAGS
112 save_LDFLAGS=$LDFLAGS
115 dnl ------------------------------------------------------------------
116 dnl check for AliRoot features
119 AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
120 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
123 if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
124 dnl ------------------------------------------------------------------
125 dnl Try to estimate the system architecture
126 case $host_os:$host_cpu in
127 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
128 linux*) alice_target='linux' ;;
129 *) alice_target='unknown' ;;
131 if test "x$alice_target" = "xunknown" ; then
132 if test -z $ALICE_TARGET ; then
133 AC_MSG_ERROR([Can not estimate system architecture.
134 To avoid the problem, set the ALICE_TARGET variable appropriately.
135 Please send the following information to Matthias.Richter@ift.uib.no:
136 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
138 AC_MSG_NOTICE([Unknown system architecture.
139 Please send the following information to Matthias.Richter@ift.uib.no:
140 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
143 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
144 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
145 overriding $ALICE_TARGET by $alice_target])
147 ALICE_TARGET=$alice_target
149 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
150 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
151 ALIROOTINCDIR=${ALICE_ROOT}/include
152 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
153 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
154 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
157 AC_MSG_CHECKING([for AliRoot])
158 if test "x$ALICE_ROOT" != "x" \
159 && test -d ${ALIROOTBINDIR} \
160 && test -d ${ALIROOTLIBDIR} \
161 && test -d ${ALIROOTINCDIR}; then
162 have_aliroot=$ALICE_ROOT
168 AC_MSG_RESULT([$have_aliroot])
171 AC_SUBST([ALICE_ROOT])
172 AC_SUBST([ALIROOT_CPPFLAGS])
173 AC_SUBST([ALIROOT_LDFLAGS])
174 AC_SUBST([ALIROOTBINDIR])
175 AC_SUBST([ALIROOTLIBDIR])
177 ALIROOT_LIBS="$ALIROOT_LIBS $ADD_ROOTLIBS"
178 AC_SUBST([ALIROOT_LIBS])
179 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
181 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
183 AC_SUBST([HLTBASE_CPPFLAGS])
184 AC_SUBST([HLTBASE_LDFLAGS])
186 dnl ------------------------------------------------------------------
188 [AC_HELP_STRING([--disable-all],
189 [disable all detector modules, individual modules can be switched on by --enable-det])],
190 [disable_all=yes],[])
192 dnl ------------------------------------------------------------------
193 AC_MSG_CHECKING([whether to impose strict coding conventions])
194 AC_ARG_ENABLE(strict,
195 [AC_HELP_STRING([--disable-strict],
196 [disable coding convention checks ])],
197 [],[enable_strict=yes])
198 if test "x$enable_strict" = "xyes" ; then
199 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
201 AC_MSG_RESULT([$enable_strict])
203 dnl ------------------------------------------------------------------
204 AC_MSG_CHECKING([whether to enable component statistics])
205 AC_ARG_ENABLE(component-stat,
206 [AC_HELP_STRING([--enable-component-stat],
207 [enable component statistics ])],
210 dnl enable component statistics if not explicitely disabled
211 if test "x$enable_component_stat" != "xno" &&
212 test "x$enable_debug" = "xyes" ; then
213 enable_component_stat=yes.debug
216 if test "x$enable_component_stat" = "x" ; then
217 enable_component_stat=no
220 if test "x$enable_component_stat" != "xno" ; then
221 AC_DEFINE(HLT_COMPONENT_STATISTICS)
223 AC_MSG_RESULT([$enable_component_stat])
225 dnl ------------------------------------------------------------------
226 dnl ---- module checks
227 dnl ------------------------------------------------------------------
228 save_CPPFLAGS=$CPPFLAGS
229 save_LDFLAGS=$LDFLAGS
232 dnl ------------------------------------------------------------------
233 AC_MSG_NOTICE([-------------------------------------------------])
234 AC_MSG_NOTICE([checking dependencies for HLTbase library])
235 HLTBASE_CHECKLIBS='XMLParser'
236 for CHECKLIB in $HLTBASE_CHECKLIBS ; do
237 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
238 LIBS="$save_LIBS $ROOTLIBS $ALIHLTBASE_LIBS"
239 AC_CHECK_LIB([$CHECKLIB],[_init], [ALIHLTBASE_LIBS="$ALIHLTBASE_LIBS -l$CHECKLIB"])
241 AC_SUBST([ALIHLTBASE_LIBS])
243 dnl ------------------------------------------------------------------
244 AC_MSG_CHECKING([whether to compile sample library])
245 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
246 AC_ARG_ENABLE(sample,
247 [AC_HELP_STRING([--disable-sample],
248 [compile the sample library ])],
250 [if test "x$have_aliroot" = "xno" ; then
251 enable_sample="no...requires.AliRoot"
257 if test "x$enable_sample" = "xyes" ; then
258 AC_DEFINE(HLT_SAMPLE)
260 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
261 AC_MSG_RESULT([$enable_sample])
263 dnl ------------------------------------------------------------------
264 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
266 CHECK_HLTMODULE([util],
273 if test "x$enable_module" = "xmissheader"; then
274 enable_module="no...missing.headers"
275 enable_util=$enable_module
276 elif test "x$enable_module" = "xforce"; then
279 enable_util=$enable_module
281 if test "x$enable_util" = "xyes" ; then
283 ALIUTIL_LIBS=$ALIHLTMODULE_LIBS
285 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
286 AC_MSG_CHECKING([whether to compile Util library])
287 AC_MSG_RESULT([$enable_module])
288 AC_SUBST([ALIUTIL_LIBS])
290 dnl ------------------------------------------------------------------
291 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
294 CHECK_HLTMODULE([tpc],
301 if test "x$enable_module" = "xmissheader"; then
302 enable_module="no...missing.headers"
303 enable_tpc=$enable_module
304 elif test "x$enable_module" = "xforce"; then
307 enable_tpc=$enable_module
310 if test "x$enable_tpc" = "xyes" ; then
313 ALITPC_LIBS=$ALIHLTMODULE_LIBS
315 dnl Check for functionality in the TPC reconstruction required for online
318 have_tpc_hltoffline_rec=no
319 AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
320 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
321 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
322 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
323 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
324 #include <AliTPCclustererMI.h>
325 #include <TObjArray.h>],
326 [AliTPCtrackerMI tracker;
327 TObjArray* array=NULL;
328 tracker.LoadClusters(array);
329 AliTPCclustererMI cl(NULL, NULL);
330 cl.GetOutputClonesArray();])],
331 [have_tpc_hltoffline_rec=yes],
332 [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
333 AC_MSG_RESULT([$have_tpc_hltoffline_rec])
335 have_alitpcclusterparam_r40128=no
336 AC_MSG_CHECKING([checking for AliTPCClusterParam r40128])
337 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTPCClusterParam.h>],
338 [AliTPCClusterParam param;
339 float test=param.ParamS0Par(0,0,0)]);],
340 [have_alitpcclusterparam_r40128=yes],
341 [AC_DEFINE(HAVE_NOT_ALITPCCLUSTERPARAM_r40128)])
342 AC_MSG_RESULT([$have_alitpcclusterparam_r40128])
347 AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
348 AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
349 AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)])
352 if test ! "x$have_aliroot" = "xno" ; then
353 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
354 # which is stored in the TPC/mapping/Patchx.data files from
355 # AliRoot version v4-04-Release (May 2006)
356 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
357 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
358 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
359 [have_tpc_mapping=yes
360 AC_SUBST(TPC_PAD_MAPPING_PATH)
361 AC_DEFINE(HAVE_TPC_MAPPING)],
365 AC_MSG_CHECKING([for TPC mapping layout])
366 AC_MSG_RESULT([$have_tpc_mapping])
370 enable_module=$enable_tpc
372 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
373 AC_MSG_CHECKING([whether to compile TPC library])
374 AC_MSG_RESULT([$enable_module])
375 AC_SUBST([ALITPC_LIBS])
377 dnl ------------------------------------------------------------------
378 AH_TEMPLATE([HLT_RCU],[hlt rcu library])
380 CHECK_HLTMODULE([rcu],
387 if test "x$enable_module" = "xmissheader"; then
388 enable_module="no...missing.headers"
389 enable_rcu=$enable_module
390 elif test "x$enable_module" = "xforce"; then
393 enable_rcu=$enable_module
396 if test "x$enable_rcu" = "xyes" ; then
399 enable_module=$enable_rcu
401 AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
402 AC_MSG_CHECKING([whether to compile RCU library])
403 AC_MSG_RESULT([$enable_module])
404 AC_SUBST([ALIRCU_LIBS])
406 dnl ------------------------------------------------------------------
407 AH_TEMPLATE([HLT_CALO],[hlt calo(rimeter) library])
410 CHECK_HLTMODULE([calo],
416 if test "x$enable_module" = "xmissheader"; then
417 enable_module="no...missing.headers"
418 enable_calo=$enable_module
419 elif test "x$enable_module" = "xforce"; then
422 enable_calo=$enable_module
425 if test "x$enable_calo" = "xyes" ; then
427 ALICALO_LIBS=$ALIHLTMODULE_LIBS
429 enable_module=$enable_calo
431 AM_CONDITIONAL(EN_HLT_CALO, test x$enable_calo = xyes)
432 AC_MSG_CHECKING([whether to compile CALO library])
433 AC_MSG_RESULT([$enable_module])
434 AC_SUBST([ALICALO_LIBS])
436 dnl ------------------------------------------------------------------
437 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
440 CHECK_HLTMODULE([phos],
446 if test "x$enable_module" = "xmissheader"; then
447 enable_module="no...requires.AliRoot>v4-05-07"
448 enable_phos=$enable_module
449 elif test "x$enable_module" = "xforce"; then
452 enable_phos=$enable_module
455 if test "x$enable_phos" = "xyes" ; then
457 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
459 enable_module=$enable_phos
461 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
462 AC_MSG_CHECKING([whether to compile PHOS library])
463 AC_MSG_RESULT([$enable_module])
464 AC_SUBST([ALIPHOS_LIBS])
466 dnl ------------------------------------------------------------------
467 AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
470 CHECK_HLTMODULE([emcal],
476 if test "x$enable_module" = "xmissheader"; then
477 enable_module="no...header.missing"
478 enable_emcal=$enable_module
479 elif test "x$enable_module" = "xforce"; then
482 enable_emcal=$enable_module
485 if test "x$enable_emcal" = "xyes" ; then
487 ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
489 enable_module=$enable_emcal
491 AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
492 AC_MSG_CHECKING([whether to compile EMCAL library])
493 AC_MSG_RESULT([$enable_module])
494 AC_SUBST([ALIEMCAL_LIBS])
496 dnl ------------------------------------------------------------------
497 AH_TEMPLATE([HLT_TRD],[hlt trd library])
500 CHECK_HLTMODULE([trd],
506 if test "x$enable_module" = "xmissheader"; then
507 enable_module="no...requires.AliRoot>v4-07-Release"
508 enable_trd=$enable_module
509 elif test "x$enable_module" = "xforce"; then
512 enable_trd=$enable_module
515 if test "x$enable_trd" = "xyes" ; then
517 ALITRD_LIBS=$ALIHLTMODULE_LIBS
519 enable_module=$enable_trd
521 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
522 AC_MSG_CHECKING([whether to compile TRD library])
523 AC_MSG_RESULT([$enable_module])
524 AC_SUBST([ALITRD_LIBS])
526 dnl ------------------------------------------------------------------
527 AH_TEMPLATE([HLT_FMD],[hlt fmd library])
529 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
530 CHECK_HLTMODULE([fmd],
536 if test "x$enable_module" = "xmissheader"; then
537 enable_module="no...missing.headers"
538 enable_fmd=$enable_module
539 elif test "x$enable_module" = "xforce"; then
542 enable_fmd=$enable_module
545 if test "x$enable_fmd" = "xyes" ; then
547 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
549 enable_module=$enable_fmd
551 AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
552 AC_MSG_CHECKING([whether to compile FMD library])
553 AC_MSG_RESULT([$enable_module])
554 AC_SUBST([ALIFMD_LIBS])
556 dnl ------------------------------------------------------------------
557 AH_TEMPLATE([HLT_ZDC],[hlt zdc library])
559 ALIZDC_LIBS=$ALIHLTMODULE_LIBS
560 CHECK_HLTMODULE([zdc],
566 if test "x$enable_module" = "xmissheader"; then
567 enable_module="no...missing.headers"
568 enable_zdc=$enable_module
569 elif test "x$enable_module" = "xforce"; then
572 enable_zdc=$enable_module
575 if test "x$enable_zdc" = "xyes" ; then
577 ALIZDC_LIBS=$ALIHLTMODULE_LIBS
579 enable_module=$enable_zdc
581 AM_CONDITIONAL(EN_HLT_ZDC, test x$enable_zdc = xyes)
582 AC_MSG_CHECKING([whether to compile ZDC library])
583 AC_MSG_RESULT([$enable_module])
584 AC_SUBST([ALIZDC_LIBS])
586 dnl ------------------------------------------------------------------
587 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
590 CHECK_HLTMODULE([dimuon],
597 if test "x$enable_module" = "xmissheader"; then
598 enable_module="no...requires.AliRoot>=v4-08-Release"
599 enable_muon=$enable_module
600 elif test "x$enable_module" = "xforce"; then
603 enable_muon=$enable_module
606 if test "x$enable_muon" = "xyes" ; then
608 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
610 save_CPPFLAGS="$CPPFLAGS"
613 dnl Check for functionality GetRawStream AliMUONDigitMaker.h
615 have_muon_digitmaker_getrawstream=no
616 AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker)
617 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON"
618 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
619 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
620 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>],
621 [AliMUONDigitMaker dm;
622 dm.GetRawStreamTracker();])],
623 [have_muon_digitmaker_getrawstream=yes],
624 [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
626 AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
629 dnl Check for AliMpPad::GetPositionX/Y
630 dnl change of implementation in MUON code
631 dnl revision 31769, Wed Apr 1 2009
633 have_muon_alimppad_getposition=no
634 AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
635 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
636 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
637 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
638 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>],
640 pad.GetPositionX();])],
641 [have_muon_alimppad_getposition=yes],
642 [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
644 AC_MSG_RESULT([$have_muon_alimppad_getposition])
646 CPPFLAGS="$save_CPPFLAGS"
650 enable_module=$enable_muon
652 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
653 AC_MSG_CHECKING([whether to compile MUON library])
654 AC_MSG_RESULT([$enable_module])
655 AC_SUBST([ALIMUON_LIBS])
657 dnl ------------------------------------------------------------------
658 AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
661 CHECK_HLTMODULE([trigger],
667 if test "x$enable_module" = "xmissheader"; then
668 enable_module="no...header.missing"
669 enable_trigger=$enable_module
670 elif test "x$enable_module" = "xforce"; then
673 enable_trigger=$enable_module
676 if test "x$enable_trigger" = "xyes" ; then
677 AC_DEFINE(HLT_TRIGGER)
678 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
680 enable_module=$enable_trigger
682 AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
683 AC_MSG_CHECKING([whether to compile Trigger library])
684 AC_MSG_RESULT([$enable_module])
685 AC_SUBST([ALITRIGGER_LIBS])
687 dnl ------------------------------------------------------------------
688 AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
691 CHECK_HLTMODULE([global],
697 if test "x$enable_module" = "xmissheader"; then
698 enable_module="no...header.missing"
699 enable_global=$enable_module
700 elif test "x$enable_module" = "xforce"; then
703 enable_global=$enable_module
706 if test "x$enable_global" = "xyes" ; then
707 AC_DEFINE(HLT_GLOBAL)
708 ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
710 enable_module=$enable_global
712 AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
713 AC_MSG_CHECKING([whether to compile Global library])
714 AC_MSG_RESULT([$enable_module])
715 AC_SUBST([ALIGLOBAL_LIBS])
717 dnl ------------------------------------------------------------------
718 AH_TEMPLATE([HLT_JET],[hlt jet library])
724 AC_ARG_WITH(fastjet, [installation path of the FASTJET package],
725 [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet],
726 [ test -n $FASTJET && with_fastjet=$FASTJET ])
728 if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then
729 ALIFASTJET_INCFLAGS="-I${with_fastjet}/include"
730 ALIFASTJET_HEADER="fastjet/PseudoJet.hh"
731 ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib"
732 ALIFASTJET_LIBS="CGAL fastjet"
737 CHECK_HLTMODULE([jet],
744 if test "x$enable_module" = "xmissheader"; then
745 enable_module="no...header.missing"
746 enable_jet=$enable_module
747 elif test "x$enable_module" = "xforce"; then
750 enable_jet=$enable_module
753 if test "x$enable_jet" = "xyes" ; then
755 ALIJET_LIBS="$ALIHLTMODULE_LIBS"
757 if test "x$with_fastjet" != "xno"; then
758 AC_DEFINE(HAVE_FASTJET)
759 AC_DEFINE(WITHFASTJET)
760 ALIJET_LIBS="$ALIJET_LIBS $FASTJET_LDFLAGS"
762 AC_MSG_CHECKING([compilation with FASTJET package])
763 AC_MSG_RESULT($with_fastjet)
766 enable_module=$enable_jet
769 AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
770 AC_MSG_CHECKING([whether to compile Jet library])
771 AC_MSG_RESULT([$enable_module])
772 AC_SUBST([ALIJET_LIBS])
774 dnl ------------------------------------------------------------------
775 AH_TEMPLATE([HLT_VZERO],[hlt vzero library])
778 CHECK_HLTMODULE([vzero],
784 if test "x$enable_module" = "xmissheader"; then
785 enable_module="no...header.missing"
786 enable_vzero=$enable_module
787 elif test "x$enable_module" = "xforce"; then
790 enable_vzero=$enable_module
793 if test "x$enable_vzero" = "xyes" ; then
795 ALIVZERO_LIBS=$ALIHLTMODULE_LIBS
797 enable_module=$enable_vzero
799 AM_CONDITIONAL(EN_HLT_VZERO, test x$enable_vzero = xyes)
800 AC_MSG_CHECKING([whether to compile VZERO library])
801 AC_MSG_RESULT([$enable_module])
802 AC_SUBST([ALIVZERO_LIBS])
804 dnl ------------------------------------------------------------------
805 AH_TEMPLATE([HLT_ITS],[hlt its library])
808 CHECK_HLTMODULE([its],
814 if test "x$enable_module" = "xmissheader"; then
815 enable_module="no...header.missing"
816 enable_its=$enable_module
817 elif test "x$enable_module" = "xforce"; then
820 enable_its=$enable_module
823 if test "x$enable_its" = "xyes" ; then
825 ALIITS_LIBS=$ALIHLTMODULE_LIBS
827 enable_module=$enable_its
829 AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
830 AC_MSG_CHECKING([whether to compile ITS library])
831 AC_MSG_RESULT([$enable_module])
832 AC_SUBST([ALIITS_LIBS])
834 dnl ------------------------------------------------------------------
835 AH_TEMPLATE([HLT_COMP],[hlt comp library])
838 CHECK_HLTMODULE([comp],
844 if test "x$enable_module" = "xmissheader"; then
845 enable_module="no...header.missing"
846 enable_comp=$enable_module
847 elif test "x$enable_module" = "xforce"; then
850 enable_comp=$enable_module
853 if test "x$enable_comp" = "xyes" ; then
855 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
857 enable_module=$enable_comp
859 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
860 AC_MSG_CHECKING([whether to compile comp library])
861 AC_MSG_RESULT([$enable_module])
862 AC_SUBST([ALICOMP_LIBS])
864 dnl ------------------------------------------------------------------
865 AC_MSG_CHECKING([whether to disable AliRoot logging])
866 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
867 AC_ARG_ENABLE(aliroot-logging,
868 [AC_HELP_STRING([--disable-aliroot-logging],
869 [disable logging through AliRoot logging methods])],
870 [],[enable_aliroot_logging=no])
871 if test "x$have_aliroot" = "xno" ; then
872 enable_aliroot_logging=yes # this means 'disable'
874 if test "x$enable_aliroot_logging" != "xno" ; then
875 AC_DEFINE(NOALIROOT_LOGGING)
877 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
878 AC_MSG_RESULT([$enable_aliroot_logging])
880 dnl ------------------------------------------------------------------
881 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
882 AH_TEMPLATE([DOMC],[MC saving])
883 AC_ARG_ENABLE(mc-saving,
884 [AC_HELP_STRING([--enable-mc-saving],
885 [enable saving MC data through the chain])],
886 [],[enable_mc_saving=no])
887 if test "x$enable_mc_saving" = "xyes" ; then
890 AC_MSG_RESULT([$enable_mc_saving])
892 dnl ------------------------------------------------------------------
893 dnl certainly something old, but we keep the define
894 AC_MSG_CHECKING([whether to use ROWHOUGH])
895 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
896 AC_ARG_ENABLE(rowhough,
897 [AC_HELP_STRING([--enable-rowhough],
899 [],[enable_rowhough=no])
900 if test "x$enable_rowhough" = "xyes" ; then
901 AC_DEFINE(USEROWHOUGH)
903 AC_MSG_RESULT([$enable_rowhough])
905 dnl ------------------------------------------------------------------
906 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
907 dnl stand-alone build system. This is most likely something old we can
908 dnl get rid off later, or do something more reasonable. Since the define
909 dnl needs the quotes they have to be escaped. This works well for the
910 dnl Makefile but not for the configure script. So we have to add the
911 dnl defines after all the other checks.
912 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
913 if test ! "x$have_aliroot" = "xno" ; then
914 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
917 dnl ------------------------------------------------------------------
921 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
922 AC_PATH_PROG(PERL, perl)
923 AC_PATH_PROG(DOXYGEN, doxygen)
925 [AC_HELP_STRING([--enable-dot],
926 [enable dot documentation generator])],
930 AC_PATH_PROG(DOT, dot)
931 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
933 DOT_PATH=`dirname $DOT`
936 AC_MSG_CHECKING([for documentation mode])
938 [AC_HELP_STRING([--disable-doc],
939 [disable documentation build; monolithic build --enable-doc=mono ])],
940 [],[enable_doc=modules])
942 if test "x$DOXYGEN" = "x" ; then
943 enable_doc=no.doxygen
944 elif test "x$enable_doc" = "xyes" ; then
946 elif test ! "x$enable_doc" = "xmono" && \
947 test ! "x$enable_doc" = "xmodules" && \
948 test ! "x$enable_doc" = "xno"; then
950 AC_MSG_WARN([unknown option])
952 if test "x$enable_doc" = "xno" ; then
957 AC_MSG_RESULT([$enable_doc])
958 AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
959 AM_CONDITIONAL(BUILD_DOC, test ! "x$DOXYGEN" = "x")
963 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
964 dnl echo $HAVE_SRC_SUBDIR
965 dnl if ! test -d $HAVE_SRC_SUBDIR; then
968 dnl AC_SUBST([HAVE_SRC_SUBDIR])
970 dnl ------------------------------------------------------------------
971 AC_MSG_NOTICE([---------------------------------------------- ])
972 AC_MSG_NOTICE([ build summary ])
973 AC_MSG_NOTICE([---------------------------------------------- ])
975 AC_CONFIG_FILES([Makefile
981 BASE/util/test/Makefile
982 BASE/interface/Makefile
984 BASE/interface/test/Makefile
987 doc/doxymodule.conf])
989 dnl AliRoot and installation directory for libraries
991 AC_MSG_NOTICE([AliRoot: $have_aliroot])
992 AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
993 if test "x$have_aliroot" != "xno"; then
994 AC_CONFIG_FILES([sim/Makefile
997 rec/startAliEVE-barrel-tracks.sh
1004 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1005 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1006 AC_MSG_NOTICE([libdir set to $libdir])
1009 AC_MSG_NOTICE([compile sample library: $enable_sample])
1010 if test "x$enable_sample" = "xyes"; then
1011 AC_CONFIG_FILES([SampleLib/Makefile])
1014 AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1015 if test "x$enable_rcu" = "xyes"; then
1016 AC_CONFIG_FILES([RCU/Makefile
1021 AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1022 if test "x$enable_tpc" = "xyes"; then
1023 AC_CONFIG_FILES([TPCLib/Makefile
1024 TPCLib/test/Makefile
1025 TPCLib/mapping2array.cxx
1027 TPCLib/calibration/Makefile
1031 AC_MSG_NOTICE([compile CALO library: $enable_calo])
1032 if test "x$enable_calo" = "xyes"; then
1033 AC_CONFIG_FILES([CALO/Makefile
1034 CALO/test/Makefile])
1037 AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1038 if test "x$enable_phos" = "xyes"; then
1039 AC_CONFIG_FILES([PHOS/Makefile])
1042 AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1043 if test "x$enable_emcal" = "xyes"; then
1044 AC_CONFIG_FILES([EMCAL/Makefile])
1047 AC_MSG_NOTICE([compile TRD library: $enable_trd])
1048 if test "x$enable_trd" = "xyes"; then
1049 AC_CONFIG_FILES([TRD/Makefile])
1052 AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1053 if test "x$enable_fmd" = "xyes"; then
1054 AC_CONFIG_FILES([FMD/Makefile])
1057 AC_MSG_NOTICE([compile ZDC library: $enable_zdc])
1058 if test "x$enable_zdc" = "xyes"; then
1059 AC_CONFIG_FILES([ZDC/Makefile])
1062 AC_MSG_NOTICE([compile MUON library: $enable_muon])
1063 if test "x$enable_muon" = "xyes"; then
1064 AC_CONFIG_FILES([MUON/Makefile])
1067 AC_MSG_NOTICE([compile ITS library: $enable_its])
1068 if test "x$enable_its" = "xyes"; then
1069 AC_CONFIG_FILES([ITS/Makefile])
1072 AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1073 if test "x$enable_trigger" = "xyes"; then
1074 AC_CONFIG_FILES([trigger/Makefile
1075 trigger/test/Makefile])
1078 AC_MSG_NOTICE([compile global library: $enable_global])
1079 if test "x$enable_global" = "xyes"; then
1080 AC_CONFIG_FILES([global/Makefile])
1083 AC_MSG_NOTICE([compile jet library: $enable_jet])
1084 if test "x$enable_jet" = "xyes"; then
1085 AC_CONFIG_FILES([JET/Makefile])
1088 AC_MSG_NOTICE([compile vzero library: $enable_vzero])
1089 if test "x$enable_vzero" = "xyes"; then
1090 AC_CONFIG_FILES([VZERO/Makefile])
1093 AC_MSG_NOTICE([compile comp library: $enable_comp])
1094 if test "x$enable_comp" = "xyes"; then
1095 AC_CONFIG_FILES([comp/Makefile])