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