dnl Online Monitoring GUI
dnl
dnl ------------------------------------------------------------------
-AC_INIT([Alice HLT Online Monitoring GUI] , [0.2], [thaeder@kip.uni-heidelberg.de], AliHLTGUI)
+AC_INIT([Alice HLT Online Monitoring GUI] , [1.5], [thaeder@kip.uni-heidelberg.de], AliHLTGUI)
dnl ------------------------------------------------------------------
AC_CANONICAL_SYSTEM
dnl ------------------------------------------------------------------
dnl check for the HLT PubSub Framework
-AC_ARG_WITH(pubsub, [ --with-pubsub top of the HLT PubSub framework],
+AC_MSG_CHECKING([for HLT PubSub Framework])
+AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework],
[],
[ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ])
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])
-save_CPPFLAGS=$CPPFLAGS
-save_LDFLAGS=$LDFLAGS
-save_LIBS=$LIBS
if test "x$with_pubsub" != "xno" ; then
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ save_LIBS=$LIBS
# currently the different versions of the HLT PubSub framework have a different
# directory layout
- if test -d ${with_pubsub}/include/Util/HOMER ; then
- HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER ${with_pubsub}/include/Util/HOMER/reader"
+ if test -d ${with_pubsub}/include/HOMER ; then
+ # the 'early' location of the include files with separated HOMER sub dirs
+ 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_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_INCDIRS="${with_pubsub}/src/Util/HOMER/include"
else
+ # fall back if include files were not installed (versions before Sep 06)
HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include"
fi
- HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -I$i ; done`
+ HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done`
HOMER_LIBDIR=${with_pubsub}/lib/`uname -s`-`uname -m`
HOMER_LDFLAGS="-L$HOMER_LIBDIR"
+ CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS $ALIROOT_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS $ALIROOT_LDFLAGS"
+ LIBS="$save_LIBS $ALIROOT_LIBS"
+ with_homer=no
+ AC_LANG_PUSH(C++)
+ AC_CHECK_HEADER([HOMERReader.h],
+ [ 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.h>],
+ [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"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
fi
-CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS"
-LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS"
-LIBS="$save_LIBS -ldl"
-with_homer=no
-AC_LANG_PUSH(C++)
-AC_CHECK_HEADER([HOMERReader.h],
- [ AC_CHECK_LIB([HOMERReader],[_init],[with_homer=yes
- HOMER_LIBS="-lHOMERReader"])])
-AC_LANG_POP(C++)
-if test "x$with_homer" = "xno" ; then
- HOMER_INCDIRS=
- HOMER_LDFLAGS=
- HOMER_LIBS=
-else
- AC_DEFINE(HAVE_HOMERREADER)
-fi
-CPPFLAGS="$save_CPPFLAGS"
-LDFLAGS="$save_LDFLAGS"
-LIBS="$save_LIBS"
-
test "x$with_homer" != "xyes" && \
test "x$enable_strict" != "xno" && \
AC_ERROR([Stop! The package needs the HOMER library.
Use --with-pubsub option to point to the HLT PubSub installation])
AC_SUBST([HOMER_INCDIRS])
AC_SUBST([HOMER_LIBDIR])
+
+AC_SUBST([HOMER_CPPFLAGS])
AC_SUBST([HOMER_LDFLAGS])
+AC_SUBST([HOMER_LIBS])
+
dnl ------------------------------------------------------------------
dnl Check for the AliHLTTPCLibrary
AC_ARG_WITH(alihlt, [ --with-alihlt top of the AliRoot HLT module],
[],
[ test -n $ALIHLT_PREFIX && with_alihlt=$ALIHLT_PREFIX])
-AC_MSG_NOTICE([$with_alihlt])
if ! test -z ${with_alihlt} \
&& test -d ${with_alihlt} \
&& test "x${with_alihlt}" != "x$ALICE_ROOT" ; then