]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/configure.ac
Removing html documenation from CVS
[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 ------------------------------------------------------------------
c018a1bd 8AC_INIT([Alice High Level Trigger] , [0.8-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
fbf4d793 63 # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
64 ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer'
dc8f7cb7 65 for CHECKLIB in $ROOT_CHECKLIBS ; do
dc8f7cb7 66 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
67 LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
68 AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
69 done
dfaa582a 70
71 # TBuffer.h has been made pure virtual in root v5-15-02 and one
72 # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
73 AC_CHECK_HEADERS([TBufferFile.h])
74
0b6c2560 75 # TView.h has been made pure virtual right after root v5-15-02 and one
76 # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
77 AC_CHECK_HEADERS([TView3D.h])
78
dc8f7cb7 79 CPPFLAGS=$save_CPPFLAGS
80 LDFLAGS=$save_LDFLAGS
81 LIBS=$save_LIBS
dfaa582a 82 AC_LANG_POP(C++)
dc8f7cb7 83fi
b521659f 84
85dnl ------------------------------------------------------------------
86# TODO: make this configurable through arguments
87#Define whether you want to run with ALIROOT or only ROOT
88AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
89ALIHLT_USEPACKAGE=ALIROOT
90#ALIHLT_USEPACKAGE=ROOT
91#ALIHLT_USEPACKAGE=STANDALONE
92AC_DEFINE(use_aliroot)
93AC_DEFINE(use_root)
85869391 94CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
85869391 95
96dnl ------------------------------------------------------------------
74c73e5a 97dnl check for AliRoot features
98AC_LANG_PUSH(C++)
74c73e5a 99have_aliroot=no
2bbbadd1 100AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation],
101 [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
102 [])
103
104if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
105 dnl ------------------------------------------------------------------
106 dnl Try to estimate the system architecture
107 case $host_os:$host_cpu in
108 linux*:x86_64*) alice_target='linuxx8664gcc' ;;
109 linux*) alice_target='linux' ;;
110 *) alice_target='unknown' ;;
111 esac
112 if test "x$alice_target" = "xunknown" ; then
113 if test -z $ALICE_TARGET ; then
114 AC_MSG_ERROR([Can not estimate system architecture.
115 To avoid the problem, set the ALICE_TARGET variable appropriately.
116 Please send the following information to Matthias.Richter@ift.uib.no:
117 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
118 else
119 AC_MSG_NOTICE([Unknown system architecture.
120 Please send the following information to Matthias.Richter@ift.uib.no:
121 ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
122 fi
123 else
124 if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
125 AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
126 overriding $ALICE_TARGET by $alice_target])
127 fi
128 ALICE_TARGET=$alice_target
129 fi
dc8f7cb7 130 ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
74c73e5a 131 ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
132 ALIROOTINCDIR=${ALICE_ROOT}/include
dc8f7cb7 133 test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
2bbbadd1 134 test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
135 test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
74c73e5a 136fi
2bbbadd1 137
138AC_MSG_CHECKING([for AliRoot])
74c73e5a 139if test "x$ALICE_ROOT" != "x" \
dc8f7cb7 140 && test -d ${ALIROOTBINDIR} \
74c73e5a 141 && test -d ${ALIROOTLIBDIR} \
142 && test -d ${ALIROOTINCDIR}; then
143 have_aliroot=$ALICE_ROOT
144else
dc8f7cb7 145 ALIROOTBINDIR=
74c73e5a 146 ALIROOTLIBDIR=
147 ALIROOTINCDIR=
148fi
149AC_MSG_RESULT([$have_aliroot])
150
151if test ! "x$have_aliroot" = "xno" ; then
74c73e5a 152 ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
153 ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
dc8f7cb7 154 ALIROOT_LIBS="-lESD $ADD_ROOTLIBS"
74c73e5a 155 save_CPPFLAGS=$CPPFLAGS
156 save_LDFLAGS=$LDFLAGS
157 save_LIBS=$LIBS
158 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
db16520a 159 LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
2bbbadd1 160
f8c5e339 161 # check for certain AliRoot libraries/files/features
c018a1bd 162 # libSTEERBase present since Aug 7 2007
163 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
164 CHECKLIB=STEERBase
165 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
166
f5bf5fc3 167 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
168 CHECKLIB=AOD
169 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
170
2bbbadd1 171 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
172 have_alirawdata=no
173 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
174 CHECKLIB=RAWDatabase
175 AC_CHECK_LIB([$CHECKLIB],[_init],
176 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
177 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
178 CHECKLIB=RAWDatarec
179 AC_CHECK_LIB([$CHECKLIB],[_init],
180 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
181 AC_DEFINE(HAVE_ALIRAWDATA)
182 have_alirawdata=$CHECKLIB])],
183 [# second pass with -RAWData
184 CHECKLIB="-lRAWData"
185 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
186 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
187 #include <AliRawReaderFile.h>
188 #include <AliRawReaderDate.h>
189 #include <AliRawReaderRoot.h>],
190 [AliRawReaderMemory mreader;
191 AliRawReaderFile freader;
192 AliRawReaderDate dreader(NULL,0);
193 AliRawReaderRoot rreader(NULL,0);])],
194 [AC_DEFINE(HAVE_ALIRAWDATA)
195 ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
196 have_alirawdata=$CHECKLIB],
197 [have_alirawdata=no])
198 ]) dnl AC_CHECK_LIB RAWDatabase
fa274626 199 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
200 AC_MSG_RESULT([$have_alirawdata])
201
fbf4d793 202 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
203 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
204 CHECKLIB=CDB
205 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
206
207 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
208 CHECKLIB=STEER
209 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
210
211 dnl
212 dnl check whether AliLog supports notification callback
213 dnl
214 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
215 have_alilog_notification=no
216 if test ! "x$have_aliroot" = "xno" ; then
217 AC_MSG_CHECKING([whether AliLog supports notification callback])
218 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
219 [AliLog::AliLogNotification fct])],
220 [have_alilog_notification=yes],
221 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
222 AC_MSG_RESULT([$have_alilog_notification])
223 fi
224
225 if test "x$have_aliroot" = "xno" ; then
226 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
227 # but library dependencies might not be resolved completely
228 #ALIROOT_CPPFLAGS=
229 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
230 This can happen from time to time due to development in AliRoot. You can
231 force compilation of detector libs by --enable-<detector>, but be aware
232 of unresolved references at runtime.])
233 AC_MSG_WARN([ ------------------------------------------ ])
234 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
235 AC_MSG_WARN([ please include config.log ])
236 AC_MSG_WARN([ ------------------------------------------ ])
237 ALIROOT_LDFLAGS=
238 ALIROOT_LIBS=
239 fi
240
f5bf5fc3 241 dnl
fbf4d793 242 dnl required header files and libraries for modules
f5bf5fc3 243 dnl
244 if test ! "x$have_aliroot" = "xno" ; then
245 # the HLTTPCLib needs to link agains TPCbase and TPCrec
246 # TPC library for AliTPCParam and AliSimDigits used in
247 # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx
248 # fram May 07 TPCbase depends on libGui.so
f59fee6d 249 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
f5bf5fc3 250 have_alitpc=yes
251 AC_MSG_CHECKING(for required classes in TPC libraries)
252 if test ! "x$have_alitpc" = "xno" ; then
f59fee6d 253 ALITPC_LIBS="-lGui -lTPCbase -lTPCrec"
254 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
f5bf5fc3 255 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h>
256 #include <AliTPCParam.h>
257 #include <AliTPCParamSR.h>
258 #include <AliTPCDigitsArray.h>
259 #include <AliTPCClustersArray.h>
260 #include <AliTPCcluster.h>
261 #include <AliTPCClustersRow.h>],
262 [AliSimDigits dig;
263 AliTPCParam param;
264 AliTPCParamSR paramsr;
265 AliTPCDigitsArray digarray;
266 AliTPCClustersArray clustarray;
267 AliTPCcluster clust;
268 AliTPCClustersRow row])],
f59fee6d 269 [AC_DEFINE(HAVE_ALITPC)],
f5bf5fc3 270 [have_alitpc=no
f59fee6d 271 ALITPC_LIBS= ])
f5bf5fc3 272 fi
273 AC_MSG_RESULT($have_alitpc)
274 fi
33e463e1 275 AC_CHECK_HEADERS([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
276 AC_CHECK_HEADERS([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
675d662a 277
db16520a 278 have_tpc_mapping=no
279 if test ! "x$have_aliroot" = "xno" ; then
04dbc9e4 280 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
db16520a 281 # which is stored in the TPC/mapping/Patchx.data files from
282 # AliRoot version v4-04-Release (May 2006)
283 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
284 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
285 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
286 [have_tpc_mapping=yes
287 AC_SUBST(TPC_PAD_MAPPING_PATH)
288 AC_DEFINE(HAVE_TPC_MAPPING)],
289 [])
290
291 fi
292 AC_MSG_CHECKING([for TPC mapping layout])
db16520a 293 AC_MSG_RESULT([$have_tpc_mapping])
04dbc9e4 294
f59fee6d 295 if test ! "x$have_alirawdata" = "xno" ; then
296 # check for header files needed by the TPCLib/AliHLTTPCDigitReaderPacket
297 # the header file has been moved to the TPC module
298 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
299 # AliRawReaderMemory.h AliRawReaderFile.h already checked
300 #AC_CHECK_HEADERS([AliRawReaderMemory.h AliRawReaderFile.h AliTPCRawStream.h])
301 AC_CHECK_HEADERS([AliTPCRawStream.h])
302 fi
303
304 dnl
305 dnl Check for the interface of AliExternalTrackParam which has been changed
306 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
307 dnl or higher)
308 externaltrackparam_version=1
309 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
310 [AliExternalTrackParam trackparam;
311 Double_t param[[5]]; Double_t covar[[15]];
312 trackparam.Set(0., 0., param, covar);])],
313 [externaltrackparam_version=2],
314 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
315 AC_MSG_CHECKING(for version of AliExternalTrackParam)
316 AC_MSG_RESULT($externaltrackparam_version)
317
74c73e5a 318 CPPFLAGS=$save_CPPFLAGS
319 LDFLAGS=$save_LDFLAGS
320 LIBS=$save_LIBS
74c73e5a 321fi
f59fee6d 322
74c73e5a 323AC_LANG_POP(C++)
5f5b708b 324AC_SUBST([ALICE_ROOT])
74c73e5a 325AC_SUBST([ALIROOT_CPPFLAGS])
326AC_SUBST([ALIROOT_LDFLAGS])
dc8f7cb7 327AC_SUBST([ALIROOTBINDIR])
53feaef5 328AC_SUBST([ALIROOTLIBDIR])
74c73e5a 329AC_SUBST([ALIROOT_LIBS])
0f51f5b8 330AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
85869391 331
6c1a9d9e 332HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
333HLTBASE_LDFLAGS=
334AC_SUBST([HLTBASE_CPPFLAGS])
335AC_SUBST([HLTBASE_LDFLAGS])
336
78b557c2 337dnl ------------------------------------------------------------------
338dnl check for the HLT PubSub Framework
f8c5e339 339dnl namely for the existence of the HOMER library
340dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
341dnl package. It os though possible to choose an external. library
342dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
343dnl got the name libAliHLTHOMER
78b557c2 344AC_MSG_CHECKING([for HLT PubSub Framework])
345AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
346 [],
347 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
348if test -z $with_pubsub || ! test -d $with_pubsub ; then
349 with_pubsub=no
350fi
351AC_MSG_RESULT([$with_pubsub])
f8c5e339 352HOMER_VERSION=2
5f1685a0 353HOMER_LIBS=
78b557c2 354
355AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
356if test "x$with_pubsub" != "xno" ; then
357 save_CPPFLAGS=$CPPFLAGS
358 save_LDFLAGS=$LDFLAGS
359 save_LIBS=$LIBS
4a6b4894 360 # currently the different versions of the HLT PubSub framework have a different
361 # directory layout
20b6dd9a 362 if test -d ${with_pubsub}/include/HOMER ; then
5235c3e9 363 # the 'early' location of the include files with separated HOMER sub dirs
9ce4bf4a 364 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
5235c3e9 365 elif test -d ${with_pubsub}/include/Util/HOMER ; then
366 # location for HLT Framework versions after Sep 2006
9ce4bf4a 367 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
5235c3e9 368 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
369 # fall back if include files were not installed (versions after Sep 06)
9ce4bf4a 370 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
4a6b4894 371 else
5235c3e9 372 # fall back if include files were not installed (versions before Sep 06)
9ce4bf4a 373 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
4a6b4894 374 fi
9ce4bf4a 375 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
5894eaa5 376
377 AC_ARG_ENABLE(pubsub-debug,
378 [AC_HELP_STRING([--disable-pubsub-debug],
379 [force the production version of the PubSub framework])],
380 [],[enable_pubsub_debug=yes])
381 homer_type="none"
382 HOMER_TARGET="`uname -s`-`uname -m`"
383 AC_MSG_CHECKING([for HLT PubSub Framework release type])
384 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
385 homer_type="production"
386 HOMER_TARGET="${HOMER_TARGET}-release"
387 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
388 homer_type="debug"
389 HOMER_TARGET="${HOMER_TARGET}-debug"
390 fi
391 AC_MSG_RESULT([${homer_type}])
f8c5e339 392 HOMERREADER_HEADER=HOMERReader.h
5894eaa5 393 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
394 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
53feaef5 395 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
78b557c2 396 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
397 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
398 LIBS="$save_LIBS "
399 with_homer=no
400 AC_LANG_PUSH(C++)
f8c5e339 401 AC_CHECK_HEADER([$HOMERREADER_HEADER],
5f1685a0 402 [ AC_CHECK_LIB([HOMER],[_init],
403 [with_homer=yes
404 HOMER_LIBS="-lHOMER"],
405 [ AC_CHECK_LIB([HOMERReader],[_init],
406 [with_homer=yes
407 HOMER_LIBS="-lHOMERReader"])])
408 LIBS="$LIBS $HOMER_LIBS"
9ce4bf4a 409 AC_MSG_CHECKING([version of HOMER library])
5f1685a0 410 dnl The Homer library has no versioning, so we do our own
411 dnl version description
412 dnl ----------------------------------------------------------------------
413 dnl 1 inintial version
414 dnl 2 GetBlockStatusFlags added to the interface
415 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
416 [HOMERReader reader("dummy", 0);
417 reader.GetBlockStatusFlags(0);])],
f8c5e339 418 [],
419 [HOMER_VERSION=1])
5f1685a0 420 AC_MSG_RESULT([$HOMER_VERSION])
f8c5e339 421 ],
422 [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
78b557c2 423 AC_LANG_POP(C++)
f8c5e339 424 HOMER_INBUILT_LIB=
425else
426dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
427 topdir=`dirname $0`
428 HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
429 HOMERREADER_HEADER=AliHLTHOMERReader.h
430 HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
431 HOMER_BINDIR=
432 HOMER_LIBDIR=
433 HOMER_LDFLAGS=
434fi
435
78b557c2 436 if test "x$with_homer" = "xno" ; then
437 HOMER_CPPFLAGS=
438 HOMER_LDFLAGS=
5f1685a0 439 HOMER_LIBS=
78b557c2 440 else
5f1685a0 441 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
78b557c2 442 AC_DEFINE(HAVE_HOMERREADER)
443 fi
444 CPPFLAGS="$save_CPPFLAGS"
445 LDFLAGS="$save_LDFLAGS"
446 LIBS="$save_LIBS"
f8c5e339 447
448AC_SUBST([HOMERREADER_HEADER])
449AC_SUBST([HOMER_INBUILT_LIB])
78b557c2 450AC_SUBST([HOMER_CPPFLAGS])
451AC_SUBST([HOMER_LDFLAGS])
53feaef5 452AC_SUBST([HOMER_LIBDIR])
453AC_SUBST([HOMER_BINDIR])
5f1685a0 454AC_SUBST([HOMER_LIBS])
78b557c2 455
85869391 456dnl ------------------------------------------------------------------
457AC_MSG_CHECKING([whether to impose strict coding conventions])
458AC_ARG_ENABLE(strict,
459 [AC_HELP_STRING([--enable-strict],
460 [enable coding convention checks ])],
461 [],[enable_strict=no])
462if test "x$enable_strict" = "xyes" ; then
463 CPPFLAGS="$CPPFLAGS -Weffc++"
464fi
465AC_MSG_RESULT([$enable_strict])
b521659f 466
467dnl ------------------------------------------------------------------
468AC_MSG_CHECKING([whether to compile sample library])
469AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
470AC_ARG_ENABLE(sample,
c018a1bd 471 [AC_HELP_STRING([--disable-sample],
b521659f 472 [compile the sample library ])],
2e742d30 473 [],
474 [if test "x$have_aliroot" = "xno" ; then
475 enable_sample="no...requires.AliRoot"
476 else
477 enable_sample=yes
478 fi
479 ])
480
b521659f 481if test "x$enable_sample" = "xyes" ; then
482 AC_DEFINE(HLT_SAMPLE)
483fi
484AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
485AC_MSG_RESULT([$enable_sample])
486
c018a1bd 487dnl ------------------------------------------------------------------
488AC_MSG_CHECKING([whether to compile util library])
489AH_TEMPLATE([HLT_UTIL],[HLT utility library])
490AC_ARG_ENABLE(util,
491 [AC_HELP_STRING([--disable-util],
492 [compile the util library ])],
2e742d30 493 [],
494 [if test "x$have_aliroot" = "xno" ; then
495 enable_util="no...requires.AliRoot"
496 else
497 enable_util=yes
498 fi
499 ])
c018a1bd 500
501if test "x$enable_util" = "xyes" ; then
502 AC_DEFINE(HLT_UTIL)
503fi
504AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
505AC_MSG_RESULT([$enable_util])
506
b521659f 507dnl ------------------------------------------------------------------
b521659f 508AH_TEMPLATE([HLT_TPC],[hlt tpc library])
f59fee6d 509
510CHECK_HLTMODULE([tpc],
511 [], [],
512 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
513 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
514 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
515
c6b46c3f 516if test "x$enable_module" = "xmissheader"; then
517 enable_module="no...missing.headers"
f59fee6d 518 enable_tpc="no...missing.headers"
519elif test "x$have_alitpc" = "xno" ; then
c6b46c3f 520 enable_module="no...requires.AliRoot.TPC.libraries"
f59fee6d 521 enable_tpc="no...requires.AliRoot.TPC.libraries"
c6b46c3f 522elif test "x$enable_module" = "xforce"; then
523 enable_tpc="yes"
f59fee6d 524else
525 enable_tpc=$enable_module
526fi
2e742d30 527
b521659f 528if test "x$enable_tpc" = "xyes" ; then
529 AC_DEFINE(HLT_TPC)
530fi
531AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
f59fee6d 532AC_MSG_CHECKING([whether to compile tpc library])
c6b46c3f 533AC_MSG_RESULT([$enable_module])
f59fee6d 534AC_SUBST([ALITPC_LIBS])
b521659f 535
c160eda8 536dnl ------------------------------------------------------------------
c160eda8 537AH_TEMPLATE([HLT_PHOS],[hlt phos library])
f59fee6d 538
539ALIPHOS_LIBS=
540CHECK_HLTMODULE([phos],
541 [], [$ALIROOT_CPPFLAGS],
542 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
543 [PHOSbase PHOSrec PHOSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
544 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
545
c6b46c3f 546if test "x$enable_module" = "xmissheader"; then
547 enable_module="no...requires.AliRoot>v4-05-07"
f59fee6d 548 enable_phos="no...requires.AliRoot>v4-05-07"
c6b46c3f 549elif test "x$enable_module" = "xforce"; then
550 enable_phos="yes"
f59fee6d 551else
552 have_alicalorawstream=no
553 if test ! "x$have_aliroot" = "xno" ; then
554 AC_LANG_PUSH(C++)
555 save_CPPFLAGS="$CPPFLAGS"
556 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
557 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
558 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
559 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
560 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
561 #include <AliCaloRawStream.h>],
562 [int i])],
563 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
564 have_alicalorawstream=yes],
565 [])
566 AC_MSG_RESULT([$have_alicalorawstream])
567 AC_LANG_POP(C++)
568 CPPFLAGS="$save_CPPFLAGS"
569 fi
570 if test "x$have_alicalorawstream" != "xyes"; then
571 enable_phos="no...requires.AliRoot>v4-05-07"
572 else
573 enable_phos=$enable_module
574 fi
575fi
2e742d30 576
c160eda8 577if test "x$enable_phos" = "xyes" ; then
578 AC_DEFINE(HLT_PHOS)
f59fee6d 579 ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
c160eda8 580fi
581AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
f59fee6d 582AC_MSG_CHECKING([whether to compile phos library])
c6b46c3f 583AC_MSG_RESULT([$enable_module])
f59fee6d 584AC_SUBST([ALIPHOS_LIBS])
c160eda8 585
c6b46c3f 586dnl ------------------------------------------------------------------
587AH_TEMPLATE([HLT_TRD],[hlt trd library])
588
f59fee6d 589ALITRD_LIBS=
590CHECK_HLTMODULE([trd],
591 [], [],
592 [MLP], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
593 [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
594 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
595
c6b46c3f 596if test "x$enable_module" = "xmissheader"; then
597 enable_module="no...requires.AliRoot>v4-07-Release"
f59fee6d 598 enable_trd="no...requires.AliRoot>v4-07-Release"
c6b46c3f 599elif test "x$enable_module" = "xforce"; then
600 enable_trd="yes"
f59fee6d 601else
602 enable_trd=$enable_module
603 if test "x$enable_trd" = "xyes" ; then
604 AC_LANG_PUSH(C++)
605 save_CPPFLAGS="$CPPFLAGS"
606 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
607 AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
608 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
609 [AliTRDclusterizer c;
610 c.SetRawVersion(0)])],
611 [],
612 [enable_trd="no...requires.AliRoot>v4-07-Release"])
613 AC_MSG_RESULT([$enable_trd])
614 AC_LANG_POP(C++)
615 CPPFLAGS="$save_CPPFLAGS"
616 fi
617fi
2e742d30 618
0f51f5b8 619if test "x$enable_trd" = "xyes" ; then
620 AC_DEFINE(HLT_TRD)
f59fee6d 621 ALITRD_LIBS=$ALIHLTMODULE_LIBS
0f51f5b8 622fi
623AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
f59fee6d 624AC_MSG_CHECKING([whether to compile trd library])
c6b46c3f 625AC_MSG_RESULT([$enable_module])
f59fee6d 626AC_SUBST([ALITRD_LIBS])
0f51f5b8 627
94cc9aab 628dnl ------------------------------------------------------------------
94cc9aab 629AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
2e742d30 630
f59fee6d 631ALIMUON_LIBS=
e89e6b23 632CHECK_HLTMODULE([dimuon],
f59fee6d 633 [AliMUONVCluster.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON],
634 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
635 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
636 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
637
638if test "x$enable_module" = "xmissheader"; then
c6b46c3f 639 enable_module="no...requires.AliRoot>v4-07-Release"
f59fee6d 640 enable_muon="no...requires.AliRoot>v4-07-Release"
c6b46c3f 641elif test "x$enable_module" = "xforce"; then
642 enable_muon="yes"
f59fee6d 643else
644 enable_muon=$enable_module
645fi
646
647if test "x$enable_muon" = "xyes" ; then
94cc9aab 648 AC_DEFINE(HLT_MUON)
f59fee6d 649 ALIMUON_LIBS=$ALIHLTMODULE_LIBS
94cc9aab 650fi
f59fee6d 651AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
652AC_MSG_CHECKING([whether to compile muon library])
c6b46c3f 653AC_MSG_RESULT([$enable_module])
f59fee6d 654AC_SUBST([ALIMUON_LIBS])
94cc9aab 655
e89e6b23 656dnl ------------------------------------------------------------------
657AH_TEMPLATE([HLT_COMP],[hlt comp library])
658
659ALICOMP_LIBS=
660CHECK_HLTMODULE([comp],
661 [], [$ALIROOT_CPPFLAGS],
662 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
663 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
664 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
665
666if test "x$enable_module" = "xmissheader"; then
c6b46c3f 667 enable_module="no...header.missing"
e89e6b23 668 enable_comp="no...header.missing"
c6b46c3f 669elif test "x$enable_module" = "xforce"; then
670 enable_comp="yes"
e89e6b23 671else
672 enable_comp=$enable_module
673fi
674
675if test "x$enable_comp" = "xyes" ; then
676 AC_DEFINE(HLT_COMP)
677 ALICOMP_LIBS=$ALIHLTMODULE_LIBS
678fi
679AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
680AC_MSG_CHECKING([whether to compile comp library])
c6b46c3f 681AC_MSG_RESULT([$enable_module])
e89e6b23 682AC_SUBST([ALICOMP_LIBS])
683
b521659f 684dnl ------------------------------------------------------------------
fc455fba 685AC_MSG_CHECKING([whether to disable AliRoot logging])
686AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
687AC_ARG_ENABLE(aliroot-logging,
688 [AC_HELP_STRING([--disable-aliroot-logging],
689 [disable logging through AliRoot logging methods])],
690 [],[enable_aliroot_logging=no])
c018a1bd 691if test "x$have_aliroot" = "xno" ; then
692 enable_aliroot_logging=yes # this means 'disable'
693fi
fc455fba 694if test "x$enable_aliroot_logging" != "xno" ; then
695 AC_DEFINE(NOALIROOT_LOGGING)
b521659f 696fi
fc455fba 697AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
698AC_MSG_RESULT([$enable_aliroot_logging])
b521659f 699
700dnl ------------------------------------------------------------------
701AC_MSG_CHECKING([whether to enable saving MC data through the chain])
702AH_TEMPLATE([DOMC],[MC saving])
703AC_ARG_ENABLE(mc-saving,
704 [AC_HELP_STRING([--enable-mc-saving],
705 [enable saving MC data through the chain])],
706 [],[enable_mc_saving=no])
707if test "x$enable_mc_saving" = "xyes" ; then
708 AC_DEFINE(DOMC)
709fi
710AC_MSG_RESULT([$enable_mc_saving])
711
b521659f 712dnl ------------------------------------------------------------------
b521659f 713dnl certainly something old, but we keep the define
714AC_MSG_CHECKING([whether to use ROWHOUGH])
715AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
716AC_ARG_ENABLE(rowhough,
717 [AC_HELP_STRING([--enable-rowhough],
718 [use ROWHOUGH ])],
719 [],[enable_rowhough=no])
720if test "x$enable_rowhough" = "xyes" ; then
721 AC_DEFINE(USEROWHOUGH)
722fi
723AC_MSG_RESULT([$enable_rowhough])
724
53feaef5 725dnl ------------------------------------------------------------------
726dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
727dnl stand-alone build system. This is most likely something old we can
728dnl get rid off later, or do something more reasonable. Since the define
729dnl needs the quotes they have to be escaped. This works well for the
730dnl Makefile but not for the configure script. So we have to add the
731dnl defines after all the other checks.
732CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
733if test ! "x$have_aliroot" = "xno" ; then
734 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
735fi
736
b521659f 737dnl ------------------------------------------------------------------
738dnl
739dnl Documentation
740dnl
741AC_ARG_VAR(DOXYGEN, The Documentation Generator)
742AC_PATH_PROG(PERL, perl)
743AC_PATH_PROG(DOXYGEN, doxygen)
744AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
5894eaa5 745AC_ARG_ENABLE(dot,
746 [AC_HELP_STRING([--enable-dot],
747 [enable dot documentation generator])],
748 [],[enable_dot=no])
b521659f 749HAVE_DOT=NO
750DOT_PATH=
751AC_PATH_PROG(DOT, dot)
5894eaa5 752if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
b521659f 753 HAVE_DOT=YES
754 DOT_PATH=`dirname $DOT`
755fi
756AC_SUBST([HAVE_DOT])
757AC_SUBST([DOT_PATH])
758
90ebac25 759dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
760dnl echo $HAVE_SRC_SUBDIR
761dnl if ! test -d $HAVE_SRC_SUBDIR; then
762dnl HAVE_SRC_SUBDIR=
763dnl fi
764dnl AC_SUBST([HAVE_SRC_SUBDIR])
765
2bbbadd1 766dnl ------------------------------------------------------------------
767dnl inatallation directory for libraries
768dnl
769if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
770libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
771AC_MSG_NOTICE([libdir set to $libdir])
772fi
b521659f 773dnl ------------------------------------------------------------------
774AC_CONFIG_FILES([Makefile
775 BASE/Makefile
53feaef5 776 BASE/setenv.sh
777 BASE/setenv.csh
2be16a33 778 BASE/HOMER/Makefile
242bb794 779 BASE/util/Makefile
d098ebd4 780 BASE/interface/Makefile
4cbaf07b 781 sim/Makefile
782 rec/Makefile
b521659f 783 SampleLib/Makefile
784 TPCLib/Makefile
db16520a 785 TPCLib/mapping2array.cxx
78b557c2 786 TPCLib/OnlineDisplay/Makefile
c160eda8 787 PHOS/Makefile
0f51f5b8 788 TRD/Makefile
94cc9aab 789 MUON/Makefile
e89e6b23 790 comp/Makefile
b521659f 791 doc/Makefile
792 doc/doxygen.conf])
793
794
795AC_OUTPUT
796dnl
797dnl EOF
798dnl
799