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