]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/configure.ac
AliESDCaloCluster.cxx,.h: Removed fM11 and related getter and setter,
[u/mrichter/AliRoot.git] / HLT / configure.ac
index 505bf03f45ee0b26998ac5d112e565cfa6b47f01..19f140e6397be566d5ac7f56d22d59ab10538e36 100644 (file)
@@ -5,7 +5,20 @@ dnl template for the configuration script for the Alice HLT
 dnl framework and components
 dnl 
 dnl ------------------------------------------------------------------
-AC_INIT([Alice High Level Trigger] , [0.9-dev], [Matthias.Richter@ift.uib.no], alice-hlt)
+
+dnl Take either the AliRoot tag as version id or the current revision
+AC_INIT([Alice High Level Trigger] , 
+       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`; \
+                   revision=`svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | cut -d '/' -f 4`; \
+                   if test "x$url" != "x"; then echo -n $url; \
+                   elif test "x$revision" != "x"; then echo -n $revision ; \
+                   elif test -e .revision && test x`cat .revision` != x; then \
+                      cat .revision; \
+                   else \
+                      echo -n invalid-version; \
+                   fi]),
+       [Matthias.Richter@ift.uib.no], 
+       [alice-hlt])
 
 dnl ------------------------------------------------------------------
 dnl the package from CVS contains the old Makefiles as well. In order to
@@ -92,6 +105,9 @@ ALIHLT_USEPACKAGE=ALIROOT
 AC_DEFINE(use_aliroot)
 AC_DEFINE(use_root)
 CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
+save_CPPFLAGS=$CPPFLAGS
+save_LDFLAGS=$LDFLAGS
+save_LIBS=$LIBS
 
 dnl ------------------------------------------------------------------
 dnl check for AliRoot features
@@ -178,7 +194,6 @@ if test ! "x$have_aliroot" = "xno" ; then
         CHECKLIB=RAWDatarec
         AC_CHECK_LIB([$CHECKLIB],[_init],
                [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
-               AC_DEFINE(HAVE_ALIRAWDATA)
                have_alirawdata=$CHECKLIB])],
        [# second pass with -RAWData
         CHECKLIB="-lRAWData"
@@ -191,8 +206,7 @@ if test ! "x$have_aliroot" = "xno" ; then
                                       AliRawReaderFile freader;
                                       AliRawReaderDate dreader(NULL,0);
                                       AliRawReaderRoot rreader(NULL,0);])],
-                                     [AC_DEFINE(HAVE_ALIRAWDATA)
-                                      ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
+                                     [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
                                       have_alirawdata=$CHECKLIB], 
                                      [have_alirawdata=no])
        ]) dnl AC_CHECK_LIB RAWDatabase
@@ -238,6 +252,19 @@ if test ! "x$have_aliroot" = "xno" ; then
     ALIROOT_LIBS=
   fi
 
+  dnl
+  dnl ESD copy function added May 9 2008 rev 25667
+  dnl
+  have_esd_copy=no
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>],
+                                 [AliESDEvent esd1;
+                                  AliESDEvent esd2;
+                                  esd2=esd1;])],
+                 [have_esd_copy=yes], 
+                [AC_DEFINE(HAVE_NOT_ESD_COPY)])
+  AC_MSG_CHECKING(for ESD assignment operator)
+  AC_MSG_RESULT([$have_esd_copy])
+
   dnl
   dnl required header files and libraries for modules
   dnl
@@ -245,7 +272,7 @@ if test ! "x$have_aliroot" = "xno" ; then
     # the HLTTPCLib needs to link agains TPCbase and TPCrec
     # TPC library for AliTPCParam and AliSimDigits used in 
     # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx
-    # fram May 07 TPCbase depends on libGui.so
+    # from May 07 TPCbase depends on libGui.so
     CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC"
     have_alitpc=yes
     AC_MSG_CHECKING(for required classes in TPC libraries)
@@ -270,7 +297,7 @@ if test ! "x$have_aliroot" = "xno" ; then
                                      [have_alitpc=no
                                       ALITPC_LIBS= ])
     fi
-    AC_MSG_RESULT($have_alitpc)
+    AC_MSG_RESULT([$have_alitpc])
   fi
   AC_CHECK_HEADERS([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])
   AC_CHECK_HEADERS([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)])
@@ -292,15 +319,6 @@ if test ! "x$have_aliroot" = "xno" ; then
   AC_MSG_CHECKING([for TPC mapping layout])
   AC_MSG_RESULT([$have_tpc_mapping])
 
-  if test ! "x$have_alirawdata" = "xno" ; then
-    # check for header files needed by the TPCLib/AliHLTTPCDigitReaderPacket
-    # the header file has been moved to the TPC module
-    CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS  -I${ALICE_ROOT}/TPC"
-    # AliRawReaderMemory.h AliRawReaderFile.h already checked
-    #AC_CHECK_HEADERS([AliRawReaderMemory.h AliRawReaderFile.h AliTPCRawStream.h])
-    AC_CHECK_HEADERS([AliTPCRawStream.h])
-  fi
-
   dnl
   dnl Check for the interface of AliExternalTrackParam which has been changed
   dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
@@ -318,7 +336,7 @@ if test ! "x$have_aliroot" = "xno" ; then
   CPPFLAGS=$save_CPPFLAGS
   LDFLAGS=$save_LDFLAGS
   LIBS=$save_LIBS
-fi
+fi # if test ! "x$have_aliroot" = "xno"
 
 AC_LANG_POP(C++)
 AC_SUBST([ALICE_ROOT])
@@ -453,6 +471,12 @@ AC_SUBST([HOMER_LIBDIR])
 AC_SUBST([HOMER_BINDIR])
 AC_SUBST([HOMER_LIBS])
 
+dnl ------------------------------------------------------------------
+AC_ARG_ENABLE(all,
+  [AC_HELP_STRING([--disable-all],
+      [disable all detector modules, individual modules can be switched on by --enable-det])],
+  [disable_all=yes],[])
+
 dnl ------------------------------------------------------------------
 AC_MSG_CHECKING([whether to impose strict coding conventions])
 AC_ARG_ENABLE(strict,
@@ -460,7 +484,7 @@ AC_ARG_ENABLE(strict,
       [disable coding convention checks ])],
   [],[enable_strict=yes])
 if test "x$enable_strict" = "xyes" ; then
-   CPPFLAGS="$CPPFLAGS -Weffc++"
+   CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall"
 fi
 AC_MSG_RESULT([$enable_strict])
 
@@ -508,7 +532,8 @@ dnl ------------------------------------------------------------------
 AH_TEMPLATE([HLT_TPC],[hlt tpc library])
 
 CHECK_HLTMODULE([tpc],
-               [], [],
+               [AliTPCRawStream.h], 
+               [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC],
                [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
                [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
                [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
@@ -529,10 +554,56 @@ if test "x$enable_tpc" = "xyes" ; then
   AC_DEFINE(HLT_TPC)
 fi
 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
-AC_MSG_CHECKING([whether to compile tpc library])
+AC_MSG_CHECKING([whether to compile TPC library])
 AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALITPC_LIBS])
 
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_RCU],[hlt rcu library])
+
+CHECK_HLTMODULE([rcu],
+               [AliAltroDecoder.h], 
+               [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW],
+               [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
+               [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
+               [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
+
+if test "x$enable_module" = "xmissheader"; then
+  enable_module="no...missing.headers"
+  enable_rcu="no...missing.headers"
+elif test "x$have_alircu" = "xno" ; then
+  enable_module="no...requires.AliRoot.RAW.libraries"
+  enable_rcu="no...requires.AliRoot.RAW.libraries"
+elif test "x$enable_module" = "xforce"; then
+  enable_rcu="yes"
+else
+  AC_LANG_PUSH(C++)
+  save_CPPFLAGS=$CPPFLAGS
+  save_LDFLAGS=$LDFLAGS
+  save_LIBS=$LIBS
+  CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
+  LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
+  LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>], 
+                                  [AliAltroDecoder decoder;
+                                 decoder.CopyBackward(NULL, 0);])],
+                                  [enable_rcu=$enable_module], 
+                                 [enable_module="no...requires.AliRoot>v4-10-Release"
+                                  enable_rcu="no...requires.AliRoot>v4-10-Release"])
+  CPPFLAGS=$save_CPPFLAGS
+  LDFLAGS=$save_LDFLAGS
+  LIBS=$save_LIBS
+  AC_LANG_POP(C++)
+fi
+
+if test "x$enable_rcu" = "xyes" ; then 
+  AC_DEFINE(HLT_RCU)
+fi
+AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes)
+AC_MSG_CHECKING([whether to compile RCU library])
+AC_MSG_RESULT([$enable_module])
+AC_SUBST([ALIRCU_LIBS])
+
 dnl ------------------------------------------------------------------
 AH_TEMPLATE([HLT_PHOS],[hlt phos library])
   
@@ -540,7 +611,7 @@ ALIPHOS_LIBS=
 CHECK_HLTMODULE([phos],
                [], [$ALIROOT_CPPFLAGS],
                [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS],
-               [PHOSbase PHOSrec PHOSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
+               [PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
                [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
 
 if test "x$enable_module" = "xmissheader"; then
@@ -579,7 +650,7 @@ if test "x$enable_phos" = "xyes" ; then
   ALIPHOS_LIBS=$ALIHLTMODULE_LIBS
 fi
 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
-AC_MSG_CHECKING([whether to compile phos library])
+AC_MSG_CHECKING([whether to compile PHOS library])
 AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALIPHOS_LIBS])
 
@@ -621,7 +692,7 @@ if test "x$enable_trd" = "xyes" ; then
   ALITRD_LIBS=$ALIHLTMODULE_LIBS
 fi
 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
-AC_MSG_CHECKING([whether to compile trd library])
+AC_MSG_CHECKING([whether to compile TRD library])
 AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALITRD_LIBS])
 
@@ -630,13 +701,8 @@ AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
 
 ALIMUON_LIBS=
 CHECK_HLTMODULE([dimuon],
-<<<<<<< configure.ac
-               [AliMUONTriggerIO.h AliMUONVCluster.h], 
-               [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON],
-=======
                [AliMpExMap.h AliMUONTriggerIO.h], 
                [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
->>>>>>> 1.54
                [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
                [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
                [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
@@ -655,10 +721,66 @@ if test "x$enable_muon" = "xyes" ; then
   ALIMUON_LIBS=$ALIHLTMODULE_LIBS
 fi
 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
-AC_MSG_CHECKING([whether to compile muon library])
+AC_MSG_CHECKING([whether to compile MUON library])
 AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALIMUON_LIBS])
 
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library])
+
+ALITRIGGER_LIBS=
+CHECK_HLTMODULE([trigger],
+               [], [$ALIROOT_CPPFLAGS],
+               [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
+               [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
+               [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
+
+if test "x$enable_module" = "xmissheader"; then
+  enable_module="no...header.missing"
+  enable_trigger="no...header.missing"
+elif test "x$enable_module" = "xforce"; then
+  enable_trigger="yes"
+else
+  enable_trigger=$enable_module
+fi
+
+if test "x$enable_trigger" = "xyes" ; then 
+  AC_DEFINE(HLT_TRIGGER)
+  ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS
+fi
+AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes)
+AC_MSG_CHECKING([whether to compile Trigger library])
+AC_MSG_RESULT([$enable_module])
+AC_SUBST([ALITRIGGER_LIBS])
+
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_ITS],[hlt its library])
+
+ALIITS_LIBS=
+CHECK_HLTMODULE([its],
+               [], [$ALIROOT_CPPFLAGS],
+               [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
+               [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
+               [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
+
+if test "x$enable_module" = "xmissheader"; then
+  enable_module="no...header.missing"
+  enable_its="no...header.missing"
+elif test "x$enable_module" = "xforce"; then
+  enable_its="yes"
+else
+  enable_its=$enable_module
+fi
+
+if test "x$enable_its" = "xyes" ; then 
+  AC_DEFINE(HLT_ITS)
+  ALIITS_LIBS=$ALIHLTMODULE_LIBS
+fi
+AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes)
+AC_MSG_CHECKING([whether to compile ITS library])
+AC_MSG_RESULT([$enable_module])
+AC_SUBST([ALIITS_LIBS])
+
 dnl ------------------------------------------------------------------
 AH_TEMPLATE([HLT_COMP],[hlt comp library])
 
@@ -770,13 +892,10 @@ dnl fi
 dnl AC_SUBST([HAVE_SRC_SUBDIR])
 
 dnl ------------------------------------------------------------------
-dnl inatallation directory for libraries
-dnl 
-if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
-libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
-AC_MSG_NOTICE([libdir set to $libdir])
-fi
-dnl ------------------------------------------------------------------
+AC_MSG_NOTICE([---------------------------------------------- ])
+AC_MSG_NOTICE([                build summary                  ])
+AC_MSG_NOTICE([---------------------------------------------- ])
+
 AC_CONFIG_FILES([Makefile 
                 BASE/Makefile
                 BASE/setenv.sh
@@ -784,20 +903,77 @@ AC_CONFIG_FILES([Makefile
                 BASE/HOMER/Makefile
                 BASE/util/Makefile
                 BASE/interface/Makefile
-                sim/Makefile
-                rec/Makefile
-                SampleLib/Makefile
-                TPCLib/Makefile
-                TPCLib/mapping2array.cxx
-                TPCLib/OnlineDisplay/Makefile
-                PHOS/Makefile
-                TRD/Makefile
-                MUON/Makefile
-                trigger/Makefile
-                comp/Makefile
+                BASE/test/Makefile
                 doc/Makefile
-                doc/doxygen.conf])
+                doc/doxygen.conf
+                doc/doxymodule.conf])
 
+dnl AliRoot and installation directory for libraries
+dnl 
+AC_MSG_NOTICE([AliRoot: $have_aliroot])
+AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" )
+if test "x$have_aliroot" != "xno"; then 
+  AC_CONFIG_FILES([sim/Makefile         
+                  rec/Makefile  
+                  rec/test/Makefile     
+                  shuttle/Makefile
+                  ])
+fi
+if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
+libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
+AC_MSG_NOTICE([libdir set to $libdir])
+fi
+
+AC_MSG_NOTICE([compile sample library: $enable_sample])
+if test "x$enable_sample" = "xyes"; then 
+  AC_CONFIG_FILES([SampleLib/Makefile])
+fi
+
+AC_MSG_NOTICE([compile RCU library: $enable_rcu])
+if test "x$enable_rcu" = "xyes"; then 
+  AC_CONFIG_FILES([RCU/Makefile
+                  RCU/test/Makefile
+                  ])
+fi
+
+AC_MSG_NOTICE([compile TPC library: $enable_tpc])
+if test "x$enable_tpc" = "xyes"; then 
+  AC_CONFIG_FILES([TPCLib/Makefile           
+                  TPCLib/test/Makefile       
+                  TPCLib/mapping2array.cxx     
+                  TPCLib/OnlineDisplay/Makefile
+                  ])
+fi
+
+AC_MSG_NOTICE([compile PHOS library: $enable_phos])
+if test "x$enable_phos" = "xyes"; then 
+  AC_CONFIG_FILES([PHOS/Makefile])
+fi
+
+AC_MSG_NOTICE([compile TRD library: $enable_trd])
+if test "x$enable_trd" = "xyes"; then 
+  AC_CONFIG_FILES([TRD/Makefile])
+fi
+
+AC_MSG_NOTICE([compile MUON library: $enable_muon])
+if test "x$enable_muon" = "xyes"; then 
+  AC_CONFIG_FILES([MUON/Makefile])
+fi
+
+AC_MSG_NOTICE([compile ITS library: $enable_its])
+if test "x$enable_its" = "xyes"; then 
+  AC_CONFIG_FILES([ITS/Makefile])
+fi
+
+AC_MSG_NOTICE([compile trigger library: $enable_trigger])
+if test "x$enable_trigger" = "xyes"; then 
+  AC_CONFIG_FILES([trigger/Makefile])
+fi
+
+AC_MSG_NOTICE([compile comp library: $enable_comp])
+if test "x$enable_comp" = "xyes"; then 
+  AC_CONFIG_FILES([comp/Makefile])
+fi
 
 AC_OUTPUT
 dnl