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