]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/configure.ac
Removal of obsolete code
[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
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
c018a1bd 160 # libSTEERBase present since Aug 7 2007
161 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
162 CHECKLIB=STEERBase
163 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
164
f5bf5fc3 165 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
166 CHECKLIB=AOD
167 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
168
169 # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
170 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
171 CHECKLIB=CDB
172 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
173
74c73e5a 174 # check for certain AliRoot libraries/files/features
2bbbadd1 175 # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
176 have_alirawdata=no
177 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
178 CHECKLIB=RAWDatabase
179 AC_CHECK_LIB([$CHECKLIB],[_init],
180 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
181 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
182 CHECKLIB=RAWDatarec
183 AC_CHECK_LIB([$CHECKLIB],[_init],
184 [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
185 AC_DEFINE(HAVE_ALIRAWDATA)
186 have_alirawdata=$CHECKLIB])],
187 [# second pass with -RAWData
188 CHECKLIB="-lRAWData"
189 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
190 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
191 #include <AliRawReaderFile.h>
192 #include <AliRawReaderDate.h>
193 #include <AliRawReaderRoot.h>],
194 [AliRawReaderMemory mreader;
195 AliRawReaderFile freader;
196 AliRawReaderDate dreader(NULL,0);
197 AliRawReaderRoot rreader(NULL,0);])],
198 [AC_DEFINE(HAVE_ALIRAWDATA)
199 ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
200 have_alirawdata=$CHECKLIB],
201 [have_alirawdata=no])
202 ]) dnl AC_CHECK_LIB RAWDatabase
fa274626 203 AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
204 AC_MSG_RESULT([$have_alirawdata])
205
f5bf5fc3 206 dnl
207 dnl required header files and libraries for the AliHLTTPC library
208 dnl
209 if test ! "x$have_aliroot" = "xno" ; then
210 # the HLTTPCLib needs to link agains TPCbase and TPCrec
211 # TPC library for AliTPCParam and AliSimDigits used in
212 # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx
213 # fram May 07 TPCbase depends on libGui.so
214 saveALIROOT_CPPFLAGS="$ALIROOT_CPPFLAGS"
215 ALIROOT_CPPFLAGS="$saveALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
216 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
217 have_alitpc=yes
218 AC_MSG_CHECKING(for required classes in TPC libraries)
219 if test ! "x$have_alitpc" = "xno" ; then
220 save_ALIROOT_LIBS=$ALIROOT_LIBS
221 ALIROOT_LIBS="$save_ALIROOT_LIBS -lTPCbase -lTPCrec -lGui -lSTEER"
222 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
223 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h>
224 #include <AliTPCParam.h>
225 #include <AliTPCParamSR.h>
226 #include <AliTPCDigitsArray.h>
227 #include <AliTPCClustersArray.h>
228 #include <AliTPCcluster.h>
229 #include <AliTPCClustersRow.h>],
230 [AliSimDigits dig;
231 AliTPCParam param;
232 AliTPCParamSR paramsr;
233 AliTPCDigitsArray digarray;
234 AliTPCClustersArray clustarray;
235 AliTPCcluster clust;
236 AliTPCClustersRow row])],
237 [AC_DEFINE(HAVE_ALITPC)
238 saveALIROOT_CPPFLAGS=$ALIROOT_CPPFLAGS
239 saveALIROOT_LIBS=$ALIROOT_LIBS],
240 [have_alitpc=no
241 ALIROOT_CPPFLAGS=$saveALIROOT_CPPFLAGS
242 ALIROOT_LIBS=$saveALIROOT_LIBS])
243 fi
244 AC_MSG_RESULT($have_alitpc)
245 fi
33e463e1 246 AC_CHECK_HEADERS([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
247 AC_CHECK_HEADERS([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
675d662a 248
249 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
250 CHECKLIB=STEER
c018a1bd 251 AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
675d662a 252
fa274626 253 dnl
254 dnl check whether AliLog supports notification callback
255 dnl
675d662a 256 LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
fa274626 257 have_alilog_notification=no
c018a1bd 258 if test ! "x$have_aliroot" = "xno" ; then
fa274626 259 AC_MSG_CHECKING([whether AliLog supports notification callback])
260 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>],
261 [AliLog::AliLogNotification fct])],
262 [have_alilog_notification=yes],
263 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
264 AC_MSG_RESULT([$have_alilog_notification])
c018a1bd 265 fi
2bbbadd1 266
04dbc9e4 267 dnl
268 dnl Check for the interface of AliExternalTrackParam which has been changed
269 dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
270 dnl or higher)
271 externaltrackparam_version=1
272 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>],
273 [AliExternalTrackParam trackparam;
274 Double_t param[[5]]; Double_t covar[[15]];
275 trackparam.Set(0., 0., param, covar);])],
276 [externaltrackparam_version=2],
277 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
278 AC_MSG_CHECKING(for version of AliExternalTrackParam)
279 AC_MSG_RESULT($externaltrackparam_version)
280
5894eaa5 281 dnl
282 dnl required header files and libraries for the AliHLTPHOS library
283 dnl
284 have_alicalorawstream=no
285 if test ! "x$have_aliroot" = "xno" ; then
286 # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
287 #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
288 AC_MSG_CHECKING([for AliCaloRawStream.h usability])
289 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
290 #include <AliCaloRawStream.h>],
291 [int i])],
292 [AC_DEFINE(HAVE_ALICALORAWSTREAM)
293 have_alicalorawstream=yes],
294 [])
295 AC_MSG_RESULT([$have_alicalorawstream])
296 fi
297
298 dnl
299 dnl required header files and libraries for the AliHLTTRD library
300 dnl
301 AC_CHECK_HEADERS([AliGeomManager.h], [], [AC_DEFINE([HAVNT_ALIGEOMMANAGER])])
302
74c73e5a 303 if test ! "x$have_alirawdata" = "xno" ; then
304 # check for header files needed by the TPCLib/AliHLTTPCDigitReaderPacket
305 # the header file has been moved to the TPC module
306 CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
307 # AliRawReaderMemory.h AliRawReaderFile.h already checked
308 #AC_CHECK_HEADERS([AliRawReaderMemory.h AliRawReaderFile.h AliTPCRawStream.h])
309 AC_CHECK_HEADERS([AliTPCRawStream.h])
310 fi
85869391 311
db16520a 312 have_tpc_mapping=no
313 if test ! "x$have_aliroot" = "xno" ; then
04dbc9e4 314 # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC
db16520a 315 # which is stored in the TPC/mapping/Patchx.data files from
316 # AliRoot version v4-04-Release (May 2006)
317 AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
318 TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
319 AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data],
320 [have_tpc_mapping=yes
321 AC_SUBST(TPC_PAD_MAPPING_PATH)
322 AC_DEFINE(HAVE_TPC_MAPPING)],
323 [])
324
325 fi
326 AC_MSG_CHECKING([for TPC mapping layout])
db16520a 327 AC_MSG_RESULT([$have_tpc_mapping])
04dbc9e4 328
74c73e5a 329 if test "x$have_aliroot" = "xno" ; then
c018a1bd 330 # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
331 # but library dependencies might not be resolved completely
332 #ALIROOT_CPPFLAGS=
333 AC_MSG_WARN([some of the AliRoot library dependencies are not resolved. You
334 can force compilation of detector libs by --enable-<detector>, but be aware
335 of unresolved references at runtime.])
336 AC_MSG_WARN([ ------------------------------------------ ])
337 AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ])
338 AC_MSG_WARN([ ------------------------------------------ ])
74c73e5a 339 ALIROOT_LDFLAGS=
340 ALIROOT_LIBS=
341 fi
342 CPPFLAGS=$save_CPPFLAGS
343 LDFLAGS=$save_LDFLAGS
344 LIBS=$save_LIBS
74c73e5a 345fi
346AC_LANG_POP(C++)
5f5b708b 347AC_SUBST([ALICE_ROOT])
74c73e5a 348AC_SUBST([ALIROOT_CPPFLAGS])
349AC_SUBST([ALIROOT_LDFLAGS])
dc8f7cb7 350AC_SUBST([ALIROOTBINDIR])
53feaef5 351AC_SUBST([ALIROOTLIBDIR])
74c73e5a 352AC_SUBST([ALIROOT_LIBS])
0f51f5b8 353AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
85869391 354
6c1a9d9e 355HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
356HLTBASE_LDFLAGS=
357AC_SUBST([HLTBASE_CPPFLAGS])
358AC_SUBST([HLTBASE_LDFLAGS])
359
78b557c2 360dnl ------------------------------------------------------------------
361dnl check for the HLT PubSub Framework
362AC_MSG_CHECKING([for HLT PubSub Framework])
363AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
364 [],
365 [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
366if test -z $with_pubsub || ! test -d $with_pubsub ; then
367 with_pubsub=no
368fi
369AC_MSG_RESULT([$with_pubsub])
5f1685a0 370HOMER_VERSION=1
371HOMER_LIBS=
78b557c2 372
373AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
374if test "x$with_pubsub" != "xno" ; then
375 save_CPPFLAGS=$CPPFLAGS
376 save_LDFLAGS=$LDFLAGS
377 save_LIBS=$LIBS
4a6b4894 378 # currently the different versions of the HLT PubSub framework have a different
379 # directory layout
20b6dd9a 380 if test -d ${with_pubsub}/include/HOMER ; then
5235c3e9 381 # the 'early' location of the include files with separated HOMER sub dirs
9ce4bf4a 382 HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
5235c3e9 383 elif test -d ${with_pubsub}/include/Util/HOMER ; then
384 # location for HLT Framework versions after Sep 2006
9ce4bf4a 385 HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
5235c3e9 386 elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
387 # fall back if include files were not installed (versions after Sep 06)
9ce4bf4a 388 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
4a6b4894 389 else
5235c3e9 390 # fall back if include files were not installed (versions before Sep 06)
9ce4bf4a 391 HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
4a6b4894 392 fi
9ce4bf4a 393 HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
5894eaa5 394
395 AC_ARG_ENABLE(pubsub-debug,
396 [AC_HELP_STRING([--disable-pubsub-debug],
397 [force the production version of the PubSub framework])],
398 [],[enable_pubsub_debug=yes])
399 homer_type="none"
400 HOMER_TARGET="`uname -s`-`uname -m`"
401 AC_MSG_CHECKING([for HLT PubSub Framework release type])
402 if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
403 homer_type="production"
404 HOMER_TARGET="${HOMER_TARGET}-release"
405 elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
406 homer_type="debug"
407 HOMER_TARGET="${HOMER_TARGET}-debug"
408 fi
409 AC_MSG_RESULT([${homer_type}])
410 HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
411 HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
53feaef5 412 HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
78b557c2 413 CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
414 LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
415 LIBS="$save_LIBS "
416 with_homer=no
417 AC_LANG_PUSH(C++)
418 AC_CHECK_HEADER([HOMERReader.h],
5f1685a0 419 [ AC_CHECK_LIB([HOMER],[_init],
420 [with_homer=yes
421 HOMER_LIBS="-lHOMER"],
422 [ AC_CHECK_LIB([HOMERReader],[_init],
423 [with_homer=yes
424 HOMER_LIBS="-lHOMERReader"])])
425 LIBS="$LIBS $HOMER_LIBS"
9ce4bf4a 426 AC_MSG_CHECKING([version of HOMER library])
5f1685a0 427 dnl The Homer library has no versioning, so we do our own
428 dnl version description
429 dnl ----------------------------------------------------------------------
430 dnl 1 inintial version
431 dnl 2 GetBlockStatusFlags added to the interface
432 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
433 [HOMERReader reader("dummy", 0);
434 reader.GetBlockStatusFlags(0);])],
435 [if test $HOMER_VERSION -lt 2 ; then HOMER_VERSION=2; fi],
436 [])
437 AC_MSG_RESULT([$HOMER_VERSION])
438 ]) #AC_CHECK_HEADER([HOMERReader.h])
78b557c2 439 AC_LANG_POP(C++)
440 if test "x$with_homer" = "xno" ; then
441 HOMER_CPPFLAGS=
442 HOMER_LDFLAGS=
5f1685a0 443 HOMER_LIBS=
78b557c2 444 else
5f1685a0 445 HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
78b557c2 446 AC_DEFINE(HAVE_HOMERREADER)
447 fi
448 CPPFLAGS="$save_CPPFLAGS"
449 LDFLAGS="$save_LDFLAGS"
450 LIBS="$save_LIBS"
451fi
452AC_SUBST([HOMER_CPPFLAGS])
453AC_SUBST([HOMER_LDFLAGS])
53feaef5 454AC_SUBST([HOMER_LIBDIR])
455AC_SUBST([HOMER_BINDIR])
5f1685a0 456AC_SUBST([HOMER_LIBS])
78b557c2 457
85869391 458dnl ------------------------------------------------------------------
459AC_MSG_CHECKING([whether to impose strict coding conventions])
460AC_ARG_ENABLE(strict,
461 [AC_HELP_STRING([--enable-strict],
462 [enable coding convention checks ])],
463 [],[enable_strict=no])
464if test "x$enable_strict" = "xyes" ; then
465 CPPFLAGS="$CPPFLAGS -Weffc++"
466fi
467AC_MSG_RESULT([$enable_strict])
b521659f 468
469dnl ------------------------------------------------------------------
470AC_MSG_CHECKING([whether to compile sample library])
471AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
472AC_ARG_ENABLE(sample,
c018a1bd 473 [AC_HELP_STRING([--disable-sample],
b521659f 474 [compile the sample library ])],
c018a1bd 475 [sample_force=yes],[enable_sample=yes])
476if test "x$sample_force" = "xyes" ; then
477 enable_sample="yes"
478elif test "x$have_aliroot" = "xno" ; then
479 enable_sample="no...requires.AliRoot"
480fi
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 ])],
493 [util_force=yes],[enable_util=yes])
494if test "x$util_force" = "xyes" ; then
495 enable_util="yes"
496elif test "x$have_aliroot" = "xno" ; then
497 enable_util="no...requires.AliRoot"
498fi
499
500if test "x$enable_util" = "xyes" ; then
501 AC_DEFINE(HLT_UTIL)
502fi
503AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
504AC_MSG_RESULT([$enable_util])
505
b521659f 506dnl ------------------------------------------------------------------
507AC_MSG_CHECKING([whether to compile tpc library])
508AH_TEMPLATE([HLT_TPC],[hlt tpc library])
509AC_ARG_ENABLE(tpc,
c018a1bd 510 [AC_HELP_STRING([--disable-tpc],
b521659f 511 [compile the tpc library ])],
c018a1bd 512 [tpc_force=yes],[enable_tpc=yes])
513if test "x$tpc_force" = "xyes" ; then
514 enable_tpc="yes"
515elif test "x$have_aliroot" = "xno" ; then
74c73e5a 516 enable_tpc="no...requires.AliRoot"
517elif test "x$have_alitpc" = "xno" ; then
518 enable_tpc="no...requires.AliRoot.TPC.libraries"
519fi
b521659f 520if test "x$enable_tpc" = "xyes" ; then
521 AC_DEFINE(HLT_TPC)
522fi
523AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
524AC_MSG_RESULT([$enable_tpc])
525
c160eda8 526dnl ------------------------------------------------------------------
527AC_MSG_CHECKING([whether to compile phos library])
528AH_TEMPLATE([HLT_PHOS],[hlt phos library])
529AC_ARG_ENABLE(phos,
c018a1bd 530 [AC_HELP_STRING([--disable-phos],
c160eda8 531 [compile the phos library ])],
c018a1bd 532 [phos_force=yes],[enable_phos=yes])
533if test "x$phos_force" = "xyes" ; then
534 enable_phos="yes"
535elif test "x$have_aliroot" = "xno" ; then
c160eda8 536 enable_phos="no...requires.AliRoot"
04dbc9e4 537elif ! test "x$have_alicalorawstream" = "xyes"; then
538 enable_phos="no...requires.AliRoot>v4-05-07"
c160eda8 539fi
540if test "x$enable_phos" = "xyes" ; then
541 AC_DEFINE(HLT_PHOS)
542fi
543AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
544AC_MSG_RESULT([$enable_phos])
545
0f51f5b8 546dnl ------------------------------------------------------------------
547AC_MSG_CHECKING([whether to compile trd library])
548AH_TEMPLATE([HLT_TRD],[hlt trd library])
549AC_ARG_ENABLE(trd,
c018a1bd 550 [AC_HELP_STRING([--disable-trd],
0f51f5b8 551 [compile the trd library ])],
c018a1bd 552 [trd_force=yes],[enable_trd=yes])
553if test "x$trd_force" = "xyes" ; then
554 enable_trd="yes"
555elif test "x$have_aliroot" = "xno" ; then
0f51f5b8 556 enable_trd="no...requires.AliRoot"
557fi
558if test "x$enable_trd" = "xyes" ; then
559 AC_DEFINE(HLT_TRD)
560fi
561AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
562AC_MSG_RESULT([$enable_trd])
563
94cc9aab 564dnl ------------------------------------------------------------------
565AC_MSG_CHECKING([whether to compile dimuon library])
566AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
567AC_ARG_ENABLE(dimuon,
c018a1bd 568 [AC_HELP_STRING([--disable-dimuon],
94cc9aab 569 [compile the dimuon library ])],
c018a1bd 570 [dimuon_force=yes],[enable_dimuon=yes])
571if test "x$dimuon_force" = "xyes" ; then
572 enable_dimuon="yes"
573elif test "x$have_aliroot" = "xno" ; then
94cc9aab 574 enable_dimuon="no...requires.AliRoot"
575fi
576if test "x$enable_dimuon" = "xyes" ; then
577 AC_DEFINE(HLT_MUON)
578fi
579AM_CONDITIONAL(EN_HLT_MUON, test x$enable_dimuon = xyes)
580AC_MSG_RESULT([$enable_dimuon])
581
b521659f 582dnl ------------------------------------------------------------------
fc455fba 583AC_MSG_CHECKING([whether to disable AliRoot logging])
584AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
585AC_ARG_ENABLE(aliroot-logging,
586 [AC_HELP_STRING([--disable-aliroot-logging],
587 [disable logging through AliRoot logging methods])],
588 [],[enable_aliroot_logging=no])
c018a1bd 589if test "x$have_aliroot" = "xno" ; then
590 enable_aliroot_logging=yes # this means 'disable'
591fi
fc455fba 592if test "x$enable_aliroot_logging" != "xno" ; then
593 AC_DEFINE(NOALIROOT_LOGGING)
b521659f 594fi
fc455fba 595AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
596AC_MSG_RESULT([$enable_aliroot_logging])
b521659f 597
598dnl ------------------------------------------------------------------
599AC_MSG_CHECKING([whether to enable saving MC data through the chain])
600AH_TEMPLATE([DOMC],[MC saving])
601AC_ARG_ENABLE(mc-saving,
602 [AC_HELP_STRING([--enable-mc-saving],
603 [enable saving MC data through the chain])],
604 [],[enable_mc_saving=no])
605if test "x$enable_mc_saving" = "xyes" ; then
606 AC_DEFINE(DOMC)
607fi
608AC_MSG_RESULT([$enable_mc_saving])
609
b521659f 610dnl ------------------------------------------------------------------
b521659f 611dnl certainly something old, but we keep the define
612AC_MSG_CHECKING([whether to use ROWHOUGH])
613AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
614AC_ARG_ENABLE(rowhough,
615 [AC_HELP_STRING([--enable-rowhough],
616 [use ROWHOUGH ])],
617 [],[enable_rowhough=no])
618if test "x$enable_rowhough" = "xyes" ; then
619 AC_DEFINE(USEROWHOUGH)
620fi
621AC_MSG_RESULT([$enable_rowhough])
622
53feaef5 623dnl ------------------------------------------------------------------
624dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
625dnl stand-alone build system. This is most likely something old we can
626dnl get rid off later, or do something more reasonable. Since the define
627dnl needs the quotes they have to be escaped. This works well for the
628dnl Makefile but not for the configure script. So we have to add the
629dnl defines after all the other checks.
630CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
631if test ! "x$have_aliroot" = "xno" ; then
632 CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
633fi
634
b521659f 635dnl ------------------------------------------------------------------
636dnl
637dnl Documentation
638dnl
639AC_ARG_VAR(DOXYGEN, The Documentation Generator)
640AC_PATH_PROG(PERL, perl)
641AC_PATH_PROG(DOXYGEN, doxygen)
642AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
5894eaa5 643AC_ARG_ENABLE(dot,
644 [AC_HELP_STRING([--enable-dot],
645 [enable dot documentation generator])],
646 [],[enable_dot=no])
b521659f 647HAVE_DOT=NO
648DOT_PATH=
649AC_PATH_PROG(DOT, dot)
5894eaa5 650if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
b521659f 651 HAVE_DOT=YES
652 DOT_PATH=`dirname $DOT`
653fi
654AC_SUBST([HAVE_DOT])
655AC_SUBST([DOT_PATH])
656
90ebac25 657dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
658dnl echo $HAVE_SRC_SUBDIR
659dnl if ! test -d $HAVE_SRC_SUBDIR; then
660dnl HAVE_SRC_SUBDIR=
661dnl fi
662dnl AC_SUBST([HAVE_SRC_SUBDIR])
663
2bbbadd1 664dnl ------------------------------------------------------------------
665dnl inatallation directory for libraries
666dnl
667if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
668libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
669AC_MSG_NOTICE([libdir set to $libdir])
670fi
b521659f 671dnl ------------------------------------------------------------------
672AC_CONFIG_FILES([Makefile
673 BASE/Makefile
53feaef5 674 BASE/setenv.sh
675 BASE/setenv.csh
242bb794 676 BASE/util/Makefile
d098ebd4 677 BASE/interface/Makefile
b521659f 678 SampleLib/Makefile
679 TPCLib/Makefile
db16520a 680 TPCLib/mapping2array.cxx
78b557c2 681 TPCLib/OnlineDisplay/Makefile
c160eda8 682 PHOS/Makefile
0f51f5b8 683 TRD/Makefile
94cc9aab 684 MUON/Makefile
b521659f 685 doc/Makefile
686 doc/doxygen.conf])
687
688
689AC_OUTPUT
690dnl
691dnl EOF
692dnl
693