]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/configure.ac
coding conventions and compilation warnings
[u/mrichter/AliRoot.git] / HLT / configure.ac
index d0fa92afd3f450ddb4e8aa44f777ad46eadbb219..485cbc3b9c4cabb61644fa01515d098d60e33d69 100644 (file)
@@ -5,7 +5,7 @@ dnl template for the configuration script for the Alice HLT
 dnl framework and components
 dnl 
 dnl ------------------------------------------------------------------
-AC_INIT([Alice High Level Trigger] , [0.8-dev], [Matthias.Richter@ift.uib.no], alice-hlt)
+AC_INIT([Alice High Level Trigger] , [0.9-dev], [Matthias.Richter@ift.uib.no], alice-hlt)
 
 dnl ------------------------------------------------------------------
 dnl the package from CVS contains the old Makefiles as well. In order to
@@ -178,7 +178,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 +190,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
@@ -245,7 +243,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)
@@ -292,15 +290,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
@@ -456,11 +445,11 @@ AC_SUBST([HOMER_LIBS])
 dnl ------------------------------------------------------------------
 AC_MSG_CHECKING([whether to impose strict coding conventions])
 AC_ARG_ENABLE(strict,
-  [AC_HELP_STRING([--enable-strict],
-      [enable coding convention checks ])],
-  [],[enable_strict=no])
+  [AC_HELP_STRING([--disable-strict],
+      [disable coding convention checks ])],
+  [],[enable_strict=yes])
 if test "x$enable_strict" = "xyes" ; then
-   CPPFLAGS="$CPPFLAGS -Weffc++"
+   CPPFLAGS="$CPPFLAGS -Weffc++ -Wall"
 fi
 AC_MSG_RESULT([$enable_strict])
 
@@ -508,15 +497,20 @@ 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])
 
-if test "x$enable-module" = "xmissheader"; then
+if test "x$enable_module" = "xmissheader"; then
+  enable_module="no...missing.headers"
   enable_tpc="no...missing.headers"
 elif test "x$have_alitpc" = "xno" ; then
+  enable_module="no...requires.AliRoot.TPC.libraries"
   enable_tpc="no...requires.AliRoot.TPC.libraries"
+elif test "x$enable_module" = "xforce"; then
+  enable_tpc="yes"
 else
   enable_tpc=$enable_module
 fi
@@ -526,9 +520,55 @@ if test "x$enable_tpc" = "xyes" ; then
 fi
 AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
 AC_MSG_CHECKING([whether to compile tpc library])
-AC_MSG_RESULT([$enable_tpc])
+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])
   
@@ -539,8 +579,11 @@ CHECK_HLTMODULE([phos],
                [PHOSbase PHOSrec PHOSsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
                [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
 
-if test "x$enable-module" = "xmissheader"; then
+if test "x$enable_module" = "xmissheader"; then
+  enable_module="no...requires.AliRoot>v4-05-07"
   enable_phos="no...requires.AliRoot>v4-05-07"
+elif test "x$enable_module" = "xforce"; then
+  enable_phos="yes"
 else
   have_alicalorawstream=no
   if test ! "x$have_aliroot" = "xno" ; then
@@ -573,9 +616,12 @@ if test "x$enable_phos" = "xyes" ; then
 fi
 AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes)
 AC_MSG_CHECKING([whether to compile phos library])
-AC_MSG_RESULT([$enable_phos])
+AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALIPHOS_LIBS])
 
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_TRD],[hlt trd library])
+  
 ALITRD_LIBS=
 CHECK_HLTMODULE([trd],
                [], [],
@@ -583,8 +629,11 @@ CHECK_HLTMODULE([trd],
                [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
                [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
 
-if test "x$enable-module" = "xmissheader"; then
+if test "x$enable_module" = "xmissheader"; then
+  enable_module="no...requires.AliRoot>v4-07-Release"
   enable_trd="no...requires.AliRoot>v4-07-Release"
+elif test "x$enable_module" = "xforce"; then
+  enable_trd="yes"
 else
   enable_trd=$enable_module
   if test "x$enable_trd" = "xyes" ; then
@@ -609,21 +658,25 @@ if test "x$enable_trd" = "xyes" ; then
 fi
 AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes)
 AC_MSG_CHECKING([whether to compile trd library])
-AC_MSG_RESULT([$enable_trd])
+AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALITRD_LIBS])
 
 dnl ------------------------------------------------------------------
 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
 
 ALIMUON_LIBS=
-CHECK_HLTMODULE([muon],
-               [AliMUONVCluster.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON],
+CHECK_HLTMODULE([dimuon],
+               [AliMpExMap.h AliMUONTriggerIO.h], 
+               [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping],
                [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
                [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
                [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
 
 if test "x$enable_module" = "xmissheader"; then
-  enable_muon="no...requires.AliRoot>v4-07-Release"
+  enable_module="no...requires.AliRoot>=v4-08-Release"
+  enable_muon="no...requires.AliRoot>=v4-08-Release"
+elif test "x$enable_module" = "xforce"; then
+  enable_muon="yes"
 else
   enable_muon=$enable_module
 fi
@@ -634,9 +687,37 @@ if test "x$enable_muon" = "xyes" ; then
 fi
 AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes)
 AC_MSG_CHECKING([whether to compile muon library])
-AC_MSG_RESULT([$enable_muon])
+AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALIMUON_LIBS])
 
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_COMP],[hlt comp library])
+
+ALICOMP_LIBS=
+CHECK_HLTMODULE([comp],
+               [], [$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_comp="no...header.missing"
+elif test "x$enable_module" = "xforce"; then
+  enable_comp="yes"
+else
+  enable_comp=$enable_module
+fi
+
+if test "x$enable_comp" = "xyes" ; then 
+  AC_DEFINE(HLT_COMP)
+  ALICOMP_LIBS=$ALIHLTMODULE_LIBS
+fi
+AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
+AC_MSG_CHECKING([whether to compile comp library])
+AC_MSG_RESULT([$enable_module])
+AC_SUBST([ALICOMP_LIBS])
+
 dnl ------------------------------------------------------------------
 AC_MSG_CHECKING([whether to disable AliRoot logging])
 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
@@ -734,17 +815,23 @@ AC_CONFIG_FILES([Makefile
                 BASE/HOMER/Makefile
                 BASE/util/Makefile
                 BASE/interface/Makefile
+                BASE/test/Makefile
                 sim/Makefile
                 rec/Makefile
+                shuttle/Makefile
                 SampleLib/Makefile
                 TPCLib/Makefile
                 TPCLib/mapping2array.cxx
                 TPCLib/OnlineDisplay/Makefile
+                RCU/Makefile
                 PHOS/Makefile
                 TRD/Makefile
                 MUON/Makefile
+                trigger/Makefile
+                comp/Makefile
                 doc/Makefile
-                doc/doxygen.conf])
+                doc/doxygen.conf
+                doc/doxymodule.conf])
 
 
 AC_OUTPUT