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