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