]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/configure.ac
Use TMath functions
[u/mrichter/AliRoot.git] / HLT / configure.ac
CommitLineData
b521659f 1dnl -*- mode: autoconf -*-
2dnl
3dnl $Id$
4dnl template for the configuration script for the Alice HLT
5dnl framework and components
6dnl
7dnl ------------------------------------------------------------------
408c5899 8
9dnl Take either the AliRoot tag as version id or the current revision
10AC_INIT([Alice High Level Trigger] ,
7233bc62 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 \
16 cat .revision; \
17 else \
18 echo -n invalid-version; \
19 fi]),
408c5899 20 [Matthias.Richter@ift.uib.no],
21 [alice-hlt])
b521659f 22
23dnl ------------------------------------------------------------------
24dnl the package from CVS contains the old Makefiles as well. In order to
25dnl prevent them from becoming overwritten, we require a separate build
26dnl directory
27if test "`dirname $0`" = "." ; then
28 AC_ERROR([please run the script from a separate build directory])
29fi
30
31dnl ------------------------------------------------------------------
32AC_CANONICAL_SYSTEM
33AC_PREFIX_DEFAULT(${PWD})
34AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
b59c004b 35AM_INIT_AUTOMAKE([-Wno-portability])
b521659f 36AC_PROG_CC
37AC_PROG_CXX
38AC_PROG_LIBTOOL
39
40AC_DEBUG
5b1c9727 41AC_PROFILING
b521659f 42AC_OPTIMIZATION
dc8f7cb7 43AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
44
45dnl ------------------------------------------------------------------
46dnl A warning posted into the auto-generated files
47dnl Does NOT concern this file ;-)
48AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
49AC_SUBST([AUTOGENERATED_WARNING])
b521659f 50
51dnl ------------------------------------------------------------------
52dnl
53dnl Check for ROOT
54dnl
55ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
56AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
53feaef5 57AC_SUBST([ROOTSYS])
dc8f7cb7 58ROOTBINDIR=`dirname $ROOTEXEC`
59AC_SUBST([ROOTBINDIR])
60
dfaa582a 61dnl test for additional required root libraries and headers
62LIBS='-ldl'
63if test "x$have_root" = "x1"; then
64 AC_LANG_PUSH(C++)
65 save_CPPFLAGS=$CPPFLAGS
66 save_LDFLAGS=$LDFLAGS
67 save_LIBS=$LIBS
68 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
69
dc8f7cb7 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
75 # libTreePlayer.so
76 # - from Jan 07 libESD also depends on libXMLIO
fbf4d793 77 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
0776a74c 78 # - libCDB.so depends on libXMLParser since Mar 11 2009 r 31411
6af7322f 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'
dc8f7cb7 81 for CHECKLIB in $ROOT_CHECKLIBS ; do
dc8f7cb7 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"])
85 done
dfaa582a 86
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)
ba4b0dd7 89 AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE])
dfaa582a 90
0b6c2560 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)
ba4b0dd7 93 AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D])
0b6c2560 94
dc8f7cb7 95 CPPFLAGS=$save_CPPFLAGS
96 LDFLAGS=$save_LDFLAGS
97 LIBS=$save_LIBS
dfaa582a 98 AC_LANG_POP(C++)
dc8f7cb7 99fi
b521659f 100
101dnl ------------------------------------------------------------------
102# TODO: make this configurable through arguments
103#Define whether you want to run with ALIROOT or only ROOT
104AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
105ALIHLT_USEPACKAGE=ALIROOT
106#ALIHLT_USEPACKAGE=ROOT
107#ALIHLT_USEPACKAGE=STANDALONE
108AC_DEFINE(use_aliroot)
109AC_DEFINE(use_root)
85869391 110CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
7233bc62 111save_CPPFLAGS=$CPPFLAGS
112save_LDFLAGS=$LDFLAGS
113save_LIBS=$LIBS
85869391 114
115dnl ------------------------------------------------------------------
74c73e5a 116dnl check for AliRoot features
117AC_LANG_PUSH(C++)
74c73e5a 118have_aliroot=no
2bbbadd1 119AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
120 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
121 [])
122
123if 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' ;;
130 esac
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 ])
137 else
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 ])
141 fi
142 else
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])
146 fi
147 ALICE_TARGET=$alice_target
148 fi
dc8f7cb7 149 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
74c73e5a 150 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
151 ALIROOTINCDIR=${ALICE_ROOT}/include
dc8f7cb7 152 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
2bbbadd1 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])
74c73e5a 155fi
2bbbadd1 156
157AC_MSG_CHECKING([for AliRoot])
74c73e5a 158if test "x$ALICE_ROOT" != "x" \
dc8f7cb7 159 && test -d ${ALIROOTBINDIR} \
74c73e5a 160 && test -d ${ALIROOTLIBDIR} \
161 && test -d ${ALIROOTINCDIR}; then
162 have_aliroot=$ALICE_ROOT
163else
dc8f7cb7 164 ALIROOTBINDIR=
74c73e5a 165 ALIROOTLIBDIR=
166 ALIROOTINCDIR=
167fi
168AC_MSG_RESULT([$have_aliroot])
169
170if test ! "x$have_aliroot" = "xno" ; then
74c73e5a 171 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
172 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
cef8ce36 173 ALIROOT_LIBS="$ADD_ROOTLIBS"
74c73e5a 174 save_CPPFLAGS=$CPPFLAGS
175 save_LDFLAGS=$LDFLAGS
176 save_LIBS=$LIBS
177 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
db16520a 178 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
2bbbadd1 179
f8c5e339 180 # check for certain AliRoot libraries/files/features
c018a1bd 181 # libSTEERBase present since Aug 7 2007
1df31a70 182 # ###########################################
183 # temporary workaround for circular dependency libSTEERbase libSTEER
184 # https://savannah.cern.ch/bugs/index.php?49914
185 # disable the sequence of checks and load libraries in parallel
186 ALIROOT_LIBS="$ALIROOT_LIBS -lAOD -lCDB -lRAWDatabase -lRAWDatarec -lESD -lSTEER"
98a0e47f 187 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
c018a1bd 188 CHECKLIB=STEERBase
189 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
190
98a0e47f 191 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
f5bf5fc3 192 CHECKLIB=AOD
193 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
194
cef8ce36 195 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
98a0e47f 196 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
cef8ce36 197 CHECKLIB=CDB
198 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
199
2bbbadd1 200 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
201 have_alirawdata=no
202 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
203 CHECKLIB=RAWDatabase
204 AC_CHECK_LIB([$CHECKLIB],[_init],
205 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
cef8ce36 206 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lESD -lSTEER"
2bbbadd1 207 CHECKLIB=RAWDatarec
208 AC_CHECK_LIB([$CHECKLIB],[_init],
209 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
2bbbadd1 210 have_alirawdata=$CHECKLIB])],
211 [# second pass with -RAWData
212 CHECKLIB="-lRAWData"
213 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
214 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
215 #include <AliRawReaderFile.h>
216 #include <AliRawReaderDate.h>
217 #include <AliRawReaderRoot.h>],
218 [AliRawReaderMemory mreader;
219 AliRawReaderFile freader;
220 AliRawReaderDate dreader(NULL,0);
221 AliRawReaderRoot rreader(NULL,0);])],
e962f438 222 [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
2bbbadd1 223 have_alirawdata=$CHECKLIB],
224 [have_alirawdata=no])
225 ]) dnl AC_CHECK_LIB RAWDatabase
fa274626 226 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
227 AC_MSG_RESULT([$have_alirawdata])
228
fbf4d793 229 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
cef8ce36 230 CHECKLIB=ESD
fbf4d793 231 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
232
233 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
234 CHECKLIB=STEER
235 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
236
237 dnl
238 dnl check whether AliLog supports notification callback
22a5325b 239 dnl 2010-03-03: revision 38921 introduces AliLog::GetRootLogger in order to make AliLog
240 dnl a pure sigleton, introduce a 2-level check here
fbf4d793 241 dnl
242 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
243 have_alilog_notification=no
244 if test ! "x$have_aliroot" = "xno" ; then
245 AC_MSG_CHECKING([whether AliLog supports notification callback])
246 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
22a5325b 247 [AliLog* logger=AliLog::GetRootLogger();])],
248 [have_alilog_notification=yes],
249 [AC_DEFINE(NO_ALILOG_GETROOTLOGGER)
250 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
251 [AliLog::AliLogNotification fct])],
252 [have_alilog_notification=yes],
253 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
254 ])
fbf4d793 255 AC_MSG_RESULT([$have_alilog_notification])
256 fi
257
258 if test "x$have_aliroot" = "xno" ; then
259 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
260 # but library dependencies might not be resolved completely
261 #ALIROOT_CPPFLAGS=
262 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
263 This can happen from time to time due to development in AliRoot. You can
264 force compilation of detector libs by --enable-<detector>, but be aware
265 of unresolved references at runtime.])
266 AC_MSG_WARN([ ------------------------------------------ ])
267 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
268 AC_MSG_WARN([ please include config.log ])
269 AC_MSG_WARN([ ------------------------------------------ ])
270 ALIROOT_LDFLAGS=
271 ALIROOT_LIBS=
272 fi
273
f527516f 274 dnl
275 dnl ESD supports non-std content
276 dnl
277 have_esd_nonstd=no
278 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>
279 #include <AliExternalTrackParam.h>
280 #include <TTree.h>
281 #include <TClonesArray.h>],
282 [AliESDEvent esd;
283 esd.CreateStdContent();
284 TTree* tree=new TTree("esdTree", "Tree with HLT ESD objects");
f527516f 285 TClonesArray* a=new TClonesArray("AliExternalTrackParam");
286 a->SetName("SomeObject");
287 esd.AddObject(a);
50a3793d 288 esd.WriteToTree(tree);
f527516f 289 if (!tree->FindBranch("SomeObject")) return 1;
290 return 0;])],
291 [have_esd_nonstd=yes],
292 [AC_DEFINE(HAVE_NOT_ESD_NONSTD)])
293 AC_MSG_CHECKING(whether ESD supports non standard content)
294 AC_MSG_RESULT([$have_esd_nonstd])
295
83cb7e1d 296 dnl
297 dnl ESD copy function added May 9 2008 rev 25667
298 dnl
f527516f 299 if test "x$have_esd_nonstd" != "xyes"; then
83cb7e1d 300 have_esd_copy=no
301 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>],
302 [AliESDEvent esd1;
303 AliESDEvent esd2;
304 esd2=esd1;])],
9877121c 305 [have_esd_copy=yes],
306 [AC_DEFINE(HAVE_NOT_ESD_COPY)])
83cb7e1d 307 AC_MSG_CHECKING(for ESD assignment operator)
308 AC_MSG_RESULT([$have_esd_copy])
f527516f 309 fi
83cb7e1d 310
296b5188 311 dnl
312 dnl AliRawReaderMemory support for multiple buffers added
c03e064d 313 dnl revision 26829 Jun 2008
296b5188 314 dnl
315 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW"
316 have_rawreadermemory_multbuffers=no
317 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>],
318 [AliRawReaderMemory rr;
319 rr.AddBuffer(NULL, 0, 0);])],
320 [have_rawreadermemory_multbuffers=yes],
321 [AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)])
c03e064d 322 AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers)
296b5188 323 AC_MSG_RESULT([$have_rawreadermemory_multbuffers])
324
a553c904 325 dnl
326 dnl Changes in the magnetic field implementation
327 dnl revision 30848 Feb 1 2009
328 dnl
329 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
330 have_alimagf30848=no
331 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMagF.h>],
332 [int test=AliMagF::k5kG;])],
333 [have_alimagf30848=yes],
334 [AC_DEFINE(HAVE_NOT_ALIMAGF30848)])
335 AC_MSG_CHECKING(AliMagF contains field definitions)
336 AC_MSG_RESULT([$have_alimagf30848])
337
338 dnl
339 dnl Cleanup of the RunLoader implementation
340 dnl revision 30859 Feb 2 2009
341 dnl
342 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
343 have_alirunloader30859=no
344 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRunLoader.h>],
345 [AliRunLoader* rl=AliRunLoader::Instance();])],
346 [have_alirunloader30859=yes],
347 [AC_DEFINE(HAVE_NOT_ALIRUNLOADER30859)])
348 AC_MSG_CHECKING(AliRunLoader::Instance)
349 AC_MSG_RESULT([$have_alirunloader30859])
350
73c1ebf5 351 have_aliqav1=no
352 AC_CHECK_HEADER([AliQAv1.h], [have_aliqav1=yes], [])
353 AM_CONDITIONAL(EN_HLT_QA, test x$have_aliqav1 = xyes)
95ea76b5 354 AC_CHECK_HEADER([AliESDHLTDecision.h], [], [AC_DEFINE(HAVE_NOT_ALIESDHLTDECISION)])
73c1ebf5 355
f5bf5fc3 356 dnl
fbf4d793 357 dnl required header files and libraries for modules
f5bf5fc3 358 dnl
04dbc9e4 359
f59fee6d 360 dnl
361 dnl Check for the interface of AliExternalTrackParam which has been changed
362 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
363 dnl or higher)
364 externaltrackparam_version=1
365 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
366 [AliExternalTrackParam trackparam;
367 Double_t param[[5]]; Double_t covar[[15]];
368 trackparam.Set(0., 0., param, covar);])],
369 [externaltrackparam_version=2],
370 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
371 AC_MSG_CHECKING(for version of AliExternalTrackParam)
372 AC_MSG_RESULT($externaltrackparam_version)
373
4646c6e3 374 dnl The AliShuttleInterface was changed in rev 29388. Some return types
375 dnl had been const, now changed according to gcc 4.3 warnings
376 AC_MSG_CHECKING(for version of AliShuttleInterface.h)
377 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/"
378 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
379 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
380 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliShuttleInterface.h>],
381 [class dummy : public AliShuttleInterface {
382 public:
383 const UInt_t GetStartTimeDCSQuery() {;}
384 };])],
385 [AC_DEFINE(SHUTTLE_PRE_REV29388_INTERFACE)
386 alishuttleinterface_version=pre.rev.29388],
387 [alishuttleinterface_version=up.to.date])
388 AC_MSG_RESULT([$alishuttleinterface_version])
389
74c73e5a 390 CPPFLAGS=$save_CPPFLAGS
391 LDFLAGS=$save_LDFLAGS
392 LIBS=$save_LIBS
7233bc62 393fi # if test ! "x$have_aliroot" = "xno"
f59fee6d 394
74c73e5a 395AC_LANG_POP(C++)
5f5b708b 396AC_SUBST([ALICE_ROOT])
74c73e5a 397AC_SUBST([ALIROOT_CPPFLAGS])
398AC_SUBST([ALIROOT_LDFLAGS])
dc8f7cb7 399AC_SUBST([ALIROOTBINDIR])
53feaef5 400AC_SUBST([ALIROOTLIBDIR])
593a08ea 401
402ALIROOT_LIBS="$ALIROOT_LIBS $ADD_ROOTLIBS"
74c73e5a 403AC_SUBST([ALIROOT_LIBS])
0f51f5b8 404AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
85869391 405
6c1a9d9e 406HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
407HLTBASE_LDFLAGS=
408AC_SUBST([HLTBASE_CPPFLAGS])
409AC_SUBST([HLTBASE_LDFLAGS])
410
78b557c2 411dnl ------------------------------------------------------------------
412dnl check for the HLT PubSub Framework
f8c5e339 413dnl namely for the existence of the HOMER library
414dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
415dnl package. It os though possible to choose an external. library
416dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
417dnl got the name libAliHLTHOMER
78b557c2 418AC_MSG_CHECKING([for HLT PubSub Framework])
419AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
420 [],
421 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
422if test -z $with_pubsub || ! test -d $with_pubsub ; then
423 with_pubsub=no
424fi
425AC_MSG_RESULT([$with_pubsub])
f8c5e339 426HOMER_VERSION=2
5f1685a0 427HOMER_LIBS=
78b557c2 428
429AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
430if test "x$with_pubsub" != "xno" ; then
431 save_CPPFLAGS=$CPPFLAGS
432 save_LDFLAGS=$LDFLAGS
433 save_LIBS=$LIBS
4a6b4894 434 # currently the different versions of the HLT PubSub framework have a different
435 # directory layout
20b6dd9a 436 if test -d ${with_pubsub}/include/HOMER ; then
5235c3e9 437 # the 'early' location of the include files with separated HOMER sub dirs
9ce4bf4a 438 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
5235c3e9 439 elif test -d ${with_pubsub}/include/Util/HOMER ; then
440 # location for HLT Framework versions after Sep 2006
9ce4bf4a 441 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
5235c3e9 442 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
443 # fall back if include files were not installed (versions after Sep 06)
9ce4bf4a 444 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
4a6b4894 445 else
5235c3e9 446 # fall back if include files were not installed (versions before Sep 06)
9ce4bf4a 447 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
4a6b4894 448 fi
9ce4bf4a 449 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
5894eaa5 450
451 AC_ARG_ENABLE(pubsub-debug,
452 [AC_HELP_STRING([--disable-pubsub-debug],
453 [force the production version of the PubSub framework])],
454 [],[enable_pubsub_debug=yes])
455 homer_type="none"
456 HOMER_TARGET="`uname -s`-`uname -m`"
457 AC_MSG_CHECKING([for HLT PubSub Framework release type])
458 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
459 homer_type="production"
460 HOMER_TARGET="${HOMER_TARGET}-release"
461 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
462 homer_type="debug"
463 HOMER_TARGET="${HOMER_TARGET}-debug"
464 fi
465 AC_MSG_RESULT([${homer_type}])
f8c5e339 466 HOMERREADER_HEADER=HOMERReader.h
5894eaa5 467 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
468 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
53feaef5 469 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
78b557c2 470 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
471 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
472 LIBS="$save_LIBS "
473 with_homer=no
474 AC_LANG_PUSH(C++)
f8c5e339 475 AC_CHECK_HEADER([$HOMERREADER_HEADER],
5f1685a0 476 [ AC_CHECK_LIB([HOMER],[_init],
477 [with_homer=yes
478 HOMER_LIBS="-lHOMER"],
479 [ AC_CHECK_LIB([HOMERReader],[_init],
480 [with_homer=yes
481 HOMER_LIBS="-lHOMERReader"])])
482 LIBS="$LIBS $HOMER_LIBS"
9ce4bf4a 483 AC_MSG_CHECKING([version of HOMER library])
5f1685a0 484 dnl The Homer library has no versioning, so we do our own
485 dnl version description
486 dnl ----------------------------------------------------------------------
487 dnl 1 inintial version
488 dnl 2 GetBlockStatusFlags added to the interface
489 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
490 [HOMERReader reader("dummy", 0);
491 reader.GetBlockStatusFlags(0);])],
f8c5e339 492 [],
493 [HOMER_VERSION=1])
5f1685a0 494 AC_MSG_RESULT([$HOMER_VERSION])
f8c5e339 495 ],
496 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
78b557c2 497 AC_LANG_POP(C++)
f8c5e339 498 HOMER_INBUILT_LIB=
499else
500dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
501 topdir=`dirname $0`
502 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
503 HOMERREADER_HEADER=AliHLTHOMERReader.h
504 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
505 HOMER_BINDIR=
506 HOMER_LIBDIR=
507 HOMER_LDFLAGS=
508fi
509
78b557c2 510 if test "x$with_homer" = "xno" ; then
511 HOMER_CPPFLAGS=
512 HOMER_LDFLAGS=
5f1685a0 513 HOMER_LIBS=
78b557c2 514 else
5f1685a0 515 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
78b557c2 516 AC_DEFINE(HAVE_HOMERREADER)
517 fi
518 CPPFLAGS="$save_CPPFLAGS"
519 LDFLAGS="$save_LDFLAGS"
520 LIBS="$save_LIBS"
f8c5e339 521
522AC_SUBST([HOMERREADER_HEADER])
523AC_SUBST([HOMER_INBUILT_LIB])
78b557c2 524AC_SUBST([HOMER_CPPFLAGS])
525AC_SUBST([HOMER_LDFLAGS])
53feaef5 526AC_SUBST([HOMER_LIBDIR])
527AC_SUBST([HOMER_BINDIR])
5f1685a0 528AC_SUBST([HOMER_LIBS])
78b557c2 529
7233bc62 530dnl ------------------------------------------------------------------
531AC_ARG_ENABLE(all,
532 [AC_HELP_STRING([--disable-all],
533 [disable all detector modules, individual modules can be switched on by --enable-det])],
534 [disable_all=yes],[])
535
85869391 536dnl ------------------------------------------------------------------
537AC_MSG_CHECKING([whether to impose strict coding conventions])
538AC_ARG_ENABLE(strict,
2028353f 539 [AC_HELP_STRING([--disable-strict],
540 [disable coding convention checks ])],
541 [],[enable_strict=yes])
85869391 542if test "x$enable_strict" = "xyes" ; then
f7561f8d 543 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
85869391 544fi
545AC_MSG_RESULT([$enable_strict])
b521659f 546
5b6ab198 547dnl ------------------------------------------------------------------
548AC_MSG_CHECKING([whether to enable component statistics])
549AC_ARG_ENABLE(component-stat,
550 [AC_HELP_STRING([--enable-component-stat],
551 [enable component statistics ])],
24dc45d8 552 [],[])
553
554dnl enable component statistics if not explicitely disabled
555if test "x$enable_component_stat" != "xno" &&
556 test "x$enable_debug" = "xyes" ; then
557 enable_component_stat=yes.debug
558fi
559
560if test "x$enable_component_stat" = "x" ; then
561 enable_component_stat=no
562fi
563
564if test "x$enable_component_stat" != "xno" ; then
5b6ab198 565 AC_DEFINE(HLT_COMPONENT_STATISTICS)
566fi
567AC_MSG_RESULT([$enable_component_stat])
568
cad2d06c 569dnl ------------------------------------------------------------------
570dnl ---- module checks
571dnl ------------------------------------------------------------------
572save_CPPFLAGS=$CPPFLAGS
573save_LDFLAGS=$LDFLAGS
574save_LIBS=$LIBS
575
c8500eef 576dnl ------------------------------------------------------------------
577AC_MSG_NOTICE([-------------------------------------------------])
578AC_MSG_NOTICE([checking dependencies for HLTbase library])
579HLTBASE_CHECKLIBS='XMLParser'
580for CHECKLIB in $HLTBASE_CHECKLIBS ; do
581 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
582 LIBS="$save_LIBS $ROOTLIBS $ALIHLTBASE_LIBS"
583 AC_CHECK_LIB([$CHECKLIB],[_init], [ALIHLTBASE_LIBS="$ALIHLTBASE_LIBS -l$CHECKLIB"])
584done
585AC_SUBST([ALIHLTBASE_LIBS])
586
b521659f 587dnl ------------------------------------------------------------------
588AC_MSG_CHECKING([whether to compile sample library])
589AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
590AC_ARG_ENABLE(sample,
c018a1bd 591 [AC_HELP_STRING([--disable-sample],
b521659f 592 [compile the sample library ])],
2e742d30 593 [],
594 [if test "x$have_aliroot" = "xno" ; then
595 enable_sample="no...requires.AliRoot"
596 else
597 enable_sample=yes
598 fi
599 ])
600
b521659f 601if test "x$enable_sample" = "xyes" ; then
602 AC_DEFINE(HLT_SAMPLE)
603fi
604AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
605AC_MSG_RESULT([$enable_sample])
606
c018a1bd 607dnl ------------------------------------------------------------------
c018a1bd 608AH_TEMPLATE([HLT_UTIL],[HLT utility library])
b59c004b 609ALIUTIL_LIBS=
610CHECK_HLTMODULE([util],
611 [],
612 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/RAW -I$ALICE_ROOT/PYTHIA6],
613 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
614 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
615 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
616
617if test "x$enable_module" = "xmissheader"; then
618 enable_module="no...missing.headers"
619 enable_util=$enable_module
620elif test "x$enable_module" = "xforce"; then
621 enable_util="yes"
622else
623 enable_util=$enable_module
624fi
c018a1bd 625if test "x$enable_util" = "xyes" ; then
626 AC_DEFINE(HLT_UTIL)
b59c004b 627 ALIUTIL_LIBS=$ALIHLTMODULE_LIBS
c018a1bd 628fi
629AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
b59c004b 630AC_MSG_CHECKING([whether to compile Util library])
631AC_MSG_RESULT([$enable_module])
632AC_SUBST([ALIUTIL_LIBS])
c018a1bd 633
b521659f 634dnl ------------------------------------------------------------------
b521659f 635AH_TEMPLATE([HLT_TPC],[hlt tpc library])
f59fee6d 636
e642ae99 637ALITPC_LIBS=
f59fee6d 638CHECK_HLTMODULE([tpc],
e962f438 639 [AliTPCRawStream.h],
640 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
70d00903 641 [Gui ANALYSIS STAT], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
e642ae99 642 [TPCbase TPCrec TPCcalib], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
f59fee6d 643 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
644
c6b46c3f 645if test "x$enable_module" = "xmissheader"; then
646 enable_module="no...missing.headers"
50a3793d 647 enable_tpc=$enable_module
c6b46c3f 648elif test "x$enable_module" = "xforce"; then
649 enable_tpc="yes"
f59fee6d 650else
651 enable_tpc=$enable_module
652fi
2e742d30 653
b521659f 654if test "x$enable_tpc" = "xyes" ; then
e642ae99 655 AC_LANG_PUSH(C++)
b521659f 656 AC_DEFINE(HLT_TPC)
e642ae99 657 ALITPC_LIBS=$ALIHLTMODULE_LIBS
658 dnl
659 dnl Check for functionality in the TPC reconstruction required for online
660 dnl processing
661 dnl
662 have_tpc_hltoffline_rec=no
663 AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
664 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
665 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
666 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
667 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
668 #include <AliTPCclustererMI.h>
669 #include <TObjArray.h>],
670 [AliTPCtrackerMI tracker;
671 TObjArray* array=NULL;
672 tracker.LoadClusters(array);
673 AliTPCclustererMI cl(NULL, NULL);
89c2e505 674 cl.GetOutputClonesArray();])],
e642ae99 675 [have_tpc_hltoffline_rec=yes],
676 [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
677 AC_MSG_RESULT([$have_tpc_hltoffline_rec])
678
0f058f3e 679 have_alitpcclusterparam_r40128=no
680 AC_MSG_CHECKING([checking for AliTPCClusterParam r40128])
681 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTPCClusterParam.h>],
682 [AliTPCClusterParam param;
683 float test=param.ParamS0Par(0,0,0)]);],
684 [have_alitpcclusterparam_r40128=yes],
685 [AC_DEFINE(HAVE_NOT_ALITPCCLUSTERPARAM_r40128)])
686 AC_MSG_RESULT([$have_alitpcclusterparam_r40128])
687
688 LIBS=$save_LIBS
689
690
e642ae99 691 AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
692 AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
a553c904 693 AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)])
e642ae99 694
695 have_tpc_mapping=no
696 if test ! "x$have_aliroot" = "xno" ; then
697 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
698 # which is stored in the TPC/mapping/Patchx.data files from
699 # AliRoot version v4-04-Release (May 2006)
700 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
701 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
702 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
703 [have_tpc_mapping=yes
704 AC_SUBST(TPC_PAD_MAPPING_PATH)
705 AC_DEFINE(HAVE_TPC_MAPPING)],
706 [])
707
708 fi
709 AC_MSG_CHECKING([for TPC mapping layout])
710 AC_MSG_RESULT([$have_tpc_mapping])
711 AC_LANG_POP(C++)
712
adec4ad4 713else
714 enable_module=$enable_tpc
b521659f 715fi
716AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
d6e2c707 717AC_MSG_CHECKING([whether to compile TPC library])
c6b46c3f 718AC_MSG_RESULT([$enable_module])
f59fee6d 719AC_SUBST([ALITPC_LIBS])
b521659f 720
5e3820e2 721dnl ------------------------------------------------------------------
722AH_TEMPLATE([HLT_RCU],[hlt rcu library])
723
724CHECK_HLTMODULE([rcu],
725 [AliAltroDecoder.h],
726 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
727 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
728 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
729 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
730
731if test "x$enable_module" = "xmissheader"; then
732 enable_module="no...missing.headers"
50a3793d 733 enable_rcu=$enable_module
5e3820e2 734elif test "x$enable_module" = "xforce"; then
735 enable_rcu="yes"
736else
737 AC_LANG_PUSH(C++)
5e3820e2 738 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
739 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
740 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
741 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>],
742 [AliAltroDecoder decoder;
743 decoder.CopyBackward(NULL, 0);])],
744 [enable_rcu=$enable_module],
745 [enable_module="no...requires.AliRoot>v4-10-Release"
746 enable_rcu="no...requires.AliRoot>v4-10-Release"])
747 CPPFLAGS=$save_CPPFLAGS
748 LDFLAGS=$save_LDFLAGS
749 LIBS=$save_LIBS
750 AC_LANG_POP(C++)
751fi
752
753if test "x$enable_rcu" = "xyes" ; then
754 AC_DEFINE(HLT_RCU)
adec4ad4 755else
756 enable_module=$enable_rcu
5e3820e2 757fi
758AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
d6e2c707 759AC_MSG_CHECKING([whether to compile RCU library])
5e3820e2 760AC_MSG_RESULT([$enable_module])
761AC_SUBST([ALIRCU_LIBS])
762
fe8738cf 763dnl ------------------------------------------------------------------
764AH_TEMPLATE([HLT_CALO],[hlt calo(rimeter) library])
765
766ALICALO_LIBS=
767CHECK_HLTMODULE([calo],
768 [], [$ALIROOT_CPPFLAGS],
769 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
d194ebce 770 [EMCALUtils PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
fe8738cf 771 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
772
773if test "x$enable_module" = "xmissheader"; then
774 enable_module="no...missing.headers"
775 enable_calo=$enable_module
776elif test "x$enable_module" = "xforce"; then
777 enable_calo="yes"
778else
779 have_alicalorawstream=no
780 if test ! "x$have_aliroot" = "xno" ; then
781 AC_LANG_PUSH(C++)
782 save_CPPFLAGS="$CPPFLAGS"
783 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
784 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
785 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
786 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
787 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
788 #include <AliCaloRawStream.h>],
789 [int i])],
790 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
791 have_alicalorawstream=yes],
792 [])
793 AC_MSG_RESULT([$have_alicalorawstream])
fe571896 794
795 have_aliesdcalocluster_r38477=no
796 AC_MSG_CHECKING([for AliESDCaloCluster r38477])
797 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliESDCaloCluster.h>],
798 [AliESDCaloCluster cluster;
799 cluster.SetTrackDistance(0.0, 0.0)]);],
800 [have_aliesdcalocluster_r38477=yes],
801 [AC_DEFINE(HAVE_NOT_ALIESDCALOCLUSTER_r38477)])
802 AC_MSG_RESULT([$have_aliesdcalocluster_r38477])
803
fe8738cf 804 AC_LANG_POP(C++)
805 CPPFLAGS="$save_CPPFLAGS"
806 fi
807 if test "x$have_alicalorawstream" != "xyes"; then
808 enable_calo="no...requires.AliRoot>v4-05-07"
809 else
810 enable_calo=$enable_module
811 fi
812fi
813
814if test "x$enable_calo" = "xyes" ; then
815 AC_DEFINE(HLT_CALO)
816 ALICALO_LIBS=$ALIHLTMODULE_LIBS
817else
818 enable_module=$enable_calo
819fi
820AM_CONDITIONAL(EN_HLT_CALO, test x$enable_calo = xyes)
821AC_MSG_CHECKING([whether to compile CALO library])
822AC_MSG_RESULT([$enable_module])
823AC_SUBST([ALICALO_LIBS])
824
c160eda8 825dnl ------------------------------------------------------------------
c160eda8 826AH_TEMPLATE([HLT_PHOS],[hlt phos library])
f59fee6d 827
828ALIPHOS_LIBS=
829CHECK_HLTMODULE([phos],
830 [], [$ALIROOT_CPPFLAGS],
831 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
70979a80 832 [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
f59fee6d 833 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
834
c6b46c3f 835if test "x$enable_module" = "xmissheader"; then
836 enable_module="no...requires.AliRoot>v4-05-07"
50a3793d 837 enable_phos=$enable_module
c6b46c3f 838elif test "x$enable_module" = "xforce"; then
839 enable_phos="yes"
f59fee6d 840else
841 have_alicalorawstream=no
842 if test ! "x$have_aliroot" = "xno" ; then
843 AC_LANG_PUSH(C++)
844 save_CPPFLAGS="$CPPFLAGS"
845 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
846 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
56584e00 847 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
f59fee6d 848 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
849 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
850 #include <AliCaloRawStream.h>],
851 [int i])],
852 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
853 have_alicalorawstream=yes],
854 [])
fe8738cf 855 AC_MSG_RESULT([$have_alicalorawstream])
ae1c1854 856 AC_MSG_CHECKING([for required EMC functionality in AliPHOSRecoParam.h ])
857 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliPHOSRecoParam.h>],
858 [AliPHOSRecoParam param;
859 param.GetEMCClusteringThreshold()])],
860 [have_aliphosrecoparam=yes],
861 [AC_DEFINE(HAVE_NOT_PHOSRECOPARAMEMC)])
fe8738cf 862 AC_MSG_RESULT([$have_aliphosrecoparam])
f59fee6d 863 AC_LANG_POP(C++)
864 CPPFLAGS="$save_CPPFLAGS"
865 fi
866 if test "x$have_alicalorawstream" != "xyes"; then
867 enable_phos="no...requires.AliRoot>v4-05-07"
868 else
869 enable_phos=$enable_module
870 fi
871fi
2e742d30 872
c160eda8 873if test "x$enable_phos" = "xyes" ; then
874 AC_DEFINE(HLT_PHOS)
f59fee6d 875 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 876else
877 enable_module=$enable_phos
c160eda8 878fi
879AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
d6e2c707 880AC_MSG_CHECKING([whether to compile PHOS library])
c6b46c3f 881AC_MSG_RESULT([$enable_module])
f59fee6d 882AC_SUBST([ALIPHOS_LIBS])
c160eda8 883
fe8738cf 884dnl ------------------------------------------------------------------
885AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
886
887ALIEMCAL_LIBS=
888CHECK_HLTMODULE([emcal],
c1482104 889 [], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/EMCAL -I$ALICE_ROOT/VZERO],
fe8738cf 890 [RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
c1482104 891 [EMCALrec EMCALsim EMCALbase EMCALUtils VZERObase], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
fe8738cf 892 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
893
894if test "x$enable_module" = "xmissheader"; then
895 enable_module="no...header.missing"
896 enable_emcal=$enable_module
897elif test "x$enable_module" = "xforce"; then
898 enable_emcal="yes"
899else
900 enable_emcal=$enable_module
901fi
902
903if test "x$enable_emcal" = "xyes" ; then
904 AC_DEFINE(HLT_EMCAL)
905 ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
906else
907 enable_module=$enable_emcal
908fi
909AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
910AC_MSG_CHECKING([whether to compile EMCAL library])
911AC_MSG_RESULT([$enable_module])
912AC_SUBST([ALIEMCAL_LIBS])
913
c6b46c3f 914dnl ------------------------------------------------------------------
915AH_TEMPLATE([HLT_TRD],[hlt trd library])
916
f59fee6d 917ALITRD_LIBS=
918CHECK_HLTMODULE([trd],
919 [], [],
b3f74118 920 [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
5b44f496 921 [STAT TRDbase TRDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
f59fee6d 922 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
923
c6b46c3f 924if test "x$enable_module" = "xmissheader"; then
925 enable_module="no...requires.AliRoot>v4-07-Release"
50a3793d 926 enable_trd=$enable_module
c6b46c3f 927elif test "x$enable_module" = "xforce"; then
928 enable_trd="yes"
f59fee6d 929else
930 enable_trd=$enable_module
931 if test "x$enable_trd" = "xyes" ; then
932 AC_LANG_PUSH(C++)
933 save_CPPFLAGS="$CPPFLAGS"
934 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
adec4ad4 935 # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release
936 # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008
0d66dbf5 937 # changed to AliTRDReconstructor::SetStreamLevel() due to revision 27797, Tue Aug 5 2008
ae5bf1dd 938 # changed to AliTRDReconstructor::SetClusters() according to revision 28069, Mon Aug 18 2008
cef8ce36 939 # changed to AliTRDCluster according to revision 30461, Thu Dec 18 2008
53eb3786 940 # changed to AliTRDclusterizer::GetAddedClusters according to revision 31299, Wed Mar 4 2009
5b44f496 941 # changed to AliTRDclusterizer::GetNTimeBins according to revision 37102 Sun Nov 22 2009
53eb3786 942 AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
943 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
944 [AliTRDclusterizer c;
5b44f496 945 c.GetNTimeBins()])],
f59fee6d 946 [],
5b44f496 947 [enable_trd="no...requires.AliRoot>v4-18-Release"])
f59fee6d 948 AC_MSG_RESULT([$enable_trd])
2fc8c061 949
950 if test "x$enable_trd" = "xyes" ; then
35e2b984 951 have_alitrdseedv1_r39693=no
952 AC_MSG_CHECKING([checking for AliTRDseedV1 r39693])
953 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDseedV1.h>],
954 [AliTRDseedV1 seed;
955 seed.SetC(0.0, 1)]);],
956 [have_alitrdseedv1_r39693=yes],
957 [AC_DEFINE(HAVE_NOT_ALITRD_SEEDV1_r39693)])
958 AC_MSG_RESULT([$have_alitrdseedv1_r39693])
5b44f496 959
960 have_alitrdrawstream_r39608=no
961 AC_MSG_CHECKING([checking for AliTRDrawStream r39608])
962 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDrawStreamBase.h>],
963 [AliTRDrawStreamBase::SetRawStreamVersion(AliTRDrawStreamBase::kTRDdefaultStream)]);],
964 [have_alitrdrawstream_r39608=yes],
965 [AC_DEFINE(HAVE_NOT_ALITRD_RAWSTREAM_r39608)])
966 AC_MSG_RESULT([$have_alitrdrawstream_r39608])
c950df89 967
968 have_alitrdrecoparam_r41621=no
969 AC_MSG_CHECKING([checking for AliTRDrecoParam r41621])
970 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDrecoParam.h>],
971 [AliTRDrecoParam::GetLowFluxHLTParam()]);],
972 [have_alitrdrecoparam_r41621=yes
973 AC_DEFINE(HAVE_ALITRD_RECOPARAM_r41621)],
974 [AC_DEFINE(HAVE_NOT_ALITRD_RECOPARAM_r41621)])
975 AC_MSG_RESULT([$have_alitrdrecoparam_r41621])
2fc8c061 976 fi
977
f59fee6d 978 AC_LANG_POP(C++)
979 CPPFLAGS="$save_CPPFLAGS"
980 fi
981fi
2e742d30 982
0f51f5b8 983if test "x$enable_trd" = "xyes" ; then
984 AC_DEFINE(HLT_TRD)
f59fee6d 985 ALITRD_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 986else
987 enable_module=$enable_trd
0f51f5b8 988fi
989AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
d6e2c707 990AC_MSG_CHECKING([whether to compile TRD library])
c6b46c3f 991AC_MSG_RESULT([$enable_module])
f59fee6d 992AC_SUBST([ALITRD_LIBS])
0f51f5b8 993
629266d1 994dnl ------------------------------------------------------------------
995AH_TEMPLATE([HLT_FMD],[hlt fmd library])
996
997ALIFMD_LIBS=$ALIHLTMODULE_LIBS
998CHECK_HLTMODULE([fmd],
999 [], [],
1000 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
50a3793d 1001 [FMDbase FMDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
629266d1 1002 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1003
1004if test "x$enable_module" = "xmissheader"; then
50a3793d 1005 enable_module="no...missing.headers"
1006 enable_fmd=$enable_module
629266d1 1007elif test "x$enable_module" = "xforce"; then
1008 enable_fmd="yes"
1009else
1010 enable_fmd=$enable_module
629266d1 1011fi
1012
1013if test "x$enable_fmd" = "xyes" ; then
1014 AC_DEFINE(HLT_FMD)
1015 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
1016else
1017 enable_module=$enable_fmd
1018fi
1019AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
1020AC_MSG_CHECKING([whether to compile FMD library])
1021AC_MSG_RESULT([$enable_module])
1022AC_SUBST([ALIFMD_LIBS])
1023
94cc9aab 1024dnl ------------------------------------------------------------------
94cc9aab 1025AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
2e742d30 1026
f59fee6d 1027ALIMUON_LIBS=
e89e6b23 1028CHECK_HLTMODULE([dimuon],
41f99620 1029 [AliMpExMap.h AliMUONTriggerIO.h],
1030 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
b3f74118 1031 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1032 [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
f59fee6d 1033 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1034
1035if test "x$enable_module" = "xmissheader"; then
a853a794 1036 enable_module="no...requires.AliRoot>=v4-08-Release"
50a3793d 1037 enable_muon=$enable_module
c6b46c3f 1038elif test "x$enable_module" = "xforce"; then
1039 enable_muon="yes"
f59fee6d 1040else
1041 enable_muon=$enable_module
1042fi
1043
1044if test "x$enable_muon" = "xyes" ; then
94cc9aab 1045 AC_DEFINE(HLT_MUON)
f59fee6d 1046 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
6ed1b948 1047 AC_LANG_PUSH(C++)
accd4c8f 1048 save_CPPFLAGS="$CPPFLAGS"
1049
6ed1b948 1050 dnl
1051 dnl Check for functionality GetRawStream AliMUONDigitMaker.h
1052 dnl
1053 have_muon_digitmaker_getrawstream=no
1054 AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker)
1055 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON"
1056 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
1057 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
1058 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>],
1059 [AliMUONDigitMaker dm;
1060 dm.GetRawStreamTracker();])],
1061 [have_muon_digitmaker_getrawstream=yes],
1062 [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
1063 LIBS=$save_LIBS
1064 AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
53eb3786 1065
1066 dnl
1067 dnl Check for AliMpPad::GetPositionX/Y
1068 dnl change of implementation in MUON code
1069 dnl revision 31769, Wed Apr 1 2009
1070 dnl
1071 have_muon_alimppad_getposition=no
1072 AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
1073 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
1074 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
1075 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
1076 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>],
1077 [AliMpPad pad;
1078 pad.GetPositionX();])],
1079 [have_muon_alimppad_getposition=yes],
1080 [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
1081 LIBS=$save_LIBS
1082 AC_MSG_RESULT([$have_muon_alimppad_getposition])
1083
accd4c8f 1084 CPPFLAGS="$save_CPPFLAGS"
6ed1b948 1085
1086 AC_LANG_POP(C++)
adec4ad4 1087else
1088 enable_module=$enable_muon
94cc9aab 1089fi
f59fee6d 1090AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
d6e2c707 1091AC_MSG_CHECKING([whether to compile MUON library])
c6b46c3f 1092AC_MSG_RESULT([$enable_module])
f59fee6d 1093AC_SUBST([ALIMUON_LIBS])
94cc9aab 1094
d6e2c707 1095dnl ------------------------------------------------------------------
1096AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
1097
1098ALITRIGGER_LIBS=
1099CHECK_HLTMODULE([trigger],
1100 [], [$ALIROOT_CPPFLAGS],
1101 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1102 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1103 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1104
1105if test "x$enable_module" = "xmissheader"; then
1106 enable_module="no...header.missing"
50a3793d 1107 enable_trigger=$enable_module
d6e2c707 1108elif test "x$enable_module" = "xforce"; then
1109 enable_trigger="yes"
1110else
1111 enable_trigger=$enable_module
1112fi
1113
1114if test "x$enable_trigger" = "xyes" ; then
1115 AC_DEFINE(HLT_TRIGGER)
1116 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 1117else
1118 enable_module=$enable_trigger
d6e2c707 1119fi
1120AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
1121AC_MSG_CHECKING([whether to compile Trigger library])
1122AC_MSG_RESULT([$enable_module])
1123AC_SUBST([ALITRIGGER_LIBS])
1124
ec6160d5 1125dnl ------------------------------------------------------------------
1126AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
1127
1128ALIGLOBAL_LIBS=
1129CHECK_HLTMODULE([global],
1130 [], [$ALIROOT_CPPFLAGS],
1131 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
f4b540e9 1132 [PHOSUtils ], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
ec6160d5 1133 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1134
1135if test "x$enable_module" = "xmissheader"; then
1136 enable_module="no...header.missing"
1137 enable_global=$enable_module
1138elif test "x$enable_module" = "xforce"; then
1139 enable_global="yes"
1140else
1141 enable_global=$enable_module
1142 if test "x$enable_global" = "xyes" ; then
1143 AC_LANG_PUSH(C++)
1144 save_CPPFLAGS="$CPPFLAGS"
1145 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
1146 AC_MSG_CHECKING([for required functions in AliESDtrack])
1147 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliESDtrack.h>],
1148 [AliESDtrack t;
1149 t.SetGlobalChi2(0)])],
1150 [],
1151 [enable_global="no...requires.AliRoot>v4-17-Release"])
1152 AC_MSG_RESULT([$enable_global])
1153 AC_LANG_POP(C++)
1154 CPPFLAGS="$save_CPPFLAGS"
1155 fi
1156fi
1157
1158if test "x$enable_global" = "xyes" ; then
1159 AC_DEFINE(HLT_GLOBAL)
1160 ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
1161else
1162 enable_module=$enable_global
1163fi
1164AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
1165AC_MSG_CHECKING([whether to compile Global library])
1166AC_MSG_RESULT([$enable_module])
1167AC_SUBST([ALIGLOBAL_LIBS])
1168
33daad3d 1169dnl ------------------------------------------------------------------
1170AH_TEMPLATE([HLT_JET],[hlt jet library])
1171
04cbe3ac 1172ALIFASTJET_HEADER=
1173ALIFASTJET_INCFLAGS=
1174ALIFASTJET_LIBS=
1175ALIFASTJET_LDFLAGS=
1176AC_ARG_WITH(fastjet, [installation path of the FASTJET package],
1177 [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet],
1178 [ test -n $FASTJET && with_fastjet=$FASTJET ])
1179
1180if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then
1181 ALIFASTJET_INCFLAGS="-I${with_fastjet}/include"
3665c6c3 1182 ALIFASTJET_HEADER="fastjet/PseudoJet.hh"
04cbe3ac 1183 ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib"
1184 ALIFASTJET_LIBS="CGAL fastjet"
33daad3d 1185else
04cbe3ac 1186 with_fastjet=no
33daad3d 1187fi
1188
04cbe3ac 1189CHECK_HLTMODULE([jet],
1190 [$ALIFASTJET_HEADER], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/JETAN $ALIFASTJET_INCFLAGS],
02bfa57b 1191 [$ALIFASTJET_LIBS], [$ROOTLIBDIR $ALIFASTJET_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS],
593a08ea 1192 [AOD ESD ANALYSIS ANALYSISalice JETAN],
d927dd07 1193 [-L$ROOTLIBDIR $ALIROOT_LDFLAGS $ALIFASTJET_LDFLAGS -L$ALICE_ROOT/lib/tgt_$ALICE_TARGET],
04cbe3ac 1194 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
33daad3d 1195
1196if test "x$enable_module" = "xmissheader"; then
1197 enable_module="no...header.missing"
1198 enable_jet=$enable_module
1199elif test "x$enable_module" = "xforce"; then
1200 enable_jet="yes"
1201else
1202 enable_jet=$enable_module
1203fi
1204
04cbe3ac 1205if test "x$enable_jet" = "xyes" ; then
33daad3d 1206 AC_DEFINE(HLT_JET)
1207 ALIJET_LIBS="$ALIHLTMODULE_LIBS"
04cbe3ac 1208
1209 if test "x$with_fastjet" != "xno"; then
1210 AC_DEFINE(HAVE_FASTJET)
1211 AC_DEFINE(WITHFASTJET)
02bfa57b 1212 ALIJET_LIBS="$ALIJET_LIBS $FASTJET_LDFLAGS"
04cbe3ac 1213 fi
1214 AC_MSG_CHECKING([compilation with FASTJET package])
1215 AC_MSG_RESULT($with_fastjet)
1216
33daad3d 1217else
1218 enable_module=$enable_jet
1219fi
1220
33daad3d 1221AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
1222AC_MSG_CHECKING([whether to compile Jet library])
1223AC_MSG_RESULT([$enable_module])
1224AC_SUBST([ALIJET_LIBS])
1225
d6e2c707 1226dnl ------------------------------------------------------------------
1227AH_TEMPLATE([HLT_ITS],[hlt its library])
1228
1229ALIITS_LIBS=
1230CHECK_HLTMODULE([its],
ae5bf1dd 1231 [AliITSCompressRawDataSDD.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS],
cad2d06c 1232 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
b3ac448a 1233 [ITSbase ITSrec ITSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
d6e2c707 1234 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1235
1236if test "x$enable_module" = "xmissheader"; then
1237 enable_module="no...header.missing"
50a3793d 1238 enable_its=$enable_module
d6e2c707 1239elif test "x$enable_module" = "xforce"; then
1240 enable_its="yes"
1241else
1242 enable_its=$enable_module
adec4ad4 1243 if test "x$enable_its" = "xyes" ; then
1244 AC_LANG_PUSH(C++)
1245 save_CPPFLAGS="$CPPFLAGS"
1246 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS"
1247 # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008
1248 # require AliVertexer::GetNominalPos()
1249 AC_MSG_CHECKING([for required functions in AliITSVertexer])
1250 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>],
1251 [AliITSVertexerZ v;
1252 v.GetNominalPos()])],
1253 [],
1254 [enable_its="no...requires.AliRoot>v4-13-Release"])
1255 AC_MSG_RESULT([$enable_its])
1256 AC_LANG_POP(C++)
1257 CPPFLAGS="$save_CPPFLAGS"
1258 fi
d6e2c707 1259fi
1260
1261if test "x$enable_its" = "xyes" ; then
1262 AC_DEFINE(HLT_ITS)
1263 ALIITS_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 1264else
1265 enable_module=$enable_its
d6e2c707 1266fi
1267AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
1268AC_MSG_CHECKING([whether to compile ITS library])
1269AC_MSG_RESULT([$enable_module])
1270AC_SUBST([ALIITS_LIBS])
1271
e89e6b23 1272dnl ------------------------------------------------------------------
1273AH_TEMPLATE([HLT_COMP],[hlt comp library])
1274
1275ALICOMP_LIBS=
1276CHECK_HLTMODULE([comp],
1277 [], [$ALIROOT_CPPFLAGS],
1278 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1279 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
1280 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1281
1282if test "x$enable_module" = "xmissheader"; then
c6b46c3f 1283 enable_module="no...header.missing"
50a3793d 1284 enable_comp=$enable_module
c6b46c3f 1285elif test "x$enable_module" = "xforce"; then
1286 enable_comp="yes"
e89e6b23 1287else
1288 enable_comp=$enable_module
1289fi
1290
1291if test "x$enable_comp" = "xyes" ; then
1292 AC_DEFINE(HLT_COMP)
1293 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 1294else
1295 enable_module=$enable_comp
e89e6b23 1296fi
1297AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
1298AC_MSG_CHECKING([whether to compile comp library])
c6b46c3f 1299AC_MSG_RESULT([$enable_module])
e89e6b23 1300AC_SUBST([ALICOMP_LIBS])
1301
b521659f 1302dnl ------------------------------------------------------------------
fc455fba 1303AC_MSG_CHECKING([whether to disable AliRoot logging])
1304AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
1305AC_ARG_ENABLE(aliroot-logging,
1306 [AC_HELP_STRING([--disable-aliroot-logging],
1307 [disable logging through AliRoot logging methods])],
1308 [],[enable_aliroot_logging=no])
c018a1bd 1309if test "x$have_aliroot" = "xno" ; then
1310 enable_aliroot_logging=yes # this means 'disable'
1311fi
fc455fba 1312if test "x$enable_aliroot_logging" != "xno" ; then
1313 AC_DEFINE(NOALIROOT_LOGGING)
b521659f 1314fi
fc455fba 1315AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
1316AC_MSG_RESULT([$enable_aliroot_logging])
b521659f 1317
1318dnl ------------------------------------------------------------------
1319AC_MSG_CHECKING([whether to enable saving MC data through the chain])
1320AH_TEMPLATE([DOMC],[MC saving])
1321AC_ARG_ENABLE(mc-saving,
1322 [AC_HELP_STRING([--enable-mc-saving],
1323 [enable saving MC data through the chain])],
1324 [],[enable_mc_saving=no])
1325if test "x$enable_mc_saving" = "xyes" ; then
1326 AC_DEFINE(DOMC)
1327fi
1328AC_MSG_RESULT([$enable_mc_saving])
1329
b521659f 1330dnl ------------------------------------------------------------------
b521659f 1331dnl certainly something old, but we keep the define
1332AC_MSG_CHECKING([whether to use ROWHOUGH])
1333AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
1334AC_ARG_ENABLE(rowhough,
1335 [AC_HELP_STRING([--enable-rowhough],
1336 [use ROWHOUGH ])],
1337 [],[enable_rowhough=no])
1338if test "x$enable_rowhough" = "xyes" ; then
1339 AC_DEFINE(USEROWHOUGH)
1340fi
1341AC_MSG_RESULT([$enable_rowhough])
1342
53feaef5 1343dnl ------------------------------------------------------------------
1344dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
1345dnl stand-alone build system. This is most likely something old we can
1346dnl get rid off later, or do something more reasonable. Since the define
1347dnl needs the quotes they have to be escaped. This works well for the
1348dnl Makefile but not for the configure script. So we have to add the
1349dnl defines after all the other checks.
1350CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
1351if test ! "x$have_aliroot" = "xno" ; then
1352 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
1353fi
1354
b521659f 1355dnl ------------------------------------------------------------------
1356dnl
1357dnl Documentation
1358dnl
1359AC_ARG_VAR(DOXYGEN, The Documentation Generator)
1360AC_PATH_PROG(PERL, perl)
1361AC_PATH_PROG(DOXYGEN, doxygen)
5894eaa5 1362AC_ARG_ENABLE(dot,
1363 [AC_HELP_STRING([--enable-dot],
1364 [enable dot documentation generator])],
1365 [],[enable_dot=no])
b521659f 1366HAVE_DOT=NO
1367DOT_PATH=
1368AC_PATH_PROG(DOT, dot)
5894eaa5 1369if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
b521659f 1370 HAVE_DOT=YES
1371 DOT_PATH=`dirname $DOT`
1372fi
ae1c1854 1373
1374AC_MSG_CHECKING([for documentation mode])
1375AC_ARG_ENABLE(doc,
1376 [AC_HELP_STRING([--disable-doc],
1377 [disable documentation build; monolithic build --enable-doc=mono ])],
1378 [],[enable_doc=modules])
fb345ed7 1379
ae1c1854 1380if test "x$DOXYGEN" = "x" ; then
1381 enable_doc=no.doxygen
fb345ed7 1382elif test "x$enable_doc" = "xyes" ; then
1383 enable_doc=yes
ae1c1854 1384elif test ! "x$enable_doc" = "xmono" && \
1385 test ! "x$enable_doc" = "xmodules" && \
1386 test ! "x$enable_doc" = "xno"; then
1387 enable_doc=no
1388 AC_MSG_WARN([unknown option])
1389fi
1390if test "x$enable_doc" = "xno" ; then
1391 enable_doc=off
1392 DOXYGEN=
1393fi
1394
1395AC_MSG_RESULT([$enable_doc])
1396AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
1397AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
b521659f 1398AC_SUBST([HAVE_DOT])
1399AC_SUBST([DOT_PATH])
1400
90ebac25 1401dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
1402dnl echo $HAVE_SRC_SUBDIR
1403dnl if ! test -d $HAVE_SRC_SUBDIR; then
1404dnl HAVE_SRC_SUBDIR=
1405dnl fi
1406dnl AC_SUBST([HAVE_SRC_SUBDIR])
1407
2bbbadd1 1408dnl ------------------------------------------------------------------
7233bc62 1409AC_MSG_NOTICE([---------------------------------------------- ])
1410AC_MSG_NOTICE([ build summary ])
1411AC_MSG_NOTICE([---------------------------------------------- ])
1412
b521659f 1413AC_CONFIG_FILES([Makefile
1414 BASE/Makefile
53feaef5 1415 BASE/setenv.sh
1416 BASE/setenv.csh
2be16a33 1417 BASE/HOMER/Makefile
242bb794 1418 BASE/util/Makefile
4b31e06b 1419 BASE/util/test/Makefile
d098ebd4 1420 BASE/interface/Makefile
853121af 1421 BASE/test/Makefile
1a21074a 1422 BASE/interface/test/Makefile
b521659f 1423 doc/Makefile
2efb85be 1424 doc/doxygen.conf
1425 doc/doxymodule.conf])
b521659f 1426
7233bc62 1427dnl AliRoot and installation directory for libraries
1428dnl
1429AC_MSG_NOTICE([AliRoot: $have_aliroot])
1430AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
1431if test "x$have_aliroot" != "xno"; then
1432 AC_CONFIG_FILES([sim/Makefile
1433 rec/Makefile
652cf9d2 1434 rec/test/Makefile
436c2d0c 1435 rec/startAliEVE-barrel-tracks.sh
7233bc62 1436 shuttle/Makefile
ff4edcee 1437 pendolino/Makefile
ce5f90bf 1438 benchmark/Makefile
ed292d06 1439 QA/Makefile
7233bc62 1440 ])
1441fi
1442if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1443libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1444AC_MSG_NOTICE([libdir set to $libdir])
1445fi
1446
1447AC_MSG_NOTICE([compile sample library: $enable_sample])
1448if test "x$enable_sample" = "xyes"; then
1449 AC_CONFIG_FILES([SampleLib/Makefile])
1450fi
1451
652cf9d2 1452AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1453if test "x$enable_rcu" = "xyes"; then
1454 AC_CONFIG_FILES([RCU/Makefile
1455 RCU/test/Makefile
1456 ])
1457fi
1458
7233bc62 1459AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1460if test "x$enable_tpc" = "xyes"; then
1461 AC_CONFIG_FILES([TPCLib/Makefile
1462 TPCLib/test/Makefile
1463 TPCLib/mapping2array.cxx
b658d7e4 1464 TPCLib/EVE/Makefile
32e0c022 1465 TPCLib/calibration/Makefile
7233bc62 1466 ])
1467fi
1468
fe8738cf 1469AC_MSG_NOTICE([compile CALO library: $enable_calo])
1470if test "x$enable_calo" = "xyes"; then
1471 AC_CONFIG_FILES([CALO/Makefile
1472 CALO/test/Makefile])
1473fi
1474
7233bc62 1475AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1476if test "x$enable_phos" = "xyes"; then
1477 AC_CONFIG_FILES([PHOS/Makefile])
1478fi
1479
fe8738cf 1480AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1481if test "x$enable_emcal" = "xyes"; then
1482 AC_CONFIG_FILES([EMCAL/Makefile])
1483fi
1484
7233bc62 1485AC_MSG_NOTICE([compile TRD library: $enable_trd])
1486if test "x$enable_trd" = "xyes"; then
1487 AC_CONFIG_FILES([TRD/Makefile])
1488fi
1489
50a3793d 1490AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1491if test "x$enable_fmd" = "xyes"; then
1492 AC_CONFIG_FILES([FMD/Makefile])
1493fi
1494
7233bc62 1495AC_MSG_NOTICE([compile MUON library: $enable_muon])
1496if test "x$enable_muon" = "xyes"; then
1497 AC_CONFIG_FILES([MUON/Makefile])
1498fi
1499
1500AC_MSG_NOTICE([compile ITS library: $enable_its])
1501if test "x$enable_its" = "xyes"; then
1502 AC_CONFIG_FILES([ITS/Makefile])
1503fi
1504
1505AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1506if test "x$enable_trigger" = "xyes"; then
0a76630e 1507 AC_CONFIG_FILES([trigger/Makefile
1508 trigger/test/Makefile])
7233bc62 1509fi
1510
ec6160d5 1511AC_MSG_NOTICE([compile global library: $enable_global])
1512if test "x$enable_global" = "xyes"; then
1513 AC_CONFIG_FILES([global/Makefile])
1514fi
1515
33daad3d 1516AC_MSG_NOTICE([compile jet library: $enable_jet])
1517if test "x$enable_jet" = "xyes"; then
1518 AC_CONFIG_FILES([JET/Makefile])
1519fi
1520
7233bc62 1521AC_MSG_NOTICE([compile comp library: $enable_comp])
1522if test "x$enable_comp" = "xyes"; then
1523 AC_CONFIG_FILES([comp/Makefile])
1524fi
b521659f 1525
1526AC_OUTPUT
1527dnl
1528dnl EOF
1529dnl
1530