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