implementation of effc++
[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 ------------------------------------------------------------------
738c049f 8AC_INIT([Alice High Level Trigger] , [0.2], [Matthias.Richter@ift.uib.no], alice-hlt)
b521659f 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)
85869391 46CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\""
47CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\""
48CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
49LDFLAGS="$LDFLAGS -L${ROOTLIBDIR} ${ROOTLIBS}"
50
51dnl ------------------------------------------------------------------
52dnl check for AliRoot
53dnl AC_LANG_PUSH(C++)
54dnl AC_MSG_CHECKING([for AliRoot])
55dnl have_aliroot=no
56dnl ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
57dnl ALIROOTINCDIR=${ALICE_ROOT}/include
58dnl if test "x$ALICE_ROOT" != "x" \
59dnl && test -d ${ALIROOTLIBDIR} \
60dnl && test -d ${ALIROOTINCDIR}; then
61dnl have_aliroot=yes
62dnl else
63dnl ALIROOTLIBDIR=
64dnl ALIROOTINCDIR=
65dnl fi
66dnl AC_MSG_RESULT([$have_aliroot])
67
68dnl if test ! "x$have_aliroot" = "x" ; then
69dnl CPPFLAGS="$CPPFLAGS -I${ALIROOTINCDIR}"
70dnl LDFLAGS="$LDFLAGS -L${ALIROOTLIBDIR} -lESD -lGeom -lMinuit -lVMC -lEG -lRAWData -ldl"
71dnl have_alisteer=no
72dnl AC_CHECK_LIB(STEER, [AliRun], [have_alisteer=yes])
73dnl fi
74dnl AC_LANG_POP(C++)
75
76
77dnl ------------------------------------------------------------------
78AC_MSG_CHECKING([whether to impose strict coding conventions])
79AC_ARG_ENABLE(strict,
80 [AC_HELP_STRING([--enable-strict],
81 [enable coding convention checks ])],
82 [],[enable_strict=no])
83if test "x$enable_strict" = "xyes" ; then
84 CPPFLAGS="$CPPFLAGS -Weffc++"
85fi
86AC_MSG_RESULT([$enable_strict])
b521659f 87
88dnl ------------------------------------------------------------------
89AC_MSG_CHECKING([whether to compile sample library])
90AH_TEMPLATE([HLT_SAMPLE],[hlt sample library])
91AC_ARG_ENABLE(sample,
92 [AC_HELP_STRING([--enable-sample],
93 [compile the sample library ])],
94 [],[enable_sample=yes])
95if test "x$enable_sample" = "xyes" ; then
96 AC_DEFINE(HLT_SAMPLE)
97fi
98AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes)
99AC_MSG_RESULT([$enable_sample])
100
101dnl ------------------------------------------------------------------
102AC_MSG_CHECKING([whether to compile tpc library])
103AH_TEMPLATE([HLT_TPC],[hlt tpc library])
104AC_ARG_ENABLE(tpc,
105 [AC_HELP_STRING([--enable-tpc],
106 [compile the tpc library ])],
107 [],[enable_tpc=yes])
108if test "x$enable_tpc" = "xyes" ; then
109 AC_DEFINE(HLT_TPC)
110fi
111AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes)
112AC_MSG_RESULT([$enable_tpc])
113
114dnl ------------------------------------------------------------------
85869391 115if test "x$enable_tpc" = "xyes" ; then
116 AC_MSG_CHECKING([whether to compile tpc reference library])
117 AH_TEMPLATE([HLT_TPCREF],[hlt tpc reference library])
118 AC_ARG_ENABLE(tpcref,
119 [AC_HELP_STRING([--enable-tpcref],
120 [compile the tpc reference library ])],
121 [],[enable_tpcref=no])
122 if test "x$enable_tpcref" = "xyes" ; then
123 AC_DEFINE(HLT_TPCREF)
124 fi
125 AM_CONDITIONAL(EN_HLT_TPCREF, test x$enable_tpcref = xyes)
126 AC_MSG_RESULT([$enable_tpcref])
127fi
128
129dnl ------------------------------------------------------------------
b521659f 130AC_MSG_CHECKING([whether to enable HLT logging])
131AH_TEMPLATE([NOLOGGING],[disable hlt logging])
132AC_ARG_ENABLE(logging,
133 [AC_HELP_STRING([--enable-logging],
134 [enable logging])],
135 [],[enable_logging=yes])
136if test "x$enable_logging" != "xyes" ; then
137 AC_DEFINE(NOLOGGING)
138fi
139AC_MSG_RESULT([$enable_logging])
140
141dnl ------------------------------------------------------------------
142AC_MSG_CHECKING([whether to enable saving MC data through the chain])
143AH_TEMPLATE([DOMC],[MC saving])
144AC_ARG_ENABLE(mc-saving,
145 [AC_HELP_STRING([--enable-mc-saving],
146 [enable saving MC data through the chain])],
147 [],[enable_mc_saving=no])
148if test "x$enable_mc_saving" = "xyes" ; then
149 AC_DEFINE(DOMC)
150fi
151AC_MSG_RESULT([$enable_mc_saving])
152
153dnl ------------------------------------------------------------------
b521659f 154AC_MSG_CHECKING([whether to enable AliRoot NEWIO])
155AH_TEMPLATE([use_newio],[AliRoot NEWIO])
156AC_ARG_ENABLE(newio,
157 [AC_HELP_STRING([--enable-newio],
158 [enable AliRoot NEWIO ])],
159 [],[enable_newio=yes])
160if test "x$enable_newio" = "xyes" ; then
161 AC_DEFINE(use_newio)
162fi
163AC_MSG_RESULT([$enable_newio])
164
165dnl ------------------------------------------------------------------
166dnl certainly something old, but we keep the define
167AC_MSG_CHECKING([whether to use ROWHOUGH])
168AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH])
169AC_ARG_ENABLE(rowhough,
170 [AC_HELP_STRING([--enable-rowhough],
171 [use ROWHOUGH ])],
172 [],[enable_rowhough=no])
173if test "x$enable_rowhough" = "xyes" ; then
174 AC_DEFINE(USEROWHOUGH)
175fi
176AC_MSG_RESULT([$enable_rowhough])
177
178dnl ------------------------------------------------------------------
179dnl
180dnl Documentation
181dnl
182AC_ARG_VAR(DOXYGEN, The Documentation Generator)
183AC_PATH_PROG(PERL, perl)
184AC_PATH_PROG(DOXYGEN, doxygen)
185AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
186HAVE_DOT=NO
187DOT_PATH=
188AC_PATH_PROG(DOT, dot)
189if ! test "x$DOT" = "x" ; then
190 HAVE_DOT=YES
191 DOT_PATH=`dirname $DOT`
192fi
193AC_SUBST([HAVE_DOT])
194AC_SUBST([DOT_PATH])
195
196dnl ------------------------------------------------------------------
197AC_CONFIG_FILES([Makefile
198 BASE/Makefile
199 SampleLib/Makefile
200 TPCLib/Makefile
201 TPCLib/Ref/Makefile
b521659f 202 doc/Makefile
203 doc/doxygen.conf])
204
205
206AC_OUTPUT
207dnl
208dnl EOF
209dnl
210