]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HLT/configure.ac
coverity warning fix
[u/mrichter/AliRoot.git] / HLT / configure.ac
... / ...
CommitLineData
1dnl -*- mode: autoconf -*-
2dnl
3dnl $Id$
4dnl template for the configuration script for the Alice HLT
5dnl framework and components
6dnl
7dnl Note: the autoconf build system is deprecated and not maintained
8dnl since AliRoot was converted to cmake
9dnl 2013-03-06: most of checks for AliRoot features have been removed
10dnl in order to run the existing doxygen setup until this has been
11dnl converted to cmake as well
12dnl
13dnl ------------------------------------------------------------------
14
15dnl Take either the AliRoot tag as version id or the current revision
16AC_INIT([Alice High Level Trigger] ,
17 [doc],
18 [Matthias.Richter@ift.uib.no],
19 [alice-hlt])
20
21dnl ------------------------------------------------------------------
22dnl the package from CVS contains the old Makefiles as well. In order to
23dnl prevent them from becoming overwritten, we require a separate build
24dnl directory
25if test "`dirname $0`" = "." ; then
26 AC_ERROR([please run the script from a separate build directory])
27fi
28
29dnl ------------------------------------------------------------------
30AC_CANONICAL_SYSTEM
31AC_PREFIX_DEFAULT(${PWD})
32AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
33AM_INIT_AUTOMAKE([-Wno-portability])
34AC_PROG_CC
35AC_PROG_CXX
36AC_PROG_LIBTOOL
37
38AC_DEBUG
39AC_PROFILING
40AC_OPTIMIZATION
41AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
42
43dnl ------------------------------------------------------------------
44dnl A warning posted into the auto-generated files
45dnl Does NOT concern this file ;-)
46AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
47AC_SUBST([AUTOGENERATED_WARNING])
48
49dnl ------------------------------------------------------------------
50dnl
51dnl Check for ROOT
52dnl
53ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
54AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
55AC_SUBST([ROOTSYS])
56ROOTBINDIR=`dirname $ROOTEXEC`
57AC_SUBST([ROOTBINDIR])
58
59dnl test for additional required root libraries and headers
60LIBS='-ldl'
61if test "x$have_root" = "x1"; then
62 AC_LANG_PUSH(C++)
63 save_CPPFLAGS=$CPPFLAGS
64 save_LDFLAGS=$LDFLAGS
65 save_LIBS=$LIBS
66 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
67
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
73 # libTreePlayer.so
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"])
83 done
84
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])
88
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])
92
93 CPPFLAGS=$save_CPPFLAGS
94 LDFLAGS=$save_LDFLAGS
95 LIBS=$save_LIBS
96 AC_LANG_POP(C++)
97fi
98
99dnl ------------------------------------------------------------------
100# TODO: make this configurable through arguments
101#Define whether you want to run with ALIROOT or only ROOT
102AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
103ALIHLT_USEPACKAGE=ALIROOT
104#ALIHLT_USEPACKAGE=ROOT
105#ALIHLT_USEPACKAGE=STANDALONE
106AC_DEFINE(use_aliroot)
107AC_DEFINE(use_root)
108CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
109save_CPPFLAGS=$CPPFLAGS
110save_LDFLAGS=$LDFLAGS
111save_LIBS=$LIBS
112
113dnl ------------------------------------------------------------------
114dnl check for AliRoot features
115AC_LANG_PUSH(C++)
116have_aliroot=no
117AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
118 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
119 [])
120
121if 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' ;;
128 esac
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 ])
135 else
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 ])
139 fi
140 else
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])
144 fi
145 ALICE_TARGET=$alice_target
146 fi
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])
153fi
154
155AC_MSG_CHECKING([for AliRoot])
156if test "x$ALICE_ROOT" != "x" \
157 && test -d ${ALIROOTBINDIR} \
158 && test -d ${ALIROOTLIBDIR} \
159 && test -d ${ALIROOTINCDIR}; then
160 have_aliroot=$ALICE_ROOT
161else
162 ALIROOTBINDIR=
163 ALIROOTLIBDIR=
164 ALIROOTINCDIR=
165fi
166AC_MSG_RESULT([$have_aliroot])
167
168AC_LANG_POP(C++)
169AC_SUBST([ALICE_ROOT])
170AC_SUBST([ALIROOT_CPPFLAGS])
171AC_SUBST([ALIROOT_LDFLAGS])
172AC_SUBST([ALIROOTBINDIR])
173AC_SUBST([ALIROOTLIBDIR])
174
175ALIROOT_LIBS="$ALIROOT_LIBS $ADD_ROOTLIBS"
176AC_SUBST([ALIROOT_LIBS])
177AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
178
179HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
180HLTBASE_LDFLAGS=
181AC_SUBST([HLTBASE_CPPFLAGS])
182AC_SUBST([HLTBASE_LDFLAGS])
183
184dnl ------------------------------------------------------------------
185AC_ARG_ENABLE(all,
186 [AC_HELP_STRING([--disable-all],
187 [disable all detector modules, individual modules can be switched on by --enable-det])],
188 [disable_all=yes],[])
189
190dnl ------------------------------------------------------------------
191AC_MSG_CHECKING([whether to impose strict coding conventions])
192AC_ARG_ENABLE(strict,
193 [AC_HELP_STRING([--disable-strict],
194 [disable coding convention checks ])],
195 [],[enable_strict=yes])
196if test "x$enable_strict" = "xyes" ; then
197 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
198fi
199AC_MSG_RESULT([$enable_strict])
200
201dnl ------------------------------------------------------------------
202AC_MSG_CHECKING([whether to enable component statistics])
203AC_ARG_ENABLE(component-stat,
204 [AC_HELP_STRING([--enable-component-stat],
205 [enable component statistics ])],
206 [],[])
207
208dnl enable component statistics if not explicitely disabled
209if test "x$enable_component_stat" != "xno" &&
210 test "x$enable_debug" = "xyes" ; then
211 enable_component_stat=yes.debug
212fi
213
214if test "x$enable_component_stat" = "x" ; then
215 enable_component_stat=no
216fi
217
218if test "x$enable_component_stat" != "xno" ; then
219 AC_DEFINE(HLT_COMPONENT_STATISTICS)
220fi
221AC_MSG_RESULT([$enable_component_stat])
222
223dnl ------------------------------------------------------------------
224dnl ---- module checks
225dnl ------------------------------------------------------------------
226save_CPPFLAGS=$CPPFLAGS
227save_LDFLAGS=$LDFLAGS
228save_LIBS=$LIBS
229
230dnl ------------------------------------------------------------------
231AC_MSG_NOTICE([-------------------------------------------------])
232AC_MSG_NOTICE([checking dependencies for HLTbase library])
233HLTBASE_CHECKLIBS='XMLParser'
234for 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"])
238done
239AC_SUBST([ALIHLTBASE_LIBS])
240
241dnl ------------------------------------------------------------------
242AC_MSG_CHECKING([whether to compile sample library])
243AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
244AC_ARG_ENABLE(sample,
245 [AC_HELP_STRING([--disable-sample],
246 [compile the sample library ])],
247 [],
248 [if test "x$have_aliroot" = "xno" ; then
249 enable_sample="no...requires.AliRoot"
250 else
251 enable_sample=yes
252 fi
253 ])
254
255if test "x$enable_sample" = "xyes" ; then
256 AC_DEFINE(HLT_SAMPLE)
257fi
258AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
259AC_MSG_RESULT([$enable_sample])
260
261dnl ------------------------------------------------------------------
262AH_TEMPLATE([HLT_UTIL],[HLT utility library])
263ALIUTIL_LIBS=
264CHECK_HLTMODULE([util],
265 [],
266 [],
267 [], [], [],
268 [], [],
269 [])
270
271if test "x$enable_module" = "xmissheader"; then
272 enable_module="no...missing.headers"
273 enable_util=$enable_module
274elif test "x$enable_module" = "xforce"; then
275 enable_util="yes"
276else
277 enable_util=$enable_module
278fi
279if test "x$enable_util" = "xyes" ; then
280 AC_DEFINE(HLT_UTIL)
281 ALIUTIL_LIBS=$ALIHLTMODULE_LIBS
282fi
283AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
284AC_MSG_CHECKING([whether to compile Util library])
285AC_MSG_RESULT([$enable_module])
286AC_SUBST([ALIUTIL_LIBS])
287
288dnl ------------------------------------------------------------------
289AH_TEMPLATE([HLT_TPC],[hlt tpc library])
290
291ALITPC_LIBS=
292CHECK_HLTMODULE([tpc],
293 [],
294 [],
295 [], [], [],
296 [], [],
297 [])
298
299if test "x$enable_module" = "xmissheader"; then
300 enable_module="no...missing.headers"
301 enable_tpc=$enable_module
302elif test "x$enable_module" = "xforce"; then
303 enable_tpc="yes"
304else
305 enable_tpc=$enable_module
306fi
307
308if test "x$enable_tpc" = "xyes" ; then
309 AC_LANG_PUSH(C++)
310 AC_DEFINE(HLT_TPC)
311 ALITPC_LIBS=$ALIHLTMODULE_LIBS
312 dnl
313 dnl Check for functionality in the TPC reconstruction required for online
314 dnl processing
315 dnl
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])
332
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])
341
342 LIBS=$save_LIBS
343
344
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)])
348
349 have_tpc_mapping=no
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)],
360 [])
361
362 fi
363 AC_MSG_CHECKING([for TPC mapping layout])
364 AC_MSG_RESULT([$have_tpc_mapping])
365 AC_LANG_POP(C++)
366
367else
368 enable_module=$enable_tpc
369fi
370AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
371AC_MSG_CHECKING([whether to compile TPC library])
372AC_MSG_RESULT([$enable_module])
373AC_SUBST([ALITPC_LIBS])
374
375dnl ------------------------------------------------------------------
376AH_TEMPLATE([HLT_RCU],[hlt rcu library])
377
378CHECK_HLTMODULE([rcu],
379 [],
380 [],
381 [], [], [],
382 [], [],
383 [])
384
385if test "x$enable_module" = "xmissheader"; then
386 enable_module="no...missing.headers"
387 enable_rcu=$enable_module
388elif test "x$enable_module" = "xforce"; then
389 enable_rcu="yes"
390else
391 enable_rcu=$enable_module
392fi
393
394if test "x$enable_rcu" = "xyes" ; then
395 AC_DEFINE(HLT_RCU)
396else
397 enable_module=$enable_rcu
398fi
399AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
400AC_MSG_CHECKING([whether to compile RCU library])
401AC_MSG_RESULT([$enable_module])
402AC_SUBST([ALIRCU_LIBS])
403
404dnl ------------------------------------------------------------------
405AH_TEMPLATE([HLT_CALO],[hlt calo(rimeter) library])
406
407ALICALO_LIBS=
408CHECK_HLTMODULE([calo],
409 [], [],
410 [], [], [],
411 [], [],
412 [])
413
414if test "x$enable_module" = "xmissheader"; then
415 enable_module="no...missing.headers"
416 enable_calo=$enable_module
417elif test "x$enable_module" = "xforce"; then
418 enable_calo="yes"
419else
420 enable_calo=$enable_module
421fi
422
423if test "x$enable_calo" = "xyes" ; then
424 AC_DEFINE(HLT_CALO)
425 ALICALO_LIBS=$ALIHLTMODULE_LIBS
426else
427 enable_module=$enable_calo
428fi
429AM_CONDITIONAL(EN_HLT_CALO, test x$enable_calo = xyes)
430AC_MSG_CHECKING([whether to compile CALO library])
431AC_MSG_RESULT([$enable_module])
432AC_SUBST([ALICALO_LIBS])
433
434dnl ------------------------------------------------------------------
435AH_TEMPLATE([HLT_PHOS],[hlt phos library])
436
437ALIPHOS_LIBS=
438CHECK_HLTMODULE([phos],
439 [], [],
440 [], [], [],
441 [], [],
442 [])
443
444if test "x$enable_module" = "xmissheader"; then
445 enable_module="no...requires.AliRoot>v4-05-07"
446 enable_phos=$enable_module
447elif test "x$enable_module" = "xforce"; then
448 enable_phos="yes"
449else
450 enable_phos=$enable_module
451fi
452
453if test "x$enable_phos" = "xyes" ; then
454 AC_DEFINE(HLT_PHOS)
455 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
456else
457 enable_module=$enable_phos
458fi
459AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
460AC_MSG_CHECKING([whether to compile PHOS library])
461AC_MSG_RESULT([$enable_module])
462AC_SUBST([ALIPHOS_LIBS])
463
464dnl ------------------------------------------------------------------
465AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
466
467ALIEMCAL_LIBS=
468CHECK_HLTMODULE([emcal],
469 [], [],
470 [], [], [],
471 [], [],
472 [])
473
474if test "x$enable_module" = "xmissheader"; then
475 enable_module="no...header.missing"
476 enable_emcal=$enable_module
477elif test "x$enable_module" = "xforce"; then
478 enable_emcal="yes"
479else
480 enable_emcal=$enable_module
481fi
482
483if test "x$enable_emcal" = "xyes" ; then
484 AC_DEFINE(HLT_EMCAL)
485 ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
486else
487 enable_module=$enable_emcal
488fi
489AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
490AC_MSG_CHECKING([whether to compile EMCAL library])
491AC_MSG_RESULT([$enable_module])
492AC_SUBST([ALIEMCAL_LIBS])
493
494dnl ------------------------------------------------------------------
495AH_TEMPLATE([HLT_TRD],[hlt trd library])
496
497ALITRD_LIBS=
498CHECK_HLTMODULE([trd],
499 [], [],
500 [], [], [],
501 [], [],
502 [])
503
504if test "x$enable_module" = "xmissheader"; then
505 enable_module="no...requires.AliRoot>v4-07-Release"
506 enable_trd=$enable_module
507elif test "x$enable_module" = "xforce"; then
508 enable_trd="yes"
509else
510 enable_trd=$enable_module
511fi
512
513if test "x$enable_trd" = "xyes" ; then
514 AC_DEFINE(HLT_TRD)
515 ALITRD_LIBS=$ALIHLTMODULE_LIBS
516else
517 enable_module=$enable_trd
518fi
519AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
520AC_MSG_CHECKING([whether to compile TRD library])
521AC_MSG_RESULT([$enable_module])
522AC_SUBST([ALITRD_LIBS])
523
524dnl ------------------------------------------------------------------
525AH_TEMPLATE([HLT_FMD],[hlt fmd library])
526
527ALIFMD_LIBS=$ALIHLTMODULE_LIBS
528CHECK_HLTMODULE([fmd],
529 [], [],
530 [], [], [],
531 [], [],
532 [])
533
534if test "x$enable_module" = "xmissheader"; then
535 enable_module="no...missing.headers"
536 enable_fmd=$enable_module
537elif test "x$enable_module" = "xforce"; then
538 enable_fmd="yes"
539else
540 enable_fmd=$enable_module
541fi
542
543if test "x$enable_fmd" = "xyes" ; then
544 AC_DEFINE(HLT_FMD)
545 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
546else
547 enable_module=$enable_fmd
548fi
549AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
550AC_MSG_CHECKING([whether to compile FMD library])
551AC_MSG_RESULT([$enable_module])
552AC_SUBST([ALIFMD_LIBS])
553
554dnl ------------------------------------------------------------------
555AH_TEMPLATE([HLT_ZDC],[hlt zdc library])
556
557ALIZDC_LIBS=$ALIHLTMODULE_LIBS
558CHECK_HLTMODULE([zdc],
559 [], [],
560 [], [], [],
561 [], [],
562 [])
563
564if test "x$enable_module" = "xmissheader"; then
565 enable_module="no...missing.headers"
566 enable_zdc=$enable_module
567elif test "x$enable_module" = "xforce"; then
568 enable_zdc="yes"
569else
570 enable_zdc=$enable_module
571fi
572
573if test "x$enable_zdc" = "xyes" ; then
574 AC_DEFINE(HLT_ZDC)
575 ALIZDC_LIBS=$ALIHLTMODULE_LIBS
576else
577 enable_module=$enable_zdc
578fi
579AM_CONDITIONAL(EN_HLT_ZDC, test x$enable_zdc = xyes)
580AC_MSG_CHECKING([whether to compile ZDC library])
581AC_MSG_RESULT([$enable_module])
582AC_SUBST([ALIZDC_LIBS])
583
584dnl ------------------------------------------------------------------
585AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
586
587ALIMUON_LIBS=
588CHECK_HLTMODULE([dimuon],
589 [],
590 [],
591 [], [], [],
592 [], [],
593 [])
594
595if test "x$enable_module" = "xmissheader"; then
596 enable_module="no...requires.AliRoot>=v4-08-Release"
597 enable_muon=$enable_module
598elif test "x$enable_module" = "xforce"; then
599 enable_muon="yes"
600else
601 enable_muon=$enable_module
602fi
603
604if test "x$enable_muon" = "xyes" ; then
605 AC_DEFINE(HLT_MUON)
606 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
607 AC_LANG_PUSH(C++)
608 save_CPPFLAGS="$CPPFLAGS"
609
610 dnl
611 dnl Check for functionality GetRawStream AliMUONDigitMaker.h
612 dnl
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)])
623 LIBS=$save_LIBS
624 AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
625
626 dnl
627 dnl Check for AliMpPad::GetPositionX/Y
628 dnl change of implementation in MUON code
629 dnl revision 31769, Wed Apr 1 2009
630 dnl
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>],
637 [AliMpPad pad;
638 pad.GetPositionX();])],
639 [have_muon_alimppad_getposition=yes],
640 [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
641 LIBS=$save_LIBS
642 AC_MSG_RESULT([$have_muon_alimppad_getposition])
643
644 CPPFLAGS="$save_CPPFLAGS"
645
646 AC_LANG_POP(C++)
647else
648 enable_module=$enable_muon
649fi
650AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
651AC_MSG_CHECKING([whether to compile MUON library])
652AC_MSG_RESULT([$enable_module])
653AC_SUBST([ALIMUON_LIBS])
654
655dnl ------------------------------------------------------------------
656AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
657
658ALITRIGGER_LIBS=
659CHECK_HLTMODULE([trigger],
660 [], [],
661 [], [], [],
662 [], [],
663 [])
664
665if test "x$enable_module" = "xmissheader"; then
666 enable_module="no...header.missing"
667 enable_trigger=$enable_module
668elif test "x$enable_module" = "xforce"; then
669 enable_trigger="yes"
670else
671 enable_trigger=$enable_module
672fi
673
674if test "x$enable_trigger" = "xyes" ; then
675 AC_DEFINE(HLT_TRIGGER)
676 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
677else
678 enable_module=$enable_trigger
679fi
680AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
681AC_MSG_CHECKING([whether to compile Trigger library])
682AC_MSG_RESULT([$enable_module])
683AC_SUBST([ALITRIGGER_LIBS])
684
685dnl ------------------------------------------------------------------
686AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
687
688ALIGLOBAL_LIBS=
689CHECK_HLTMODULE([global],
690 [], [],
691 [], [], [],
692 [], [],
693 [])
694
695if test "x$enable_module" = "xmissheader"; then
696 enable_module="no...header.missing"
697 enable_global=$enable_module
698elif test "x$enable_module" = "xforce"; then
699 enable_global="yes"
700else
701 enable_global=$enable_module
702fi
703
704if test "x$enable_global" = "xyes" ; then
705 AC_DEFINE(HLT_GLOBAL)
706 ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
707else
708 enable_module=$enable_global
709fi
710AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
711AC_MSG_CHECKING([whether to compile Global library])
712AC_MSG_RESULT([$enable_module])
713AC_SUBST([ALIGLOBAL_LIBS])
714
715dnl ------------------------------------------------------------------
716AH_TEMPLATE([HLT_JET],[hlt jet library])
717
718ALIFASTJET_HEADER=
719ALIFASTJET_INCFLAGS=
720ALIFASTJET_LIBS=
721ALIFASTJET_LDFLAGS=
722AC_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 ])
725
726if 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"
731else
732 with_fastjet=no
733fi
734
735CHECK_HLTMODULE([jet],
736 [], [],
737 [], [], [],
738 [],
739 [],
740 [])
741
742if test "x$enable_module" = "xmissheader"; then
743 enable_module="no...header.missing"
744 enable_jet=$enable_module
745elif test "x$enable_module" = "xforce"; then
746 enable_jet="yes"
747else
748 enable_jet=$enable_module
749fi
750
751if test "x$enable_jet" = "xyes" ; then
752 AC_DEFINE(HLT_JET)
753 ALIJET_LIBS="$ALIHLTMODULE_LIBS"
754
755 if test "x$with_fastjet" != "xno"; then
756 AC_DEFINE(HAVE_FASTJET)
757 AC_DEFINE(WITHFASTJET)
758 ALIJET_LIBS="$ALIJET_LIBS $FASTJET_LDFLAGS"
759 fi
760 AC_MSG_CHECKING([compilation with FASTJET package])
761 AC_MSG_RESULT($with_fastjet)
762
763else
764 enable_module=$enable_jet
765fi
766
767AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
768AC_MSG_CHECKING([whether to compile Jet library])
769AC_MSG_RESULT([$enable_module])
770AC_SUBST([ALIJET_LIBS])
771
772dnl ------------------------------------------------------------------
773AH_TEMPLATE([HLT_VZERO],[hlt vzero library])
774
775ALIVZERO_LIBS=
776CHECK_HLTMODULE([vzero],
777 [], [],
778 [], [], [],
779 [], [],
780 [])
781
782if test "x$enable_module" = "xmissheader"; then
783 enable_module="no...header.missing"
784 enable_vzero=$enable_module
785elif test "x$enable_module" = "xforce"; then
786 enable_vzero="yes"
787else
788 enable_vzero=$enable_module
789fi
790
791if test "x$enable_vzero" = "xyes" ; then
792 AC_DEFINE(HLT_VZERO)
793 ALIVZERO_LIBS=$ALIHLTMODULE_LIBS
794else
795 enable_module=$enable_vzero
796fi
797AM_CONDITIONAL(EN_HLT_VZERO, test x$enable_vzero = xyes)
798AC_MSG_CHECKING([whether to compile VZERO library])
799AC_MSG_RESULT([$enable_module])
800AC_SUBST([ALIVZERO_LIBS])
801
802dnl ------------------------------------------------------------------
803AH_TEMPLATE([HLT_ITS],[hlt its library])
804
805ALIITS_LIBS=
806CHECK_HLTMODULE([its],
807 [], [],
808 [], [], [],
809 [], [],
810 [])
811
812if test "x$enable_module" = "xmissheader"; then
813 enable_module="no...header.missing"
814 enable_its=$enable_module
815elif test "x$enable_module" = "xforce"; then
816 enable_its="yes"
817else
818 enable_its=$enable_module
819fi
820
821if test "x$enable_its" = "xyes" ; then
822 AC_DEFINE(HLT_ITS)
823 ALIITS_LIBS=$ALIHLTMODULE_LIBS
824else
825 enable_module=$enable_its
826fi
827AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
828AC_MSG_CHECKING([whether to compile ITS library])
829AC_MSG_RESULT([$enable_module])
830AC_SUBST([ALIITS_LIBS])
831
832dnl ------------------------------------------------------------------
833AH_TEMPLATE([HLT_COMP],[hlt comp library])
834
835ALICOMP_LIBS=
836CHECK_HLTMODULE([comp],
837 [], [],
838 [], [], [],
839 [], [],
840 [])
841
842if test "x$enable_module" = "xmissheader"; then
843 enable_module="no...header.missing"
844 enable_comp=$enable_module
845elif test "x$enable_module" = "xforce"; then
846 enable_comp="yes"
847else
848 enable_comp=$enable_module
849fi
850
851if test "x$enable_comp" = "xyes" ; then
852 AC_DEFINE(HLT_COMP)
853 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
854else
855 enable_module=$enable_comp
856fi
857AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
858AC_MSG_CHECKING([whether to compile comp library])
859AC_MSG_RESULT([$enable_module])
860AC_SUBST([ALICOMP_LIBS])
861
862dnl ------------------------------------------------------------------
863AC_MSG_CHECKING([whether to disable AliRoot logging])
864AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
865AC_ARG_ENABLE(aliroot-logging,
866 [AC_HELP_STRING([--disable-aliroot-logging],
867 [disable logging through AliRoot logging methods])],
868 [],[enable_aliroot_logging=no])
869if test "x$have_aliroot" = "xno" ; then
870 enable_aliroot_logging=yes # this means 'disable'
871fi
872if test "x$enable_aliroot_logging" != "xno" ; then
873 AC_DEFINE(NOALIROOT_LOGGING)
874fi
875AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
876AC_MSG_RESULT([$enable_aliroot_logging])
877
878dnl ------------------------------------------------------------------
879AC_MSG_CHECKING([whether to enable saving MC data through the chain])
880AH_TEMPLATE([DOMC],[MC saving])
881AC_ARG_ENABLE(mc-saving,
882 [AC_HELP_STRING([--enable-mc-saving],
883 [enable saving MC data through the chain])],
884 [],[enable_mc_saving=no])
885if test "x$enable_mc_saving" = "xyes" ; then
886 AC_DEFINE(DOMC)
887fi
888AC_MSG_RESULT([$enable_mc_saving])
889
890dnl ------------------------------------------------------------------
891dnl certainly something old, but we keep the define
892AC_MSG_CHECKING([whether to use ROWHOUGH])
893AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
894AC_ARG_ENABLE(rowhough,
895 [AC_HELP_STRING([--enable-rowhough],
896 [use ROWHOUGH ])],
897 [],[enable_rowhough=no])
898if test "x$enable_rowhough" = "xyes" ; then
899 AC_DEFINE(USEROWHOUGH)
900fi
901AC_MSG_RESULT([$enable_rowhough])
902
903dnl ------------------------------------------------------------------
904dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
905dnl stand-alone build system. This is most likely something old we can
906dnl get rid off later, or do something more reasonable. Since the define
907dnl needs the quotes they have to be escaped. This works well for the
908dnl Makefile but not for the configure script. So we have to add the
909dnl defines after all the other checks.
910CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
911if test ! "x$have_aliroot" = "xno" ; then
912 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
913fi
914
915dnl ------------------------------------------------------------------
916dnl
917dnl Documentation
918dnl
919AC_ARG_VAR(DOXYGEN, The Documentation Generator)
920AC_PATH_PROG(PERL, perl)
921AC_PATH_PROG(DOXYGEN, doxygen)
922AC_ARG_ENABLE(dot,
923 [AC_HELP_STRING([--enable-dot],
924 [enable dot documentation generator])],
925 [],[enable_dot=no])
926HAVE_DOT=NO
927DOT_PATH=
928AC_PATH_PROG(DOT, dot)
929if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
930 HAVE_DOT=YES
931 DOT_PATH=`dirname $DOT`
932fi
933
934AC_MSG_CHECKING([for documentation mode])
935AC_ARG_ENABLE(doc,
936 [AC_HELP_STRING([--disable-doc],
937 [disable documentation build; monolithic build --enable-doc=mono ])],
938 [],[enable_doc=modules])
939
940if test "x$DOXYGEN" = "x" ; then
941 enable_doc=no.doxygen
942elif test "x$enable_doc" = "xyes" ; then
943 enable_doc=yes
944elif test ! "x$enable_doc" = "xmono" && \
945 test ! "x$enable_doc" = "xmodules" && \
946 test ! "x$enable_doc" = "xno"; then
947 enable_doc=no
948 AC_MSG_WARN([unknown option])
949fi
950if test "x$enable_doc" = "xno" ; then
951 enable_doc=off
952 DOXYGEN=
953fi
954
955AC_MSG_RESULT([$enable_doc])
956AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
957AM_CONDITIONAL(BUILD_DOC, test ! "x$DOXYGEN" = "x")
958AC_SUBST([HAVE_DOT])
959AC_SUBST([DOT_PATH])
960
961dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
962dnl echo $HAVE_SRC_SUBDIR
963dnl if ! test -d $HAVE_SRC_SUBDIR; then
964dnl HAVE_SRC_SUBDIR=
965dnl fi
966dnl AC_SUBST([HAVE_SRC_SUBDIR])
967
968dnl ------------------------------------------------------------------
969AC_MSG_NOTICE([---------------------------------------------- ])
970AC_MSG_NOTICE([ build summary ])
971AC_MSG_NOTICE([---------------------------------------------- ])
972
973AC_CONFIG_FILES([Makefile
974 BASE/Makefile
975 BASE/setenv.sh
976 BASE/setenv.csh
977 BASE/HOMER/Makefile
978 BASE/util/Makefile
979 BASE/util/test/Makefile
980 BASE/interface/Makefile
981 BASE/test/Makefile
982 BASE/interface/test/Makefile
983 doc/Makefile
984 doc/doxygen.conf
985 doc/doxymodule.conf])
986
987dnl AliRoot and installation directory for libraries
988dnl
989AC_MSG_NOTICE([AliRoot: $have_aliroot])
990AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
991if test "x$have_aliroot" != "xno"; then
992 AC_CONFIG_FILES([sim/Makefile
993 rec/Makefile
994 rec/test/Makefile
995 rec/startAliEVE-barrel-tracks.sh
996 shuttle/Makefile
997 pendolino/Makefile
998 benchmark/Makefile
999 QA/Makefile
1000 ])
1001fi
1002if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1003libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1004AC_MSG_NOTICE([libdir set to $libdir])
1005fi
1006
1007AC_MSG_NOTICE([compile sample library: $enable_sample])
1008if test "x$enable_sample" = "xyes"; then
1009 AC_CONFIG_FILES([SampleLib/Makefile])
1010fi
1011
1012AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1013if test "x$enable_rcu" = "xyes"; then
1014 AC_CONFIG_FILES([RCU/Makefile
1015 RCU/test/Makefile
1016 ])
1017fi
1018
1019AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1020if test "x$enable_tpc" = "xyes"; then
1021 AC_CONFIG_FILES([TPCLib/Makefile
1022 TPCLib/test/Makefile
1023 TPCLib/mapping2array.cxx
1024 TPCLib/EVE/Makefile
1025 TPCLib/calibration/Makefile
1026 ])
1027fi
1028
1029AC_MSG_NOTICE([compile CALO library: $enable_calo])
1030if test "x$enable_calo" = "xyes"; then
1031 AC_CONFIG_FILES([CALO/Makefile
1032 CALO/test/Makefile])
1033fi
1034
1035AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1036if test "x$enable_phos" = "xyes"; then
1037 AC_CONFIG_FILES([PHOS/Makefile])
1038fi
1039
1040AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1041if test "x$enable_emcal" = "xyes"; then
1042 AC_CONFIG_FILES([EMCAL/Makefile])
1043fi
1044
1045AC_MSG_NOTICE([compile TRD library: $enable_trd])
1046if test "x$enable_trd" = "xyes"; then
1047 AC_CONFIG_FILES([TRD/Makefile])
1048fi
1049
1050AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1051if test "x$enable_fmd" = "xyes"; then
1052 AC_CONFIG_FILES([FMD/Makefile])
1053fi
1054
1055AC_MSG_NOTICE([compile ZDC library: $enable_zdc])
1056if test "x$enable_zdc" = "xyes"; then
1057 AC_CONFIG_FILES([ZDC/Makefile])
1058fi
1059
1060AC_MSG_NOTICE([compile MUON library: $enable_muon])
1061if test "x$enable_muon" = "xyes"; then
1062 AC_CONFIG_FILES([MUON/Makefile])
1063fi
1064
1065AC_MSG_NOTICE([compile ITS library: $enable_its])
1066if test "x$enable_its" = "xyes"; then
1067 AC_CONFIG_FILES([ITS/Makefile])
1068fi
1069
1070AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1071if test "x$enable_trigger" = "xyes"; then
1072 AC_CONFIG_FILES([trigger/Makefile
1073 trigger/test/Makefile])
1074fi
1075
1076AC_MSG_NOTICE([compile global library: $enable_global])
1077if test "x$enable_global" = "xyes"; then
1078 AC_CONFIG_FILES([global/Makefile])
1079fi
1080
1081AC_MSG_NOTICE([compile jet library: $enable_jet])
1082if test "x$enable_jet" = "xyes"; then
1083 AC_CONFIG_FILES([JET/Makefile])
1084fi
1085
1086AC_MSG_NOTICE([compile vzero library: $enable_vzero])
1087if test "x$enable_vzero" = "xyes"; then
1088 AC_CONFIG_FILES([VZERO/Makefile])
1089fi
1090
1091AC_MSG_NOTICE([compile comp library: $enable_comp])
1092if test "x$enable_comp" = "xyes"; then
1093 AC_CONFIG_FILES([comp/Makefile])
1094fi
1095
1096AC_OUTPUT
1097dnl
1098dnl EOF
1099dnl
1100