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