]>
Commit | Line | Data |
---|---|---|
b521659f | 1 | dnl -*- mode: autoconf -*- |
2 | dnl | |
3 | dnl $Id$ | |
4 | dnl template for the configuration script for the Alice HLT | |
5 | dnl framework and components | |
6 | dnl | |
7 | dnl ------------------------------------------------------------------ | |
738c049f | 8 | AC_INIT([Alice High Level Trigger] , [0.2], [Matthias.Richter@ift.uib.no], alice-hlt) |
b521659f | 9 | |
10 | dnl ------------------------------------------------------------------ | |
11 | dnl the package from CVS contains the old Makefiles as well. In order to | |
12 | dnl prevent them from becoming overwritten, we require a separate build | |
13 | dnl directory | |
14 | if test "`dirname $0`" = "." ; then | |
15 | AC_ERROR([please run the script from a separate build directory]) | |
16 | fi | |
17 | ||
18 | dnl ------------------------------------------------------------------ | |
19 | AC_CANONICAL_SYSTEM | |
20 | AC_PREFIX_DEFAULT(${PWD}) | |
21 | AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx) | |
22 | AM_INIT_AUTOMAKE | |
23 | AC_PROG_CC | |
24 | AC_PROG_CXX | |
25 | AC_PROG_LIBTOOL | |
26 | ||
27 | AC_DEBUG | |
28 | AC_OPTIMIZATION | |
29 | ||
30 | dnl ------------------------------------------------------------------ | |
31 | dnl | |
32 | dnl Check for ROOT | |
33 | dnl | |
34 | ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])]) | |
35 | AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" ) | |
36 | ||
37 | dnl ------------------------------------------------------------------ | |
38 | # TODO: make this configurable through arguments | |
39 | #Define whether you want to run with ALIROOT or only ROOT | |
40 | AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment]) | |
41 | ALIHLT_USEPACKAGE=ALIROOT | |
42 | #ALIHLT_USEPACKAGE=ROOT | |
43 | #ALIHLT_USEPACKAGE=STANDALONE | |
44 | AC_DEFINE(use_aliroot) | |
45 | AC_DEFINE(use_root) | |
85869391 | 46 | CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" |
47 | CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" | |
48 | CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}" | |
49 | LDFLAGS="$LDFLAGS -L${ROOTLIBDIR} ${ROOTLIBS}" | |
50 | ||
51 | dnl ------------------------------------------------------------------ | |
52 | dnl check for AliRoot | |
53 | dnl AC_LANG_PUSH(C++) | |
54 | dnl AC_MSG_CHECKING([for AliRoot]) | |
55 | dnl have_aliroot=no | |
56 | dnl ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET} | |
57 | dnl ALIROOTINCDIR=${ALICE_ROOT}/include | |
58 | dnl if test "x$ALICE_ROOT" != "x" \ | |
59 | dnl && test -d ${ALIROOTLIBDIR} \ | |
60 | dnl && test -d ${ALIROOTINCDIR}; then | |
61 | dnl have_aliroot=yes | |
62 | dnl else | |
63 | dnl ALIROOTLIBDIR= | |
64 | dnl ALIROOTINCDIR= | |
65 | dnl fi | |
66 | dnl AC_MSG_RESULT([$have_aliroot]) | |
67 | ||
68 | dnl if test ! "x$have_aliroot" = "x" ; then | |
69 | dnl CPPFLAGS="$CPPFLAGS -I${ALIROOTINCDIR}" | |
70 | dnl LDFLAGS="$LDFLAGS -L${ALIROOTLIBDIR} -lESD -lGeom -lMinuit -lVMC -lEG -lRAWData -ldl" | |
71 | dnl have_alisteer=no | |
72 | dnl AC_CHECK_LIB(STEER, [AliRun], [have_alisteer=yes]) | |
73 | dnl fi | |
74 | dnl AC_LANG_POP(C++) | |
75 | ||
76 | ||
77 | dnl ------------------------------------------------------------------ | |
78 | AC_MSG_CHECKING([whether to impose strict coding conventions]) | |
79 | AC_ARG_ENABLE(strict, | |
80 | [AC_HELP_STRING([--enable-strict], | |
81 | [enable coding convention checks ])], | |
82 | [],[enable_strict=no]) | |
83 | if test "x$enable_strict" = "xyes" ; then | |
84 | CPPFLAGS="$CPPFLAGS -Weffc++" | |
85 | fi | |
86 | AC_MSG_RESULT([$enable_strict]) | |
b521659f | 87 | |
88 | dnl ------------------------------------------------------------------ | |
89 | AC_MSG_CHECKING([whether to compile sample library]) | |
90 | AH_TEMPLATE([HLT_SAMPLE],[hlt sample library]) | |
91 | AC_ARG_ENABLE(sample, | |
92 | [AC_HELP_STRING([--enable-sample], | |
93 | [compile the sample library ])], | |
94 | [],[enable_sample=yes]) | |
95 | if test "x$enable_sample" = "xyes" ; then | |
96 | AC_DEFINE(HLT_SAMPLE) | |
97 | fi | |
98 | AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes) | |
99 | AC_MSG_RESULT([$enable_sample]) | |
100 | ||
101 | dnl ------------------------------------------------------------------ | |
102 | AC_MSG_CHECKING([whether to compile tpc library]) | |
103 | AH_TEMPLATE([HLT_TPC],[hlt tpc library]) | |
104 | AC_ARG_ENABLE(tpc, | |
105 | [AC_HELP_STRING([--enable-tpc], | |
106 | [compile the tpc library ])], | |
107 | [],[enable_tpc=yes]) | |
108 | if test "x$enable_tpc" = "xyes" ; then | |
109 | AC_DEFINE(HLT_TPC) | |
110 | fi | |
111 | AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes) | |
112 | AC_MSG_RESULT([$enable_tpc]) | |
113 | ||
85869391 | 114 | dnl ------------------------------------------------------------------ |
115 | if 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]) | |
127 | fi | |
128 | ||
b521659f | 129 | dnl ------------------------------------------------------------------ |
130 | AC_MSG_CHECKING([whether to enable HLT logging]) | |
131 | AH_TEMPLATE([NOLOGGING],[disable hlt logging]) | |
132 | AC_ARG_ENABLE(logging, | |
133 | [AC_HELP_STRING([--enable-logging], | |
134 | [enable logging])], | |
135 | [],[enable_logging=yes]) | |
136 | if test "x$enable_logging" != "xyes" ; then | |
137 | AC_DEFINE(NOLOGGING) | |
138 | fi | |
139 | AC_MSG_RESULT([$enable_logging]) | |
140 | ||
141 | dnl ------------------------------------------------------------------ | |
142 | AC_MSG_CHECKING([whether to enable saving MC data through the chain]) | |
143 | AH_TEMPLATE([DOMC],[MC saving]) | |
144 | AC_ARG_ENABLE(mc-saving, | |
145 | [AC_HELP_STRING([--enable-mc-saving], | |
146 | [enable saving MC data through the chain])], | |
147 | [],[enable_mc_saving=no]) | |
148 | if test "x$enable_mc_saving" = "xyes" ; then | |
149 | AC_DEFINE(DOMC) | |
150 | fi | |
151 | AC_MSG_RESULT([$enable_mc_saving]) | |
152 | ||
b521659f | 153 | dnl ------------------------------------------------------------------ |
154 | AC_MSG_CHECKING([whether to enable AliRoot NEWIO]) | |
155 | AH_TEMPLATE([use_newio],[AliRoot NEWIO]) | |
156 | AC_ARG_ENABLE(newio, | |
157 | [AC_HELP_STRING([--enable-newio], | |
158 | [enable AliRoot NEWIO ])], | |
159 | [],[enable_newio=yes]) | |
160 | if test "x$enable_newio" = "xyes" ; then | |
161 | AC_DEFINE(use_newio) | |
162 | fi | |
163 | AC_MSG_RESULT([$enable_newio]) | |
164 | ||
165 | dnl ------------------------------------------------------------------ | |
166 | dnl certainly something old, but we keep the define | |
167 | AC_MSG_CHECKING([whether to use ROWHOUGH]) | |
168 | AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH]) | |
169 | AC_ARG_ENABLE(rowhough, | |
170 | [AC_HELP_STRING([--enable-rowhough], | |
171 | [use ROWHOUGH ])], | |
172 | [],[enable_rowhough=no]) | |
173 | if test "x$enable_rowhough" = "xyes" ; then | |
174 | AC_DEFINE(USEROWHOUGH) | |
175 | fi | |
176 | AC_MSG_RESULT([$enable_rowhough]) | |
177 | ||
178 | dnl ------------------------------------------------------------------ | |
179 | dnl | |
180 | dnl Documentation | |
181 | dnl | |
182 | AC_ARG_VAR(DOXYGEN, The Documentation Generator) | |
183 | AC_PATH_PROG(PERL, perl) | |
184 | AC_PATH_PROG(DOXYGEN, doxygen) | |
185 | AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x") | |
186 | HAVE_DOT=NO | |
187 | DOT_PATH= | |
188 | AC_PATH_PROG(DOT, dot) | |
189 | if ! test "x$DOT" = "x" ; then | |
190 | HAVE_DOT=YES | |
191 | DOT_PATH=`dirname $DOT` | |
192 | fi | |
193 | AC_SUBST([HAVE_DOT]) | |
194 | AC_SUBST([DOT_PATH]) | |
195 | ||
196 | dnl ------------------------------------------------------------------ | |
197 | AC_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 | ||
206 | AC_OUTPUT | |
207 | dnl | |
208 | dnl EOF | |
209 | dnl | |
210 |