1 dnl -*- mode: autoconf -*-
4 dnl template for the configuration script for the Alice HLT
5 dnl framework and components
7 dnl ------------------------------------------------------------------
9 dnl Take either the AliRoot tag as version id or the current revision
10 AC_INIT([Alice High Level Trigger] ,
11 m4_esyscmd([url=`svn info | grep "URL:" | cut -d: -f3 | sed -e 's|[/]*HLT[/]*$||' | sed -e 's|^[/]*||g' | cut -d '/' -f 4`; rev=`cat configure.ac | sed -e '/^dnl \$Id:/!d'| cut -d ' ' -f4 | tr -d '\n'`; if test "x$url" != "x"; then echo -n $url; elif test "x$rev" != "x"; then echo -n $rev ; else echo -n invalid-version; fi]),
12 [Matthias.Richter@ift.uib.no],
15 dnl ------------------------------------------------------------------
16 dnl the package from CVS contains the old Makefiles as well. In order to
17 dnl prevent them from becoming overwritten, we require a separate build
19 if test "`dirname $0`" = "." ; then
20 AC_ERROR([please run the script from a separate build directory])
23 dnl ------------------------------------------------------------------
25 AC_PREFIX_DEFAULT(${PWD})
26 AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
34 AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
36 dnl ------------------------------------------------------------------
37 dnl A warning posted into the auto-generated files
38 dnl Does NOT concern this file ;-)
39 AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
40 AC_SUBST([AUTOGENERATED_WARNING])
42 dnl ------------------------------------------------------------------
46 ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
47 AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
49 ROOTBINDIR=`dirname $ROOTEXEC`
50 AC_SUBST([ROOTBINDIR])
52 dnl test for additional required root libraries and headers
54 if test "x$have_root" = "x1"; then
56 save_CPPFLAGS=$CPPFLAGS
59 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
61 # we check for the libSTEER library which is linked to
62 # - the ROOT libs libGeom libMinuit libVMC libEG
63 # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
64 # - ROOT libCint needs also libdl
65 # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
67 # - from Jan 07 libESD also depends on libXMLIO
68 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
69 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer'
70 for CHECKLIB in $ROOT_CHECKLIBS ; do
71 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
72 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
73 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
76 # TBuffer.h has been made pure virtual in root v5-15-02 and one
77 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
78 AC_CHECK_HEADERS([TBufferFile.h])
80 # TView.h has been made pure virtual right after root v5-15-02 and one
81 # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
82 AC_CHECK_HEADERS([TView3D.h])
84 CPPFLAGS=$save_CPPFLAGS
90 dnl ------------------------------------------------------------------
91 # TODO: make this configurable through arguments
92 #Define whether you want to run with ALIROOT or only ROOT
93 AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
94 ALIHLT_USEPACKAGE=ALIROOT
95 #ALIHLT_USEPACKAGE=ROOT
96 #ALIHLT_USEPACKAGE=STANDALONE
97 AC_DEFINE(use_aliroot)
99 CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
101 dnl ------------------------------------------------------------------
102 dnl check for AliRoot features
105 AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
106 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
109 if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
110 dnl ------------------------------------------------------------------
111 dnl Try to estimate the system architecture
112 case $host_os:$host_cpu in
113 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
114 linux*) alice_target='linux' ;;
115 *) alice_target='unknown' ;;
117 if test "x$alice_target" = "xunknown" ; then
118 if test -z $ALICE_TARGET ; then
119 AC_MSG_ERROR([Can not estimate system architecture.
120 To avoid the problem, set the ALICE_TARGET variable appropriately.
121 Please send the following information to Matthias.Richter@ift.uib.no:
122 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
124 AC_MSG_NOTICE([Unknown system architecture.
125 Please send the following information to Matthias.Richter@ift.uib.no:
126 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
129 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
130 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
131 overriding $ALICE_TARGET by $alice_target])
133 ALICE_TARGET=$alice_target
135 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
136 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
137 ALIROOTINCDIR=${ALICE_ROOT}/include
138 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
139 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
140 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
143 AC_MSG_CHECKING([for AliRoot])
144 if test "x$ALICE_ROOT" != "x" \
145 && test -d ${ALIROOTBINDIR} \
146 && test -d ${ALIROOTLIBDIR} \
147 && test -d ${ALIROOTINCDIR}; then
148 have_aliroot=$ALICE_ROOT
154 AC_MSG_RESULT([$have_aliroot])
156 if test ! "x$have_aliroot" = "xno" ; then
157 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
158 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
159 ALIROOT_LIBS="-lESD $ADD_ROOTLIBS"
160 save_CPPFLAGS=$CPPFLAGS
161 save_LDFLAGS=$LDFLAGS
163 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
164 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
166 # check for certain AliRoot libraries/files/features
167 # libSTEERBase present since Aug 7 2007
168 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
170 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
172 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
174 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
176 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
178 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
180 AC_CHECK_LIB([$CHECKLIB],[_init],
181 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
182 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
184 AC_CHECK_LIB([$CHECKLIB],[_init],
185 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
186 have_alirawdata=$CHECKLIB])],
187 [# second pass with -RAWData
189 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
190 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
191 #include <AliRawReaderFile.h>
192 #include <AliRawReaderDate.h>
193 #include <AliRawReaderRoot.h>],
194 [AliRawReaderMemory mreader;
195 AliRawReaderFile freader;
196 AliRawReaderDate dreader(NULL,0);
197 AliRawReaderRoot rreader(NULL,0);])],
198 [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
199 have_alirawdata=$CHECKLIB],
200 [have_alirawdata=no])
201 ]) dnl AC_CHECK_LIB RAWDatabase
202 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
203 AC_MSG_RESULT([$have_alirawdata])
205 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
206 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
208 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
210 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
212 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
215 dnl check whether AliLog supports notification callback
217 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
218 have_alilog_notification=no
219 if test ! "x$have_aliroot" = "xno" ; then
220 AC_MSG_CHECKING([whether AliLog supports notification callback])
221 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
222 [AliLog::AliLogNotification fct])],
223 [have_alilog_notification=yes],
224 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
225 AC_MSG_RESULT([$have_alilog_notification])
228 if test "x$have_aliroot" = "xno" ; then
229 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
230 # but library dependencies might not be resolved completely
232 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
233 This can happen from time to time due to development in AliRoot. You can
234 force compilation of detector libs by --enable-<detector>, but be aware
235 of unresolved references at runtime.])
236 AC_MSG_WARN([ ------------------------------------------ ])
237 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
238 AC_MSG_WARN([ please include config.log ])
239 AC_MSG_WARN([ ------------------------------------------ ])
245 dnl required header files and libraries for modules
247 if test ! "x$have_aliroot" = "xno" ; then
248 # the HLTTPCLib needs to link agains TPCbase and TPCrec
249 # TPC library for AliTPCParam and AliSimDigits used in
250 # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx
251 # from May 07 TPCbase depends on libGui.so
252 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
254 AC_MSG_CHECKING(for required classes in TPC libraries)
255 if test ! "x$have_alitpc" = "xno" ; then
256 ALITPC_LIBS="-lGui -lTPCbase -lTPCrec"
257 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
258 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h>
259 #include <AliTPCParam.h>
260 #include <AliTPCParamSR.h>
261 #include <AliTPCDigitsArray.h>
262 #include <AliTPCClustersArray.h>
263 #include <AliTPCcluster.h>
264 #include <AliTPCClustersRow.h>],
267 AliTPCParamSR paramsr;
268 AliTPCDigitsArray digarray;
269 AliTPCClustersArray clustarray;
271 AliTPCClustersRow row])],
272 [AC_DEFINE(HAVE_ALITPC)],
276 AC_MSG_RESULT($have_alitpc)
278 AC_CHECK_HEADERS([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
279 AC_CHECK_HEADERS([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
282 if test ! "x$have_aliroot" = "xno" ; then
283 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
284 # which is stored in the TPC/mapping/Patchx.data files from
285 # AliRoot version v4-04-Release (May 2006)
286 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
287 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
288 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
289 [have_tpc_mapping=yes
290 AC_SUBST(TPC_PAD_MAPPING_PATH)
291 AC_DEFINE(HAVE_TPC_MAPPING)],
295 AC_MSG_CHECKING([for TPC mapping layout])
296 AC_MSG_RESULT([$have_tpc_mapping])
299 dnl Check for the interface of AliExternalTrackParam which has been changed
300 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
302 externaltrackparam_version=1
303 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
304 [AliExternalTrackParam trackparam;
305 Double_t param[[5]]; Double_t covar[[15]];
306 trackparam.Set(0., 0., param, covar);])],
307 [externaltrackparam_version=2],
308 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
309 AC_MSG_CHECKING(for version of AliExternalTrackParam)
310 AC_MSG_RESULT($externaltrackparam_version)
312 CPPFLAGS=$save_CPPFLAGS
313 LDFLAGS=$save_LDFLAGS
318 AC_SUBST([ALICE_ROOT])
319 AC_SUBST([ALIROOT_CPPFLAGS])
320 AC_SUBST([ALIROOT_LDFLAGS])
321 AC_SUBST([ALIROOTBINDIR])
322 AC_SUBST([ALIROOTLIBDIR])
323 AC_SUBST([ALIROOT_LIBS])
324 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
326 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
328 AC_SUBST([HLTBASE_CPPFLAGS])
329 AC_SUBST([HLTBASE_LDFLAGS])
331 dnl ------------------------------------------------------------------
332 dnl check for the HLT PubSub Framework
333 dnl namely for the existence of the HOMER library
334 dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
335 dnl package. It os though possible to choose an external. library
336 dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
337 dnl got the name libAliHLTHOMER
338 AC_MSG_CHECKING([for HLT PubSub Framework])
339 AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
341 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
342 if test -z $with_pubsub || ! test -d $with_pubsub ; then
345 AC_MSG_RESULT([$with_pubsub])
349 AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
350 if test "x$with_pubsub" != "xno" ; then
351 save_CPPFLAGS=$CPPFLAGS
352 save_LDFLAGS=$LDFLAGS
354 # currently the different versions of the HLT PubSub framework have a different
356 if test -d ${with_pubsub}/include/HOMER ; then
357 # the 'early' location of the include files with separated HOMER sub dirs
358 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
359 elif test -d ${with_pubsub}/include/Util/HOMER ; then
360 # location for HLT Framework versions after Sep 2006
361 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
362 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
363 # fall back if include files were not installed (versions after Sep 06)
364 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
366 # fall back if include files were not installed (versions before Sep 06)
367 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
369 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
371 AC_ARG_ENABLE(pubsub-debug,
372 [AC_HELP_STRING([--disable-pubsub-debug],
373 [force the production version of the PubSub framework])],
374 [],[enable_pubsub_debug=yes])
376 HOMER_TARGET="`uname -s`-`uname -m`"
377 AC_MSG_CHECKING([for HLT PubSub Framework release type])
378 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
379 homer_type="production"
380 HOMER_TARGET="${HOMER_TARGET}-release"
381 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
383 HOMER_TARGET="${HOMER_TARGET}-debug"
385 AC_MSG_RESULT([${homer_type}])
386 HOMERREADER_HEADER=HOMERReader.h
387 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
388 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
389 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
390 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
391 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
395 AC_CHECK_HEADER([$HOMERREADER_HEADER],
396 [ AC_CHECK_LIB([HOMER],[_init],
398 HOMER_LIBS="-lHOMER"],
399 [ AC_CHECK_LIB([HOMERReader],[_init],
401 HOMER_LIBS="-lHOMERReader"])])
402 LIBS="$LIBS $HOMER_LIBS"
403 AC_MSG_CHECKING([version of HOMER library])
404 dnl The Homer library has no versioning, so we do our own
405 dnl version description
406 dnl ----------------------------------------------------------------------
407 dnl 1 inintial version
408 dnl 2 GetBlockStatusFlags added to the interface
409 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
410 [HOMERReader reader("dummy", 0);
411 reader.GetBlockStatusFlags(0);])],
414 AC_MSG_RESULT([$HOMER_VERSION])
416 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
420 dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
422 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
423 HOMERREADER_HEADER=AliHLTHOMERReader.h
424 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
430 if test "x$with_homer" = "xno" ; then
435 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
436 AC_DEFINE(HAVE_HOMERREADER)
438 CPPFLAGS="$save_CPPFLAGS"
439 LDFLAGS="$save_LDFLAGS"
442 AC_SUBST([HOMERREADER_HEADER])
443 AC_SUBST([HOMER_INBUILT_LIB])
444 AC_SUBST([HOMER_CPPFLAGS])
445 AC_SUBST([HOMER_LDFLAGS])
446 AC_SUBST([HOMER_LIBDIR])
447 AC_SUBST([HOMER_BINDIR])
448 AC_SUBST([HOMER_LIBS])
450 dnl ------------------------------------------------------------------
451 AC_MSG_CHECKING([whether to impose strict coding conventions])
452 AC_ARG_ENABLE(strict,
453 [AC_HELP_STRING([--disable-strict],
454 [disable coding convention checks ])],
455 [],[enable_strict=yes])
456 if test "x$enable_strict" = "xyes" ; then
457 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall"
459 AC_MSG_RESULT([$enable_strict])
461 dnl ------------------------------------------------------------------
462 AC_MSG_CHECKING([whether to compile sample library])
463 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
464 AC_ARG_ENABLE(sample,
465 [AC_HELP_STRING([--disable-sample],
466 [compile the sample library ])],
468 [if test "x$have_aliroot" = "xno" ; then
469 enable_sample="no...requires.AliRoot"
475 if test "x$enable_sample" = "xyes" ; then
476 AC_DEFINE(HLT_SAMPLE)
478 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
479 AC_MSG_RESULT([$enable_sample])
481 dnl ------------------------------------------------------------------
482 AC_MSG_CHECKING([whether to compile util library])
483 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
485 [AC_HELP_STRING([--disable-util],
486 [compile the util library ])],
488 [if test "x$have_aliroot" = "xno" ; then
489 enable_util="no...requires.AliRoot"
495 if test "x$enable_util" = "xyes" ; then
498 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
499 AC_MSG_RESULT([$enable_util])
501 dnl ------------------------------------------------------------------
502 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
504 CHECK_HLTMODULE([tpc],
506 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
507 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
508 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
509 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
511 if test "x$enable_module" = "xmissheader"; then
512 enable_module="no...missing.headers"
513 enable_tpc="no...missing.headers"
514 elif test "x$have_alitpc" = "xno" ; then
515 enable_module="no...requires.AliRoot.TPC.libraries"
516 enable_tpc="no...requires.AliRoot.TPC.libraries"
517 elif test "x$enable_module" = "xforce"; then
520 enable_tpc=$enable_module
523 if test "x$enable_tpc" = "xyes" ; then
526 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
527 AC_MSG_CHECKING([whether to compile TPC library])
528 AC_MSG_RESULT([$enable_module])
529 AC_SUBST([ALITPC_LIBS])
531 dnl ------------------------------------------------------------------
532 AH_TEMPLATE([HLT_RCU],[hlt rcu library])
534 CHECK_HLTMODULE([rcu],
536 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
537 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
538 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
539 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
541 if test "x$enable_module" = "xmissheader"; then
542 enable_module="no...missing.headers"
543 enable_rcu="no...missing.headers"
544 elif test "x$have_alircu" = "xno" ; then
545 enable_module="no...requires.AliRoot.RAW.libraries"
546 enable_rcu="no...requires.AliRoot.RAW.libraries"
547 elif test "x$enable_module" = "xforce"; then
551 save_CPPFLAGS=$CPPFLAGS
552 save_LDFLAGS=$LDFLAGS
554 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
555 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
556 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
557 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>],
558 [AliAltroDecoder decoder;
559 decoder.CopyBackward(NULL, 0);])],
560 [enable_rcu=$enable_module],
561 [enable_module="no...requires.AliRoot>v4-10-Release"
562 enable_rcu="no...requires.AliRoot>v4-10-Release"])
563 CPPFLAGS=$save_CPPFLAGS
564 LDFLAGS=$save_LDFLAGS
569 if test "x$enable_rcu" = "xyes" ; then
572 AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
573 AC_MSG_CHECKING([whether to compile RCU library])
574 AC_MSG_RESULT([$enable_module])
575 AC_SUBST([ALIRCU_LIBS])
577 dnl ------------------------------------------------------------------
578 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
581 CHECK_HLTMODULE([phos],
582 [], [$ALIROOT_CPPFLAGS],
583 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
584 [PHOSbase PHOSrec PHOSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
585 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
587 if test "x$enable_module" = "xmissheader"; then
588 enable_module="no...requires.AliRoot>v4-05-07"
589 enable_phos="no...requires.AliRoot>v4-05-07"
590 elif test "x$enable_module" = "xforce"; then
593 have_alicalorawstream=no
594 if test ! "x$have_aliroot" = "xno" ; then
596 save_CPPFLAGS="$CPPFLAGS"
597 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
598 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
599 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
600 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
601 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
602 #include <AliCaloRawStream.h>],
604 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
605 have_alicalorawstream=yes],
607 AC_MSG_RESULT([$have_alicalorawstream])
609 CPPFLAGS="$save_CPPFLAGS"
611 if test "x$have_alicalorawstream" != "xyes"; then
612 enable_phos="no...requires.AliRoot>v4-05-07"
614 enable_phos=$enable_module
618 if test "x$enable_phos" = "xyes" ; then
620 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
622 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
623 AC_MSG_CHECKING([whether to compile PHOS library])
624 AC_MSG_RESULT([$enable_module])
625 AC_SUBST([ALIPHOS_LIBS])
627 dnl ------------------------------------------------------------------
628 AH_TEMPLATE([HLT_TRD],[hlt trd library])
631 CHECK_HLTMODULE([trd],
633 [MLP], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
634 [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
635 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
637 if test "x$enable_module" = "xmissheader"; then
638 enable_module="no...requires.AliRoot>v4-07-Release"
639 enable_trd="no...requires.AliRoot>v4-07-Release"
640 elif test "x$enable_module" = "xforce"; then
643 enable_trd=$enable_module
644 if test "x$enable_trd" = "xyes" ; then
646 save_CPPFLAGS="$CPPFLAGS"
647 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
648 AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
649 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
650 [AliTRDclusterizer c;
651 c.SetRawVersion(0)])],
653 [enable_trd="no...requires.AliRoot>v4-07-Release"])
654 AC_MSG_RESULT([$enable_trd])
656 CPPFLAGS="$save_CPPFLAGS"
660 if test "x$enable_trd" = "xyes" ; then
662 ALITRD_LIBS=$ALIHLTMODULE_LIBS
664 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
665 AC_MSG_CHECKING([whether to compile TRD library])
666 AC_MSG_RESULT([$enable_module])
667 AC_SUBST([ALITRD_LIBS])
669 dnl ------------------------------------------------------------------
670 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
673 CHECK_HLTMODULE([dimuon],
674 [AliMpExMap.h AliMUONTriggerIO.h],
675 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
676 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
677 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
678 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
680 if test "x$enable_module" = "xmissheader"; then
681 enable_module="no...requires.AliRoot>=v4-08-Release"
682 enable_muon="no...requires.AliRoot>=v4-08-Release"
683 elif test "x$enable_module" = "xforce"; then
686 enable_muon=$enable_module
689 if test "x$enable_muon" = "xyes" ; then
691 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
693 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
694 AC_MSG_CHECKING([whether to compile MUON library])
695 AC_MSG_RESULT([$enable_module])
696 AC_SUBST([ALIMUON_LIBS])
698 dnl ------------------------------------------------------------------
699 AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
702 CHECK_HLTMODULE([trigger],
703 [], [$ALIROOT_CPPFLAGS],
704 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
705 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
706 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
708 if test "x$enable_module" = "xmissheader"; then
709 enable_module="no...header.missing"
710 enable_trigger="no...header.missing"
711 elif test "x$enable_module" = "xforce"; then
714 enable_trigger=$enable_module
717 if test "x$enable_trigger" = "xyes" ; then
718 AC_DEFINE(HLT_TRIGGER)
719 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
721 AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
722 AC_MSG_CHECKING([whether to compile Trigger library])
723 AC_MSG_RESULT([$enable_module])
724 AC_SUBST([ALITRIGGER_LIBS])
726 dnl ------------------------------------------------------------------
727 AH_TEMPLATE([HLT_ITS],[hlt its library])
730 CHECK_HLTMODULE([its],
731 [], [$ALIROOT_CPPFLAGS],
732 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
733 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
734 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
736 if test "x$enable_module" = "xmissheader"; then
737 enable_module="no...header.missing"
738 enable_its="no...header.missing"
739 elif test "x$enable_module" = "xforce"; then
742 enable_its=$enable_module
745 if test "x$enable_its" = "xyes" ; then
747 ALIITS_LIBS=$ALIHLTMODULE_LIBS
749 AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
750 AC_MSG_CHECKING([whether to compile ITS library])
751 AC_MSG_RESULT([$enable_module])
752 AC_SUBST([ALIITS_LIBS])
754 dnl ------------------------------------------------------------------
755 AH_TEMPLATE([HLT_COMP],[hlt comp library])
758 CHECK_HLTMODULE([comp],
759 [], [$ALIROOT_CPPFLAGS],
760 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
761 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
762 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
764 if test "x$enable_module" = "xmissheader"; then
765 enable_module="no...header.missing"
766 enable_comp="no...header.missing"
767 elif test "x$enable_module" = "xforce"; then
770 enable_comp=$enable_module
773 if test "x$enable_comp" = "xyes" ; then
775 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
777 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
778 AC_MSG_CHECKING([whether to compile comp library])
779 AC_MSG_RESULT([$enable_module])
780 AC_SUBST([ALICOMP_LIBS])
782 dnl ------------------------------------------------------------------
783 AC_MSG_CHECKING([whether to disable AliRoot logging])
784 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
785 AC_ARG_ENABLE(aliroot-logging,
786 [AC_HELP_STRING([--disable-aliroot-logging],
787 [disable logging through AliRoot logging methods])],
788 [],[enable_aliroot_logging=no])
789 if test "x$have_aliroot" = "xno" ; then
790 enable_aliroot_logging=yes # this means 'disable'
792 if test "x$enable_aliroot_logging" != "xno" ; then
793 AC_DEFINE(NOALIROOT_LOGGING)
795 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
796 AC_MSG_RESULT([$enable_aliroot_logging])
798 dnl ------------------------------------------------------------------
799 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
800 AH_TEMPLATE([DOMC],[MC saving])
801 AC_ARG_ENABLE(mc-saving,
802 [AC_HELP_STRING([--enable-mc-saving],
803 [enable saving MC data through the chain])],
804 [],[enable_mc_saving=no])
805 if test "x$enable_mc_saving" = "xyes" ; then
808 AC_MSG_RESULT([$enable_mc_saving])
810 dnl ------------------------------------------------------------------
811 dnl certainly something old, but we keep the define
812 AC_MSG_CHECKING([whether to use ROWHOUGH])
813 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
814 AC_ARG_ENABLE(rowhough,
815 [AC_HELP_STRING([--enable-rowhough],
817 [],[enable_rowhough=no])
818 if test "x$enable_rowhough" = "xyes" ; then
819 AC_DEFINE(USEROWHOUGH)
821 AC_MSG_RESULT([$enable_rowhough])
823 dnl ------------------------------------------------------------------
824 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
825 dnl stand-alone build system. This is most likely something old we can
826 dnl get rid off later, or do something more reasonable. Since the define
827 dnl needs the quotes they have to be escaped. This works well for the
828 dnl Makefile but not for the configure script. So we have to add the
829 dnl defines after all the other checks.
830 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
831 if test ! "x$have_aliroot" = "xno" ; then
832 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
835 dnl ------------------------------------------------------------------
839 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
840 AC_PATH_PROG(PERL, perl)
841 AC_PATH_PROG(DOXYGEN, doxygen)
842 AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
844 [AC_HELP_STRING([--enable-dot],
845 [enable dot documentation generator])],
849 AC_PATH_PROG(DOT, dot)
850 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
852 DOT_PATH=`dirname $DOT`
857 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
858 dnl echo $HAVE_SRC_SUBDIR
859 dnl if ! test -d $HAVE_SRC_SUBDIR; then
862 dnl AC_SUBST([HAVE_SRC_SUBDIR])
864 dnl ------------------------------------------------------------------
865 dnl inatallation directory for libraries
867 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
868 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
869 AC_MSG_NOTICE([libdir set to $libdir])
871 dnl ------------------------------------------------------------------
872 AC_CONFIG_FILES([Makefile
878 BASE/interface/Makefile
886 TPCLib/mapping2array.cxx
887 TPCLib/OnlineDisplay/Makefile
898 doc/doxymodule.conf])