X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2Fconfigure.ac;h=22ace9d92eb27400c1545de5e200db463529fbc2;hb=4b1c3976e861776aaec32efe206d834b5f8c5015;hp=016d2fda88a38daa31451f19e1987e0da410c067;hpb=5235c3e94c3900e2034290f1cff28dc775d57a97;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/configure.ac b/HLT/configure.ac index 016d2fda88a..22ace9d92eb 100644 --- a/HLT/configure.ac +++ b/HLT/configure.ac @@ -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.5-dev], [Matthias.Richter@ift.uib.no], alice-hlt) +AC_INIT([Alice High Level Trigger] , [0.6-dev], [Matthias.Richter@ift.uib.no], alice-hlt) dnl ------------------------------------------------------------------ dnl the package from CVS contains the old Makefiles as well. In order to @@ -26,6 +26,13 @@ AC_PROG_LIBTOOL AC_DEBUG AC_OPTIMIZATION +AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 ) + +dnl ------------------------------------------------------------------ +dnl A warning posted into the auto-generated files +dnl Does NOT concern this file ;-) +AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!" +AC_SUBST([AUTOGENERATED_WARNING]) dnl ------------------------------------------------------------------ dnl @@ -33,6 +40,46 @@ dnl Check for ROOT dnl ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])]) AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" ) +AC_SUBST([ROOTSYS]) +ROOTBINDIR=`dirname $ROOTEXEC` +AC_SUBST([ROOTBINDIR]) + +dnl test for additional required root libraries and headers +LIBS='-ldl' +if test "x$have_root" = "x1"; then + AC_LANG_PUSH(C++) + save_CPPFLAGS=$CPPFLAGS + save_LDFLAGS=$LDFLAGS + save_LIBS=$LIBS + CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done` + + # we check for the libSTEER library which is linked to + # - the ROOT libs libGeom libMinuit libVMC libEG + # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07) + # - ROOT libCint needs also libdl + # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires + # libTreePlayer.so + # - from Jan 07 libESD also depends on libXMLIO + ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO' + for CHECKLIB in $ROOT_CHECKLIBS ; do + LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}" + LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS" + AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"]) + done + + # TBuffer.h has been made pure virtual in root v5-15-02 and one + # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h) + AC_CHECK_HEADERS([TBufferFile.h]) + + # TView.h has been made pure virtual right after root v5-15-02 and one + # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D) + AC_CHECK_HEADERS([TView3D.h]) + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + AC_LANG_POP(C++) +fi dnl ------------------------------------------------------------------ # TODO: make this configurable through arguments @@ -79,31 +126,31 @@ if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then fi ALICE_TARGET=$alice_target fi + ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET} ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET} ALIROOTINCDIR=${ALICE_ROOT}/include + test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR]) test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR]) test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR]) fi AC_MSG_CHECKING([for AliRoot]) if test "x$ALICE_ROOT" != "x" \ + && test -d ${ALIROOTBINDIR} \ && test -d ${ALIROOTLIBDIR} \ && test -d ${ALIROOTINCDIR}; then have_aliroot=$ALICE_ROOT else + ALIROOTBINDIR= ALIROOTLIBDIR= ALIROOTINCDIR= fi AC_MSG_RESULT([$have_aliroot]) if test ! "x$have_aliroot" = "xno" ; then - # we check for the libSTEER library which is linked to - # - the ROOT libs libGeom libMinuit libVMC libEG - # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07) - # - ROOT libCint needs also libdl ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW" ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}" - ALIROOT_LIBS="-lESD -lGeom -lMinuit -lVMC -lEG -ldl" + ALIROOT_LIBS="-lESD $ADD_ROOTLIBS" save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS save_LIBS=$LIBS @@ -144,8 +191,33 @@ if test ! "x$have_aliroot" = "xno" ; then have_alirawdata=$CHECKLIB], [have_alirawdata=no]) ]) dnl AC_CHECK_LIB RAWDatabase - AC_MSG_CHECKING(for AliRawReader classes in RAWData libraries) - AC_MSG_RESULT($have_alirawdata) + AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries]) + AC_MSG_RESULT([$have_alirawdata]) + + dnl + dnl check whether AliLog supports notification callback + dnl + have_alilog_notification=no + AC_MSG_CHECKING([whether AliLog supports notification callback]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [AliLog::AliLogNotification fct])], + [have_alilog_notification=yes], + [AC_DEFINE(NO_ALILOG_NOTIFICATION)]) + AC_MSG_RESULT([$have_alilog_notification]) + + 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 + dnl or higher) + externaltrackparam_version=1 + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [AliExternalTrackParam trackparam; + Double_t param[[5]]; Double_t covar[[15]]; + trackparam.Set(0., 0., param, covar);])], + [externaltrackparam_version=2], + [AC_DEFINE(EXTERNALTRACKPARAM_V1)]) + AC_MSG_CHECKING(for version of AliExternalTrackParam) + AC_MSG_RESULT($externaltrackparam_version) LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" CHECKLIB=STEER @@ -199,7 +271,7 @@ if test ! "x$have_aliroot" = "xno" ; then have_tpc_mapping=no if test ! "x$have_aliroot" = "xno" ; then - # the TPCLib/AliHLTTPCRawReader needs the actual Pad layot of the TPC + # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC # which is stored in the TPC/mapping/Patchx.data files from # AliRoot version v4-04-Release (May 2006) AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available]) @@ -212,9 +284,25 @@ if test ! "x$have_aliroot" = "xno" ; then fi AC_MSG_CHECKING([for TPC mapping layout]) - AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes) AC_MSG_RESULT([$have_tpc_mapping]) - + + dnl + dnl required header files and libraries for the AliHLTPHOS library + dnl + have_alicalorawstream=no + if test ! "x$have_aliroot" = "xno" ; then + # this can not be used as AliCaloRawStream.h indirectly depends on TString.h + #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes]) + AC_MSG_CHECKING([for AliCaloRawStream.h usability]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include + #include ], + [int i])], + [AC_DEFINE(HAVE_ALICALORAWSTREAM) + have_alicalorawstream=yes], + []) + AC_MSG_RESULT([$have_alicalorawstream]) + fi + if test "x$have_aliroot" = "xno" ; then ALIROOT_CPPFLAGS= ALIROOT_LDFLAGS= @@ -223,15 +311,20 @@ if test ! "x$have_aliroot" = "xno" ; then CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS - if test ! "x$have_aliroot" = "xno" ; then - CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" - fi fi AC_LANG_POP(C++) +AC_SUBST([ALICE_ROOT]) AC_SUBST([ALIROOT_CPPFLAGS]) AC_SUBST([ALIROOT_LDFLAGS]) +AC_SUBST([ALIROOTBINDIR]) +AC_SUBST([ALIROOTLIBDIR]) AC_SUBST([ALIROOT_LIBS]) -CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" +AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes) + +HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE' +HLTBASE_LDFLAGS= +AC_SUBST([HLTBASE_CPPFLAGS]) +AC_SUBST([HLTBASE_LDFLAGS]) dnl ------------------------------------------------------------------ dnl check for the HLT PubSub Framework @@ -243,6 +336,8 @@ if test -z $with_pubsub || ! test -d $with_pubsub ; then with_pubsub=no fi AC_MSG_RESULT([$with_pubsub]) +HOMER_VERSION=1 +HOMER_LIBS= AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface]) if test "x$with_pubsub" != "xno" ; then @@ -253,30 +348,54 @@ if test "x$with_pubsub" != "xno" ; then # directory layout if test -d ${with_pubsub}/include/HOMER ; then # the 'early' location of the include files with separated HOMER sub dirs - HOMER_CPPFLAGS="-I${with_pubsub}/include/HOMER -I${with_pubsub}/include/HOMER/reader" + HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader" elif test -d ${with_pubsub}/include/Util/HOMER ; then # location for HLT Framework versions after Sep 2006 - HOMER_CPPFLAGS="-I${with_pubsub}/include/Util/HOMER" + HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER" elif test -d ${with_pubsub}/src/Util/HOMER/include ; then # fall back if include files were not installed (versions after Sep 06) - HOMER_CPPFLAGS="-I${with_pubsub}/src/Util/HOMER/include" + HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include" else # fall back if include files were not installed (versions before Sep 06) - HOMER_CPPFLAGS="-I${with_pubsub}/src/Util/HOMER/reader/include -I${with_pubsub}/src/Util/HOMER/data/include" + HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include" fi - HOMER_LDFLAGS="-L${with_pubsub}/lib/`uname -s`-`uname -m`" + HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done` + HOMER_BINDIR="${with_pubsub}/bin/`uname -s`-`uname -m`" + HOMER_LIBDIR="${with_pubsub}/lib/`uname -s`-`uname -m`" + HOMER_LDFLAGS="-L${HOMER_LIBDIR}" CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS" LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS" LIBS="$save_LIBS " with_homer=no AC_LANG_PUSH(C++) AC_CHECK_HEADER([HOMERReader.h], - [ AC_CHECK_LIB([HOMERReader],[_init],[with_homer=yes])]) + [ AC_CHECK_LIB([HOMER],[_init], + [with_homer=yes + HOMER_LIBS="-lHOMER"], + [ AC_CHECK_LIB([HOMERReader],[_init], + [with_homer=yes + HOMER_LIBS="-lHOMERReader"])]) + LIBS="$LIBS $HOMER_LIBS" + AC_MSG_CHECKING([version of HOMER library]) + dnl The Homer library has no versioning, so we do our own + dnl version description + dnl ---------------------------------------------------------------------- + dnl 1 inintial version + dnl 2 GetBlockStatusFlags added to the interface + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [HOMERReader reader("dummy", 0); + reader.GetBlockStatusFlags(0);])], + [if test $HOMER_VERSION -lt 2 ; then HOMER_VERSION=2; fi], + []) + AC_MSG_RESULT([$HOMER_VERSION]) + ]) #AC_CHECK_HEADER([HOMERReader.h]) AC_LANG_POP(C++) if test "x$with_homer" = "xno" ; then HOMER_CPPFLAGS= HOMER_LDFLAGS= + HOMER_LIBS= else + HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION" AC_DEFINE(HAVE_HOMERREADER) fi CPPFLAGS="$save_CPPFLAGS" @@ -285,6 +404,9 @@ if test "x$with_pubsub" != "xno" ; then fi AC_SUBST([HOMER_CPPFLAGS]) AC_SUBST([HOMER_LDFLAGS]) +AC_SUBST([HOMER_LIBDIR]) +AC_SUBST([HOMER_BINDIR]) +AC_SUBST([HOMER_LIBS]) dnl ------------------------------------------------------------------ AC_MSG_CHECKING([whether to impose strict coding conventions]) @@ -337,6 +459,8 @@ AC_ARG_ENABLE(phos, [],[enable_phos=yes]) if test "x$have_aliroot" = "xno" ; then enable_phos="no...requires.AliRoot" +elif ! test "x$have_alicalorawstream" = "xyes"; then + enable_phos="no...requires.AliRoot>v4-05-07" fi if test "x$enable_phos" = "xyes" ; then AC_DEFINE(HLT_PHOS) @@ -345,16 +469,33 @@ AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes) AC_MSG_RESULT([$enable_phos]) dnl ------------------------------------------------------------------ -AC_MSG_CHECKING([whether to enable HLT logging]) -AH_TEMPLATE([NOLOGGING],[disable hlt logging]) -AC_ARG_ENABLE(logging, - [AC_HELP_STRING([--enable-logging], - [enable logging])], - [],[enable_logging=yes]) -if test "x$enable_logging" != "xyes" ; then - AC_DEFINE(NOLOGGING) +AC_MSG_CHECKING([whether to compile trd library]) +AH_TEMPLATE([HLT_TRD],[hlt trd library]) +AC_ARG_ENABLE(trd, + [AC_HELP_STRING([--enable-trd], + [compile the trd library ])], + [],[enable_trd=yes]) +if test "x$have_aliroot" = "xno" ; then + enable_trd="no...requires.AliRoot" +fi +if test "x$enable_trd" = "xyes" ; then + AC_DEFINE(HLT_TRD) +fi +AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes) +AC_MSG_RESULT([$enable_trd]) + +dnl ------------------------------------------------------------------ +AC_MSG_CHECKING([whether to disable AliRoot logging]) +AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging]) +AC_ARG_ENABLE(aliroot-logging, + [AC_HELP_STRING([--disable-aliroot-logging], + [disable logging through AliRoot logging methods])], + [],[enable_aliroot_logging=no]) +if test "x$enable_aliroot_logging" != "xno" ; then + AC_DEFINE(NOALIROOT_LOGGING) fi -AC_MSG_RESULT([$enable_logging]) +AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no) +AC_MSG_RESULT([$enable_aliroot_logging]) dnl ------------------------------------------------------------------ AC_MSG_CHECKING([whether to enable saving MC data through the chain]) @@ -368,18 +509,6 @@ if test "x$enable_mc_saving" = "xyes" ; then fi AC_MSG_RESULT([$enable_mc_saving]) -dnl ------------------------------------------------------------------ -AC_MSG_CHECKING([whether to enable AliRoot NEWIO]) -AH_TEMPLATE([use_newio],[AliRoot NEWIO]) -AC_ARG_ENABLE(newio, - [AC_HELP_STRING([--enable-newio], - [enable AliRoot NEWIO ])], - [],[enable_newio=yes]) -if test "x$enable_newio" = "xyes" ; then - AC_DEFINE(use_newio) -fi -AC_MSG_RESULT([$enable_newio]) - dnl ------------------------------------------------------------------ dnl certainly something old, but we keep the define AC_MSG_CHECKING([whether to use ROWHOUGH]) @@ -393,6 +522,18 @@ if test "x$enable_rowhough" = "xyes" ; then fi AC_MSG_RESULT([$enable_rowhough]) +dnl ------------------------------------------------------------------ +dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old +dnl stand-alone build system. This is most likely something old we can +dnl get rid off later, or do something more reasonable. Since the define +dnl needs the quotes they have to be escaped. This works well for the +dnl Makefile but not for the configure script. So we have to add the +dnl defines after all the other checks. +CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" +if test ! "x$have_aliroot" = "xno" ; then + CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" +fi + dnl ------------------------------------------------------------------ dnl dnl Documentation @@ -421,11 +562,15 @@ fi dnl ------------------------------------------------------------------ AC_CONFIG_FILES([Makefile BASE/Makefile + BASE/setenv.sh + BASE/setenv.csh + BASE/util/Makefile SampleLib/Makefile TPCLib/Makefile TPCLib/mapping2array.cxx TPCLib/OnlineDisplay/Makefile PHOS/Makefile + TRD/Makefile doc/Makefile doc/doxygen.conf])