1 dnl -*- mode: autoconf -*-
4 dnl template for the configuration script for the Alice HLT
5 dnl framework and components
7 dnl ------------------------------------------------------------------
8 AC_INIT([Alice High Level Trigger] , [0.9-dev], [Matthias.Richter@ift.uib.no], alice-hlt)
10 dnl ------------------------------------------------------------------
11 dnl the package from CVS contains the old Makefiles as well. In order to
12 dnl prevent them from becoming overwritten, we require a separate build
14 if test "`dirname $0`" = "." ; then
15 AC_ERROR([please run the script from a separate build directory])
18 dnl ------------------------------------------------------------------
20 AC_PREFIX_DEFAULT(${PWD})
21 AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
29 AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
31 dnl ------------------------------------------------------------------
32 dnl A warning posted into the auto-generated files
33 dnl Does NOT concern this file ;-)
34 AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
35 AC_SUBST([AUTOGENERATED_WARNING])
37 dnl ------------------------------------------------------------------
41 ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
42 AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
44 ROOTBINDIR=`dirname $ROOTEXEC`
45 AC_SUBST([ROOTBINDIR])
47 dnl test for additional required root libraries and headers
49 if test "x$have_root" = "x1"; then
51 save_CPPFLAGS=$CPPFLAGS
54 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
56 # we check for the libSTEER library which is linked to
57 # - the ROOT libs libGeom libMinuit libVMC libEG
58 # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
59 # - ROOT libCint needs also libdl
60 # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
62 # - from Jan 07 libESD also depends on libXMLIO
63 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
64 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer'
65 for CHECKLIB in $ROOT_CHECKLIBS ; do
66 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
67 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
68 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
71 # TBuffer.h has been made pure virtual in root v5-15-02 and one
72 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
73 AC_CHECK_HEADERS([TBufferFile.h])
75 # TView.h has been made pure virtual right after root v5-15-02 and one
76 # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
77 AC_CHECK_HEADERS([TView3D.h])
79 CPPFLAGS=$save_CPPFLAGS
85 dnl ------------------------------------------------------------------
86 # TODO: make this configurable through arguments
87 #Define whether you want to run with ALIROOT or only ROOT
88 AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
89 ALIHLT_USEPACKAGE=ALIROOT
90 #ALIHLT_USEPACKAGE=ROOT
91 #ALIHLT_USEPACKAGE=STANDALONE
92 AC_DEFINE(use_aliroot)
94 CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
96 dnl ------------------------------------------------------------------
97 dnl check for AliRoot features
100 AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
101 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
104 if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
105 dnl ------------------------------------------------------------------
106 dnl Try to estimate the system architecture
107 case $host_os:$host_cpu in
108 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
109 linux*) alice_target='linux' ;;
110 *) alice_target='unknown' ;;
112 if test "x$alice_target" = "xunknown" ; then
113 if test -z $ALICE_TARGET ; then
114 AC_MSG_ERROR([Can not estimate system architecture.
115 To avoid the problem, set the ALICE_TARGET variable appropriately.
116 Please send the following information to Matthias.Richter@ift.uib.no:
117 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
119 AC_MSG_NOTICE([Unknown system architecture.
120 Please send the following information to Matthias.Richter@ift.uib.no:
121 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
124 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
125 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
126 overriding $ALICE_TARGET by $alice_target])
128 ALICE_TARGET=$alice_target
130 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
131 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
132 ALIROOTINCDIR=${ALICE_ROOT}/include
133 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
134 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
135 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
138 AC_MSG_CHECKING([for AliRoot])
139 if test "x$ALICE_ROOT" != "x" \
140 && test -d ${ALIROOTBINDIR} \
141 && test -d ${ALIROOTLIBDIR} \
142 && test -d ${ALIROOTINCDIR}; then
143 have_aliroot=$ALICE_ROOT
149 AC_MSG_RESULT([$have_aliroot])
151 if test ! "x$have_aliroot" = "xno" ; then
152 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
153 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
154 ALIROOT_LIBS="-lESD $ADD_ROOTLIBS"
155 save_CPPFLAGS=$CPPFLAGS
156 save_LDFLAGS=$LDFLAGS
158 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
159 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
161 # check for certain AliRoot libraries/files/features
162 # libSTEERBase present since Aug 7 2007
163 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
165 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
167 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
169 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
171 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
173 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
175 AC_CHECK_LIB([$CHECKLIB],[_init],
176 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
177 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
179 AC_CHECK_LIB([$CHECKLIB],[_init],
180 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
181 have_alirawdata=$CHECKLIB])],
182 [# second pass with -RAWData
184 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
185 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
186 #include <AliRawReaderFile.h>
187 #include <AliRawReaderDate.h>
188 #include <AliRawReaderRoot.h>],
189 [AliRawReaderMemory mreader;
190 AliRawReaderFile freader;
191 AliRawReaderDate dreader(NULL,0);
192 AliRawReaderRoot rreader(NULL,0);])],
193 [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
194 have_alirawdata=$CHECKLIB],
195 [have_alirawdata=no])
196 ]) dnl AC_CHECK_LIB RAWDatabase
197 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
198 AC_MSG_RESULT([$have_alirawdata])
200 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
201 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
203 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
205 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
207 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
210 dnl check whether AliLog supports notification callback
212 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
213 have_alilog_notification=no
214 if test ! "x$have_aliroot" = "xno" ; then
215 AC_MSG_CHECKING([whether AliLog supports notification callback])
216 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
217 [AliLog::AliLogNotification fct])],
218 [have_alilog_notification=yes],
219 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
220 AC_MSG_RESULT([$have_alilog_notification])
223 if test "x$have_aliroot" = "xno" ; then
224 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
225 # but library dependencies might not be resolved completely
227 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
228 This can happen from time to time due to development in AliRoot. You can
229 force compilation of detector libs by --enable-<detector>, but be aware
230 of unresolved references at runtime.])
231 AC_MSG_WARN([ ------------------------------------------ ])
232 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
233 AC_MSG_WARN([ please include config.log ])
234 AC_MSG_WARN([ ------------------------------------------ ])
240 dnl required header files and libraries for modules
242 if test ! "x$have_aliroot" = "xno" ; then
243 # the HLTTPCLib needs to link agains TPCbase and TPCrec
244 # TPC library for AliTPCParam and AliSimDigits used in
245 # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx
246 # from May 07 TPCbase depends on libGui.so
247 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
249 AC_MSG_CHECKING(for required classes in TPC libraries)
250 if test ! "x$have_alitpc" = "xno" ; then
251 ALITPC_LIBS="-lGui -lTPCbase -lTPCrec"
252 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
253 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h>
254 #include <AliTPCParam.h>
255 #include <AliTPCParamSR.h>
256 #include <AliTPCDigitsArray.h>
257 #include <AliTPCClustersArray.h>
258 #include <AliTPCcluster.h>
259 #include <AliTPCClustersRow.h>],
262 AliTPCParamSR paramsr;
263 AliTPCDigitsArray digarray;
264 AliTPCClustersArray clustarray;
266 AliTPCClustersRow row])],
267 [AC_DEFINE(HAVE_ALITPC)],
271 AC_MSG_RESULT($have_alitpc)
273 AC_CHECK_HEADERS([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
274 AC_CHECK_HEADERS([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
277 if test ! "x$have_aliroot" = "xno" ; then
278 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
279 # which is stored in the TPC/mapping/Patchx.data files from
280 # AliRoot version v4-04-Release (May 2006)
281 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
282 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
283 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
284 [have_tpc_mapping=yes
285 AC_SUBST(TPC_PAD_MAPPING_PATH)
286 AC_DEFINE(HAVE_TPC_MAPPING)],
290 AC_MSG_CHECKING([for TPC mapping layout])
291 AC_MSG_RESULT([$have_tpc_mapping])
294 dnl Check for the interface of AliExternalTrackParam which has been changed
295 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
297 externaltrackparam_version=1
298 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
299 [AliExternalTrackParam trackparam;
300 Double_t param[[5]]; Double_t covar[[15]];
301 trackparam.Set(0., 0., param, covar);])],
302 [externaltrackparam_version=2],
303 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
304 AC_MSG_CHECKING(for version of AliExternalTrackParam)
305 AC_MSG_RESULT($externaltrackparam_version)
307 CPPFLAGS=$save_CPPFLAGS
308 LDFLAGS=$save_LDFLAGS
313 AC_SUBST([ALICE_ROOT])
314 AC_SUBST([ALIROOT_CPPFLAGS])
315 AC_SUBST([ALIROOT_LDFLAGS])
316 AC_SUBST([ALIROOTBINDIR])
317 AC_SUBST([ALIROOTLIBDIR])
318 AC_SUBST([ALIROOT_LIBS])
319 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
321 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
323 AC_SUBST([HLTBASE_CPPFLAGS])
324 AC_SUBST([HLTBASE_LDFLAGS])
326 dnl ------------------------------------------------------------------
327 dnl check for the HLT PubSub Framework
328 dnl namely for the existence of the HOMER library
329 dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
330 dnl package. It os though possible to choose an external. library
331 dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
332 dnl got the name libAliHLTHOMER
333 AC_MSG_CHECKING([for HLT PubSub Framework])
334 AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
336 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
337 if test -z $with_pubsub || ! test -d $with_pubsub ; then
340 AC_MSG_RESULT([$with_pubsub])
344 AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
345 if test "x$with_pubsub" != "xno" ; then
346 save_CPPFLAGS=$CPPFLAGS
347 save_LDFLAGS=$LDFLAGS
349 # currently the different versions of the HLT PubSub framework have a different
351 if test -d ${with_pubsub}/include/HOMER ; then
352 # the 'early' location of the include files with separated HOMER sub dirs
353 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
354 elif test -d ${with_pubsub}/include/Util/HOMER ; then
355 # location for HLT Framework versions after Sep 2006
356 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
357 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
358 # fall back if include files were not installed (versions after Sep 06)
359 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
361 # fall back if include files were not installed (versions before Sep 06)
362 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
364 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
366 AC_ARG_ENABLE(pubsub-debug,
367 [AC_HELP_STRING([--disable-pubsub-debug],
368 [force the production version of the PubSub framework])],
369 [],[enable_pubsub_debug=yes])
371 HOMER_TARGET="`uname -s`-`uname -m`"
372 AC_MSG_CHECKING([for HLT PubSub Framework release type])
373 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
374 homer_type="production"
375 HOMER_TARGET="${HOMER_TARGET}-release"
376 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
378 HOMER_TARGET="${HOMER_TARGET}-debug"
380 AC_MSG_RESULT([${homer_type}])
381 HOMERREADER_HEADER=HOMERReader.h
382 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
383 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
384 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
385 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
386 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
390 AC_CHECK_HEADER([$HOMERREADER_HEADER],
391 [ AC_CHECK_LIB([HOMER],[_init],
393 HOMER_LIBS="-lHOMER"],
394 [ AC_CHECK_LIB([HOMERReader],[_init],
396 HOMER_LIBS="-lHOMERReader"])])
397 LIBS="$LIBS $HOMER_LIBS"
398 AC_MSG_CHECKING([version of HOMER library])
399 dnl The Homer library has no versioning, so we do our own
400 dnl version description
401 dnl ----------------------------------------------------------------------
402 dnl 1 inintial version
403 dnl 2 GetBlockStatusFlags added to the interface
404 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
405 [HOMERReader reader("dummy", 0);
406 reader.GetBlockStatusFlags(0);])],
409 AC_MSG_RESULT([$HOMER_VERSION])
411 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
415 dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
417 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
418 HOMERREADER_HEADER=AliHLTHOMERReader.h
419 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
425 if test "x$with_homer" = "xno" ; then
430 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
431 AC_DEFINE(HAVE_HOMERREADER)
433 CPPFLAGS="$save_CPPFLAGS"
434 LDFLAGS="$save_LDFLAGS"
437 AC_SUBST([HOMERREADER_HEADER])
438 AC_SUBST([HOMER_INBUILT_LIB])
439 AC_SUBST([HOMER_CPPFLAGS])
440 AC_SUBST([HOMER_LDFLAGS])
441 AC_SUBST([HOMER_LIBDIR])
442 AC_SUBST([HOMER_BINDIR])
443 AC_SUBST([HOMER_LIBS])
445 dnl ------------------------------------------------------------------
446 AC_MSG_CHECKING([whether to impose strict coding conventions])
447 AC_ARG_ENABLE(strict,
448 [AC_HELP_STRING([--disable-strict],
449 [disable coding convention checks ])],
450 [],[enable_strict=yes])
451 if test "x$enable_strict" = "xyes" ; then
452 CPPFLAGS="$CPPFLAGS -Weffc++"
454 AC_MSG_RESULT([$enable_strict])
456 dnl ------------------------------------------------------------------
457 AC_MSG_CHECKING([whether to compile sample library])
458 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
459 AC_ARG_ENABLE(sample,
460 [AC_HELP_STRING([--disable-sample],
461 [compile the sample library ])],
463 [if test "x$have_aliroot" = "xno" ; then
464 enable_sample="no...requires.AliRoot"
470 if test "x$enable_sample" = "xyes" ; then
471 AC_DEFINE(HLT_SAMPLE)
473 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
474 AC_MSG_RESULT([$enable_sample])
476 dnl ------------------------------------------------------------------
477 AC_MSG_CHECKING([whether to compile util library])
478 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
480 [AC_HELP_STRING([--disable-util],
481 [compile the util library ])],
483 [if test "x$have_aliroot" = "xno" ; then
484 enable_util="no...requires.AliRoot"
490 if test "x$enable_util" = "xyes" ; then
493 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
494 AC_MSG_RESULT([$enable_util])
496 dnl ------------------------------------------------------------------
497 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
499 CHECK_HLTMODULE([tpc],
501 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
502 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
503 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
504 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
506 if test "x$enable_module" = "xmissheader"; then
507 enable_module="no...missing.headers"
508 enable_tpc="no...missing.headers"
509 elif test "x$have_alitpc" = "xno" ; then
510 enable_module="no...requires.AliRoot.TPC.libraries"
511 enable_tpc="no...requires.AliRoot.TPC.libraries"
512 elif test "x$enable_module" = "xforce"; then
515 enable_tpc=$enable_module
518 if test "x$enable_tpc" = "xyes" ; then
521 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
522 AC_MSG_CHECKING([whether to compile tpc library])
523 AC_MSG_RESULT([$enable_module])
524 AC_SUBST([ALITPC_LIBS])
526 dnl ------------------------------------------------------------------
527 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
530 CHECK_HLTMODULE([phos],
531 [], [$ALIROOT_CPPFLAGS],
532 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
533 [PHOSbase PHOSrec PHOSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
534 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
536 if test "x$enable_module" = "xmissheader"; then
537 enable_module="no...requires.AliRoot>v4-05-07"
538 enable_phos="no...requires.AliRoot>v4-05-07"
539 elif test "x$enable_module" = "xforce"; then
542 have_alicalorawstream=no
543 if test ! "x$have_aliroot" = "xno" ; then
545 save_CPPFLAGS="$CPPFLAGS"
546 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
547 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
548 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
549 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
550 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
551 #include <AliCaloRawStream.h>],
553 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
554 have_alicalorawstream=yes],
556 AC_MSG_RESULT([$have_alicalorawstream])
558 CPPFLAGS="$save_CPPFLAGS"
560 if test "x$have_alicalorawstream" != "xyes"; then
561 enable_phos="no...requires.AliRoot>v4-05-07"
563 enable_phos=$enable_module
567 if test "x$enable_phos" = "xyes" ; then
569 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
571 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
572 AC_MSG_CHECKING([whether to compile phos library])
573 AC_MSG_RESULT([$enable_module])
574 AC_SUBST([ALIPHOS_LIBS])
576 dnl ------------------------------------------------------------------
577 AH_TEMPLATE([HLT_TRD],[hlt trd library])
580 CHECK_HLTMODULE([trd],
582 [MLP], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
583 [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
584 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
586 if test "x$enable_module" = "xmissheader"; then
587 enable_module="no...requires.AliRoot>v4-07-Release"
588 enable_trd="no...requires.AliRoot>v4-07-Release"
589 elif test "x$enable_module" = "xforce"; then
592 enable_trd=$enable_module
593 if test "x$enable_trd" = "xyes" ; then
595 save_CPPFLAGS="$CPPFLAGS"
596 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
597 AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
598 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
599 [AliTRDclusterizer c;
600 c.SetRawVersion(0)])],
602 [enable_trd="no...requires.AliRoot>v4-07-Release"])
603 AC_MSG_RESULT([$enable_trd])
605 CPPFLAGS="$save_CPPFLAGS"
609 if test "x$enable_trd" = "xyes" ; then
611 ALITRD_LIBS=$ALIHLTMODULE_LIBS
613 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
614 AC_MSG_CHECKING([whether to compile trd library])
615 AC_MSG_RESULT([$enable_module])
616 AC_SUBST([ALITRD_LIBS])
618 dnl ------------------------------------------------------------------
619 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
622 CHECK_HLTMODULE([dimuon],
623 [AliMpExMap.h AliMUONTriggerIO.h],
624 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
625 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
626 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
627 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
629 if test "x$enable_module" = "xmissheader"; then
630 enable_module="no...requires.AliRoot>=v4-08-Release"
631 enable_muon="no...requires.AliRoot>=v4-08-Release"
632 elif test "x$enable_module" = "xforce"; then
635 enable_muon=$enable_module
638 if test "x$enable_muon" = "xyes" ; then
640 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
642 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
643 AC_MSG_CHECKING([whether to compile muon library])
644 AC_MSG_RESULT([$enable_module])
645 AC_SUBST([ALIMUON_LIBS])
647 dnl ------------------------------------------------------------------
648 AH_TEMPLATE([HLT_COMP],[hlt comp library])
651 CHECK_HLTMODULE([comp],
652 [], [$ALIROOT_CPPFLAGS],
653 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
654 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
655 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
657 if test "x$enable_module" = "xmissheader"; then
658 enable_module="no...header.missing"
659 enable_comp="no...header.missing"
660 elif test "x$enable_module" = "xforce"; then
663 enable_comp=$enable_module
666 if test "x$enable_comp" = "xyes" ; then
668 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
670 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
671 AC_MSG_CHECKING([whether to compile comp library])
672 AC_MSG_RESULT([$enable_module])
673 AC_SUBST([ALICOMP_LIBS])
675 dnl ------------------------------------------------------------------
676 AC_MSG_CHECKING([whether to disable AliRoot logging])
677 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
678 AC_ARG_ENABLE(aliroot-logging,
679 [AC_HELP_STRING([--disable-aliroot-logging],
680 [disable logging through AliRoot logging methods])],
681 [],[enable_aliroot_logging=no])
682 if test "x$have_aliroot" = "xno" ; then
683 enable_aliroot_logging=yes # this means 'disable'
685 if test "x$enable_aliroot_logging" != "xno" ; then
686 AC_DEFINE(NOALIROOT_LOGGING)
688 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
689 AC_MSG_RESULT([$enable_aliroot_logging])
691 dnl ------------------------------------------------------------------
692 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
693 AH_TEMPLATE([DOMC],[MC saving])
694 AC_ARG_ENABLE(mc-saving,
695 [AC_HELP_STRING([--enable-mc-saving],
696 [enable saving MC data through the chain])],
697 [],[enable_mc_saving=no])
698 if test "x$enable_mc_saving" = "xyes" ; then
701 AC_MSG_RESULT([$enable_mc_saving])
703 dnl ------------------------------------------------------------------
704 dnl certainly something old, but we keep the define
705 AC_MSG_CHECKING([whether to use ROWHOUGH])
706 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
707 AC_ARG_ENABLE(rowhough,
708 [AC_HELP_STRING([--enable-rowhough],
710 [],[enable_rowhough=no])
711 if test "x$enable_rowhough" = "xyes" ; then
712 AC_DEFINE(USEROWHOUGH)
714 AC_MSG_RESULT([$enable_rowhough])
716 dnl ------------------------------------------------------------------
717 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
718 dnl stand-alone build system. This is most likely something old we can
719 dnl get rid off later, or do something more reasonable. Since the define
720 dnl needs the quotes they have to be escaped. This works well for the
721 dnl Makefile but not for the configure script. So we have to add the
722 dnl defines after all the other checks.
723 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
724 if test ! "x$have_aliroot" = "xno" ; then
725 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
728 dnl ------------------------------------------------------------------
732 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
733 AC_PATH_PROG(PERL, perl)
734 AC_PATH_PROG(DOXYGEN, doxygen)
735 AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
737 [AC_HELP_STRING([--enable-dot],
738 [enable dot documentation generator])],
742 AC_PATH_PROG(DOT, dot)
743 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
745 DOT_PATH=`dirname $DOT`
750 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
751 dnl echo $HAVE_SRC_SUBDIR
752 dnl if ! test -d $HAVE_SRC_SUBDIR; then
755 dnl AC_SUBST([HAVE_SRC_SUBDIR])
757 dnl ------------------------------------------------------------------
758 dnl inatallation directory for libraries
760 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
761 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
762 AC_MSG_NOTICE([libdir set to $libdir])
764 dnl ------------------------------------------------------------------
765 AC_CONFIG_FILES([Makefile
771 BASE/interface/Makefile
778 TPCLib/mapping2array.cxx
779 TPCLib/OnlineDisplay/Makefile