+AC_MSG_CHECKING([whether to compile phos library])
+AC_MSG_RESULT([$enable_module])
+AC_SUBST([ALIPHOS_LIBS])
+
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_TRD],[hlt trd library])
+
+ALITRD_LIBS=
+CHECK_HLTMODULE([trd],
+ [], [],
+ [MLP], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
+ [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
+ [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
+
+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
+ AC_LANG_PUSH(C++)
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD"
+ AC_MSG_CHECKING([for required functions in AliTRDclusterizer])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDclusterizer.h>],
+ [AliTRDclusterizer c;
+ c.SetRawVersion(0)])],
+ [],
+ [enable_trd="no...requires.AliRoot>v4-07-Release"])
+ AC_MSG_RESULT([$enable_trd])
+ AC_LANG_POP(C++)
+ CPPFLAGS="$save_CPPFLAGS"
+ fi
+fi
+
+if test "x$enable_trd" = "xyes" ; then
+ AC_DEFINE(HLT_TRD)
+ 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_RESULT([$enable_module])
+AC_SUBST([ALITRD_LIBS])
+
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
+
+ALIMUON_LIBS=
+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_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
+
+if test "x$enable_muon" = "xyes" ; then
+ AC_DEFINE(HLT_MUON)
+ 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_RESULT([$enable_module])
+AC_SUBST([ALIMUON_LIBS])