stand-alone compilation converted to autotools; doxygen setup added for documentation...
[u/mrichter/AliRoot.git] / HLT / configure.ac
CommitLineData
b521659f 1dnl -*- mode: autoconf -*-
2dnl
3dnl $Id$
4dnl template for the configuration script for the Alice HLT
5dnl framework and components
6dnl
7dnl ------------------------------------------------------------------
8AC_INIT([Alice High Level Trigger] , [0.1], [Matthias.Richter@ift.uib.no], alice-hlt)
9
10dnl ------------------------------------------------------------------
11dnl the package from CVS contains the old Makefiles as well. In order to
12dnl prevent them from becoming overwritten, we require a separate build
13dnl directory
14if test "`dirname $0`" = "." ; then
15 AC_ERROR([please run the script from a separate build directory])
16fi
17
18dnl ------------------------------------------------------------------
19AC_CANONICAL_SYSTEM
20AC_PREFIX_DEFAULT(${PWD})
21AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx)
22AM_INIT_AUTOMAKE
23AC_PROG_CC
24AC_PROG_CXX
25AC_PROG_LIBTOOL
26
27AC_DEBUG
28AC_OPTIMIZATION
29
30dnl ------------------------------------------------------------------
31dnl
32dnl Check for ROOT
33dnl
34ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
35AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
36
37dnl ------------------------------------------------------------------
38# TODO: make this configurable through arguments
39#Define whether you want to run with ALIROOT or only ROOT
40AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment])
41ALIHLT_USEPACKAGE=ALIROOT
42#ALIHLT_USEPACKAGE=ROOT
43#ALIHLT_USEPACKAGE=STANDALONE
44AC_DEFINE(use_aliroot)
45AC_DEFINE(use_root)
46CPPFLAGS="$CPPFLAGS -DROOTVERSION=`${ROOTCONF} --version`"
47CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=0"
48CPPFLAGS="$CPPFLAGS -I${ROOTINCDIR}"
49
50dnl ------------------------------------------------------------------
51AC_MSG_CHECKING([whether to compile sample library])
52AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
53AC_ARG_ENABLE(sample,
54 [AC_HELP_STRING([--enable-sample],
55 [compile the sample library ])],
56 [],[enable_sample=yes])
57if test "x$enable_sample" = "xyes" ; then
58 AC_DEFINE(HLT_SAMPLE)
59fi
60AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
61AC_MSG_RESULT([$enable_sample])
62
63dnl ------------------------------------------------------------------
64AC_MSG_CHECKING([whether to compile tpc library])
65AH_TEMPLATE([HLT_TPC],[hlt tpc library])
66AC_ARG_ENABLE(tpc,
67 [AC_HELP_STRING([--enable-tpc],
68 [compile the tpc library ])],
69 [],[enable_tpc=yes])
70if test "x$enable_tpc" = "xyes" ; then
71 AC_DEFINE(HLT_TPC)
72fi
73AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
74AC_MSG_RESULT([$enable_tpc])
75
76dnl ------------------------------------------------------------------
77AC_MSG_CHECKING([whether to enable HLT logging])
78AH_TEMPLATE([NOLOGGING],[disable hlt logging])
79AC_ARG_ENABLE(logging,
80 [AC_HELP_STRING([--enable-logging],
81 [enable logging])],
82 [],[enable_logging=yes])
83if test "x$enable_logging" != "xyes" ; then
84 AC_DEFINE(NOLOGGING)
85fi
86AC_MSG_RESULT([$enable_logging])
87
88dnl ------------------------------------------------------------------
89AC_MSG_CHECKING([whether to enable saving MC data through the chain])
90AH_TEMPLATE([DOMC],[MC saving])
91AC_ARG_ENABLE(mc-saving,
92 [AC_HELP_STRING([--enable-mc-saving],
93 [enable saving MC data through the chain])],
94 [],[enable_mc_saving=no])
95if test "x$enable_mc_saving" = "xyes" ; then
96 AC_DEFINE(DOMC)
97fi
98AC_MSG_RESULT([$enable_mc_saving])
99
100dnl ------------------------------------------------------------------
101# TODO: get AliRoot version during configure
102#Switch on ALIROOT version detection by cvs command
103#ifeq ($(ALIHLT_ALIDETECT),true)
104#USECVS = 1
105#endif
106
107dnl ------------------------------------------------------------------
108AC_MSG_CHECKING([whether to enable AliRoot NEWIO])
109AH_TEMPLATE([use_newio],[AliRoot NEWIO])
110AC_ARG_ENABLE(newio,
111 [AC_HELP_STRING([--enable-newio],
112 [enable AliRoot NEWIO ])],
113 [],[enable_newio=yes])
114if test "x$enable_newio" = "xyes" ; then
115 AC_DEFINE(use_newio)
116fi
117AC_MSG_RESULT([$enable_newio])
118
119dnl ------------------------------------------------------------------
120dnl certainly something old, but we keep the define
121AC_MSG_CHECKING([whether to use ROWHOUGH])
122AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
123AC_ARG_ENABLE(rowhough,
124 [AC_HELP_STRING([--enable-rowhough],
125 [use ROWHOUGH ])],
126 [],[enable_rowhough=no])
127if test "x$enable_rowhough" = "xyes" ; then
128 AC_DEFINE(USEROWHOUGH)
129fi
130AC_MSG_RESULT([$enable_rowhough])
131
132dnl ------------------------------------------------------------------
133dnl
134dnl Documentation
135dnl
136AC_ARG_VAR(DOXYGEN, The Documentation Generator)
137AC_PATH_PROG(PERL, perl)
138AC_PATH_PROG(DOXYGEN, doxygen)
139AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
140HAVE_DOT=NO
141DOT_PATH=
142AC_PATH_PROG(DOT, dot)
143if ! test "x$DOT" = "x" ; then
144 HAVE_DOT=YES
145 DOT_PATH=`dirname $DOT`
146fi
147AC_SUBST([HAVE_DOT])
148AC_SUBST([DOT_PATH])
149
150dnl ------------------------------------------------------------------
151AC_CONFIG_FILES([Makefile
152 BASE/Makefile
153 SampleLib/Makefile
154 TPCLib/Makefile
155 TPCLib/Ref/Makefile
156 src/Makefile
157 doc/Makefile
158 doc/doxygen.conf])
159
160
161AC_OUTPUT
162dnl
163dnl EOF
164dnl
165