]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/configure.ac
New on per RCU data containers
[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 ------------------------------------------------------------------
aec1b04c 8AC_INIT([Alice High Level Trigger] , [0.6-dev], [Matthias.Richter@ift.uib.no], alice-hlt)
b521659f 9
10dnl ------------------------------------------------------------------
11dnl the package from CVS contains the old Makefiles as well. In order to
12dnl prevent them from becoming overwritten, we require a separate build
13dnl directory
14if test "`dirname $0`" = "." ; then
15 AC_ERROR([please run the script from a separate build directory])
16fi
17
18dnl ------------------------------------------------------------------
19AC_CANONICAL_SYSTEM
20AC_PREFIX_DEFAULT(${PWD})
21AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
22AM_INIT_AUTOMAKE
23AC_PROG_CC
24AC_PROG_CXX
25AC_PROG_LIBTOOL
26
27AC_DEBUG
28AC_OPTIMIZATION
dc8f7cb7 29AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
30
31dnl ------------------------------------------------------------------
32dnl A warning posted into the auto-generated files
33dnl Does NOT concern this file ;-)
34AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!"
35AC_SUBST([AUTOGENERATED_WARNING])
b521659f 36
37dnl ------------------------------------------------------------------
38dnl
39dnl Check for ROOT
40dnl
41ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
42AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
53feaef5 43AC_SUBST([ROOTSYS])
dc8f7cb7 44ROOTBINDIR=`dirname $ROOTEXEC`
45AC_SUBST([ROOTBINDIR])
46
dfaa582a 47dnl test for additional required root libraries and headers
48LIBS='-ldl'
49if test "x$have_root" = "x1"; then
50 AC_LANG_PUSH(C++)
51 save_CPPFLAGS=$CPPFLAGS
52 save_LDFLAGS=$LDFLAGS
53 save_LIBS=$LIBS
54 CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
55
dc8f7cb7 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
61 # libTreePlayer.so
62 # - from Jan 07 libESD also depends on libXMLIO
dc8f7cb7 63 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO'
64 for CHECKLIB in $ROOT_CHECKLIBS ; do
dc8f7cb7 65 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
66 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
67 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
68 done
dfaa582a 69
70 # TBuffer.h has been made pure virtual in root v5-15-02 and one
71 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
72 AC_CHECK_HEADERS([TBufferFile.h])
73
dc8f7cb7 74 CPPFLAGS=$save_CPPFLAGS
75 LDFLAGS=$save_LDFLAGS
76 LIBS=$save_LIBS
dfaa582a 77 AC_LANG_POP(C++)
dc8f7cb7 78fi
b521659f 79
80dnl ------------------------------------------------------------------
81# TODO: make this configurable through arguments
82#Define whether you want to run with ALIROOT or only ROOT
83AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
84ALIHLT_USEPACKAGE=ALIROOT
85#ALIHLT_USEPACKAGE=ROOT
86#ALIHLT_USEPACKAGE=STANDALONE
87AC_DEFINE(use_aliroot)
88AC_DEFINE(use_root)
85869391 89CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
85869391 90
91dnl ------------------------------------------------------------------
74c73e5a 92dnl check for AliRoot features
93AC_LANG_PUSH(C++)
74c73e5a 94have_aliroot=no
2bbbadd1 95AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
96 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
97 [])
98
99if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
100 dnl ------------------------------------------------------------------
101 dnl Try to estimate the system architecture
102 case $host_os:$host_cpu in
103 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
104 linux*) alice_target='linux' ;;
105 *) alice_target='unknown' ;;
106 esac
107 if test "x$alice_target" = "xunknown" ; then
108 if test -z $ALICE_TARGET ; then
109 AC_MSG_ERROR([Can not estimate system architecture.
110 To avoid the problem, set the ALICE_TARGET variable appropriately.
111 Please send the following information to Matthias.Richter@ift.uib.no:
112 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
113 else
114 AC_MSG_NOTICE([Unknown system architecture.
115 Please send the following information to Matthias.Richter@ift.uib.no:
116 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
117 fi
118 else
119 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
120 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
121 overriding $ALICE_TARGET by $alice_target])
122 fi
123 ALICE_TARGET=$alice_target
124 fi
dc8f7cb7 125 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
74c73e5a 126 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
127 ALIROOTINCDIR=${ALICE_ROOT}/include
dc8f7cb7 128 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
2bbbadd1 129 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
130 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
74c73e5a 131fi
2bbbadd1 132
133AC_MSG_CHECKING([for AliRoot])
74c73e5a 134if test "x$ALICE_ROOT" != "x" \
dc8f7cb7 135 && test -d ${ALIROOTBINDIR} \
74c73e5a 136 && test -d ${ALIROOTLIBDIR} \
137 && test -d ${ALIROOTINCDIR}; then
138 have_aliroot=$ALICE_ROOT
139else
dc8f7cb7 140 ALIROOTBINDIR=
74c73e5a 141 ALIROOTLIBDIR=
142 ALIROOTINCDIR=
143fi
144AC_MSG_RESULT([$have_aliroot])
145
146if test ! "x$have_aliroot" = "xno" ; then
74c73e5a 147 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
148 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
dc8f7cb7 149 ALIROOT_LIBS="-lESD $ADD_ROOTLIBS"
74c73e5a 150 save_CPPFLAGS=$CPPFLAGS
151 save_LDFLAGS=$LDFLAGS
152 save_LIBS=$LIBS
153 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
db16520a 154 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
2bbbadd1 155
74c73e5a 156 # check for certain AliRoot libraries/files/features
2bbbadd1 157 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
158 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
159 CHECKLIB=CDB
160 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
74c73e5a 161
2bbbadd1 162 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
163 have_alirawdata=no
164 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
165 CHECKLIB=RAWDatabase
166 AC_CHECK_LIB([$CHECKLIB],[_init],
167 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
168 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
169 CHECKLIB=RAWDatarec
170 AC_CHECK_LIB([$CHECKLIB],[_init],
171 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
172 AC_DEFINE(HAVE_ALIRAWDATA)
173 have_alirawdata=$CHECKLIB])],
174 [# second pass with -RAWData
175 CHECKLIB="-lRAWData"
176 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
177 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
178 #include <AliRawReaderFile.h>
179 #include <AliRawReaderDate.h>
180 #include <AliRawReaderRoot.h>],
181 [AliRawReaderMemory mreader;
182 AliRawReaderFile freader;
183 AliRawReaderDate dreader(NULL,0);
184 AliRawReaderRoot rreader(NULL,0);])],
185 [AC_DEFINE(HAVE_ALIRAWDATA)
186 ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
187 have_alirawdata=$CHECKLIB],
188 [have_alirawdata=no])
189 ]) dnl AC_CHECK_LIB RAWDatabase
190 AC_MSG_CHECKING(for AliRawReader classes in RAWData libraries)
191 AC_MSG_RESULT($have_alirawdata)
192
04dbc9e4 193 dnl
194 dnl Check for the interface of AliExternalTrackParam which has been changed
195 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
196 dnl or higher)
197 externaltrackparam_version=1
198 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
199 [AliExternalTrackParam trackparam;
200 Double_t param[[5]]; Double_t covar[[15]];
201 trackparam.Set(0., 0., param, covar);])],
202 [externaltrackparam_version=2],
203 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
204 AC_MSG_CHECKING(for version of AliExternalTrackParam)
205 AC_MSG_RESULT($externaltrackparam_version)
206
2bbbadd1 207 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
208 CHECKLIB=STEER
209 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
74c73e5a 210
211 if test ! "x$have_aliroot" = "xno" ; then
212 # the HLTTPCLib needs to link agains TPCbase and TPCrec
213 # TPC library for AliTPCParam and AliSimDigits used in
214 # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx
215 saveALIROOT_CPPFLAGS="$ALIROOT_CPPFLAGS"
216 ALIROOT_CPPFLAGS="$saveALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
217 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
218 have_alitpc=yes
219 AC_MSG_CHECKING(for required classes in TPC libraries)
220 if test ! "x$have_alitpc" = "xno" ; then
221 save_ALIROOT_LIBS=$ALIROOT_LIBS
222 ALIROOT_LIBS="$save_ALIROOT_LIBS -lTPCbase -lTPCrec"
db16520a 223 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
74c73e5a 224 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h>
225 #include <AliTPCParam.h>
226 #include <AliTPCParamSR.h>
227 #include <AliTPCDigitsArray.h>
228 #include <AliTPCClustersArray.h>
229 #include <AliTPCcluster.h>
230 #include <AliTPCClustersRow.h>],
231 [AliSimDigits dig;
232 AliTPCParam param;
233 AliTPCParamSR paramsr;
234 AliTPCDigitsArray digarray;
235 AliTPCClustersArray clustarray;
236 AliTPCcluster clust;
237 AliTPCClustersRow row])],
238 [AC_DEFINE(HAVE_ALITPC)
239 saveALIROOT_CPPFLAGS=$ALIROOT_CPPFLAGS
240 saveALIROOT_LIBS=$ALIROOT_LIBS],
241 [have_alitpc=no
242 ALIROOT_CPPFLAGS=$saveALIROOT_CPPFLAGS
243 ALIROOT_LIBS=$saveALIROOT_LIBS])
244 fi
245 AC_MSG_RESULT($have_alitpc)
246 fi
247
248 if test ! "x$have_alirawdata" = "xno" ; then
249 # check for header files needed by the TPCLib/AliHLTTPCDigitReaderPacket
250 # the header file has been moved to the TPC module
251 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
252 # AliRawReaderMemory.h AliRawReaderFile.h already checked
253 #AC_CHECK_HEADERS([AliRawReaderMemory.h AliRawReaderFile.h AliTPCRawStream.h])
254 AC_CHECK_HEADERS([AliTPCRawStream.h])
255 fi
85869391 256
db16520a 257 have_tpc_mapping=no
258 if test ! "x$have_aliroot" = "xno" ; then
04dbc9e4 259 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
db16520a 260 # which is stored in the TPC/mapping/Patchx.data files from
261 # AliRoot version v4-04-Release (May 2006)
262 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
263 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
264 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
265 [have_tpc_mapping=yes
266 AC_SUBST(TPC_PAD_MAPPING_PATH)
267 AC_DEFINE(HAVE_TPC_MAPPING)],
268 [])
269
270 fi
271 AC_MSG_CHECKING([for TPC mapping layout])
db16520a 272 AC_MSG_RESULT([$have_tpc_mapping])
04dbc9e4 273
274 dnl
275 dnl required header files and libraries for the AliHLTPHOS library
276 dnl
277 have_alicalorawstream=no
278 if test ! "x$have_aliroot" = "xno" ; then
279 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
280 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
281 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
282 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
283 #include <AliCaloRawStream.h>],
284 [int i])],
285 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
286 have_alicalorawstream=yes],
287 [])
288 AC_MSG_RESULT([$have_alicalorawstream])
289 fi
290
74c73e5a 291 if test "x$have_aliroot" = "xno" ; then
292 ALIROOT_CPPFLAGS=
293 ALIROOT_LDFLAGS=
294 ALIROOT_LIBS=
295 fi
296 CPPFLAGS=$save_CPPFLAGS
297 LDFLAGS=$save_LDFLAGS
298 LIBS=$save_LIBS
74c73e5a 299fi
300AC_LANG_POP(C++)
5f5b708b 301AC_SUBST([ALICE_ROOT])
74c73e5a 302AC_SUBST([ALIROOT_CPPFLAGS])
303AC_SUBST([ALIROOT_LDFLAGS])
dc8f7cb7 304AC_SUBST([ALIROOTBINDIR])
53feaef5 305AC_SUBST([ALIROOTLIBDIR])
74c73e5a 306AC_SUBST([ALIROOT_LIBS])
0f51f5b8 307AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
85869391 308
6c1a9d9e 309HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
310HLTBASE_LDFLAGS=
311AC_SUBST([HLTBASE_CPPFLAGS])
312AC_SUBST([HLTBASE_LDFLAGS])
313
78b557c2 314dnl ------------------------------------------------------------------
315dnl check for the HLT PubSub Framework
316AC_MSG_CHECKING([for HLT PubSub Framework])
317AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
318 [],
319 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
320if test -z $with_pubsub || ! test -d $with_pubsub ; then
321 with_pubsub=no
322fi
323AC_MSG_RESULT([$with_pubsub])
5f1685a0 324HOMER_VERSION=1
325HOMER_LIBS=
78b557c2 326
327AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
328if test "x$with_pubsub" != "xno" ; then
329 save_CPPFLAGS=$CPPFLAGS
330 save_LDFLAGS=$LDFLAGS
331 save_LIBS=$LIBS
4a6b4894 332 # currently the different versions of the HLT PubSub framework have a different
333 # directory layout
20b6dd9a 334 if test -d ${with_pubsub}/include/HOMER ; then
5235c3e9 335 # the 'early' location of the include files with separated HOMER sub dirs
9ce4bf4a 336 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
5235c3e9 337 elif test -d ${with_pubsub}/include/Util/HOMER ; then
338 # location for HLT Framework versions after Sep 2006
9ce4bf4a 339 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
5235c3e9 340 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
341 # fall back if include files were not installed (versions after Sep 06)
9ce4bf4a 342 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
4a6b4894 343 else
5235c3e9 344 # fall back if include files were not installed (versions before Sep 06)
9ce4bf4a 345 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
4a6b4894 346 fi
9ce4bf4a 347 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
53feaef5 348 HOMER_BINDIR="${with_pubsub}/bin/`uname -s`-`uname -m`"
349 HOMER_LIBDIR="${with_pubsub}/lib/`uname -s`-`uname -m`"
350 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
78b557c2 351 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
352 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
353 LIBS="$save_LIBS "
354 with_homer=no
355 AC_LANG_PUSH(C++)
356 AC_CHECK_HEADER([HOMERReader.h],
5f1685a0 357 [ AC_CHECK_LIB([HOMER],[_init],
358 [with_homer=yes
359 HOMER_LIBS="-lHOMER"],
360 [ AC_CHECK_LIB([HOMERReader],[_init],
361 [with_homer=yes
362 HOMER_LIBS="-lHOMERReader"])])
363 LIBS="$LIBS $HOMER_LIBS"
9ce4bf4a 364 AC_MSG_CHECKING([version of HOMER library])
5f1685a0 365 dnl The Homer library has no versioning, so we do our own
366 dnl version description
367 dnl ----------------------------------------------------------------------
368 dnl 1 inintial version
369 dnl 2 GetBlockStatusFlags added to the interface
370 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
371 [HOMERReader reader("dummy", 0);
372 reader.GetBlockStatusFlags(0);])],
373 [if test $HOMER_VERSION -lt 2 ; then HOMER_VERSION=2; fi],
374 [])
375 AC_MSG_RESULT([$HOMER_VERSION])
376 ]) #AC_CHECK_HEADER([HOMERReader.h])
78b557c2 377 AC_LANG_POP(C++)
378 if test "x$with_homer" = "xno" ; then
379 HOMER_CPPFLAGS=
380 HOMER_LDFLAGS=
5f1685a0 381 HOMER_LIBS=
78b557c2 382 else
5f1685a0 383 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
78b557c2 384 AC_DEFINE(HAVE_HOMERREADER)
385 fi
386 CPPFLAGS="$save_CPPFLAGS"
387 LDFLAGS="$save_LDFLAGS"
388 LIBS="$save_LIBS"
389fi
390AC_SUBST([HOMER_CPPFLAGS])
391AC_SUBST([HOMER_LDFLAGS])
53feaef5 392AC_SUBST([HOMER_LIBDIR])
393AC_SUBST([HOMER_BINDIR])
5f1685a0 394AC_SUBST([HOMER_LIBS])
78b557c2 395
85869391 396dnl ------------------------------------------------------------------
397AC_MSG_CHECKING([whether to impose strict coding conventions])
398AC_ARG_ENABLE(strict,
399 [AC_HELP_STRING([--enable-strict],
400 [enable coding convention checks ])],
401 [],[enable_strict=no])
402if test "x$enable_strict" = "xyes" ; then
403 CPPFLAGS="$CPPFLAGS -Weffc++"
404fi
405AC_MSG_RESULT([$enable_strict])
b521659f 406
407dnl ------------------------------------------------------------------
408AC_MSG_CHECKING([whether to compile sample library])
409AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
410AC_ARG_ENABLE(sample,
411 [AC_HELP_STRING([--enable-sample],
412 [compile the sample library ])],
413 [],[enable_sample=yes])
414if test "x$enable_sample" = "xyes" ; then
415 AC_DEFINE(HLT_SAMPLE)
416fi
417AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
418AC_MSG_RESULT([$enable_sample])
419
420dnl ------------------------------------------------------------------
421AC_MSG_CHECKING([whether to compile tpc library])
422AH_TEMPLATE([HLT_TPC],[hlt tpc library])
423AC_ARG_ENABLE(tpc,
424 [AC_HELP_STRING([--enable-tpc],
425 [compile the tpc library ])],
426 [],[enable_tpc=yes])
74c73e5a 427if test "x$have_aliroot" = "xno" ; then
428 enable_tpc="no...requires.AliRoot"
429elif test "x$have_alitpc" = "xno" ; then
430 enable_tpc="no...requires.AliRoot.TPC.libraries"
431fi
b521659f 432if test "x$enable_tpc" = "xyes" ; then
433 AC_DEFINE(HLT_TPC)
434fi
435AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
436AC_MSG_RESULT([$enable_tpc])
437
c160eda8 438dnl ------------------------------------------------------------------
439AC_MSG_CHECKING([whether to compile phos library])
440AH_TEMPLATE([HLT_PHOS],[hlt phos library])
441AC_ARG_ENABLE(phos,
442 [AC_HELP_STRING([--enable-phos],
443 [compile the phos library ])],
444 [],[enable_phos=yes])
445if test "x$have_aliroot" = "xno" ; then
446 enable_phos="no...requires.AliRoot"
04dbc9e4 447elif ! test "x$have_alicalorawstream" = "xyes"; then
448 enable_phos="no...requires.AliRoot>v4-05-07"
c160eda8 449fi
450if test "x$enable_phos" = "xyes" ; then
451 AC_DEFINE(HLT_PHOS)
452fi
453AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
454AC_MSG_RESULT([$enable_phos])
455
0f51f5b8 456dnl ------------------------------------------------------------------
457AC_MSG_CHECKING([whether to compile trd library])
458AH_TEMPLATE([HLT_TRD],[hlt trd library])
459AC_ARG_ENABLE(trd,
460 [AC_HELP_STRING([--enable-trd],
461 [compile the trd library ])],
462 [],[enable_trd=yes])
463if test "x$have_aliroot" = "xno" ; then
464 enable_trd="no...requires.AliRoot"
465fi
466if test "x$enable_trd" = "xyes" ; then
467 AC_DEFINE(HLT_TRD)
468fi
469AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
470AC_MSG_RESULT([$enable_trd])
471
b521659f 472dnl ------------------------------------------------------------------
473AC_MSG_CHECKING([whether to enable HLT logging])
474AH_TEMPLATE([NOLOGGING],[disable hlt logging])
475AC_ARG_ENABLE(logging,
476 [AC_HELP_STRING([--enable-logging],
477 [enable logging])],
478 [],[enable_logging=yes])
479if test "x$enable_logging" != "xyes" ; then
480 AC_DEFINE(NOLOGGING)
481fi
482AC_MSG_RESULT([$enable_logging])
483
484dnl ------------------------------------------------------------------
485AC_MSG_CHECKING([whether to enable saving MC data through the chain])
486AH_TEMPLATE([DOMC],[MC saving])
487AC_ARG_ENABLE(mc-saving,
488 [AC_HELP_STRING([--enable-mc-saving],
489 [enable saving MC data through the chain])],
490 [],[enable_mc_saving=no])
491if test "x$enable_mc_saving" = "xyes" ; then
492 AC_DEFINE(DOMC)
493fi
494AC_MSG_RESULT([$enable_mc_saving])
495
b521659f 496dnl ------------------------------------------------------------------
b521659f 497dnl certainly something old, but we keep the define
498AC_MSG_CHECKING([whether to use ROWHOUGH])
499AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
500AC_ARG_ENABLE(rowhough,
501 [AC_HELP_STRING([--enable-rowhough],
502 [use ROWHOUGH ])],
503 [],[enable_rowhough=no])
504if test "x$enable_rowhough" = "xyes" ; then
505 AC_DEFINE(USEROWHOUGH)
506fi
507AC_MSG_RESULT([$enable_rowhough])
508
53feaef5 509dnl ------------------------------------------------------------------
510dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
511dnl stand-alone build system. This is most likely something old we can
512dnl get rid off later, or do something more reasonable. Since the define
513dnl needs the quotes they have to be escaped. This works well for the
514dnl Makefile but not for the configure script. So we have to add the
515dnl defines after all the other checks.
516CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
517if test ! "x$have_aliroot" = "xno" ; then
518 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
519fi
520
b521659f 521dnl ------------------------------------------------------------------
522dnl
523dnl Documentation
524dnl
525AC_ARG_VAR(DOXYGEN, The Documentation Generator)
526AC_PATH_PROG(PERL, perl)
527AC_PATH_PROG(DOXYGEN, doxygen)
528AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
529HAVE_DOT=NO
530DOT_PATH=
531AC_PATH_PROG(DOT, dot)
532if ! test "x$DOT" = "x" ; then
533 HAVE_DOT=YES
534 DOT_PATH=`dirname $DOT`
535fi
536AC_SUBST([HAVE_DOT])
537AC_SUBST([DOT_PATH])
538
2bbbadd1 539dnl ------------------------------------------------------------------
540dnl inatallation directory for libraries
541dnl
542if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
543libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
544AC_MSG_NOTICE([libdir set to $libdir])
545fi
b521659f 546dnl ------------------------------------------------------------------
547AC_CONFIG_FILES([Makefile
548 BASE/Makefile
53feaef5 549 BASE/setenv.sh
550 BASE/setenv.csh
b521659f 551 SampleLib/Makefile
552 TPCLib/Makefile
db16520a 553 TPCLib/mapping2array.cxx
78b557c2 554 TPCLib/OnlineDisplay/Makefile
c160eda8 555 PHOS/Makefile
0f51f5b8 556 TRD/Makefile
b521659f 557 doc/Makefile
558 doc/doxygen.conf])
559
560
561AC_OUTPUT
562dnl
563dnl EOF
564dnl
565