]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/configure.ac
updating build checks for the HLT TRD (Theo)
[u/mrichter/AliRoot.git] / HLT / configure.ac
1 dnl -*- mode: autoconf -*- 
2 dnl
3 dnl $Id$
4 dnl template for the configuration script for the Alice HLT 
5 dnl framework and components
6 dnl 
7 dnl ------------------------------------------------------------------
8
9 dnl Take either the AliRoot tag as version id or the current revision
10 AC_INIT([Alice High Level Trigger] , 
11         m4_esyscmd([url=`svn info 2> /dev/null | grep "URL:" | cut -d: -f3 | sed -e 's|[/]*HLT[/]*$||' | sed -e 's|^[/]*||g' | cut -d '/' -f 4`; \
12                     revision=`svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | cut -d '/' -f 4`; \
13                     if test "x$url" != "x"; then echo -n $url; \
14                     elif test "x$revision" != "x"; then echo -n $revision ; \
15                     elif test -e .revision && test x`cat .revision` != x; then \
16                        cat .revision; \
17                     else \
18                        echo -n invalid-version; \
19                     fi]),
20         [Matthias.Richter@ift.uib.no], 
21         [alice-hlt])
22
23 dnl ------------------------------------------------------------------
24 dnl the package from CVS contains the old Makefiles as well. In order to
25 dnl prevent them from becoming overwritten, we require a separate build
26 dnl directory
27 if test "`dirname $0`" = "." ; then
28    AC_ERROR([please run the script from a separate build directory])
29 fi
30
31 dnl ------------------------------------------------------------------
32 AC_CANONICAL_SYSTEM
33 AC_PREFIX_DEFAULT(${PWD})
34 AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
35 AM_INIT_AUTOMAKE([-Wno-portability])
36 AC_PROG_CC
37 AC_PROG_CXX
38 AC_PROG_LIBTOOL
39
40 AC_DEBUG
41 AC_PROFILING
42 AC_OPTIMIZATION
43 AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 )
44
45 dnl ------------------------------------------------------------------
46 dnl A warning posted into the auto-generated files
47 dnl Does NOT concern this file ;-)
48 AUTOGENERATED_WARNING="!!!!!!!    DO NOT EDIT THIS FILE !!!!!!"
49 AC_SUBST([AUTOGENERATED_WARNING])
50
51 dnl ------------------------------------------------------------------
52 dnl
53 dnl Check for ROOT
54 dnl
55 ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
56 AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
57 AC_SUBST([ROOTSYS])
58 ROOTBINDIR=`dirname $ROOTEXEC`
59 AC_SUBST([ROOTBINDIR])
60
61 dnl test for additional required root libraries and headers
62 LIBS='-ldl'
63 if test "x$have_root" = "x1"; then
64   AC_LANG_PUSH(C++)
65   save_CPPFLAGS=$CPPFLAGS
66   save_LDFLAGS=$LDFLAGS
67   save_LIBS=$LIBS
68   CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done`
69   
70   # we check for the libSTEER library which is linked to
71   # - the ROOT libs libGeom libMinuit libVMC libEG
72   # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
73   # - ROOT libCint needs also libdl
74   # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
75   #   libTreePlayer.so
76   # - from Jan 07 libESD also depends on libXMLIO
77   # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release)
78   # - libCDB.so depends on libXMLParser since Mar 11 2009 r 31411
79   ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer XMLParser'
80   for CHECKLIB in $ROOT_CHECKLIBS ; do
81     LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
82     LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
83     AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
84   done
85
86   # TBuffer.h has been made pure virtual in root v5-15-02 and one
87   # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h)
88   AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE])
89
90   # TView.h has been made pure virtual right after root v5-15-02 and one
91   # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D)
92   AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D])
93
94   CPPFLAGS=$save_CPPFLAGS
95   LDFLAGS=$save_LDFLAGS
96   LIBS=$save_LIBS
97   AC_LANG_POP(C++)
98 fi
99
100 dnl ------------------------------------------------------------------
101 # TODO: make this configurable through arguments
102 #Define whether you want to run with ALIROOT or only ROOT
103 AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
104 ALIHLT_USEPACKAGE=ALIROOT
105 #ALIHLT_USEPACKAGE=ROOT
106 #ALIHLT_USEPACKAGE=STANDALONE
107 AC_DEFINE(use_aliroot)
108 AC_DEFINE(use_root)
109 CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
110 save_CPPFLAGS=$CPPFLAGS
111 save_LDFLAGS=$LDFLAGS
112 save_LIBS=$LIBS
113
114 dnl ------------------------------------------------------------------
115 dnl check for AliRoot features
116 AC_LANG_PUSH(C++)
117 have_aliroot=no
118 AC_ARG_WITH(aliroot,[  --with-aliroot   top of the AliRoot installation],
119                     [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
120                     [])
121
122 if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
123   dnl ------------------------------------------------------------------
124   dnl Try to estimate the system architecture
125   case $host_os:$host_cpu in
126   linux*:x86_64*)       alice_target='linuxx8664gcc'            ;;
127   linux*)               alice_target='linux'                    ;;
128   *)                    alice_target='unknown'                  ;;
129   esac
130   if test "x$alice_target" = "xunknown" ; then
131     if test -z $ALICE_TARGET ; then
132     AC_MSG_ERROR([Can not estimate system architecture.
133     To avoid the problem, set the ALICE_TARGET variable appropriately.
134     Please send the following information to Matthias.Richter@ift.uib.no:
135         ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
136     else
137     AC_MSG_NOTICE([Unknown system architecture.
138     Please send the following information to Matthias.Richter@ift.uib.no:
139         ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])  
140     fi
141   else
142     if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
143     AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
144     overriding $ALICE_TARGET by $alice_target])
145     fi
146     ALICE_TARGET=$alice_target
147   fi
148   ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}
149   ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
150   ALIROOTINCDIR=${ALICE_ROOT}/include
151   test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR])
152   test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
153   test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
154 fi
155
156 AC_MSG_CHECKING([for AliRoot])
157 if test "x$ALICE_ROOT" != "x" \
158    && test -d ${ALIROOTBINDIR} \
159    && test -d ${ALIROOTLIBDIR} \
160    && test -d ${ALIROOTINCDIR}; then
161   have_aliroot=$ALICE_ROOT
162 else
163   ALIROOTBINDIR=
164   ALIROOTLIBDIR=
165   ALIROOTINCDIR=
166 fi
167 AC_MSG_RESULT([$have_aliroot])
168
169 if test ! "x$have_aliroot" = "xno" ; then
170   ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
171   ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
172   ALIROOT_LIBS="$ADD_ROOTLIBS"
173   save_CPPFLAGS=$CPPFLAGS
174   save_LDFLAGS=$LDFLAGS
175   save_LIBS=$LIBS
176   CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
177   LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
178   
179   # check for certain AliRoot libraries/files/features
180   # libSTEERBase present since Aug 7 2007
181   # ###########################################
182   # temporary workaround for circular dependency libSTEERbase libSTEER   
183   # https://savannah.cern.ch/bugs/index.php?49914
184   # disable the sequence of checks and load libraries in parallel
185   ALIROOT_LIBS="$ALIROOT_LIBS -lAOD -lCDB -lRAWDatabase -lRAWDatarec -lESD -lSTEER"
186   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
187   CHECKLIB=STEERBase
188   AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
189
190   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
191   CHECKLIB=AOD
192   AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
193
194   # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
195   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
196   CHECKLIB=CDB
197   AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
198
199   # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
200   have_alirawdata=no
201   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
202   CHECKLIB=RAWDatabase
203   AC_CHECK_LIB([$CHECKLIB],[_init],
204         [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
205          LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lESD -lSTEER"
206          CHECKLIB=RAWDatarec
207          AC_CHECK_LIB([$CHECKLIB],[_init],
208                [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
209                 have_alirawdata=$CHECKLIB])],
210         [# second pass with -RAWData
211          CHECKLIB="-lRAWData"
212          LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
213          AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
214                                        #include <AliRawReaderFile.h>
215                                        #include <AliRawReaderDate.h>
216                                        #include <AliRawReaderRoot.h>], 
217                                      [AliRawReaderMemory mreader;
218                                        AliRawReaderFile freader;
219                                        AliRawReaderDate dreader(NULL,0);
220                                        AliRawReaderRoot rreader(NULL,0);])],
221                                      [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
222                                        have_alirawdata=$CHECKLIB], 
223                                       [have_alirawdata=no])
224         ]) dnl AC_CHECK_LIB RAWDatabase
225   AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries])
226   AC_MSG_RESULT([$have_alirawdata])
227
228   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER"
229   CHECKLIB=ESD
230   AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
231
232   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
233   CHECKLIB=STEER
234   AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no])
235
236   dnl
237   dnl check whether AliLog supports notification callback
238   dnl 2010-03-03: revision 38921 introduces AliLog::GetRootLogger in order to make AliLog
239   dnl a pure sigleton, introduce a 2-level check here
240   dnl
241   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
242   have_alilog_notification=no
243   if test ! "x$have_aliroot" = "xno" ; then
244   AC_MSG_CHECKING([whether AliLog supports notification callback])
245   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], 
246                                   [AliLog* logger=AliLog::GetRootLogger();])],
247                                   [have_alilog_notification=yes],
248                                   [AC_DEFINE(NO_ALILOG_GETROOTLOGGER)
249                                   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], 
250                                                                   [AliLog::AliLogNotification fct])],
251                                                                   [have_alilog_notification=yes], 
252                                                                   [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
253                                   ])
254   AC_MSG_RESULT([$have_alilog_notification])
255   fi
256
257   if test "x$have_aliroot" = "xno" ; then
258     # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation
259     # but library dependencies might not be resolved completely
260     #ALIROOT_CPPFLAGS=
261     AC_MSG_WARN([some of the AliRoot library dependencies are not resolved.
262     This can happen from time to time due to development in AliRoot. You can
263     force compilation of detector libs by --enable-<detector>, but be aware
264     of unresolved references at runtime.])
265     AC_MSG_WARN([       ------------------------------------------ ])
266     AC_MSG_WARN([       Report this to $PACKAGE_BUGREPORT ])
267     AC_MSG_WARN([       please include config.log                  ])
268     AC_MSG_WARN([       ------------------------------------------ ])
269     ALIROOT_LDFLAGS=
270     ALIROOT_LIBS=
271   fi
272
273   dnl
274   dnl ESD supports non-std content
275   dnl
276   have_esd_nonstd=no
277   AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>
278                                    #include <AliExternalTrackParam.h>
279                                    #include <TTree.h>
280                                    #include <TClonesArray.h>],
281                                   [AliESDEvent esd;
282                                    esd.CreateStdContent();
283                                    TTree* tree=new TTree("esdTree", "Tree with HLT ESD objects");
284                                    TClonesArray* a=new TClonesArray("AliExternalTrackParam");
285                                    a->SetName("SomeObject");
286                                    esd.AddObject(a);
287                                    esd.WriteToTree(tree);
288                                    if (!tree->FindBranch("SomeObject")) return 1;
289                                    return 0;])],
290                  [have_esd_nonstd=yes], 
291                  [AC_DEFINE(HAVE_NOT_ESD_NONSTD)])
292   AC_MSG_CHECKING(whether ESD supports non standard content)
293   AC_MSG_RESULT([$have_esd_nonstd])
294
295   dnl
296   dnl ESD copy function added May 9 2008 rev 25667
297   dnl
298   if test "x$have_esd_nonstd" != "xyes"; then
299   have_esd_copy=no
300   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>],
301                                   [AliESDEvent esd1;
302                                    AliESDEvent esd2;
303                                    esd2=esd1;])],
304                  [have_esd_copy=yes], 
305                  [AC_DEFINE(HAVE_NOT_ESD_COPY)])
306   AC_MSG_CHECKING(for ESD assignment operator)
307   AC_MSG_RESULT([$have_esd_copy])
308   fi
309
310   dnl
311   dnl AliRawReaderMemory support for multiple buffers added
312   dnl revision 26829 Jun 2008
313   dnl
314   CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW"
315   have_rawreadermemory_multbuffers=no
316   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>],
317                                   [AliRawReaderMemory rr;
318                                    rr.AddBuffer(NULL, 0, 0);])],
319                  [have_rawreadermemory_multbuffers=yes], 
320                  [AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)])
321   AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers)
322   AC_MSG_RESULT([$have_rawreadermemory_multbuffers])
323
324   dnl
325   dnl Changes in the magnetic field implementation
326   dnl revision 30848 Feb 1 2009
327   dnl
328   CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
329   have_alimagf30848=no
330   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMagF.h>],
331                                   [int test=AliMagF::k5kG;])],
332                  [have_alimagf30848=yes], 
333                  [AC_DEFINE(HAVE_NOT_ALIMAGF30848)])
334   AC_MSG_CHECKING(AliMagF contains field definitions)
335   AC_MSG_RESULT([$have_alimagf30848])
336
337   dnl
338   dnl Cleanup of the RunLoader implementation
339   dnl revision 30859 Feb 2 2009
340   dnl
341   CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/STEER"
342   have_alirunloader30859=no
343   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRunLoader.h>],
344                                   [AliRunLoader* rl=AliRunLoader::Instance();])],
345                  [have_alirunloader30859=yes], 
346                  [AC_DEFINE(HAVE_NOT_ALIRUNLOADER30859)])
347   AC_MSG_CHECKING(AliRunLoader::Instance)
348   AC_MSG_RESULT([$have_alirunloader30859])
349
350   have_aliqav1=no
351   AC_CHECK_HEADER([AliQAv1.h], [have_aliqav1=yes], [])
352   AM_CONDITIONAL(EN_HLT_QA, test x$have_aliqav1 = xyes)
353   AC_CHECK_HEADER([AliESDHLTDecision.h], [], [AC_DEFINE(HAVE_NOT_ALIESDHLTDECISION)])
354
355   dnl
356   dnl required header files and libraries for modules
357   dnl
358
359   dnl
360   dnl Check for the interface of AliExternalTrackParam which has been changed
361   dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
362   dnl or higher)
363   externaltrackparam_version=1
364   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>], 
365                                   [AliExternalTrackParam trackparam;
366                                    Double_t param[[5]]; Double_t covar[[15]];
367                                    trackparam.Set(0., 0., param, covar);])],
368                                   [externaltrackparam_version=2],
369                                   [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
370   AC_MSG_CHECKING(for version of AliExternalTrackParam)
371   AC_MSG_RESULT($externaltrackparam_version)
372
373   dnl The AliShuttleInterface was changed in rev 29388. Some return types
374   dnl had been const, now changed according to gcc 4.3 warnings 
375   AC_MSG_CHECKING(for version of AliShuttleInterface.h)
376     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/"
377     LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
378     LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
379     AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliShuttleInterface.h>],
380                                     [class dummy : public AliShuttleInterface {
381                                      public:
382                                        const UInt_t GetStartTimeDCSQuery() {;}
383                                      };])],
384                                     [AC_DEFINE(SHUTTLE_PRE_REV29388_INTERFACE)
385                                      alishuttleinterface_version=pre.rev.29388],
386                                     [alishuttleinterface_version=up.to.date])
387   AC_MSG_RESULT([$alishuttleinterface_version])
388
389   CPPFLAGS=$save_CPPFLAGS
390   LDFLAGS=$save_LDFLAGS
391   LIBS=$save_LIBS
392 fi # if test ! "x$have_aliroot" = "xno"
393
394 AC_LANG_POP(C++)
395 AC_SUBST([ALICE_ROOT])
396 AC_SUBST([ALIROOT_CPPFLAGS])
397 AC_SUBST([ALIROOT_LDFLAGS])
398 AC_SUBST([ALIROOTBINDIR])
399 AC_SUBST([ALIROOTLIBDIR])
400
401 ALIROOT_LIBS="$ALIROOT_LIBS $ADD_ROOTLIBS"
402 AC_SUBST([ALIROOT_LIBS])
403 AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
404
405 HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE'
406 HLTBASE_LDFLAGS=
407 AC_SUBST([HLTBASE_CPPFLAGS])
408 AC_SUBST([HLTBASE_LDFLAGS])
409
410 dnl ------------------------------------------------------------------
411 dnl check for the HLT PubSub Framework
412 dnl namely for the existence of the HOMER library
413 dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt
414 dnl package. It os though possible to choose an external. library
415 dnl In order to make the origni of the HOMER lib clear, the one in AliRoot
416 dnl got the name libAliHLTHOMER
417 AC_MSG_CHECKING([for HLT PubSub Framework])
418 AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
419                     [],
420                     [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
421 if test -z $with_pubsub || ! test -d $with_pubsub ; then
422   with_pubsub=no
423 fi
424 AC_MSG_RESULT([$with_pubsub])
425 HOMER_VERSION=2
426 HOMER_LIBS=
427
428 AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface])
429 if test "x$with_pubsub" != "xno" ; then
430   save_CPPFLAGS=$CPPFLAGS
431   save_LDFLAGS=$LDFLAGS
432   save_LIBS=$LIBS
433   # currently the different versions of the HLT PubSub framework have a different
434   # directory layout
435   if test -d ${with_pubsub}/include/HOMER ; then
436     # the 'early' location of the include files with separated HOMER sub dirs
437     HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader"
438   elif test -d ${with_pubsub}/include/Util/HOMER ; then
439     # location for HLT Framework versions after Sep 2006
440     HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER"
441   elif test -d ${with_pubsub}/src/Util/HOMER/include ; then
442     # fall back if include files were not installed (versions after Sep 06)
443     HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
444   else
445     # fall back if include files were not installed (versions before Sep 06)
446     HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
447   fi
448   HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
449
450   AC_ARG_ENABLE(pubsub-debug,
451     [AC_HELP_STRING([--disable-pubsub-debug],
452         [force the production version of the PubSub framework])],
453     [],[enable_pubsub_debug=yes])
454   homer_type="none"
455   HOMER_TARGET="`uname -s`-`uname -m`"
456   AC_MSG_CHECKING([for HLT PubSub Framework release type])
457   if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then
458     homer_type="production"
459     HOMER_TARGET="${HOMER_TARGET}-release"
460   elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then
461     homer_type="debug"
462     HOMER_TARGET="${HOMER_TARGET}-debug"
463   fi
464   AC_MSG_RESULT([${homer_type}])
465   HOMERREADER_HEADER=HOMERReader.h
466   HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}"
467   HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}"
468   HOMER_LDFLAGS="-L${HOMER_LIBDIR}"
469   CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
470   LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
471   LIBS="$save_LIBS "
472   with_homer=no
473   AC_LANG_PUSH(C++)
474   AC_CHECK_HEADER([$HOMERREADER_HEADER],
475     [ AC_CHECK_LIB([HOMER],[_init],
476       [with_homer=yes
477        HOMER_LIBS="-lHOMER"],
478       [ AC_CHECK_LIB([HOMERReader],[_init],
479                      [with_homer=yes
480                       HOMER_LIBS="-lHOMERReader"])])
481       LIBS="$LIBS $HOMER_LIBS"
482       AC_MSG_CHECKING([version of HOMER library])
483       dnl The Homer library has no versioning, so we do our own
484       dnl version           description
485       dnl ----------------------------------------------------------------------
486       dnl   1          inintial version
487       dnl   2          GetBlockStatusFlags added to the interface
488       AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>],
489                                       [HOMERReader reader("dummy", 0);
490                                        reader.GetBlockStatusFlags(0);])],
491                                       [],
492                                       [HOMER_VERSION=1])
493       AC_MSG_RESULT([$HOMER_VERSION])
494   ],
495   [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER])
496   AC_LANG_POP(C++)
497   HOMER_INBUILT_LIB=
498 else
499 dnl no pubsub version defined, check if the HOMER lib is available in AliRoot
500   topdir=`dirname $0`
501   HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER"
502   HOMERREADER_HEADER=AliHLTHOMERReader.h
503   HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la
504   HOMER_BINDIR=
505   HOMER_LIBDIR=
506   HOMER_LDFLAGS=
507 fi
508
509   if test "x$with_homer" = "xno" ; then
510     HOMER_CPPFLAGS=
511     HOMER_LDFLAGS=
512     HOMER_LIBS=
513   else
514     HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION"
515     AC_DEFINE(HAVE_HOMERREADER)
516   fi
517   CPPFLAGS="$save_CPPFLAGS"
518   LDFLAGS="$save_LDFLAGS"
519   LIBS="$save_LIBS"  
520
521 AC_SUBST([HOMERREADER_HEADER])
522 AC_SUBST([HOMER_INBUILT_LIB])
523 AC_SUBST([HOMER_CPPFLAGS])
524 AC_SUBST([HOMER_LDFLAGS])
525 AC_SUBST([HOMER_LIBDIR])
526 AC_SUBST([HOMER_BINDIR])
527 AC_SUBST([HOMER_LIBS])
528
529 dnl ------------------------------------------------------------------
530 AC_ARG_ENABLE(all,
531   [AC_HELP_STRING([--disable-all],
532       [disable all detector modules, individual modules can be switched on by --enable-det])],
533   [disable_all=yes],[])
534
535 dnl ------------------------------------------------------------------
536 AC_MSG_CHECKING([whether to impose strict coding conventions])
537 AC_ARG_ENABLE(strict,
538   [AC_HELP_STRING([--disable-strict],
539       [disable coding convention checks ])],
540   [],[enable_strict=yes])
541 if test "x$enable_strict" = "xyes" ; then
542    CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow"
543 fi
544 AC_MSG_RESULT([$enable_strict])
545
546 dnl ------------------------------------------------------------------
547 AC_MSG_CHECKING([whether to enable component statistics])
548 AC_ARG_ENABLE(component-stat,
549   [AC_HELP_STRING([--enable-component-stat],
550       [enable component statistics ])],
551   [],[])
552
553 dnl enable component statistics if not explicitely disabled
554 if test "x$enable_component_stat" != "xno" &&
555    test "x$enable_debug" = "xyes" ; then
556    enable_component_stat=yes.debug
557 fi
558
559 if test "x$enable_component_stat" = "x" ; then
560    enable_component_stat=no
561 fi
562
563 if test "x$enable_component_stat" != "xno" ; then
564    AC_DEFINE(HLT_COMPONENT_STATISTICS)
565 fi
566 AC_MSG_RESULT([$enable_component_stat])
567
568 dnl ------------------------------------------------------------------
569 dnl ----  module checks
570 dnl ------------------------------------------------------------------
571 save_CPPFLAGS=$CPPFLAGS
572 save_LDFLAGS=$LDFLAGS
573 save_LIBS=$LIBS
574
575 dnl ------------------------------------------------------------------
576 AC_MSG_NOTICE([-------------------------------------------------])
577 AC_MSG_NOTICE([checking dependencies for HLTbase library])
578 HLTBASE_CHECKLIBS='XMLParser'
579 for CHECKLIB in $HLTBASE_CHECKLIBS ; do
580   LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
581   LIBS="$save_LIBS $ROOTLIBS $ALIHLTBASE_LIBS"
582   AC_CHECK_LIB([$CHECKLIB],[_init], [ALIHLTBASE_LIBS="$ALIHLTBASE_LIBS -l$CHECKLIB"])
583 done
584 AC_SUBST([ALIHLTBASE_LIBS])
585
586 dnl ------------------------------------------------------------------
587 AC_MSG_CHECKING([whether to compile sample library])
588 AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
589 AC_ARG_ENABLE(sample,
590   [AC_HELP_STRING([--disable-sample],
591       [compile the sample library ])],
592   [],
593   [if test "x$have_aliroot" = "xno" ; then
594      enable_sample="no...requires.AliRoot"
595    else
596      enable_sample=yes
597    fi
598   ])
599
600 if test "x$enable_sample" = "xyes" ; then 
601   AC_DEFINE(HLT_SAMPLE)
602 fi
603 AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
604 AC_MSG_RESULT([$enable_sample])
605
606 dnl ------------------------------------------------------------------
607 AH_TEMPLATE([HLT_UTIL],[HLT utility library])
608 ALIUTIL_LIBS=
609 CHECK_HLTMODULE([util],
610                 [], 
611                 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/RAW -I$ALICE_ROOT/PYTHIA6],
612                 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
613                 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
614                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
615
616 if test "x$enable_module" = "xmissheader"; then
617   enable_module="no...missing.headers"
618   enable_util=$enable_module
619 elif test "x$enable_module" = "xforce"; then
620   enable_util="yes"
621 else
622   enable_util=$enable_module
623 fi
624 if test "x$enable_util" = "xyes" ; then 
625   AC_DEFINE(HLT_UTIL)
626   ALIUTIL_LIBS=$ALIHLTMODULE_LIBS
627 fi
628 AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes)
629 AC_MSG_CHECKING([whether to compile Util library])
630 AC_MSG_RESULT([$enable_module])
631 AC_SUBST([ALIUTIL_LIBS])
632
633 dnl ------------------------------------------------------------------
634 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
635
636 ALITPC_LIBS=
637 CHECK_HLTMODULE([tpc],
638                 [AliTPCRawStream.h], 
639                 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
640                 [Gui ANALYSIS STAT], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
641                 [TPCbase TPCrec TPCcalib], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
642                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
643
644 if test "x$enable_module" = "xmissheader"; then
645   enable_module="no...missing.headers"
646   enable_tpc=$enable_module
647 elif test "x$enable_module" = "xforce"; then
648   enable_tpc="yes"
649 else
650   enable_tpc=$enable_module
651 fi
652
653 if test "x$enable_tpc" = "xyes" ; then 
654   AC_LANG_PUSH(C++)
655   AC_DEFINE(HLT_TPC)
656   ALITPC_LIBS=$ALIHLTMODULE_LIBS
657   dnl
658   dnl Check for functionality in the TPC reconstruction required for online
659   dnl processing
660   dnl 
661   have_tpc_hltoffline_rec=no
662   AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
663     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
664     LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
665     LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
666     AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
667                                        #include <AliTPCclustererMI.h>   
668                                        #include <TObjArray.h>], 
669                                     [AliTPCtrackerMI tracker;
670                                        TObjArray* array=NULL;
671                                        tracker.LoadClusters(array);
672                                        AliTPCclustererMI cl(NULL, NULL);
673                                        cl.GetOutputClonesArray();])],
674                                     [have_tpc_hltoffline_rec=yes], 
675                                       [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
676     LIBS=$save_LIBS
677   AC_MSG_RESULT([$have_tpc_hltoffline_rec])
678
679   AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
680   AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
681   AC_CHECK_HEADER([AliAltroRawStreamV3.h], [], [AC_DEFINE(HAVE_NOT_ALTRORAWSTREAMV3)])
682
683   have_tpc_mapping=no
684   if test ! "x$have_aliroot" = "xno" ; then
685     # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC 
686     # which is stored in the TPC/mapping/Patchx.data files from
687     # AliRoot version v4-04-Release (May 2006)
688     AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
689     TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping
690     AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data], 
691                    [have_tpc_mapping=yes
692                     AC_SUBST(TPC_PAD_MAPPING_PATH)
693                     AC_DEFINE(HAVE_TPC_MAPPING)],
694                    [])
695     
696   fi
697   AC_MSG_CHECKING([for TPC mapping layout])
698   AC_MSG_RESULT([$have_tpc_mapping])
699   AC_LANG_POP(C++)
700
701 else
702   enable_module=$enable_tpc
703 fi
704 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
705 AC_MSG_CHECKING([whether to compile TPC library])
706 AC_MSG_RESULT([$enable_module])
707 AC_SUBST([ALITPC_LIBS])
708
709 dnl ------------------------------------------------------------------
710 AH_TEMPLATE([HLT_RCU],[hlt rcu library])
711
712 CHECK_HLTMODULE([rcu],
713                 [AliAltroDecoder.h], 
714                 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
715                 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
716                 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
717                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
718
719 if test "x$enable_module" = "xmissheader"; then
720   enable_module="no...missing.headers"
721   enable_rcu=$enable_module
722 elif test "x$enable_module" = "xforce"; then
723   enable_rcu="yes"
724 else
725   AC_LANG_PUSH(C++)
726   CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
727   LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
728   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
729   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>], 
730                                   [AliAltroDecoder decoder;
731                                   decoder.CopyBackward(NULL, 0);])],
732                                   [enable_rcu=$enable_module], 
733                                   [enable_module="no...requires.AliRoot>v4-10-Release"
734                                    enable_rcu="no...requires.AliRoot>v4-10-Release"])
735   CPPFLAGS=$save_CPPFLAGS
736   LDFLAGS=$save_LDFLAGS
737   LIBS=$save_LIBS
738   AC_LANG_POP(C++)
739 fi
740
741 if test "x$enable_rcu" = "xyes" ; then 
742   AC_DEFINE(HLT_RCU)
743 else
744   enable_module=$enable_rcu
745 fi
746 AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
747 AC_MSG_CHECKING([whether to compile RCU library])
748 AC_MSG_RESULT([$enable_module])
749 AC_SUBST([ALIRCU_LIBS])
750
751 dnl ------------------------------------------------------------------
752 AH_TEMPLATE([HLT_CALO],[hlt calo(rimeter) library])
753   
754 ALICALO_LIBS=
755 CHECK_HLTMODULE([calo],
756                 [], [$ALIROOT_CPPFLAGS],
757                 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
758                 [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
759                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
760
761 if test "x$enable_module" = "xmissheader"; then
762   enable_module="no...missing.headers"
763   enable_calo=$enable_module
764 elif test "x$enable_module" = "xforce"; then
765   enable_calo="yes"
766 else
767   have_alicalorawstream=no
768   if test ! "x$have_aliroot" = "xno" ; then
769     AC_LANG_PUSH(C++)
770     save_CPPFLAGS="$CPPFLAGS"
771     # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
772     #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
773     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
774     AC_MSG_CHECKING([for AliCaloRawStream.h usability])
775     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
776                                         #include <AliCaloRawStream.h>], 
777                                        [int i])],
778                                        [AC_DEFINE(HAVE_ALICALORAWSTREAM)
779                                         have_alicalorawstream=yes], 
780                                        [])
781     AC_MSG_RESULT([$have_alicalorawstream])
782     AC_LANG_POP(C++)
783     CPPFLAGS="$save_CPPFLAGS"
784   fi
785   if test "x$have_alicalorawstream" != "xyes"; then
786     enable_calo="no...requires.AliRoot>v4-05-07"
787   else
788     enable_calo=$enable_module
789   fi
790 fi
791
792 if test "x$enable_calo" = "xyes" ; then 
793   AC_DEFINE(HLT_CALO)
794   ALICALO_LIBS=$ALIHLTMODULE_LIBS
795 else
796   enable_module=$enable_calo
797 fi
798 AM_CONDITIONAL(EN_HLT_CALO, test x$enable_calo = xyes)
799 AC_MSG_CHECKING([whether to compile CALO library])
800 AC_MSG_RESULT([$enable_module])
801 AC_SUBST([ALICALO_LIBS])
802
803 dnl ------------------------------------------------------------------
804 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
805   
806 ALIPHOS_LIBS=
807 CHECK_HLTMODULE([phos],
808                 [], [$ALIROOT_CPPFLAGS],
809                 [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
810                 [PHOSUtils PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
811                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
812
813 if test "x$enable_module" = "xmissheader"; then
814   enable_module="no...requires.AliRoot>v4-05-07"
815   enable_phos=$enable_module
816 elif test "x$enable_module" = "xforce"; then
817   enable_phos="yes"
818 else
819   have_alicalorawstream=no
820   if test ! "x$have_aliroot" = "xno" ; then
821     AC_LANG_PUSH(C++)
822     save_CPPFLAGS="$CPPFLAGS"
823     # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
824     #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
825     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/PHOS"
826     AC_MSG_CHECKING([for AliCaloRawStream.h usability])
827     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
828                                         #include <AliCaloRawStream.h>], 
829                                        [int i])],
830                                        [AC_DEFINE(HAVE_ALICALORAWSTREAM)
831                                         have_alicalorawstream=yes], 
832                                        [])
833     AC_MSG_RESULT([$have_alicalorawstream])
834     AC_MSG_CHECKING([for required EMC functionality in AliPHOSRecoParam.h ])
835     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliPHOSRecoParam.h>], 
836                                        [AliPHOSRecoParam param;
837                                         param.GetEMCClusteringThreshold()])],
838                                        [have_aliphosrecoparam=yes], 
839                                        [AC_DEFINE(HAVE_NOT_PHOSRECOPARAMEMC)])
840     AC_MSG_RESULT([$have_aliphosrecoparam])
841     AC_LANG_POP(C++)
842     CPPFLAGS="$save_CPPFLAGS"
843   fi
844   if test "x$have_alicalorawstream" != "xyes"; then
845     enable_phos="no...requires.AliRoot>v4-05-07"
846   else
847     enable_phos=$enable_module
848   fi
849 fi
850
851 if test "x$enable_phos" = "xyes" ; then 
852   AC_DEFINE(HLT_PHOS)
853   ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
854 else
855   enable_module=$enable_phos
856 fi
857 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
858 AC_MSG_CHECKING([whether to compile PHOS library])
859 AC_MSG_RESULT([$enable_module])
860 AC_SUBST([ALIPHOS_LIBS])
861
862 dnl ------------------------------------------------------------------
863 AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
864
865 ALIEMCAL_LIBS=
866 CHECK_HLTMODULE([emcal],
867                 [], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/EMCAL],
868                 [RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
869                 [EMCALrec EMCALsim EMCALbase EMCALUtils], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
870                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
871
872 if test "x$enable_module" = "xmissheader"; then
873   enable_module="no...header.missing"
874   enable_emcal=$enable_module
875 elif test "x$enable_module" = "xforce"; then
876   enable_emcal="yes"
877 else
878   enable_emcal=$enable_module
879 fi
880
881 if test "x$enable_emcal" = "xyes" ; then 
882   AC_DEFINE(HLT_EMCAL)
883   ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
884 else
885   enable_module=$enable_emcal
886 fi
887 AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
888 AC_MSG_CHECKING([whether to compile EMCAL library])
889 AC_MSG_RESULT([$enable_module])
890 AC_SUBST([ALIEMCAL_LIBS])
891
892 dnl ------------------------------------------------------------------
893 AH_TEMPLATE([HLT_TRD],[hlt trd library])
894   
895 ALITRD_LIBS=
896 CHECK_HLTMODULE([trd],
897                 [], [],
898                 [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
899                 [STAT TRDbase TRDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
900                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
901
902 if test "x$enable_module" = "xmissheader"; then
903   enable_module="no...requires.AliRoot>v4-07-Release"
904   enable_trd=$enable_module
905 elif test "x$enable_module" = "xforce"; then
906   enable_trd="yes"
907 else
908   enable_trd=$enable_module
909   if test "x$enable_trd" = "xyes" ; then
910     AC_LANG_PUSH(C++)
911     save_CPPFLAGS="$CPPFLAGS"
912     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
913     # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release
914     # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008
915     # changed to AliTRDReconstructor::SetStreamLevel() due to revision 27797, Tue Aug 5 2008
916     # changed to AliTRDReconstructor::SetClusters() according to revision 28069, Mon Aug 18 2008
917     # changed to AliTRDCluster according to revision 30461, Thu Dec 18 2008
918     # changed to AliTRDclusterizer::GetAddedClusters according to revision 31299, Wed Mar 4 2009
919     # changed to AliTRDclusterizer::GetNTimeBins according to revision 37102 Sun Nov 22 2009
920     AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
921     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>], 
922                                        [AliTRDclusterizer c;
923                                        c.GetNTimeBins()])],
924                                        [], 
925                                        [enable_trd="no...requires.AliRoot>v4-18-Release"])
926     AC_MSG_RESULT([$enable_trd])       
927
928     if test "x$enable_trd" = "xyes" ; then
929       have_alitrdseedv1_r39693=no
930       AC_MSG_CHECKING([checking for AliTRDseedV1 r39693])
931       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDseedV1.h>], 
932                                          [AliTRDseedV1 seed;
933                                           seed.SetC(0.0, 1)]);],
934                                          [have_alitrdseedv1_r39693=yes],
935                                          [AC_DEFINE(HAVE_NOT_ALITRD_SEEDV1_r39693)])
936       AC_MSG_RESULT([$have_alitrdseedv1_r39693])
937
938       have_alitrdrawstream_r39608=no
939       AC_MSG_CHECKING([checking for AliTRDrawStream r39608])
940       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDrawStreamBase.h>], 
941                                          [AliTRDrawStreamBase::SetRawStreamVersion(AliTRDrawStreamBase::kTRDdefaultStream)]);],
942                                          [have_alitrdrawstream_r39608=yes],
943                                          [AC_DEFINE(HAVE_NOT_ALITRD_RAWSTREAM_r39608)])
944       AC_MSG_RESULT([$have_alitrdrawstream_r39608])
945     fi
946
947     AC_LANG_POP(C++)
948     CPPFLAGS="$save_CPPFLAGS"
949   fi
950 fi
951
952 if test "x$enable_trd" = "xyes" ; then 
953   AC_DEFINE(HLT_TRD)
954   ALITRD_LIBS=$ALIHLTMODULE_LIBS
955 else
956   enable_module=$enable_trd
957 fi
958 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
959 AC_MSG_CHECKING([whether to compile TRD library])
960 AC_MSG_RESULT([$enable_module])
961 AC_SUBST([ALITRD_LIBS])
962
963 dnl ------------------------------------------------------------------
964 AH_TEMPLATE([HLT_FMD],[hlt fmd library])
965
966 ALIFMD_LIBS=$ALIHLTMODULE_LIBS
967 CHECK_HLTMODULE([fmd],
968                 [], [],
969                 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
970                 [FMDbase FMDrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
971                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
972
973 if test "x$enable_module" = "xmissheader"; then
974   enable_module="no...missing.headers"
975   enable_fmd=$enable_module
976 elif test "x$enable_module" = "xforce"; then
977   enable_fmd="yes"
978 else
979   enable_fmd=$enable_module
980 fi
981
982 if test "x$enable_fmd" = "xyes" ; then
983   AC_DEFINE(HLT_FMD)
984   ALIFMD_LIBS=$ALIHLTMODULE_LIBS
985 else
986   enable_module=$enable_fmd
987 fi
988 AM_CONDITIONAL(EN_HLT_FMD, test x$enable_fmd = xyes)
989 AC_MSG_CHECKING([whether to compile FMD library])
990 AC_MSG_RESULT([$enable_module])
991 AC_SUBST([ALIFMD_LIBS])
992
993 dnl ------------------------------------------------------------------
994 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
995
996 ALIMUON_LIBS=
997 CHECK_HLTMODULE([dimuon],
998                 [AliMpExMap.h AliMUONTriggerIO.h], 
999                 [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
1000                 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1001                 [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
1002                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1003
1004 if test "x$enable_module" = "xmissheader"; then
1005   enable_module="no...requires.AliRoot>=v4-08-Release"
1006   enable_muon=$enable_module
1007 elif test "x$enable_module" = "xforce"; then
1008   enable_muon="yes"
1009 else
1010   enable_muon=$enable_module
1011 fi
1012
1013 if test "x$enable_muon" = "xyes" ; then 
1014   AC_DEFINE(HLT_MUON)
1015   ALIMUON_LIBS=$ALIHLTMODULE_LIBS
1016   AC_LANG_PUSH(C++)
1017   save_CPPFLAGS="$CPPFLAGS"
1018
1019   dnl
1020   dnl Check for functionality GetRawStream AliMUONDigitMaker.h
1021   dnl 
1022   have_muon_digitmaker_getrawstream=no
1023   AC_MSG_CHECKING(for GetRawStream methods of AliMUONDigitMaker)
1024     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON"
1025     LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
1026     LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
1027     AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMUONDigitMaker.h>], 
1028                                     [AliMUONDigitMaker dm;
1029                                        dm.GetRawStreamTracker();])],
1030                                     [have_muon_digitmaker_getrawstream=yes], 
1031                                       [AC_DEFINE(HAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM)])
1032     LIBS=$save_LIBS
1033   AC_MSG_RESULT([$have_muon_digitmaker_getrawstream])
1034
1035   dnl
1036   dnl Check for AliMpPad::GetPositionX/Y
1037   dnl change of implementation in MUON code
1038   dnl revision 31769, Wed Apr 1 2009
1039   dnl 
1040   have_muon_alimppad_getposition=no
1041   AC_MSG_CHECKING(for GetPosition methods of AliMpPad)
1042     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/MUON/mapping"
1043     LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
1044     LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALIMUON_LIBS"
1045     AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliMpPad.h>], 
1046                                     [AliMpPad pad;
1047                                      pad.GetPositionX();])],
1048                                     [have_muon_alimppad_getposition=yes], 
1049                                       [AC_DEFINE(HAVE_NOT_MUON_ALIMPPAD_GETPOSITION)])
1050     LIBS=$save_LIBS
1051   AC_MSG_RESULT([$have_muon_alimppad_getposition])
1052
1053   CPPFLAGS="$save_CPPFLAGS"
1054
1055   AC_LANG_POP(C++)
1056 else
1057   enable_module=$enable_muon
1058 fi
1059 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
1060 AC_MSG_CHECKING([whether to compile MUON library])
1061 AC_MSG_RESULT([$enable_module])
1062 AC_SUBST([ALIMUON_LIBS])
1063
1064 dnl ------------------------------------------------------------------
1065 AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
1066
1067 ALITRIGGER_LIBS=
1068 CHECK_HLTMODULE([trigger],
1069                 [], [$ALIROOT_CPPFLAGS],
1070                 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1071                 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
1072                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1073
1074 if test "x$enable_module" = "xmissheader"; then
1075   enable_module="no...header.missing"
1076   enable_trigger=$enable_module
1077 elif test "x$enable_module" = "xforce"; then
1078   enable_trigger="yes"
1079 else
1080   enable_trigger=$enable_module
1081 fi
1082
1083 if test "x$enable_trigger" = "xyes" ; then 
1084   AC_DEFINE(HLT_TRIGGER)
1085   ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
1086 else
1087   enable_module=$enable_trigger
1088 fi
1089 AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
1090 AC_MSG_CHECKING([whether to compile Trigger library])
1091 AC_MSG_RESULT([$enable_module])
1092 AC_SUBST([ALITRIGGER_LIBS])
1093
1094 dnl ------------------------------------------------------------------
1095 AH_TEMPLATE([HLT_GLOBAL],[hlt global library])
1096
1097 ALIGLOBAL_LIBS=
1098 CHECK_HLTMODULE([global],
1099                 [], [$ALIROOT_CPPFLAGS],
1100                 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1101                 [PHOSUtils ], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
1102                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1103
1104 if test "x$enable_module" = "xmissheader"; then
1105   enable_module="no...header.missing"
1106   enable_global=$enable_module
1107 elif test "x$enable_module" = "xforce"; then
1108   enable_global="yes"
1109 else
1110   enable_global=$enable_module
1111   if test "x$enable_global" = "xyes" ; then
1112     AC_LANG_PUSH(C++)
1113     save_CPPFLAGS="$CPPFLAGS"
1114     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
1115     AC_MSG_CHECKING([for required functions in AliESDtrack])
1116     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliESDtrack.h>], 
1117                                        [AliESDtrack t;
1118                                        t.SetGlobalChi2(0)])],
1119                                        [], 
1120                                        [enable_global="no...requires.AliRoot>v4-17-Release"])
1121     AC_MSG_RESULT([$enable_global])       
1122     AC_LANG_POP(C++)
1123     CPPFLAGS="$save_CPPFLAGS"
1124   fi
1125 fi
1126
1127 if test "x$enable_global" = "xyes" ; then 
1128   AC_DEFINE(HLT_GLOBAL)
1129   ALIGLOBAL_LIBS=$ALIHLTMODULE_LIBS
1130 else
1131   enable_module=$enable_global
1132 fi
1133 AM_CONDITIONAL(EN_HLT_GLOBAL, test x$enable_global = xyes)
1134 AC_MSG_CHECKING([whether to compile Global library])
1135 AC_MSG_RESULT([$enable_module])
1136 AC_SUBST([ALIGLOBAL_LIBS])
1137
1138 dnl ------------------------------------------------------------------
1139 AH_TEMPLATE([HLT_JET],[hlt jet library])
1140
1141 ALIFASTJET_HEADER=
1142 ALIFASTJET_INCFLAGS=
1143 ALIFASTJET_LIBS=
1144 ALIFASTJET_LDFLAGS=
1145 AC_ARG_WITH(fastjet, [installation path of the FASTJET package],
1146                      [ test "x$with_fastjet" != "xno" && export FASTJET=$with_fastjet],
1147                      [ test -n $FASTJET && with_fastjet=$FASTJET ])
1148
1149 if test "x$with_fastjet" != "x" && test "x$with_fastjet" != "xno" ; then
1150   ALIFASTJET_INCFLAGS="-I${with_fastjet}/include"
1151   ALIFASTJET_HEADER="fastjet/PseudoJet.hh"
1152   ALIFASTJET_LDFLAGS="-L${with_fastjet}/lib"
1153   ALIFASTJET_LIBS="CGAL fastjet"
1154 else
1155   with_fastjet=no
1156 fi
1157
1158 CHECK_HLTMODULE([jet],
1159         [$ALIFASTJET_HEADER], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/JETAN $ALIFASTJET_INCFLAGS],
1160         [$ALIFASTJET_LIBS], [-L$ROOTLIBDIR $ALIFASTJET_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS],
1161         [AOD ESD ANALYSIS ANALYSISalice JETAN], 
1162         [-L$ROOTLIBDIR $ALIROOT_LDFLAGS $ALIFASTJET_LDFLAGS -L$ALICE_ROOT/lib/tgt_$ALICE_TARGET],
1163         [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1164
1165 if test "x$enable_module" = "xmissheader"; then
1166   enable_module="no...header.missing"
1167   enable_jet=$enable_module
1168 elif test "x$enable_module" = "xforce"; then
1169   enable_jet="yes"
1170 else
1171   enable_jet=$enable_module
1172 fi
1173
1174 if test "x$enable_jet" = "xyes" ; then
1175   AC_DEFINE(HLT_JET)
1176   ALIJET_LIBS="$ALIHLTMODULE_LIBS"
1177   
1178   if test "x$with_fastjet" != "xno"; then
1179      AC_DEFINE(HAVE_FASTJET)
1180      AC_DEFINE(WITHFASTJET)
1181      ALIJET_LIBS="$ALIJET_LIBS -L$FASTJET_LDFLAGS"
1182   fi
1183   AC_MSG_CHECKING([compilation with FASTJET package])
1184   AC_MSG_RESULT($with_fastjet)
1185
1186 else
1187   enable_module=$enable_jet
1188 fi
1189
1190 AM_CONDITIONAL(EN_HLT_JET, test x$enable_jet = xyes)
1191 AC_MSG_CHECKING([whether to compile Jet library])
1192 AC_MSG_RESULT([$enable_module])
1193 AC_SUBST([ALIJET_LIBS])
1194
1195 dnl ------------------------------------------------------------------
1196 AH_TEMPLATE([HLT_ITS],[hlt its library])
1197
1198 ALIITS_LIBS=
1199 CHECK_HLTMODULE([its],
1200                 [AliITSCompressRawDataSDD.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS],
1201                 [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1202                 [ITSbase ITSrec ITSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
1203                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1204
1205 if test "x$enable_module" = "xmissheader"; then
1206   enable_module="no...header.missing"
1207   enable_its=$enable_module
1208 elif test "x$enable_module" = "xforce"; then
1209   enable_its="yes"
1210 else
1211   enable_its=$enable_module
1212   if test "x$enable_its" = "xyes" ; then
1213     AC_LANG_PUSH(C++)
1214     save_CPPFLAGS="$CPPFLAGS"
1215     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS"
1216     # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008
1217     # require AliVertexer::GetNominalPos()
1218     AC_MSG_CHECKING([for required functions in AliITSVertexer])
1219     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>], 
1220                                        [AliITSVertexerZ v;
1221                                        v.GetNominalPos()])],
1222                                        [], 
1223                                        [enable_its="no...requires.AliRoot>v4-13-Release"])
1224     AC_MSG_RESULT([$enable_its])       
1225     AC_LANG_POP(C++)
1226     CPPFLAGS="$save_CPPFLAGS"
1227   fi
1228 fi
1229
1230 if test "x$enable_its" = "xyes" ; then 
1231   AC_DEFINE(HLT_ITS)
1232   ALIITS_LIBS=$ALIHLTMODULE_LIBS
1233 else
1234   enable_module=$enable_its
1235 fi
1236 AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
1237 AC_MSG_CHECKING([whether to compile ITS library])
1238 AC_MSG_RESULT([$enable_module])
1239 AC_SUBST([ALIITS_LIBS])
1240
1241 dnl ------------------------------------------------------------------
1242 AH_TEMPLATE([HLT_COMP],[hlt comp library])
1243
1244 ALICOMP_LIBS=
1245 CHECK_HLTMODULE([comp],
1246                 [], [$ALIROOT_CPPFLAGS],
1247                 [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
1248                 [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
1249                 [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
1250
1251 if test "x$enable_module" = "xmissheader"; then
1252   enable_module="no...header.missing"
1253   enable_comp=$enable_module
1254 elif test "x$enable_module" = "xforce"; then
1255   enable_comp="yes"
1256 else
1257   enable_comp=$enable_module
1258 fi
1259
1260 if test "x$enable_comp" = "xyes" ; then 
1261   AC_DEFINE(HLT_COMP)
1262   ALICOMP_LIBS=$ALIHLTMODULE_LIBS
1263 else
1264   enable_module=$enable_comp
1265 fi
1266 AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
1267 AC_MSG_CHECKING([whether to compile comp library])
1268 AC_MSG_RESULT([$enable_module])
1269 AC_SUBST([ALICOMP_LIBS])
1270
1271 dnl ------------------------------------------------------------------
1272 AC_MSG_CHECKING([whether to disable AliRoot logging])
1273 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
1274 AC_ARG_ENABLE(aliroot-logging,
1275   [AC_HELP_STRING([--disable-aliroot-logging],
1276       [disable logging through AliRoot logging methods])],
1277   [],[enable_aliroot_logging=no])
1278 if test "x$have_aliroot" = "xno" ; then
1279   enable_aliroot_logging=yes # this means 'disable'
1280 fi
1281 if test "x$enable_aliroot_logging" != "xno" ; then 
1282   AC_DEFINE(NOALIROOT_LOGGING)
1283 fi
1284 AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no)
1285 AC_MSG_RESULT([$enable_aliroot_logging])
1286
1287 dnl ------------------------------------------------------------------
1288 AC_MSG_CHECKING([whether to enable saving MC data through the chain])
1289 AH_TEMPLATE([DOMC],[MC saving])
1290 AC_ARG_ENABLE(mc-saving,
1291   [AC_HELP_STRING([--enable-mc-saving],
1292       [enable saving MC data through the chain])],
1293   [],[enable_mc_saving=no])
1294 if test "x$enable_mc_saving" = "xyes" ; then 
1295   AC_DEFINE(DOMC)
1296 fi
1297 AC_MSG_RESULT([$enable_mc_saving])
1298
1299 dnl ------------------------------------------------------------------
1300 dnl certainly something old, but we keep the define
1301 AC_MSG_CHECKING([whether to use ROWHOUGH])
1302 AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
1303 AC_ARG_ENABLE(rowhough,
1304   [AC_HELP_STRING([--enable-rowhough],
1305       [use ROWHOUGH ])],
1306   [],[enable_rowhough=no])
1307 if test "x$enable_rowhough" = "xyes" ; then 
1308   AC_DEFINE(USEROWHOUGH)
1309 fi
1310 AC_MSG_RESULT([$enable_rowhough])
1311
1312 dnl ------------------------------------------------------------------
1313 dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old
1314 dnl stand-alone build system. This is most likely something old we can
1315 dnl get rid off later, or do something more reasonable. Since the define
1316 dnl needs the quotes they have to be  escaped. This works well for the
1317 dnl Makefile but not for the configure script. So we have to add the
1318 dnl defines after all the other checks.
1319 CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
1320 if test ! "x$have_aliroot" = "xno" ; then
1321   CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
1322 fi
1323
1324 dnl ------------------------------------------------------------------
1325 dnl
1326 dnl Documentation
1327 dnl
1328 AC_ARG_VAR(DOXYGEN, The Documentation Generator)
1329 AC_PATH_PROG(PERL, perl)
1330 AC_PATH_PROG(DOXYGEN, doxygen)
1331 AC_ARG_ENABLE(dot,
1332   [AC_HELP_STRING([--enable-dot],
1333       [enable dot documentation generator])],
1334   [],[enable_dot=no])
1335 HAVE_DOT=NO
1336 DOT_PATH=
1337 AC_PATH_PROG(DOT, dot)
1338 if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then
1339    HAVE_DOT=YES
1340    DOT_PATH=`dirname $DOT`
1341 fi
1342
1343 AC_MSG_CHECKING([for documentation mode])
1344 AC_ARG_ENABLE(doc,
1345   [AC_HELP_STRING([--disable-doc],
1346       [disable documentation build; monolithic build --enable-doc=mono ])],
1347   [],[enable_doc=modules])
1348
1349 if test "x$DOXYGEN" = "x" ; then
1350    enable_doc=no.doxygen
1351 elif test "x$enable_doc" = "xyes" ; then
1352    enable_doc=yes
1353 elif test ! "x$enable_doc" = "xmono" && \
1354      test ! "x$enable_doc" = "xmodules"  && \
1355      test ! "x$enable_doc" = "xno"; then
1356    enable_doc=no
1357    AC_MSG_WARN([unknown option])
1358 fi
1359 if test "x$enable_doc" = "xno" ; then
1360    enable_doc=off
1361    DOXYGEN=
1362 fi
1363
1364 AC_MSG_RESULT([$enable_doc])
1365 AM_CONDITIONAL(MONOLITHIC_DOC, test "x$enable_doc" = "xmono")
1366 AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
1367 AC_SUBST([HAVE_DOT])
1368 AC_SUBST([DOT_PATH])
1369
1370 dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src
1371 dnl echo $HAVE_SRC_SUBDIR
1372 dnl if ! test -d $HAVE_SRC_SUBDIR; then
1373 dnl   HAVE_SRC_SUBDIR=
1374 dnl fi
1375 dnl AC_SUBST([HAVE_SRC_SUBDIR])
1376
1377 dnl ------------------------------------------------------------------
1378 AC_MSG_NOTICE([---------------------------------------------- ])
1379 AC_MSG_NOTICE([                build summary                  ])
1380 AC_MSG_NOTICE([---------------------------------------------- ])
1381
1382 AC_CONFIG_FILES([Makefile 
1383                  BASE/Makefile
1384                  BASE/setenv.sh
1385                  BASE/setenv.csh
1386                  BASE/HOMER/Makefile
1387                  BASE/util/Makefile
1388                  BASE/util/test/Makefile
1389                  BASE/interface/Makefile
1390                  BASE/test/Makefile
1391                  BASE/interface/test/Makefile
1392                  doc/Makefile
1393                  doc/doxygen.conf
1394                  doc/doxymodule.conf])
1395
1396 dnl AliRoot and installation directory for libraries
1397 dnl 
1398 AC_MSG_NOTICE([AliRoot: $have_aliroot])
1399 AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
1400 if test "x$have_aliroot" != "xno"; then 
1401   AC_CONFIG_FILES([sim/Makefile  
1402                    rec/Makefile  
1403                    rec/test/Makefile     
1404                    rec/startAliEVE-barrel-tracks.sh
1405                    shuttle/Makefile
1406                    pendolino/Makefile
1407                    benchmark/Makefile
1408                    QA/Makefile
1409                    ])
1410 fi
1411 if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
1412 libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
1413 AC_MSG_NOTICE([libdir set to $libdir])
1414 fi
1415
1416 AC_MSG_NOTICE([compile sample library: $enable_sample])
1417 if test "x$enable_sample" = "xyes"; then 
1418   AC_CONFIG_FILES([SampleLib/Makefile])
1419 fi
1420
1421 AC_MSG_NOTICE([compile RCU library: $enable_rcu])
1422 if test "x$enable_rcu" = "xyes"; then 
1423   AC_CONFIG_FILES([RCU/Makefile
1424                    RCU/test/Makefile
1425                    ])
1426 fi
1427
1428 AC_MSG_NOTICE([compile TPC library: $enable_tpc])
1429 if test "x$enable_tpc" = "xyes"; then 
1430   AC_CONFIG_FILES([TPCLib/Makefile            
1431                    TPCLib/test/Makefile       
1432                    TPCLib/mapping2array.cxx     
1433                    TPCLib/EVE/Makefile
1434                    TPCLib/calibration/Makefile
1435                    ])
1436 fi
1437
1438 AC_MSG_NOTICE([compile CALO library: $enable_calo])
1439 if test "x$enable_calo" = "xyes"; then 
1440   AC_CONFIG_FILES([CALO/Makefile
1441                    CALO/test/Makefile])
1442 fi
1443
1444 AC_MSG_NOTICE([compile PHOS library: $enable_phos])
1445 if test "x$enable_phos" = "xyes"; then 
1446   AC_CONFIG_FILES([PHOS/Makefile])
1447 fi
1448
1449 AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
1450 if test "x$enable_emcal" = "xyes"; then 
1451   AC_CONFIG_FILES([EMCAL/Makefile])
1452 fi
1453
1454 AC_MSG_NOTICE([compile TRD library: $enable_trd])
1455 if test "x$enable_trd" = "xyes"; then 
1456   AC_CONFIG_FILES([TRD/Makefile])
1457 fi
1458
1459 AC_MSG_NOTICE([compile FMD library: $enable_fmd])
1460 if test "x$enable_fmd" = "xyes"; then 
1461   AC_CONFIG_FILES([FMD/Makefile])
1462 fi
1463
1464 AC_MSG_NOTICE([compile MUON library: $enable_muon])
1465 if test "x$enable_muon" = "xyes"; then 
1466   AC_CONFIG_FILES([MUON/Makefile])
1467 fi
1468
1469 AC_MSG_NOTICE([compile ITS library: $enable_its])
1470 if test "x$enable_its" = "xyes"; then 
1471   AC_CONFIG_FILES([ITS/Makefile])
1472 fi
1473
1474 AC_MSG_NOTICE([compile trigger library: $enable_trigger])
1475 if test "x$enable_trigger" = "xyes"; then 
1476   AC_CONFIG_FILES([trigger/Makefile
1477                    trigger/test/Makefile])
1478 fi
1479
1480 AC_MSG_NOTICE([compile global library: $enable_global])
1481 if test "x$enable_global" = "xyes"; then 
1482   AC_CONFIG_FILES([global/Makefile])
1483 fi
1484
1485 AC_MSG_NOTICE([compile jet library: $enable_jet])
1486 if test "x$enable_jet" = "xyes"; then 
1487   AC_CONFIG_FILES([JET/Makefile])
1488 fi
1489
1490 AC_MSG_NOTICE([compile comp library: $enable_comp])
1491 if test "x$enable_comp" = "xyes"; then 
1492   AC_CONFIG_FILES([comp/Makefile])
1493 fi
1494
1495 AC_OUTPUT
1496 dnl
1497 dnl EOF
1498 dnl
1499