1 dnl -*- mode: autoconf -*-
4 dnl template for the configuration script for the Alice HLT
5 dnl framework and components
7 dnl Note: the autoconf build system is deprecated and not maintained
8 dnl since AliRoot was converted to cmake
9 dnl 2013-03-06: most of checks for AliRoot features have been removed
10 dnl in order to run the existing doxygen setup until this has been
11 dnl converted to cmake as well
13 dnl ------------------------------------------------------------------
15 dnl Take either the AliRoot tag as version id or the current revision
16 AC_INIT([Alice High Level Trigger] ,
18 [Matthias.Richter@ift.uib.no],
21 dnl ------------------------------------------------------------------
22 dnl the package from CVS contains the old Makefiles as well. In order to
23 dnl prevent them from becoming overwritten, we require a separate build
25 if test "`dirname $0`" = "." ; then
26 AC_ERROR([please run the script from a separate build directory])
29 dnl ------------------------------------------------------------------
31 AC_PREFIX_DEFAULT(${PWD})
32 AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
33 AM_INIT_AUTOMAKE([-Wno-portability])
41 AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
43 dnl ------------------------------------------------------------------
44 dnl A warning posted into the auto-generated files
45 dnl Does NOT concern this file ;-)
46 AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
47 AC_SUBST([AUTOGENERATED_WARNING])
49 dnl ------------------------------------------------------------------
53 ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
54 AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
56 ROOTBINDIR=`dirname $ROOTEXEC`
57 AC_SUBST([ROOTBINDIR])
59 dnl test for additional required root libraries and headers
61 if test "x$have_root" = "x1"; then
63 save_CPPFLAGS=$CPPFLAGS
66 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
68 # we check for the libSTEER library which is linked to
69 # - the ROOT libs libGeom libMinuit libVMC libEG
70 # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
71 # - ROOT libCint needs also libdl
72 # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
74 # - from Jan 07 libESD also depends on libXMLIO
75 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
76 # - libCDB.so depends on libXMLParser since Mar 11 2009 r 31411
77 # - libCDB.so depends on libGui.so since May 14 2010 r 41238
78 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer XMLParser Gui'
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])
169 AC_SUBST([ALICE_ROOT])
170 AC_SUBST([ALIROOT_CPPFLAGS])
171 AC_SUBST([ALIROOT_LDFLAGS])
172 AC_SUBST([ALIROOTBINDIR])
173 AC_SUBST([ALIROOTLIBDIR])
175 ALIROOT_LIBS="$ALIROOT_LIBS $ADD_ROOTLIBS"
176 AC_SUBST([ALIROOT_LIBS])
177 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
179 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
181 AC_SUBST([HLTBASE_CPPFLAGS])
182 AC_SUBST([HLTBASE_LDFLAGS])
184 dnl ------------------------------------------------------------------
186 [AC_HELP_STRING([--disable-all],
187 [disable all detector modules, individual modules can be switched on by --enable-det])],
188 [disable_all=yes],[])
190 dnl ------------------------------------------------------------------
191 AC_MSG_CHECKING([whether to impose strict coding conventions])
192 AC_ARG_ENABLE(strict,
193 [AC_HELP_STRING([--disable-strict],
194 [disable coding convention checks ])],
195 [],[enable_strict=yes])
196 if test "x$enable_strict" = "xyes" ; then
197 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
199 AC_MSG_RESULT([$enable_strict])
201 dnl ------------------------------------------------------------------
202 AC_MSG_CHECKING([whether to enable component statistics])
203 AC_ARG_ENABLE(component-stat,
204 [AC_HELP_STRING([--enable-component-stat],
205 [enable component statistics ])],
208 dnl enable component statistics if not explicitely disabled
209 if test "x$enable_component_stat" != "xno" &&
210 test "x$enable_debug" = "xyes" ; then
211 enable_component_stat=yes.debug
214 if test "x$enable_component_stat" = "x" ; then
215 enable_component_stat=no
218 if test "x$enable_component_stat" != "xno" ; then
219 AC_DEFINE(HLT_COMPONENT_STATISTICS)
221 AC_MSG_RESULT([$enable_component_stat])
223 dnl ------------------------------------------------------------------
224 dnl ---- module checks
225 dnl ------------------------------------------------------------------
226 save_CPPFLAGS=$CPPFLAGS
227 save_LDFLAGS=$LDFLAGS
230 dnl ------------------------------------------------------------------
231 AC_MSG_NOTICE([-------------------------------------------------])
232 AC_MSG_NOTICE([checking dependencies for HLTbase library])
233 HLTBASE_CHECKLIBS='XMLParser'
234 for CHECKLIB in $HLTBASE_CHECKLIBS ; do
235 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
236 LIBS="$save_LIBS $ROOTLIBS $ALIHLTBASE_LIBS"
237 AC_CHECK_LIB([$CHECKLIB],[_init], [ALIHLTBASE_LIBS="$ALIHLTBASE_LIBS -l$CHECKLIB"])
239 AC_SUBST([ALIHLTBASE_LIBS])
241 dnl ------------------------------------------------------------------
242 AC_MSG_CHECKING([whether to compile sample library])
243 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
244 AC_ARG_ENABLE(sample,
245 [AC_HELP_STRING([--disable-sample],
246 [compile the sample library ])],
248 [if test "x$have_aliroot" = "xno" ; then
249 enable_sample="no...requires.AliRoot"
255 if test "x$enable_sample" = "xyes" ; then
256 AC_DEFINE(HLT_SAMPLE)
258 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
259 AC_MSG_RESULT([$enable_sample])
261 dnl ------------------------------------------------------------------
262 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
264 CHECK_HLTMODULE([util],
271 if test "x$enable_module" = "xmissheader"; then
272 enable_module="no...missing.headers"
273 enable_util=$enable_module
274 elif test "x$enable_module" = "xforce"; then
277 enable_util=$enable_module
279 if test "x$enable_util" = "xyes" ; then
281 ALIUTIL_LIBS=$ALIHLTMODULE_LIBS
283 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
284 AC_MSG_CHECKING([whether to compile Util library])
285 AC_MSG_RESULT([$enable_module])
286 AC_SUBST([ALIUTIL_LIBS])
288 dnl ------------------------------------------------------------------
289 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
292 CHECK_HLTMODULE([tpc],
299 if test "x$enable_module" = "xmissheader"; then
300 enable_module="no...missing.headers"
301 enable_tpc=$enable_module
302 elif test "x$enable_module" = "xforce"; then
305 enable_tpc=$enable_module
308 if test "x$enable_tpc" = "xyes" ; then
311 ALITPC_LIBS=$ALIHLTMODULE_LIBS
313 dnl Check for functionality in the TPC reconstruction required for online
316 have_tpc_hltoffline_rec=no
317 AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
318 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
319 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
320 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
321 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
322 #include <AliTPCclustererMI.h>
323 #include <TObjArray.h>],
324 [AliTPCtrackerMI tracker;
325 TObjArray* array=NULL;
326 tracker.LoadClusters(array);
327 AliTPCclustererMI cl(NULL, NULL);
328 cl.GetOutputClonesArray();])],
329 [have_tpc_hltoffline_rec=yes],
330 [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
331 AC_MSG_RESULT([$have_tpc_hltoffline_rec])
333 have_alitpcclusterparam_r40128=no
334 AC_MSG_CHECKING([checking for AliTPCClusterParam r40128])
335 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTPCClusterParam.h>],
336 [AliTPCClusterParam param;
337 float test=param.ParamS0Par(0,0,0)]);],
338 [have_alitpcclusterparam_r40128=yes],
339 [AC_DEFINE(HAVE_NOT_ALITPCCLUSTERPARAM_r40128)])
340 AC_MSG_RESULT([$have_alitpcclusterparam_r40128])
345 AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
346 AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
347 AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)])
350 if test ! "x$have_aliroot" = "xno" ; then
351 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
352 # which is stored in the TPC/mapping/Patchx.data files from
353 # AliRoot version v4-04-Release (May 2006)
354 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
355 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
356 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
357 [have_tpc_mapping=yes
358 AC_SUBST(TPC_PAD_MAPPING_PATH)
359 AC_DEFINE(HAVE_TPC_MAPPING)],
363 AC_MSG_CHECKING([for TPC mapping layout])
364 AC_MSG_RESULT([$have_tpc_mapping])
368 enable_module=$enable_tpc
370 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
371 AC_MSG_CHECKING([whether to compile TPC library])
372 AC_MSG_RESULT([$enable_module])
373 AC_SUBST([ALITPC_LIBS])
375 dnl ------------------------------------------------------------------
376 AH_TEMPLATE([HLT_RCU],[hlt rcu library])
378 CHECK_HLTMODULE([rcu],
385 if test "x$enable_module" = "xmissheader"; then
386 enable_module="no...missing.headers"
387 enable_rcu=$enable_module
388 elif test "x$enable_module" = "xforce"; then
391 enable_rcu=$enable_module
394 if test "x$enable_rcu" = "xyes" ; then
397 enable_module=$enable_rcu
399 AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
400 AC_MSG_CHECKING([whether to compile RCU library])
401 AC_MSG_RESULT([$enable_module])
402 AC_SUBST([ALIRCU_LIBS])
404 dnl ------------------------------------------------------------------
405 AH_TEMPLATE([HLT_CALO],[hlt calo(rimeter) library])
408 CHECK_HLTMODULE([calo],
414 if test "x$enable_module" = "xmissheader"; then
415 enable_module="no...missing.headers"
416 enable_calo=$enable_module
417 elif test "x$enable_module" = "xforce"; then
420 enable_calo=$enable_module
423 if test "x$enable_calo" = "xyes" ; then
425 ALICALO_LIBS=$ALIHLTMODULE_LIBS
427 enable_module=$enable_calo
429 AM_CONDITIONAL(EN_HLT_CALO, test x$enable_calo = xyes)
430 AC_MSG_CHECKING([whether to compile CALO library])
431 AC_MSG_RESULT([$enable_module])
432 AC_SUBST([ALICALO_LIBS])
434 dnl ------------------------------------------------------------------
435 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
438 CHECK_HLTMODULE([phos],
444 if test "x$enable_module" = "xmissheader"; then
445 enable_module="no...requires.AliRoot>v4-05-07"
446 enable_phos=$enable_module
447 elif test "x$enable_module" = "xforce"; then
450 enable_phos=$enable_module
453 if test "x$enable_phos" = "xyes" ; then
455 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
457 enable_module=$enable_phos
459 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
460 AC_MSG_CHECKING([whether to compile PHOS library])
461 AC_MSG_RESULT([$enable_module])
462 AC_SUBST([ALIPHOS_LIBS])
464 dnl ------------------------------------------------------------------
465 AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
468 CHECK_HLTMODULE([emcal],
474 if test "x$enable_module" = "xmissheader"; then
475 enable_module="no...header.missing"
476 enable_emcal=$enable_module
477 elif test "x$enable_module" = "xforce"; then
480 enable_emcal=$enable_module
483 if test "x$enable_emcal" = "xyes" ; then
485 ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
487 enable_module=$enable_emcal
489 AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
490 AC_MSG_CHECKING([whether to compile EMCAL library])
491 AC_MSG_RESULT([$enable_module])
492 AC_SUBST([ALIEMCAL_LIBS])
494 dnl ------------------------------------------------------------------
495 AH_TEMPLATE([HLT_TRD],[hlt trd library])
498 CHECK_HLTMODULE([trd],
504 if test "x$enable_module" = "xmissheader"; then
505 enable_module="no...requires.AliRoot>v4-07-Release"
506 enable_trd=$enable_module
507 elif test "x$enable_module" = "xforce"; then
510 enable_trd=$enable_module
513 if test "x$enable_trd" = "xyes" ; then
515 ALITRD_LIBS=$ALIHLTMODULE_LIBS
517 enable_module=$enable_trd
519 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
520 AC_MSG_CHECKING([whether to compile TRD library])
521 AC_MSG_RESULT([$enable_module])
522 AC_SUBST([ALITRD_LIBS])
524 dnl ------------------------------------------------------------------
525 AH_TEMPLATE([HLT_FMD],[hlt fmd library])
527 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
528 CHECK_HLTMODULE([fmd],
534 if test "x$enable_module" = "xmissheader"; then
535 enable_module="no...missing.headers"
536 enable_fmd=$enable_module
537 elif test "x$enable_module" = "xforce"; then
540 enable_fmd=$enable_module
543 if test "x$enable_fmd" = "xyes" ; then
545 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
547 enable_module=$enable_fmd
549 AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
550 AC_MSG_CHECKING([whether to compile FMD library])
551 AC_MSG_RESULT([$enable_module])
552 AC_SUBST([ALIFMD_LIBS])
554 dnl ------------------------------------------------------------------
555 AH_TEMPLATE([HLT_ZDC],[hlt zdc library])
557 ALIZDC_LIBS=$ALIHLTMODULE_LIBS
558 CHECK_HLTMODULE([zdc],
564 if test "x$enable_module" = "xmissheader"; then
565 enable_module="no...missing.headers"
566 enable_zdc=$enable_module
567 elif test "x$enable_module" = "xforce"; then
570 enable_zdc=$enable_module
573 if test "x$enable_zdc" = "xyes" ; then
575 ALIZDC_LIBS=$ALIHLTMODULE_LIBS
577 enable_module=$enable_zdc
579 AM_CONDITIONAL(EN_HLT_ZDC, test x$enable_zdc = xyes)
580 AC_MSG_CHECKING([whether to compile ZDC library])
581 AC_MSG_RESULT([$enable_module])
582 AC_SUBST([ALIZDC_LIBS])
584 dnl ------------------------------------------------------------------
585 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
588 CHECK_HLTMODULE([dimuon],
595 if test "x$enable_module" = "xmissheader"; then
596 enable_module="no...requires.AliRoot>=v4-08-Release"
597 enable_muon=$enable_module
598 elif test "x$enable_module" = "xforce"; then
601 enable_muon=$enable_module
604 if test "x$enable_muon" = "xyes" ; then
606 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
608 save_CPPFLAGS="$CPPFLAGS"
611 dnl Check for functionality GetRawStream AliMUONDigitMaker.h
613 have_muon_digitmaker_getrawstream=no
614 AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker)
615 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON"
616 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
617 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
618 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>],
619 [AliMUONDigitMaker dm;
620 dm.GetRawStreamTracker();])],
621 [have_muon_digitmaker_getrawstream=yes],
622 [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
624 AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
627 dnl Check for AliMpPad::GetPositionX/Y
628 dnl change of implementation in MUON code
629 dnl revision 31769, Wed Apr 1 2009
631 have_muon_alimppad_getposition=no
632 AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
633 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
634 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
635 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
636 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>],
638 pad.GetPositionX();])],
639 [have_muon_alimppad_getposition=yes],
640 [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
642 AC_MSG_RESULT([$have_muon_alimppad_getposition])
644 CPPFLAGS="$save_CPPFLAGS"
648 enable_module=$enable_muon
650 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
651 AC_MSG_CHECKING([whether to compile MUON library])
652 AC_MSG_RESULT([$enable_module])
653 AC_SUBST([ALIMUON_LIBS])
655 dnl ------------------------------------------------------------------
656 AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
659 CHECK_HLTMODULE([trigger],
665 if test "x$enable_module" = "xmissheader"; then
666 enable_module="no...header.missing"
667 enable_trigger=$enable_module
668 elif test "x$enable_module" = "xforce"; then
671 enable_trigger=$enable_module
674 if test "x$enable_trigger" = "xyes" ; then
675 AC_DEFINE(HLT_TRIGGER)
676 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
678 enable_module=$enable_trigger
680 AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
681 AC_MSG_CHECKING([whether to compile Trigger library])
682 AC_MSG_RESULT([$enable_module])
683 AC_SUBST([ALITRIGGER_LIBS])
685 dnl ------------------------------------------------------------------
686 AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
689 CHECK_HLTMODULE([global],
695 if test "x$enable_module" = "xmissheader"; then
696 enable_module="no...header.missing"
697 enable_global=$enable_module
698 elif test "x$enable_module" = "xforce"; then
701 enable_global=$enable_module
704 if test "x$enable_global" = "xyes" ; then
705 AC_DEFINE(HLT_GLOBAL)
706 ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
708 enable_module=$enable_global
710 AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
711 AC_MSG_CHECKING([whether to compile Global library])
712 AC_MSG_RESULT([$enable_module])
713 AC_SUBST([ALIGLOBAL_LIBS])
715 dnl ------------------------------------------------------------------
716 AH_TEMPLATE([HLT_JET],[hlt jet library])
722 AC_ARG_WITH(fastjet, [installation path of the FASTJET package],
723 [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet],
724 [ test -n $FASTJET && with_fastjet=$FASTJET ])
726 if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then
727 ALIFASTJET_INCFLAGS="-I${with_fastjet}/include"
728 ALIFASTJET_HEADER="fastjet/PseudoJet.hh"
729 ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib"
730 ALIFASTJET_LIBS="CGAL fastjet"
735 CHECK_HLTMODULE([jet],
742 if test "x$enable_module" = "xmissheader"; then
743 enable_module="no...header.missing"
744 enable_jet=$enable_module
745 elif test "x$enable_module" = "xforce"; then
748 enable_jet=$enable_module
751 if test "x$enable_jet" = "xyes" ; then
753 ALIJET_LIBS="$ALIHLTMODULE_LIBS"
755 if test "x$with_fastjet" != "xno"; then
756 AC_DEFINE(HAVE_FASTJET)
757 AC_DEFINE(WITHFASTJET)
758 ALIJET_LIBS="$ALIJET_LIBS $FASTJET_LDFLAGS"
760 AC_MSG_CHECKING([compilation with FASTJET package])
761 AC_MSG_RESULT($with_fastjet)
764 enable_module=$enable_jet
767 AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
768 AC_MSG_CHECKING([whether to compile Jet library])
769 AC_MSG_RESULT([$enable_module])
770 AC_SUBST([ALIJET_LIBS])
772 dnl ------------------------------------------------------------------
773 AH_TEMPLATE([HLT_VZERO],[hlt vzero library])
776 CHECK_HLTMODULE([vzero],
782 if test "x$enable_module" = "xmissheader"; then
783 enable_module="no...header.missing"
784 enable_vzero=$enable_module
785 elif test "x$enable_module" = "xforce"; then
788 enable_vzero=$enable_module
791 if test "x$enable_vzero" = "xyes" ; then
793 ALIVZERO_LIBS=$ALIHLTMODULE_LIBS
795 enable_module=$enable_vzero
797 AM_CONDITIONAL(EN_HLT_VZERO, test x$enable_vzero = xyes)
798 AC_MSG_CHECKING([whether to compile VZERO library])
799 AC_MSG_RESULT([$enable_module])
800 AC_SUBST([ALIVZERO_LIBS])
802 dnl ------------------------------------------------------------------
803 AH_TEMPLATE([HLT_ITS],[hlt its library])
806 CHECK_HLTMODULE([its],
812 if test "x$enable_module" = "xmissheader"; then
813 enable_module="no...header.missing"
814 enable_its=$enable_module
815 elif test "x$enable_module" = "xforce"; then
818 enable_its=$enable_module
821 if test "x$enable_its" = "xyes" ; then
823 ALIITS_LIBS=$ALIHLTMODULE_LIBS
825 enable_module=$enable_its
827 AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
828 AC_MSG_CHECKING([whether to compile ITS library])
829 AC_MSG_RESULT([$enable_module])
830 AC_SUBST([ALIITS_LIBS])
832 dnl ------------------------------------------------------------------
833 AH_TEMPLATE([HLT_COMP],[hlt comp library])
836 CHECK_HLTMODULE([comp],
842 if test "x$enable_module" = "xmissheader"; then
843 enable_module="no...header.missing"
844 enable_comp=$enable_module
845 elif test "x$enable_module" = "xforce"; then
848 enable_comp=$enable_module
851 if test "x$enable_comp" = "xyes" ; then
853 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
855 enable_module=$enable_comp
857 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
858 AC_MSG_CHECKING([whether to compile comp library])
859 AC_MSG_RESULT([$enable_module])
860 AC_SUBST([ALICOMP_LIBS])
862 dnl ------------------------------------------------------------------
863 AC_MSG_CHECKING([whether to disable AliRoot logging])
864 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
865 AC_ARG_ENABLE(aliroot-logging,
866 [AC_HELP_STRING([--disable-aliroot-logging],
867 [disable logging through AliRoot logging methods])],
868 [],[enable_aliroot_logging=no])
869 if test "x$have_aliroot" = "xno" ; then
870 enable_aliroot_logging=yes # this means 'disable'
872 if test "x$enable_aliroot_logging" != "xno" ; then
873 AC_DEFINE(NOALIROOT_LOGGING)
875 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
876 AC_MSG_RESULT([$enable_aliroot_logging])
878 dnl ------------------------------------------------------------------
879 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
880 AH_TEMPLATE([DOMC],[MC saving])
881 AC_ARG_ENABLE(mc-saving,
882 [AC_HELP_STRING([--enable-mc-saving],
883 [enable saving MC data through the chain])],
884 [],[enable_mc_saving=no])
885 if test "x$enable_mc_saving" = "xyes" ; then
888 AC_MSG_RESULT([$enable_mc_saving])
890 dnl ------------------------------------------------------------------
891 dnl certainly something old, but we keep the define
892 AC_MSG_CHECKING([whether to use ROWHOUGH])
893 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
894 AC_ARG_ENABLE(rowhough,
895 [AC_HELP_STRING([--enable-rowhough],
897 [],[enable_rowhough=no])
898 if test "x$enable_rowhough" = "xyes" ; then
899 AC_DEFINE(USEROWHOUGH)
901 AC_MSG_RESULT([$enable_rowhough])
903 dnl ------------------------------------------------------------------
904 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
905 dnl stand-alone build system. This is most likely something old we can
906 dnl get rid off later, or do something more reasonable. Since the define
907 dnl needs the quotes they have to be escaped. This works well for the
908 dnl Makefile but not for the configure script. So we have to add the
909 dnl defines after all the other checks.
910 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
911 if test ! "x$have_aliroot" = "xno" ; then
912 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
915 dnl ------------------------------------------------------------------
919 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
920 AC_PATH_PROG(PERL, perl)
921 AC_PATH_PROG(DOXYGEN, doxygen)
923 [AC_HELP_STRING([--enable-dot],
924 [enable dot documentation generator])],
928 AC_PATH_PROG(DOT, dot)
929 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
931 DOT_PATH=`dirname $DOT`
934 AC_MSG_CHECKING([for documentation mode])
936 [AC_HELP_STRING([--disable-doc],
937 [disable documentation build; monolithic build --enable-doc=mono ])],
938 [],[enable_doc=modules])
940 if test "x$DOXYGEN" = "x" ; then
941 enable_doc=no.doxygen
942 elif test "x$enable_doc" = "xyes" ; then
944 elif test ! "x$enable_doc" = "xmono" && \
945 test ! "x$enable_doc" = "xmodules" && \
946 test ! "x$enable_doc" = "xno"; then
948 AC_MSG_WARN([unknown option])
950 if test "x$enable_doc" = "xno" ; then
955 AC_MSG_RESULT([$enable_doc])
956 AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
957 AM_CONDITIONAL(BUILD_DOC, test ! "x$DOXYGEN" = "x")
961 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
962 dnl echo $HAVE_SRC_SUBDIR
963 dnl if ! test -d $HAVE_SRC_SUBDIR; then
966 dnl AC_SUBST([HAVE_SRC_SUBDIR])
968 dnl ------------------------------------------------------------------
969 AC_MSG_NOTICE([---------------------------------------------- ])
970 AC_MSG_NOTICE([ build summary ])
971 AC_MSG_NOTICE([---------------------------------------------- ])
973 AC_CONFIG_FILES([Makefile
979 BASE/util/test/Makefile
980 BASE/interface/Makefile
982 BASE/interface/test/Makefile
985 doc/doxymodule.conf])
987 dnl AliRoot and installation directory for libraries
989 AC_MSG_NOTICE([AliRoot: $have_aliroot])
990 AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
991 if test "x$have_aliroot" != "xno"; then
992 AC_CONFIG_FILES([sim/Makefile
995 rec/startAliEVE-barrel-tracks.sh
1002 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1003 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1004 AC_MSG_NOTICE([libdir set to $libdir])
1007 AC_MSG_NOTICE([compile sample library: $enable_sample])
1008 if test "x$enable_sample" = "xyes"; then
1009 AC_CONFIG_FILES([SampleLib/Makefile])
1012 AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1013 if test "x$enable_rcu" = "xyes"; then
1014 AC_CONFIG_FILES([RCU/Makefile
1019 AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1020 if test "x$enable_tpc" = "xyes"; then
1021 AC_CONFIG_FILES([TPCLib/Makefile
1022 TPCLib/test/Makefile
1023 TPCLib/mapping2array.cxx
1025 TPCLib/calibration/Makefile
1029 AC_MSG_NOTICE([compile CALO library: $enable_calo])
1030 if test "x$enable_calo" = "xyes"; then
1031 AC_CONFIG_FILES([CALO/Makefile
1032 CALO/test/Makefile])
1035 AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1036 if test "x$enable_phos" = "xyes"; then
1037 AC_CONFIG_FILES([PHOS/Makefile])
1040 AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1041 if test "x$enable_emcal" = "xyes"; then
1042 AC_CONFIG_FILES([EMCAL/Makefile])
1045 AC_MSG_NOTICE([compile TRD library: $enable_trd])
1046 if test "x$enable_trd" = "xyes"; then
1047 AC_CONFIG_FILES([TRD/Makefile])
1050 AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1051 if test "x$enable_fmd" = "xyes"; then
1052 AC_CONFIG_FILES([FMD/Makefile])
1055 AC_MSG_NOTICE([compile ZDC library: $enable_zdc])
1056 if test "x$enable_zdc" = "xyes"; then
1057 AC_CONFIG_FILES([ZDC/Makefile])
1060 AC_MSG_NOTICE([compile MUON library: $enable_muon])
1061 if test "x$enable_muon" = "xyes"; then
1062 AC_CONFIG_FILES([MUON/Makefile])
1065 AC_MSG_NOTICE([compile ITS library: $enable_its])
1066 if test "x$enable_its" = "xyes"; then
1067 AC_CONFIG_FILES([ITS/Makefile])
1070 AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1071 if test "x$enable_trigger" = "xyes"; then
1072 AC_CONFIG_FILES([trigger/Makefile
1073 trigger/test/Makefile])
1076 AC_MSG_NOTICE([compile global library: $enable_global])
1077 if test "x$enable_global" = "xyes"; then
1078 AC_CONFIG_FILES([global/Makefile])
1081 AC_MSG_NOTICE([compile jet library: $enable_jet])
1082 if test "x$enable_jet" = "xyes"; then
1083 AC_CONFIG_FILES([JET/Makefile])
1086 AC_MSG_NOTICE([compile vzero library: $enable_vzero])
1087 if test "x$enable_vzero" = "xyes"; then
1088 AC_CONFIG_FILES([VZERO/Makefile])
1091 AC_MSG_NOTICE([compile comp library: $enable_comp])
1092 if test "x$enable_comp" = "xyes"; then
1093 AC_CONFIG_FILES([comp/Makefile])