Trigger bit mask and multiplicity per PMT in the VZERO ESD. Related changes and class...
[u/mrichter/AliRoot.git] / HLT / configure.ac
CommitLineData
b521659f 1dnl -*- mode: autoconf -*-
2dnl
3dnl $Id$
4dnl template for the configuration script for the Alice HLT
5dnl framework and components
6dnl
7dnl ------------------------------------------------------------------
408c5899 8
9dnl Take either the AliRoot tag as version id or the current revision
10AC_INIT([Alice High Level Trigger] ,
7233bc62 11 m4_esyscmd([url=`svn info 2> /dev/null | grep "URL:" | cut -d: -f3 | sed -e 's|[/]*HLT[/]*$||' | sed -e 's|^[/]*||g' | cut -d '/' -f 4`; \
12 revision=`svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | cut -d '/' -f 4`; \
13 if test "x$url" != "x"; then echo -n $url; \
14 elif test "x$revision" != "x"; then echo -n $revision ; \
15 elif test -e .revision && test x`cat .revision` != x; then \
16 cat .revision; \
17 else \
18 echo -n invalid-version; \
19 fi]),
408c5899 20 [Matthias.Richter@ift.uib.no],
21 [alice-hlt])
b521659f 22
23dnl ------------------------------------------------------------------
24dnl the package from CVS contains the old Makefiles as well. In order to
25dnl prevent them from becoming overwritten, we require a separate build
26dnl directory
27if test "`dirname $0`" = "." ; then
28 AC_ERROR([please run the script from a separate build directory])
29fi
30
31dnl ------------------------------------------------------------------
32AC_CANONICAL_SYSTEM
33AC_PREFIX_DEFAULT(${PWD})
34AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
35AM_INIT_AUTOMAKE
36AC_PROG_CC
37AC_PROG_CXX
38AC_PROG_LIBTOOL
39
40AC_DEBUG
41AC_OPTIMIZATION
dc8f7cb7 42AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
43
44dnl ------------------------------------------------------------------
45dnl A warning posted into the auto-generated files
46dnl Does NOT concern this file ;-)
47AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
48AC_SUBST([AUTOGENERATED_WARNING])
b521659f 49
50dnl ------------------------------------------------------------------
51dnl
52dnl Check for ROOT
53dnl
54ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
55AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
53feaef5 56AC_SUBST([ROOTSYS])
dc8f7cb7 57ROOTBINDIR=`dirname $ROOTEXEC`
58AC_SUBST([ROOTBINDIR])
59
dfaa582a 60dnl test for additional required root libraries and headers
61LIBS='-ldl'
62if test "x$have_root" = "x1"; then
63 AC_LANG_PUSH(C++)
64 save_CPPFLAGS=$CPPFLAGS
65 save_LDFLAGS=$LDFLAGS
66 save_LIBS=$LIBS
67 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
68
dc8f7cb7 69 # we check for the libSTEER library which is linked to
70 # - the ROOT libs libGeom libMinuit libVMC libEG
71 # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
72 # - ROOT libCint needs also libdl
73 # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
74 # libTreePlayer.so
75 # - from Jan 07 libESD also depends on libXMLIO
fbf4d793 76 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
77 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer'
dc8f7cb7 78 for CHECKLIB in $ROOT_CHECKLIBS ; do
dc8f7cb7 79 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
80 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
81 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
82 done
dfaa582a 83
84 # TBuffer.h has been made pure virtual in root v5-15-02 and one
85 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
ba4b0dd7 86 AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE])
dfaa582a 87
0b6c2560 88 # TView.h has been made pure virtual right after root v5-15-02 and one
89 # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
ba4b0dd7 90 AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D])
0b6c2560 91
dc8f7cb7 92 CPPFLAGS=$save_CPPFLAGS
93 LDFLAGS=$save_LDFLAGS
94 LIBS=$save_LIBS
dfaa582a 95 AC_LANG_POP(C++)
dc8f7cb7 96fi
b521659f 97
98dnl ------------------------------------------------------------------
99# TODO: make this configurable through arguments
100#Define whether you want to run with ALIROOT or only ROOT
101AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
102ALIHLT_USEPACKAGE=ALIROOT
103#ALIHLT_USEPACKAGE=ROOT
104#ALIHLT_USEPACKAGE=STANDALONE
105AC_DEFINE(use_aliroot)
106AC_DEFINE(use_root)
85869391 107CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
7233bc62 108save_CPPFLAGS=$CPPFLAGS
109save_LDFLAGS=$LDFLAGS
110save_LIBS=$LIBS
85869391 111
112dnl ------------------------------------------------------------------
74c73e5a 113dnl check for AliRoot features
114AC_LANG_PUSH(C++)
74c73e5a 115have_aliroot=no
2bbbadd1 116AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
117 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
118 [])
119
120if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
121 dnl ------------------------------------------------------------------
122 dnl Try to estimate the system architecture
123 case $host_os:$host_cpu in
124 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
125 linux*) alice_target='linux' ;;
126 *) alice_target='unknown' ;;
127 esac
128 if test "x$alice_target" = "xunknown" ; then
129 if test -z $ALICE_TARGET ; then
130 AC_MSG_ERROR([Can not estimate system architecture.
131 To avoid the problem, set the ALICE_TARGET variable appropriately.
132 Please send the following information to Matthias.Richter@ift.uib.no:
133 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
134 else
135 AC_MSG_NOTICE([Unknown system architecture.
136 Please send the following information to Matthias.Richter@ift.uib.no:
137 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
138 fi
139 else
140 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
141 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
142 overriding $ALICE_TARGET by $alice_target])
143 fi
144 ALICE_TARGET=$alice_target
145 fi
dc8f7cb7 146 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
74c73e5a 147 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
148 ALIROOTINCDIR=${ALICE_ROOT}/include
dc8f7cb7 149 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
2bbbadd1 150 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
151 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
74c73e5a 152fi
2bbbadd1 153
154AC_MSG_CHECKING([for AliRoot])
74c73e5a 155if test "x$ALICE_ROOT" != "x" \
dc8f7cb7 156 && test -d ${ALIROOTBINDIR} \
74c73e5a 157 && test -d ${ALIROOTLIBDIR} \
158 && test -d ${ALIROOTINCDIR}; then
159 have_aliroot=$ALICE_ROOT
160else
dc8f7cb7 161 ALIROOTBINDIR=
74c73e5a 162 ALIROOTLIBDIR=
163 ALIROOTINCDIR=
164fi
165AC_MSG_RESULT([$have_aliroot])
166
167if test ! "x$have_aliroot" = "xno" ; then
74c73e5a 168 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
169 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
dc8f7cb7 170 ALIROOT_LIBS="-lESD $ADD_ROOTLIBS"
74c73e5a 171 save_CPPFLAGS=$CPPFLAGS
172 save_LDFLAGS=$LDFLAGS
173 save_LIBS=$LIBS
174 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
db16520a 175 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
2bbbadd1 176
f8c5e339 177 # check for certain AliRoot libraries/files/features
c018a1bd 178 # libSTEERBase present since Aug 7 2007
179 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
180 CHECKLIB=STEERBase
181 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
182
f5bf5fc3 183 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
184 CHECKLIB=AOD
185 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
186
2bbbadd1 187 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
188 have_alirawdata=no
189 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
190 CHECKLIB=RAWDatabase
191 AC_CHECK_LIB([$CHECKLIB],[_init],
192 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
193 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
194 CHECKLIB=RAWDatarec
195 AC_CHECK_LIB([$CHECKLIB],[_init],
196 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
2bbbadd1 197 have_alirawdata=$CHECKLIB])],
198 [# second pass with -RAWData
199 CHECKLIB="-lRAWData"
200 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
201 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
202 #include <AliRawReaderFile.h>
203 #include <AliRawReaderDate.h>
204 #include <AliRawReaderRoot.h>],
205 [AliRawReaderMemory mreader;
206 AliRawReaderFile freader;
207 AliRawReaderDate dreader(NULL,0);
208 AliRawReaderRoot rreader(NULL,0);])],
e962f438 209 [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
2bbbadd1 210 have_alirawdata=$CHECKLIB],
211 [have_alirawdata=no])
212 ]) dnl AC_CHECK_LIB RAWDatabase
fa274626 213 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
214 AC_MSG_RESULT([$have_alirawdata])
215
fbf4d793 216 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
217 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
218 CHECKLIB=CDB
219 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
220
221 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
222 CHECKLIB=STEER
223 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
224
225 dnl
226 dnl check whether AliLog supports notification callback
227 dnl
228 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
229 have_alilog_notification=no
230 if test ! "x$have_aliroot" = "xno" ; then
231 AC_MSG_CHECKING([whether AliLog supports notification callback])
232 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
233 [AliLog::AliLogNotification fct])],
234 [have_alilog_notification=yes],
235 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
236 AC_MSG_RESULT([$have_alilog_notification])
237 fi
238
239 if test "x$have_aliroot" = "xno" ; then
240 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
241 # but library dependencies might not be resolved completely
242 #ALIROOT_CPPFLAGS=
243 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
244 This can happen from time to time due to development in AliRoot. You can
245 force compilation of detector libs by --enable-<detector>, but be aware
246 of unresolved references at runtime.])
247 AC_MSG_WARN([ ------------------------------------------ ])
248 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
249 AC_MSG_WARN([ please include config.log ])
250 AC_MSG_WARN([ ------------------------------------------ ])
251 ALIROOT_LDFLAGS=
252 ALIROOT_LIBS=
253 fi
254
f5bf5fc3 255 dnl
83cb7e1d 256 dnl ESD copy function added May 9 2008 rev 25667
257 dnl
258 have_esd_copy=no
259 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>],
260 [AliESDEvent esd1;
261 AliESDEvent esd2;
262 esd2=esd1;])],
9877121c 263 [have_esd_copy=yes],
264 [AC_DEFINE(HAVE_NOT_ESD_COPY)])
83cb7e1d 265 AC_MSG_CHECKING(for ESD assignment operator)
266 AC_MSG_RESULT([$have_esd_copy])
267
268 dnl
296b5188 269 dnl AliRawReaderMemory support for multiple buffers added
c03e064d 270 dnl revision 26829 Jun 2008
296b5188 271 dnl
272 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW"
273 have_rawreadermemory_multbuffers=no
274 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>],
275 [AliRawReaderMemory rr;
276 rr.AddBuffer(NULL, 0, 0);])],
277 [have_rawreadermemory_multbuffers=yes],
278 [AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)])
c03e064d 279 AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers)
296b5188 280 AC_MSG_RESULT([$have_rawreadermemory_multbuffers])
281
282 dnl
fbf4d793 283 dnl required header files and libraries for modules
f5bf5fc3 284 dnl
285 if test ! "x$have_aliroot" = "xno" ; then
286 # the HLTTPCLib needs to link agains TPCbase and TPCrec
287 # TPC library for AliTPCParam and AliSimDigits used in
288 # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx
e962f438 289 # from May 07 TPCbase depends on libGui.so
f59fee6d 290 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
f5bf5fc3 291 have_alitpc=yes
292 AC_MSG_CHECKING(for required classes in TPC libraries)
293 if test ! "x$have_alitpc" = "xno" ; then
f59fee6d 294 ALITPC_LIBS="-lGui -lTPCbase -lTPCrec"
295 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
f5bf5fc3 296 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h>
297 #include <AliTPCParam.h>
298 #include <AliTPCParamSR.h>
299 #include <AliTPCDigitsArray.h>
300 #include <AliTPCClustersArray.h>
301 #include <AliTPCcluster.h>
302 #include <AliTPCClustersRow.h>],
303 [AliSimDigits dig;
304 AliTPCParam param;
305 AliTPCParamSR paramsr;
306 AliTPCDigitsArray digarray;
307 AliTPCClustersArray clustarray;
308 AliTPCcluster clust;
309 AliTPCClustersRow row])],
f59fee6d 310 [AC_DEFINE(HAVE_ALITPC)],
f5bf5fc3 311 [have_alitpc=no
f59fee6d 312 ALITPC_LIBS= ])
f5bf5fc3 313 fi
83cb7e1d 314 AC_MSG_RESULT([$have_alitpc])
aa40a4a1 315
c03e064d 316 dnl
317 dnl Check for functionality in the TPC reconstruction required for online
318 dnl processing
319 dnl
320 have_tpc_hltoffline_rec=no
321 AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
aa40a4a1 322 ALITPC_LIBS="-lGui -lTPCbase -lTPCrec"
323 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
324 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
c03e064d 325 #include <AliTPCclustererMI.h>
aa40a4a1 326 #include <TObjArray.h>],
327 [AliTPCtrackerMI tracker;
328 TObjArray* array=NULL;
c03e064d 329 tracker.LoadClusters(array);
330 AliTPCclustererMI cl(NULL, NULL);
331 cl.GetOutputArray();])],
332 [have_tpc_hltoffline_rec=yes],
333 [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
334 AC_MSG_RESULT([$have_tpc_hltoffline_rec])
aa40a4a1 335
f5bf5fc3 336 fi
ba4b0dd7 337 AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
338 AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
675d662a 339
db16520a 340 have_tpc_mapping=no
341 if test ! "x$have_aliroot" = "xno" ; then
04dbc9e4 342 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
db16520a 343 # which is stored in the TPC/mapping/Patchx.data files from
344 # AliRoot version v4-04-Release (May 2006)
345 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
346 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
347 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
348 [have_tpc_mapping=yes
349 AC_SUBST(TPC_PAD_MAPPING_PATH)
350 AC_DEFINE(HAVE_TPC_MAPPING)],
351 [])
352
353 fi
354 AC_MSG_CHECKING([for TPC mapping layout])
db16520a 355 AC_MSG_RESULT([$have_tpc_mapping])
04dbc9e4 356
f59fee6d 357 dnl
358 dnl Check for the interface of AliExternalTrackParam which has been changed
359 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
360 dnl or higher)
361 externaltrackparam_version=1
362 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
363 [AliExternalTrackParam trackparam;
364 Double_t param[[5]]; Double_t covar[[15]];
365 trackparam.Set(0., 0., param, covar);])],
366 [externaltrackparam_version=2],
367 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
368 AC_MSG_CHECKING(for version of AliExternalTrackParam)
369 AC_MSG_RESULT($externaltrackparam_version)
370
74c73e5a 371 CPPFLAGS=$save_CPPFLAGS
372 LDFLAGS=$save_LDFLAGS
373 LIBS=$save_LIBS
7233bc62 374fi # if test ! "x$have_aliroot" = "xno"
f59fee6d 375
74c73e5a 376AC_LANG_POP(C++)
5f5b708b 377AC_SUBST([ALICE_ROOT])
74c73e5a 378AC_SUBST([ALIROOT_CPPFLAGS])
379AC_SUBST([ALIROOT_LDFLAGS])
dc8f7cb7 380AC_SUBST([ALIROOTBINDIR])
53feaef5 381AC_SUBST([ALIROOTLIBDIR])
74c73e5a 382AC_SUBST([ALIROOT_LIBS])
0f51f5b8 383AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
85869391 384
6c1a9d9e 385HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
386HLTBASE_LDFLAGS=
387AC_SUBST([HLTBASE_CPPFLAGS])
388AC_SUBST([HLTBASE_LDFLAGS])
389
85869391 390dnl ------------------------------------------------------------------
78b557c2 391dnl check for the HLT PubSub Framework
f8c5e339 392dnl namely for the existence of the HOMER library
393dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
394dnl package. It os though possible to choose an external. library
395dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
396dnl got the name libAliHLTHOMER
78b557c2 397AC_MSG_CHECKING([for HLT PubSub Framework])
398AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
399 [],
400 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
401if test -z $with_pubsub || ! test -d $with_pubsub ; then
402 with_pubsub=no
403fi
404AC_MSG_RESULT([$with_pubsub])
f8c5e339 405HOMER_VERSION=2
5f1685a0 406HOMER_LIBS=
78b557c2 407
408AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
409if test "x$with_pubsub" != "xno" ; then
410 save_CPPFLAGS=$CPPFLAGS
411 save_LDFLAGS=$LDFLAGS
412 save_LIBS=$LIBS
4a6b4894 413 # currently the different versions of the HLT PubSub framework have a different
414 # directory layout
20b6dd9a 415 if test -d ${with_pubsub}/include/HOMER ; then
5235c3e9 416 # the 'early' location of the include files with separated HOMER sub dirs
9ce4bf4a 417 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
5235c3e9 418 elif test -d ${with_pubsub}/include/Util/HOMER ; then
419 # location for HLT Framework versions after Sep 2006
9ce4bf4a 420 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
5235c3e9 421 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
422 # fall back if include files were not installed (versions after Sep 06)
9ce4bf4a 423 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
4a6b4894 424 else
5235c3e9 425 # fall back if include files were not installed (versions before Sep 06)
9ce4bf4a 426 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
4a6b4894 427 fi
9ce4bf4a 428 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
5894eaa5 429
430 AC_ARG_ENABLE(pubsub-debug,
431 [AC_HELP_STRING([--disable-pubsub-debug],
432 [force the production version of the PubSub framework])],
433 [],[enable_pubsub_debug=yes])
434 homer_type="none"
435 HOMER_TARGET="`uname -s`-`uname -m`"
436 AC_MSG_CHECKING([for HLT PubSub Framework release type])
437 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
438 homer_type="production"
439 HOMER_TARGET="${HOMER_TARGET}-release"
440 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
441 homer_type="debug"
442 HOMER_TARGET="${HOMER_TARGET}-debug"
443 fi
444 AC_MSG_RESULT([${homer_type}])
f8c5e339 445 HOMERREADER_HEADER=HOMERReader.h
5894eaa5 446 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
447 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
53feaef5 448 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
78b557c2 449 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
450 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
451 LIBS="$save_LIBS "
452 with_homer=no
453 AC_LANG_PUSH(C++)
f8c5e339 454 AC_CHECK_HEADER([$HOMERREADER_HEADER],
5f1685a0 455 [ AC_CHECK_LIB([HOMER],[_init],
456 [with_homer=yes
457 HOMER_LIBS="-lHOMER"],
458 [ AC_CHECK_LIB([HOMERReader],[_init],
459 [with_homer=yes
460 HOMER_LIBS="-lHOMERReader"])])
461 LIBS="$LIBS $HOMER_LIBS"
9ce4bf4a 462 AC_MSG_CHECKING([version of HOMER library])
5f1685a0 463 dnl The Homer library has no versioning, so we do our own
464 dnl version description
465 dnl ----------------------------------------------------------------------
466 dnl 1 inintial version
467 dnl 2 GetBlockStatusFlags added to the interface
468 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
469 [HOMERReader reader("dummy", 0);
470 reader.GetBlockStatusFlags(0);])],
f8c5e339 471 [],
472 [HOMER_VERSION=1])
5f1685a0 473 AC_MSG_RESULT([$HOMER_VERSION])
f8c5e339 474 ],
475 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
78b557c2 476 AC_LANG_POP(C++)
f8c5e339 477 HOMER_INBUILT_LIB=
478else
479dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
480 topdir=`dirname $0`
481 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
482 HOMERREADER_HEADER=AliHLTHOMERReader.h
483 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
484 HOMER_BINDIR=
485 HOMER_LIBDIR=
486 HOMER_LDFLAGS=
487fi
488
78b557c2 489 if test "x$with_homer" = "xno" ; then
490 HOMER_CPPFLAGS=
491 HOMER_LDFLAGS=
5f1685a0 492 HOMER_LIBS=
78b557c2 493 else
5f1685a0 494 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
78b557c2 495 AC_DEFINE(HAVE_HOMERREADER)
496 fi
497 CPPFLAGS="$save_CPPFLAGS"
498 LDFLAGS="$save_LDFLAGS"
499 LIBS="$save_LIBS"
f8c5e339 500
501AC_SUBST([HOMERREADER_HEADER])
502AC_SUBST([HOMER_INBUILT_LIB])
78b557c2 503AC_SUBST([HOMER_CPPFLAGS])
504AC_SUBST([HOMER_LDFLAGS])
53feaef5 505AC_SUBST([HOMER_LIBDIR])
506AC_SUBST([HOMER_BINDIR])
5f1685a0 507AC_SUBST([HOMER_LIBS])
78b557c2 508
509dnl ------------------------------------------------------------------
7233bc62 510AC_ARG_ENABLE(all,
511 [AC_HELP_STRING([--disable-all],
512 [disable all detector modules, individual modules can be switched on by --enable-det])],
513 [disable_all=yes],[])
514
515dnl ------------------------------------------------------------------
85869391 516AC_MSG_CHECKING([whether to impose strict coding conventions])
517AC_ARG_ENABLE(strict,
2028353f 518 [AC_HELP_STRING([--disable-strict],
519 [disable coding convention checks ])],
520 [],[enable_strict=yes])
85869391 521if test "x$enable_strict" = "xyes" ; then
f7561f8d 522 CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
85869391 523fi
524AC_MSG_RESULT([$enable_strict])
b521659f 525
526dnl ------------------------------------------------------------------
527AC_MSG_CHECKING([whether to compile sample library])
528AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
529AC_ARG_ENABLE(sample,
c018a1bd 530 [AC_HELP_STRING([--disable-sample],
b521659f 531 [compile the sample library ])],
2e742d30 532 [],
533 [if test "x$have_aliroot" = "xno" ; then
534 enable_sample="no...requires.AliRoot"
535 else
536 enable_sample=yes
537 fi
538 ])
539
b521659f 540if test "x$enable_sample" = "xyes" ; then
541 AC_DEFINE(HLT_SAMPLE)
542fi
543AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
544AC_MSG_RESULT([$enable_sample])
545
546dnl ------------------------------------------------------------------
c018a1bd 547AC_MSG_CHECKING([whether to compile util library])
548AH_TEMPLATE([HLT_UTIL],[HLT utility library])
549AC_ARG_ENABLE(util,
550 [AC_HELP_STRING([--disable-util],
551 [compile the util library ])],
2e742d30 552 [],
553 [if test "x$have_aliroot" = "xno" ; then
554 enable_util="no...requires.AliRoot"
555 else
556 enable_util=yes
557 fi
558 ])
c018a1bd 559
560if test "x$enable_util" = "xyes" ; then
561 AC_DEFINE(HLT_UTIL)
562fi
563AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
564AC_MSG_RESULT([$enable_util])
565
566dnl ------------------------------------------------------------------
b521659f 567AH_TEMPLATE([HLT_TPC],[hlt tpc library])
f59fee6d 568
569CHECK_HLTMODULE([tpc],
e962f438 570 [AliTPCRawStream.h],
571 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
f59fee6d 572 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
573 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
574 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
575
c6b46c3f 576if test "x$enable_module" = "xmissheader"; then
577 enable_module="no...missing.headers"
f59fee6d 578 enable_tpc="no...missing.headers"
579elif test "x$have_alitpc" = "xno" ; then
c6b46c3f 580 enable_module="no...requires.AliRoot.TPC.libraries"
f59fee6d 581 enable_tpc="no...requires.AliRoot.TPC.libraries"
c6b46c3f 582elif test "x$enable_module" = "xforce"; then
583 enable_tpc="yes"
f59fee6d 584else
585 enable_tpc=$enable_module
586fi
2e742d30 587
b521659f 588if test "x$enable_tpc" = "xyes" ; then
589 AC_DEFINE(HLT_TPC)
adec4ad4 590else
591 enable_module=$enable_tpc
b521659f 592fi
593AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
d6e2c707 594AC_MSG_CHECKING([whether to compile TPC library])
c6b46c3f 595AC_MSG_RESULT([$enable_module])
f59fee6d 596AC_SUBST([ALITPC_LIBS])
b521659f 597
598dnl ------------------------------------------------------------------
5e3820e2 599AH_TEMPLATE([HLT_RCU],[hlt rcu library])
600
601CHECK_HLTMODULE([rcu],
602 [AliAltroDecoder.h],
603 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
604 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
605 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
606 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
607
608if test "x$enable_module" = "xmissheader"; then
609 enable_module="no...missing.headers"
610 enable_rcu="no...missing.headers"
611elif test "x$have_alircu" = "xno" ; then
612 enable_module="no...requires.AliRoot.RAW.libraries"
613 enable_rcu="no...requires.AliRoot.RAW.libraries"
614elif test "x$enable_module" = "xforce"; then
615 enable_rcu="yes"
616else
617 AC_LANG_PUSH(C++)
618 save_CPPFLAGS=$CPPFLAGS
619 save_LDFLAGS=$LDFLAGS
620 save_LIBS=$LIBS
621 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
622 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
623 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
624 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>],
625 [AliAltroDecoder decoder;
626 decoder.CopyBackward(NULL, 0);])],
627 [enable_rcu=$enable_module],
628 [enable_module="no...requires.AliRoot>v4-10-Release"
629 enable_rcu="no...requires.AliRoot>v4-10-Release"])
630 CPPFLAGS=$save_CPPFLAGS
631 LDFLAGS=$save_LDFLAGS
632 LIBS=$save_LIBS
633 AC_LANG_POP(C++)
634fi
635
636if test "x$enable_rcu" = "xyes" ; then
637 AC_DEFINE(HLT_RCU)
adec4ad4 638else
639 enable_module=$enable_rcu
5e3820e2 640fi
641AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
d6e2c707 642AC_MSG_CHECKING([whether to compile RCU library])
5e3820e2 643AC_MSG_RESULT([$enable_module])
644AC_SUBST([ALIRCU_LIBS])
645
646dnl ------------------------------------------------------------------
c160eda8 647AH_TEMPLATE([HLT_PHOS],[hlt phos library])
f59fee6d 648
649ALIPHOS_LIBS=
650CHECK_HLTMODULE([phos],
651 [], [$ALIROOT_CPPFLAGS],
652 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
652cf9d2 653 [PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
f59fee6d 654 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
655
c6b46c3f 656if test "x$enable_module" = "xmissheader"; then
657 enable_module="no...requires.AliRoot>v4-05-07"
f59fee6d 658 enable_phos="no...requires.AliRoot>v4-05-07"
c6b46c3f 659elif test "x$enable_module" = "xforce"; then
660 enable_phos="yes"
f59fee6d 661else
662 have_alicalorawstream=no
663 if test ! "x$have_aliroot" = "xno" ; then
664 AC_LANG_PUSH(C++)
665 save_CPPFLAGS="$CPPFLAGS"
666 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
667 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
668 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
669 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
670 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
671 #include <AliCaloRawStream.h>],
672 [int i])],
673 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
674 have_alicalorawstream=yes],
675 [])
676 AC_MSG_RESULT([$have_alicalorawstream])
677 AC_LANG_POP(C++)
678 CPPFLAGS="$save_CPPFLAGS"
679 fi
680 if test "x$have_alicalorawstream" != "xyes"; then
681 enable_phos="no...requires.AliRoot>v4-05-07"
682 else
683 enable_phos=$enable_module
684 fi
685fi
2e742d30 686
c160eda8 687if test "x$enable_phos" = "xyes" ; then
688 AC_DEFINE(HLT_PHOS)
f59fee6d 689 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 690else
691 enable_module=$enable_phos
c160eda8 692fi
693AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
d6e2c707 694AC_MSG_CHECKING([whether to compile PHOS library])
c6b46c3f 695AC_MSG_RESULT([$enable_module])
f59fee6d 696AC_SUBST([ALIPHOS_LIBS])
c160eda8 697
c6b46c3f 698dnl ------------------------------------------------------------------
699AH_TEMPLATE([HLT_TRD],[hlt trd library])
700
f59fee6d 701ALITRD_LIBS=
702CHECK_HLTMODULE([trd],
703 [], [],
b3f74118 704 [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
f59fee6d 705 [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
706 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
707
c6b46c3f 708if test "x$enable_module" = "xmissheader"; then
709 enable_module="no...requires.AliRoot>v4-07-Release"
f59fee6d 710 enable_trd="no...requires.AliRoot>v4-07-Release"
c6b46c3f 711elif test "x$enable_module" = "xforce"; then
712 enable_trd="yes"
f59fee6d 713else
714 enable_trd=$enable_module
715 if test "x$enable_trd" = "xyes" ; then
716 AC_LANG_PUSH(C++)
717 save_CPPFLAGS="$CPPFLAGS"
718 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
adec4ad4 719 # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release
720 # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008
721 AC_MSG_CHECKING([for required functions in AliTRDrecoParam])
722 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDrecoParam.h>],
723 [AliTRDrecoParam p;
4f05d3e3 724 p.SetSeeding(0)])],
f59fee6d 725 [],
adec4ad4 726 [enable_trd="no...requires.AliRoot>v4-13-Release"])
f59fee6d 727 AC_MSG_RESULT([$enable_trd])
728 AC_LANG_POP(C++)
729 CPPFLAGS="$save_CPPFLAGS"
730 fi
731fi
2e742d30 732
0f51f5b8 733if test "x$enable_trd" = "xyes" ; then
734 AC_DEFINE(HLT_TRD)
f59fee6d 735 ALITRD_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 736else
737 enable_module=$enable_trd
0f51f5b8 738fi
739AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
d6e2c707 740AC_MSG_CHECKING([whether to compile TRD library])
c6b46c3f 741AC_MSG_RESULT([$enable_module])
f59fee6d 742AC_SUBST([ALITRD_LIBS])
0f51f5b8 743
744dnl ------------------------------------------------------------------
94cc9aab 745AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
2e742d30 746
f59fee6d 747ALIMUON_LIBS=
e89e6b23 748CHECK_HLTMODULE([dimuon],
41f99620 749 [AliMpExMap.h AliMUONTriggerIO.h],
750 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
b3f74118 751 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
752 [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
f59fee6d 753 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
754
755if test "x$enable_module" = "xmissheader"; then
a853a794 756 enable_module="no...requires.AliRoot>=v4-08-Release"
757 enable_muon="no...requires.AliRoot>=v4-08-Release"
c6b46c3f 758elif test "x$enable_module" = "xforce"; then
759 enable_muon="yes"
f59fee6d 760else
761 enable_muon=$enable_module
762fi
763
764if test "x$enable_muon" = "xyes" ; then
94cc9aab 765 AC_DEFINE(HLT_MUON)
f59fee6d 766 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 767else
768 enable_module=$enable_muon
94cc9aab 769fi
f59fee6d 770AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
d6e2c707 771AC_MSG_CHECKING([whether to compile MUON library])
c6b46c3f 772AC_MSG_RESULT([$enable_module])
f59fee6d 773AC_SUBST([ALIMUON_LIBS])
94cc9aab 774
775dnl ------------------------------------------------------------------
d6e2c707 776AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
777
778ALITRIGGER_LIBS=
779CHECK_HLTMODULE([trigger],
780 [], [$ALIROOT_CPPFLAGS],
781 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
782 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
783 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
784
785if test "x$enable_module" = "xmissheader"; then
786 enable_module="no...header.missing"
787 enable_trigger="no...header.missing"
788elif test "x$enable_module" = "xforce"; then
789 enable_trigger="yes"
790else
791 enable_trigger=$enable_module
792fi
793
794if test "x$enable_trigger" = "xyes" ; then
795 AC_DEFINE(HLT_TRIGGER)
796 ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 797else
798 enable_module=$enable_trigger
d6e2c707 799fi
800AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
801AC_MSG_CHECKING([whether to compile Trigger library])
802AC_MSG_RESULT([$enable_module])
803AC_SUBST([ALITRIGGER_LIBS])
804
805dnl ------------------------------------------------------------------
806AH_TEMPLATE([HLT_ITS],[hlt its library])
807
808ALIITS_LIBS=
809CHECK_HLTMODULE([its],
810 [], [$ALIROOT_CPPFLAGS],
811 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
812 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
813 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
814
815if test "x$enable_module" = "xmissheader"; then
816 enable_module="no...header.missing"
817 enable_its="no...header.missing"
818elif test "x$enable_module" = "xforce"; then
819 enable_its="yes"
820else
821 enable_its=$enable_module
adec4ad4 822 if test "x$enable_its" = "xyes" ; then
823 AC_LANG_PUSH(C++)
824 save_CPPFLAGS="$CPPFLAGS"
825 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS"
826 # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008
827 # require AliVertexer::GetNominalPos()
828 AC_MSG_CHECKING([for required functions in AliITSVertexer])
829 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>],
830 [AliITSVertexerZ v;
831 v.GetNominalPos()])],
832 [],
833 [enable_its="no...requires.AliRoot>v4-13-Release"])
834 AC_MSG_RESULT([$enable_its])
835 AC_LANG_POP(C++)
836 CPPFLAGS="$save_CPPFLAGS"
837 fi
d6e2c707 838fi
839
840if test "x$enable_its" = "xyes" ; then
841 AC_DEFINE(HLT_ITS)
842 ALIITS_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 843else
844 enable_module=$enable_its
d6e2c707 845fi
846AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
847AC_MSG_CHECKING([whether to compile ITS library])
848AC_MSG_RESULT([$enable_module])
849AC_SUBST([ALIITS_LIBS])
850
851dnl ------------------------------------------------------------------
e89e6b23 852AH_TEMPLATE([HLT_COMP],[hlt comp library])
853
854ALICOMP_LIBS=
855CHECK_HLTMODULE([comp],
856 [], [$ALIROOT_CPPFLAGS],
857 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
858 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
859 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
860
861if test "x$enable_module" = "xmissheader"; then
c6b46c3f 862 enable_module="no...header.missing"
e89e6b23 863 enable_comp="no...header.missing"
c6b46c3f 864elif test "x$enable_module" = "xforce"; then
865 enable_comp="yes"
e89e6b23 866else
867 enable_comp=$enable_module
868fi
869
870if test "x$enable_comp" = "xyes" ; then
871 AC_DEFINE(HLT_COMP)
872 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
adec4ad4 873else
874 enable_module=$enable_comp
e89e6b23 875fi
876AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
877AC_MSG_CHECKING([whether to compile comp library])
c6b46c3f 878AC_MSG_RESULT([$enable_module])
e89e6b23 879AC_SUBST([ALICOMP_LIBS])
880
881dnl ------------------------------------------------------------------
fc455fba 882AC_MSG_CHECKING([whether to disable AliRoot logging])
883AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
884AC_ARG_ENABLE(aliroot-logging,
885 [AC_HELP_STRING([--disable-aliroot-logging],
886 [disable logging through AliRoot logging methods])],
887 [],[enable_aliroot_logging=no])
c018a1bd 888if test "x$have_aliroot" = "xno" ; then
889 enable_aliroot_logging=yes # this means 'disable'
890fi
fc455fba 891if test "x$enable_aliroot_logging" != "xno" ; then
892 AC_DEFINE(NOALIROOT_LOGGING)
b521659f 893fi
fc455fba 894AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
895AC_MSG_RESULT([$enable_aliroot_logging])
b521659f 896
897dnl ------------------------------------------------------------------
898AC_MSG_CHECKING([whether to enable saving MC data through the chain])
899AH_TEMPLATE([DOMC],[MC saving])
900AC_ARG_ENABLE(mc-saving,
901 [AC_HELP_STRING([--enable-mc-saving],
902 [enable saving MC data through the chain])],
903 [],[enable_mc_saving=no])
904if test "x$enable_mc_saving" = "xyes" ; then
905 AC_DEFINE(DOMC)
906fi
907AC_MSG_RESULT([$enable_mc_saving])
908
909dnl ------------------------------------------------------------------
b521659f 910dnl certainly something old, but we keep the define
911AC_MSG_CHECKING([whether to use ROWHOUGH])
912AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
913AC_ARG_ENABLE(rowhough,
914 [AC_HELP_STRING([--enable-rowhough],
915 [use ROWHOUGH ])],
916 [],[enable_rowhough=no])
917if test "x$enable_rowhough" = "xyes" ; then
918 AC_DEFINE(USEROWHOUGH)
919fi
920AC_MSG_RESULT([$enable_rowhough])
921
922dnl ------------------------------------------------------------------
53feaef5 923dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
924dnl stand-alone build system. This is most likely something old we can
925dnl get rid off later, or do something more reasonable. Since the define
926dnl needs the quotes they have to be escaped. This works well for the
927dnl Makefile but not for the configure script. So we have to add the
928dnl defines after all the other checks.
929CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
930if test ! "x$have_aliroot" = "xno" ; then
931 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
932fi
933
934dnl ------------------------------------------------------------------
b521659f 935dnl
936dnl Documentation
937dnl
938AC_ARG_VAR(DOXYGEN, The Documentation Generator)
939AC_PATH_PROG(PERL, perl)
940AC_PATH_PROG(DOXYGEN, doxygen)
941AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
5894eaa5 942AC_ARG_ENABLE(dot,
943 [AC_HELP_STRING([--enable-dot],
944 [enable dot documentation generator])],
945 [],[enable_dot=no])
b521659f 946HAVE_DOT=NO
947DOT_PATH=
948AC_PATH_PROG(DOT, dot)
5894eaa5 949if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
b521659f 950 HAVE_DOT=YES
951 DOT_PATH=`dirname $DOT`
952fi
953AC_SUBST([HAVE_DOT])
954AC_SUBST([DOT_PATH])
955
90ebac25 956dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
957dnl echo $HAVE_SRC_SUBDIR
958dnl if ! test -d $HAVE_SRC_SUBDIR; then
959dnl HAVE_SRC_SUBDIR=
960dnl fi
961dnl AC_SUBST([HAVE_SRC_SUBDIR])
962
b521659f 963dnl ------------------------------------------------------------------
7233bc62 964AC_MSG_NOTICE([---------------------------------------------- ])
965AC_MSG_NOTICE([ build summary ])
966AC_MSG_NOTICE([---------------------------------------------- ])
967
b521659f 968AC_CONFIG_FILES([Makefile
969 BASE/Makefile
53feaef5 970 BASE/setenv.sh
971 BASE/setenv.csh
2be16a33 972 BASE/HOMER/Makefile
242bb794 973 BASE/util/Makefile
d098ebd4 974 BASE/interface/Makefile
853121af 975 BASE/test/Makefile
b521659f 976 doc/Makefile
2efb85be 977 doc/doxygen.conf
978 doc/doxymodule.conf])
b521659f 979
7233bc62 980dnl AliRoot and installation directory for libraries
981dnl
982AC_MSG_NOTICE([AliRoot: $have_aliroot])
983AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
984if test "x$have_aliroot" != "xno"; then
985 AC_CONFIG_FILES([sim/Makefile
986 rec/Makefile
652cf9d2 987 rec/test/Makefile
7233bc62 988 shuttle/Makefile
989 ])
990fi
991if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
992libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
993AC_MSG_NOTICE([libdir set to $libdir])
994fi
995
996AC_MSG_NOTICE([compile sample library: $enable_sample])
997if test "x$enable_sample" = "xyes"; then
998 AC_CONFIG_FILES([SampleLib/Makefile])
999fi
1000
652cf9d2 1001AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1002if test "x$enable_rcu" = "xyes"; then
1003 AC_CONFIG_FILES([RCU/Makefile
1004 RCU/test/Makefile
1005 ])
1006fi
1007
7233bc62 1008AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1009if test "x$enable_tpc" = "xyes"; then
1010 AC_CONFIG_FILES([TPCLib/Makefile
1011 TPCLib/test/Makefile
1012 TPCLib/mapping2array.cxx
1013 TPCLib/OnlineDisplay/Makefile
1014 ])
1015fi
1016
7233bc62 1017AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1018if test "x$enable_phos" = "xyes"; then
1019 AC_CONFIG_FILES([PHOS/Makefile])
1020fi
1021
1022AC_MSG_NOTICE([compile TRD library: $enable_trd])
1023if test "x$enable_trd" = "xyes"; then
1024 AC_CONFIG_FILES([TRD/Makefile])
1025fi
1026
1027AC_MSG_NOTICE([compile MUON library: $enable_muon])
1028if test "x$enable_muon" = "xyes"; then
1029 AC_CONFIG_FILES([MUON/Makefile])
1030fi
1031
1032AC_MSG_NOTICE([compile ITS library: $enable_its])
1033if test "x$enable_its" = "xyes"; then
1034 AC_CONFIG_FILES([ITS/Makefile])
1035fi
1036
1037AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1038if test "x$enable_trigger" = "xyes"; then
1039 AC_CONFIG_FILES([trigger/Makefile])
1040fi
1041
1042AC_MSG_NOTICE([compile comp library: $enable_comp])
1043if test "x$enable_comp" = "xyes"; then
1044 AC_CONFIG_FILES([comp/Makefile])
1045fi
b521659f 1046
1047AC_OUTPUT
1048dnl
1049dnl EOF
1050dnl
1051