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