+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_ZDC],[hlt zdc library])
+
+ALIZDC_LIBS=$ALIHLTMODULE_LIBS
+CHECK_HLTMODULE([zdc],
+ [], [$ALIROOT_CPPFLAGS],
+ [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
+ [ZDCbase ZDCrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS],
+ [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
+
+if test "x$enable_module" = "xmissheader"; then
+ enable_module="no...missing.headers"
+ enable_zdc=$enable_module
+elif test "x$enable_module" = "xforce"; then
+ enable_zdc="yes"
+else
+ enable_zdc=$enable_module
+
+ if test "x$enable_zdc" = "xyes" ; then
+ AC_LANG_PUSH(C++)
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ZDC"
+
+
+ # AliZDCReconstructor::GetZDCESDData() is needed, requires revision 43770, Wed Sep 22 2010
+ have_alizdcreconstructor_r43770=no
+ AC_MSG_CHECKING([checking for AliZDCReconstructor::GetZDCESDData() r43770])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliZDCReconstructor.h>],
+ [AliZDCReconstructor rec;
+ rec.GetZDCESDData()])],
+ [have_alizdcreconstructor_r43770=yes],
+ [AC_DEFINE(HAVE_NOT_ALIZDCRECONSTRUCTOR_r43770)])
+ if test "x$have_alizdcreconstructor_r43770" != "xyes"; then
+ enable_zdc="no...requires.r43770"
+ fi
+ AC_MSG_RESULT([$have_alizdcreconstructor_r43770])
+
+ AC_LANG_POP(C++)
+ CPPFLAGS="$save_CPPFLAGS"
+ fi
+
+fi
+
+if test "x$enable_zdc" = "xyes" ; then
+ AC_DEFINE(HLT_ZDC)
+ ALIZDC_LIBS=$ALIHLTMODULE_LIBS
+else
+ enable_module=$enable_zdc
+fi
+AM_CONDITIONAL(EN_HLT_ZDC, test x$enable_zdc = xyes)
+AC_MSG_CHECKING([whether to compile ZDC library])
+AC_MSG_RESULT([$enable_module])
+AC_SUBST([ALIZDC_LIBS])
+