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 ------------------------------------------------------------------ |
408c5899 |
8 | |
9 | dnl Take either the AliRoot tag as version id or the current revision |
10 | AC_INIT([Alice High Level Trigger] , |
7233bc62 |
11 | m4_esyscmd([url=`svn info 2> /dev/null | grep "URL:" | cut -d: -f3 | sed -e 's|[/]*HLT[/]*$||' | sed -e 's|^[/]*||g' | cut -d '/' -f 4`; \ |
12 | revision=`svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | cut -d '/' -f 4`; \ |
13 | if test "x$url" != "x"; then echo -n $url; \ |
14 | elif test "x$revision" != "x"; then echo -n $revision ; \ |
15 | elif test -e .revision && test x`cat .revision` != x; then \ |
16 | cat .revision; \ |
17 | else \ |
18 | echo -n invalid-version; \ |
19 | fi]), |
408c5899 |
20 | [Matthias.Richter@ift.uib.no], |
21 | [alice-hlt]) |
b521659f |
22 | |
23 | dnl ------------------------------------------------------------------ |
24 | dnl the package from CVS contains the old Makefiles as well. In order to |
25 | dnl prevent them from becoming overwritten, we require a separate build |
26 | dnl directory |
27 | if test "`dirname $0`" = "." ; then |
28 | AC_ERROR([please run the script from a separate build directory]) |
29 | fi |
30 | |
31 | dnl ------------------------------------------------------------------ |
32 | AC_CANONICAL_SYSTEM |
33 | AC_PREFIX_DEFAULT(${PWD}) |
34 | AC_CONFIG_SRCDIR(BASE/AliHLTComponent.cxx) |
35 | AM_INIT_AUTOMAKE |
36 | AC_PROG_CC |
37 | AC_PROG_CXX |
38 | AC_PROG_LIBTOOL |
39 | |
40 | AC_DEBUG |
41 | AC_OPTIMIZATION |
dc8f7cb7 |
42 | AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 ) |
43 | |
44 | dnl ------------------------------------------------------------------ |
45 | dnl A warning posted into the auto-generated files |
46 | dnl Does NOT concern this file ;-) |
47 | AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!" |
48 | AC_SUBST([AUTOGENERATED_WARNING]) |
b521659f |
49 | |
50 | dnl ------------------------------------------------------------------ |
51 | dnl |
52 | dnl Check for ROOT |
53 | dnl |
54 | ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])]) |
55 | AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" ) |
53feaef5 |
56 | AC_SUBST([ROOTSYS]) |
dc8f7cb7 |
57 | ROOTBINDIR=`dirname $ROOTEXEC` |
58 | AC_SUBST([ROOTBINDIR]) |
59 | |
dfaa582a |
60 | dnl test for additional required root libraries and headers |
61 | LIBS='-ldl' |
62 | if test "x$have_root" = "x1"; then |
63 | AC_LANG_PUSH(C++) |
64 | save_CPPFLAGS=$CPPFLAGS |
65 | save_LDFLAGS=$LDFLAGS |
66 | save_LIBS=$LIBS |
67 | CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done` |
68 | |
dc8f7cb7 |
69 | # we check for the libSTEER library which is linked to |
70 | # - the ROOT libs libGeom libMinuit libVMC libEG |
71 | # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07) |
72 | # - ROOT libCint needs also libdl |
73 | # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires |
74 | # libTreePlayer.so |
75 | # - from Jan 07 libESD also depends on libXMLIO |
fbf4d793 |
76 | # - libSTEER depends on libProofPlayer since Oct 2007 (after v4-07-Release) |
77 | ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO Thread Proof ProofPlayer' |
dc8f7cb7 |
78 | for CHECKLIB in $ROOT_CHECKLIBS ; do |
dc8f7cb7 |
79 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}" |
80 | LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS" |
81 | AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"]) |
82 | done |
dfaa582a |
83 | |
84 | # TBuffer.h has been made pure virtual in root v5-15-02 and one |
85 | # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h) |
ba4b0dd7 |
86 | AC_CHECK_HEADER([TBufferFile.h], [], [HAVE_NOT_TBUFFERFILE]) |
dfaa582a |
87 | |
0b6c2560 |
88 | # TView.h has been made pure virtual right after root v5-15-02 and one |
89 | # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D) |
ba4b0dd7 |
90 | AC_CHECK_HEADER([TView3D.h], [], [HAVE_NOT_TVIEW3D]) |
0b6c2560 |
91 | |
dc8f7cb7 |
92 | CPPFLAGS=$save_CPPFLAGS |
93 | LDFLAGS=$save_LDFLAGS |
94 | LIBS=$save_LIBS |
dfaa582a |
95 | AC_LANG_POP(C++) |
dc8f7cb7 |
96 | fi |
b521659f |
97 | |
98 | dnl ------------------------------------------------------------------ |
99 | # TODO: make this configurable through arguments |
100 | #Define whether you want to run with ALIROOT or only ROOT |
101 | AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment]) |
102 | ALIHLT_USEPACKAGE=ALIROOT |
103 | #ALIHLT_USEPACKAGE=ROOT |
104 | #ALIHLT_USEPACKAGE=STANDALONE |
105 | AC_DEFINE(use_aliroot) |
106 | AC_DEFINE(use_root) |
85869391 |
107 | CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}" |
7233bc62 |
108 | save_CPPFLAGS=$CPPFLAGS |
109 | save_LDFLAGS=$LDFLAGS |
110 | save_LIBS=$LIBS |
85869391 |
111 | |
112 | dnl ------------------------------------------------------------------ |
74c73e5a |
113 | dnl check for AliRoot features |
114 | AC_LANG_PUSH(C++) |
74c73e5a |
115 | have_aliroot=no |
2bbbadd1 |
116 | AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation], |
117 | [test -d $with_aliroot && ALICE_ROOT=$with_aliroot], |
118 | []) |
119 | |
120 | if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then |
121 | dnl ------------------------------------------------------------------ |
122 | dnl Try to estimate the system architecture |
123 | case $host_os:$host_cpu in |
124 | linux*:x86_64*) alice_target='linuxx8664gcc' ;; |
125 | linux*) alice_target='linux' ;; |
126 | *) alice_target='unknown' ;; |
127 | esac |
128 | if test "x$alice_target" = "xunknown" ; then |
129 | if test -z $ALICE_TARGET ; then |
130 | AC_MSG_ERROR([Can not estimate system architecture. |
131 | To avoid the problem, set the ALICE_TARGET variable appropriately. |
132 | Please send the following information to Matthias.Richter@ift.uib.no: |
133 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) |
134 | else |
135 | AC_MSG_NOTICE([Unknown system architecture. |
136 | Please send the following information to Matthias.Richter@ift.uib.no: |
137 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) |
138 | fi |
139 | else |
140 | if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then |
141 | AC_MSG_WARN([The ALICE_TARGET variable does not match your current system |
142 | overriding $ALICE_TARGET by $alice_target]) |
143 | fi |
144 | ALICE_TARGET=$alice_target |
145 | fi |
dc8f7cb7 |
146 | ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET} |
74c73e5a |
147 | ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET} |
148 | ALIROOTINCDIR=${ALICE_ROOT}/include |
dc8f7cb7 |
149 | test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR]) |
2bbbadd1 |
150 | test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR]) |
151 | test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR]) |
74c73e5a |
152 | fi |
2bbbadd1 |
153 | |
154 | AC_MSG_CHECKING([for AliRoot]) |
74c73e5a |
155 | if test "x$ALICE_ROOT" != "x" \ |
dc8f7cb7 |
156 | && test -d ${ALIROOTBINDIR} \ |
74c73e5a |
157 | && test -d ${ALIROOTLIBDIR} \ |
158 | && test -d ${ALIROOTINCDIR}; then |
159 | have_aliroot=$ALICE_ROOT |
160 | else |
dc8f7cb7 |
161 | ALIROOTBINDIR= |
74c73e5a |
162 | ALIROOTLIBDIR= |
163 | ALIROOTINCDIR= |
164 | fi |
165 | AC_MSG_RESULT([$have_aliroot]) |
166 | |
167 | if test ! "x$have_aliroot" = "xno" ; then |
74c73e5a |
168 | ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW" |
169 | ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}" |
dc8f7cb7 |
170 | ALIROOT_LIBS="-lESD $ADD_ROOTLIBS" |
74c73e5a |
171 | save_CPPFLAGS=$CPPFLAGS |
172 | save_LDFLAGS=$LDFLAGS |
173 | save_LIBS=$LIBS |
174 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" |
db16520a |
175 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" |
2bbbadd1 |
176 | |
f8c5e339 |
177 | # check for certain AliRoot libraries/files/features |
c018a1bd |
178 | # libSTEERBase present since Aug 7 2007 |
179 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
180 | CHECKLIB=STEERBase |
181 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) |
182 | |
f5bf5fc3 |
183 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
184 | CHECKLIB=AOD |
185 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) |
186 | |
2bbbadd1 |
187 | # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006) |
188 | have_alirawdata=no |
189 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
190 | CHECKLIB=RAWDatabase |
191 | AC_CHECK_LIB([$CHECKLIB],[_init], |
192 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" |
193 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
194 | CHECKLIB=RAWDatarec |
195 | AC_CHECK_LIB([$CHECKLIB],[_init], |
196 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" |
2bbbadd1 |
197 | have_alirawdata=$CHECKLIB])], |
198 | [# second pass with -RAWData |
199 | CHECKLIB="-lRAWData" |
200 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER" |
201 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h> |
202 | #include <AliRawReaderFile.h> |
203 | #include <AliRawReaderDate.h> |
204 | #include <AliRawReaderRoot.h>], |
205 | [AliRawReaderMemory mreader; |
206 | AliRawReaderFile freader; |
207 | AliRawReaderDate dreader(NULL,0); |
208 | AliRawReaderRoot rreader(NULL,0);])], |
e962f438 |
209 | [ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB" |
2bbbadd1 |
210 | have_alirawdata=$CHECKLIB], |
211 | [have_alirawdata=no]) |
212 | ]) dnl AC_CHECK_LIB RAWDatabase |
fa274626 |
213 | AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries]) |
214 | AC_MSG_RESULT([$have_alirawdata]) |
215 | |
fbf4d793 |
216 | # CBD library is present since AliRoot version v4-05-00 (02.06.2006) |
217 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS -lSTEER" |
218 | CHECKLIB=CDB |
219 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) |
220 | |
221 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
222 | CHECKLIB=STEER |
223 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"],[have_aliroot=no]) |
224 | |
225 | dnl |
226 | dnl check whether AliLog supports notification callback |
227 | dnl |
228 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
229 | have_alilog_notification=no |
230 | if test ! "x$have_aliroot" = "xno" ; then |
231 | AC_MSG_CHECKING([whether AliLog supports notification callback]) |
232 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], |
233 | [AliLog::AliLogNotification fct])], |
234 | [have_alilog_notification=yes], |
235 | [AC_DEFINE(NO_ALILOG_NOTIFICATION)]) |
236 | AC_MSG_RESULT([$have_alilog_notification]) |
237 | fi |
238 | |
239 | if test "x$have_aliroot" = "xno" ; then |
240 | # 2007-08-18 dont reset ALIROOT_CPPFLAGS in order to allow compilation |
241 | # but library dependencies might not be resolved completely |
242 | #ALIROOT_CPPFLAGS= |
243 | AC_MSG_WARN([some of the AliRoot library dependencies are not resolved. |
244 | This can happen from time to time due to development in AliRoot. You can |
245 | force compilation of detector libs by --enable-<detector>, but be aware |
246 | of unresolved references at runtime.]) |
247 | AC_MSG_WARN([ ------------------------------------------ ]) |
248 | AC_MSG_WARN([ Report this to $PACKAGE_BUGREPORT ]) |
249 | AC_MSG_WARN([ please include config.log ]) |
250 | AC_MSG_WARN([ ------------------------------------------ ]) |
251 | ALIROOT_LDFLAGS= |
252 | ALIROOT_LIBS= |
253 | fi |
254 | |
83cb7e1d |
255 | dnl |
256 | dnl ESD copy function added May 9 2008 rev 25667 |
257 | dnl |
258 | have_esd_copy=no |
259 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliESDEvent.h>], |
260 | [AliESDEvent esd1; |
261 | AliESDEvent esd2; |
262 | esd2=esd1;])], |
9877121c |
263 | [have_esd_copy=yes], |
264 | [AC_DEFINE(HAVE_NOT_ESD_COPY)]) |
83cb7e1d |
265 | AC_MSG_CHECKING(for ESD assignment operator) |
266 | AC_MSG_RESULT([$have_esd_copy]) |
267 | |
296b5188 |
268 | dnl |
269 | dnl AliRawReaderMemory support for multiple buffers added |
c03e064d |
270 | dnl revision 26829 Jun 2008 |
296b5188 |
271 | dnl |
272 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW" |
273 | have_rawreadermemory_multbuffers=no |
274 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>], |
275 | [AliRawReaderMemory rr; |
276 | rr.AddBuffer(NULL, 0, 0);])], |
277 | [have_rawreadermemory_multbuffers=yes], |
278 | [AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)]) |
c03e064d |
279 | AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers) |
296b5188 |
280 | AC_MSG_RESULT([$have_rawreadermemory_multbuffers]) |
281 | |
f5bf5fc3 |
282 | dnl |
fbf4d793 |
283 | dnl required header files and libraries for modules |
f5bf5fc3 |
284 | dnl |
285 | if test ! "x$have_aliroot" = "xno" ; then |
286 | # the HLTTPCLib needs to link agains TPCbase and TPCrec |
287 | # TPC library for AliTPCParam and AliSimDigits used in |
288 | # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx |
e962f438 |
289 | # from May 07 TPCbase depends on libGui.so |
f59fee6d |
290 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC" |
f5bf5fc3 |
291 | have_alitpc=yes |
292 | AC_MSG_CHECKING(for required classes in TPC libraries) |
293 | if test ! "x$have_alitpc" = "xno" ; then |
f59fee6d |
294 | ALITPC_LIBS="-lGui -lTPCbase -lTPCrec" |
295 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS" |
f5bf5fc3 |
296 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h> |
297 | #include <AliTPCParam.h> |
298 | #include <AliTPCParamSR.h> |
299 | #include <AliTPCDigitsArray.h> |
300 | #include <AliTPCClustersArray.h> |
301 | #include <AliTPCcluster.h> |
302 | #include <AliTPCClustersRow.h>], |
303 | [AliSimDigits dig; |
304 | AliTPCParam param; |
305 | AliTPCParamSR paramsr; |
306 | AliTPCDigitsArray digarray; |
307 | AliTPCClustersArray clustarray; |
308 | AliTPCcluster clust; |
309 | AliTPCClustersRow row])], |
f59fee6d |
310 | [AC_DEFINE(HAVE_ALITPC)], |
f5bf5fc3 |
311 | [have_alitpc=no |
f59fee6d |
312 | ALITPC_LIBS= ]) |
f5bf5fc3 |
313 | fi |
83cb7e1d |
314 | AC_MSG_RESULT([$have_alitpc]) |
aa40a4a1 |
315 | |
c03e064d |
316 | dnl |
317 | dnl Check for functionality in the TPC reconstruction required for online |
318 | dnl processing |
319 | dnl |
320 | have_tpc_hltoffline_rec=no |
321 | AC_MSG_CHECKING(for on-line features of TPC offline reconstruction) |
aa40a4a1 |
322 | ALITPC_LIBS="-lGui -lTPCbase -lTPCrec" |
323 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS" |
324 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h> |
c03e064d |
325 | #include <AliTPCclustererMI.h> |
aa40a4a1 |
326 | #include <TObjArray.h>], |
327 | [AliTPCtrackerMI tracker; |
328 | TObjArray* array=NULL; |
c03e064d |
329 | tracker.LoadClusters(array); |
330 | AliTPCclustererMI cl(NULL, NULL); |
331 | cl.GetOutputArray();])], |
332 | [have_tpc_hltoffline_rec=yes], |
333 | [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)]) |
334 | AC_MSG_RESULT([$have_tpc_hltoffline_rec]) |
aa40a4a1 |
335 | |
f5bf5fc3 |
336 | fi |
ba4b0dd7 |
337 | AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)]) |
338 | AC_CHECK_HEADER([AliTPCCalibPedestal.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPEDESTAL)]) |
675d662a |
339 | |
db16520a |
340 | have_tpc_mapping=no |
341 | if test ! "x$have_aliroot" = "xno" ; then |
04dbc9e4 |
342 | # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC |
db16520a |
343 | # which is stored in the TPC/mapping/Patchx.data files from |
344 | # AliRoot version v4-04-Release (May 2006) |
345 | AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available]) |
346 | TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping |
347 | AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data], |
348 | [have_tpc_mapping=yes |
349 | AC_SUBST(TPC_PAD_MAPPING_PATH) |
350 | AC_DEFINE(HAVE_TPC_MAPPING)], |
351 | []) |
352 | |
353 | fi |
354 | AC_MSG_CHECKING([for TPC mapping layout]) |
db16520a |
355 | AC_MSG_RESULT([$have_tpc_mapping]) |
04dbc9e4 |
356 | |
f59fee6d |
357 | dnl |
358 | dnl Check for the interface of AliExternalTrackParam which has been changed |
359 | dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04 |
360 | dnl or higher) |
361 | externaltrackparam_version=1 |
362 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>], |
363 | [AliExternalTrackParam trackparam; |
364 | Double_t param[[5]]; Double_t covar[[15]]; |
365 | trackparam.Set(0., 0., param, covar);])], |
366 | [externaltrackparam_version=2], |
367 | [AC_DEFINE(EXTERNALTRACKPARAM_V1)]) |
368 | AC_MSG_CHECKING(for version of AliExternalTrackParam) |
369 | AC_MSG_RESULT($externaltrackparam_version) |
370 | |
74c73e5a |
371 | CPPFLAGS=$save_CPPFLAGS |
372 | LDFLAGS=$save_LDFLAGS |
373 | LIBS=$save_LIBS |
7233bc62 |
374 | fi # if test ! "x$have_aliroot" = "xno" |
f59fee6d |
375 | |
74c73e5a |
376 | AC_LANG_POP(C++) |
5f5b708b |
377 | AC_SUBST([ALICE_ROOT]) |
74c73e5a |
378 | AC_SUBST([ALIROOT_CPPFLAGS]) |
379 | AC_SUBST([ALIROOT_LDFLAGS]) |
dc8f7cb7 |
380 | AC_SUBST([ALIROOTBINDIR]) |
53feaef5 |
381 | AC_SUBST([ALIROOTLIBDIR]) |
74c73e5a |
382 | AC_SUBST([ALIROOT_LIBS]) |
0f51f5b8 |
383 | AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes) |
85869391 |
384 | |
6c1a9d9e |
385 | HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE' |
386 | HLTBASE_LDFLAGS= |
387 | AC_SUBST([HLTBASE_CPPFLAGS]) |
388 | AC_SUBST([HLTBASE_LDFLAGS]) |
389 | |
78b557c2 |
390 | dnl ------------------------------------------------------------------ |
391 | dnl check for the HLT PubSub Framework |
f8c5e339 |
392 | dnl namely for the existence of the HOMER library |
393 | dnl from Sep 2007, the HOMER lib has been incorporated into the alice-hlt |
394 | dnl package. It os though possible to choose an external. library |
395 | dnl In order to make the origni of the HOMER lib clear, the one in AliRoot |
396 | dnl got the name libAliHLTHOMER |
78b557c2 |
397 | AC_MSG_CHECKING([for HLT PubSub Framework]) |
398 | AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework], |
399 | [], |
400 | [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ]) |
401 | if test -z $with_pubsub || ! test -d $with_pubsub ; then |
402 | with_pubsub=no |
403 | fi |
404 | AC_MSG_RESULT([$with_pubsub]) |
f8c5e339 |
405 | HOMER_VERSION=2 |
5f1685a0 |
406 | HOMER_LIBS= |
78b557c2 |
407 | |
408 | AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface]) |
409 | if test "x$with_pubsub" != "xno" ; then |
410 | save_CPPFLAGS=$CPPFLAGS |
411 | save_LDFLAGS=$LDFLAGS |
412 | save_LIBS=$LIBS |
4a6b4894 |
413 | # currently the different versions of the HLT PubSub framework have a different |
414 | # directory layout |
20b6dd9a |
415 | if test -d ${with_pubsub}/include/HOMER ; then |
5235c3e9 |
416 | # the 'early' location of the include files with separated HOMER sub dirs |
9ce4bf4a |
417 | HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader" |
5235c3e9 |
418 | elif test -d ${with_pubsub}/include/Util/HOMER ; then |
419 | # location for HLT Framework versions after Sep 2006 |
9ce4bf4a |
420 | HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER" |
5235c3e9 |
421 | elif test -d ${with_pubsub}/src/Util/HOMER/include ; then |
422 | # fall back if include files were not installed (versions after Sep 06) |
9ce4bf4a |
423 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include" |
4a6b4894 |
424 | else |
5235c3e9 |
425 | # fall back if include files were not installed (versions before Sep 06) |
9ce4bf4a |
426 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include" |
4a6b4894 |
427 | fi |
9ce4bf4a |
428 | HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done` |
5894eaa5 |
429 | |
430 | AC_ARG_ENABLE(pubsub-debug, |
431 | [AC_HELP_STRING([--disable-pubsub-debug], |
432 | [force the production version of the PubSub framework])], |
433 | [],[enable_pubsub_debug=yes]) |
434 | homer_type="none" |
435 | HOMER_TARGET="`uname -s`-`uname -m`" |
436 | AC_MSG_CHECKING([for HLT PubSub Framework release type]) |
437 | if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then |
438 | homer_type="production" |
439 | HOMER_TARGET="${HOMER_TARGET}-release" |
440 | elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then |
441 | homer_type="debug" |
442 | HOMER_TARGET="${HOMER_TARGET}-debug" |
443 | fi |
444 | AC_MSG_RESULT([${homer_type}]) |
f8c5e339 |
445 | HOMERREADER_HEADER=HOMERReader.h |
5894eaa5 |
446 | HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}" |
447 | HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}" |
53feaef5 |
448 | HOMER_LDFLAGS="-L${HOMER_LIBDIR}" |
78b557c2 |
449 | CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS" |
450 | LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS" |
451 | LIBS="$save_LIBS " |
452 | with_homer=no |
453 | AC_LANG_PUSH(C++) |
f8c5e339 |
454 | AC_CHECK_HEADER([$HOMERREADER_HEADER], |
5f1685a0 |
455 | [ AC_CHECK_LIB([HOMER],[_init], |
456 | [with_homer=yes |
457 | HOMER_LIBS="-lHOMER"], |
458 | [ AC_CHECK_LIB([HOMERReader],[_init], |
459 | [with_homer=yes |
460 | HOMER_LIBS="-lHOMERReader"])]) |
461 | LIBS="$LIBS $HOMER_LIBS" |
9ce4bf4a |
462 | AC_MSG_CHECKING([version of HOMER library]) |
5f1685a0 |
463 | dnl The Homer library has no versioning, so we do our own |
464 | dnl version description |
465 | dnl ---------------------------------------------------------------------- |
466 | dnl 1 inintial version |
467 | dnl 2 GetBlockStatusFlags added to the interface |
468 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>], |
469 | [HOMERReader reader("dummy", 0); |
470 | reader.GetBlockStatusFlags(0);])], |
f8c5e339 |
471 | [], |
472 | [HOMER_VERSION=1]) |
5f1685a0 |
473 | AC_MSG_RESULT([$HOMER_VERSION]) |
f8c5e339 |
474 | ], |
475 | [HOMERREADER_HEADER=]) #AC_CHECK_HEADER([$HOMERREADER_HEADER]) |
78b557c2 |
476 | AC_LANG_POP(C++) |
f8c5e339 |
477 | HOMER_INBUILT_LIB= |
478 | else |
479 | dnl no pubsub version defined, check if the HOMER lib is available in AliRoot |
480 | topdir=`dirname $0` |
481 | HOMER_CPPFLAGS="-I`(cd $topdir; pwd)`/BASE/HOMER" |
482 | HOMERREADER_HEADER=AliHLTHOMERReader.h |
483 | HOMER_INBUILT_LIB=`pwd`/BASE/HOMER/libAliHLTHOMER.la |
484 | HOMER_BINDIR= |
485 | HOMER_LIBDIR= |
486 | HOMER_LDFLAGS= |
487 | fi |
488 | |
78b557c2 |
489 | if test "x$with_homer" = "xno" ; then |
490 | HOMER_CPPFLAGS= |
491 | HOMER_LDFLAGS= |
5f1685a0 |
492 | HOMER_LIBS= |
78b557c2 |
493 | else |
5f1685a0 |
494 | HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION" |
78b557c2 |
495 | AC_DEFINE(HAVE_HOMERREADER) |
496 | fi |
497 | CPPFLAGS="$save_CPPFLAGS" |
498 | LDFLAGS="$save_LDFLAGS" |
499 | LIBS="$save_LIBS" |
f8c5e339 |
500 | |
501 | AC_SUBST([HOMERREADER_HEADER]) |
502 | AC_SUBST([HOMER_INBUILT_LIB]) |
78b557c2 |
503 | AC_SUBST([HOMER_CPPFLAGS]) |
504 | AC_SUBST([HOMER_LDFLAGS]) |
53feaef5 |
505 | AC_SUBST([HOMER_LIBDIR]) |
506 | AC_SUBST([HOMER_BINDIR]) |
5f1685a0 |
507 | AC_SUBST([HOMER_LIBS]) |
78b557c2 |
508 | |
7233bc62 |
509 | dnl ------------------------------------------------------------------ |
510 | AC_ARG_ENABLE(all, |
511 | [AC_HELP_STRING([--disable-all], |
512 | [disable all detector modules, individual modules can be switched on by --enable-det])], |
513 | [disable_all=yes],[]) |
514 | |
85869391 |
515 | dnl ------------------------------------------------------------------ |
516 | AC_MSG_CHECKING([whether to impose strict coding conventions]) |
517 | AC_ARG_ENABLE(strict, |
2028353f |
518 | [AC_HELP_STRING([--disable-strict], |
519 | [disable coding convention checks ])], |
520 | [],[enable_strict=yes]) |
85869391 |
521 | if test "x$enable_strict" = "xyes" ; then |
f7561f8d |
522 | CPPFLAGS="$CPPFLAGS -W -Weffc++ -Wall -Wshadow" |
85869391 |
523 | fi |
524 | AC_MSG_RESULT([$enable_strict]) |
b521659f |
525 | |
526 | dnl ------------------------------------------------------------------ |
527 | AC_MSG_CHECKING([whether to compile sample library]) |
528 | AH_TEMPLATE([HLT_SAMPLE],[hlt sample library]) |
529 | AC_ARG_ENABLE(sample, |
c018a1bd |
530 | [AC_HELP_STRING([--disable-sample], |
b521659f |
531 | [compile the sample library ])], |
2e742d30 |
532 | [], |
533 | [if test "x$have_aliroot" = "xno" ; then |
534 | enable_sample="no...requires.AliRoot" |
535 | else |
536 | enable_sample=yes |
537 | fi |
538 | ]) |
539 | |
b521659f |
540 | if test "x$enable_sample" = "xyes" ; then |
541 | AC_DEFINE(HLT_SAMPLE) |
542 | fi |
543 | AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes) |
544 | AC_MSG_RESULT([$enable_sample]) |
545 | |
c018a1bd |
546 | dnl ------------------------------------------------------------------ |
547 | AC_MSG_CHECKING([whether to compile util library]) |
548 | AH_TEMPLATE([HLT_UTIL],[HLT utility library]) |
549 | AC_ARG_ENABLE(util, |
550 | [AC_HELP_STRING([--disable-util], |
551 | [compile the util library ])], |
2e742d30 |
552 | [], |
553 | [if test "x$have_aliroot" = "xno" ; then |
554 | enable_util="no...requires.AliRoot" |
555 | else |
556 | enable_util=yes |
557 | fi |
558 | ]) |
c018a1bd |
559 | |
560 | if test "x$enable_util" = "xyes" ; then |
561 | AC_DEFINE(HLT_UTIL) |
562 | fi |
563 | AM_CONDITIONAL(EN_HLT_UTIL, test x$enable_util = xyes) |
564 | AC_MSG_RESULT([$enable_util]) |
565 | |
b521659f |
566 | dnl ------------------------------------------------------------------ |
b521659f |
567 | AH_TEMPLATE([HLT_TPC],[hlt tpc library]) |
f59fee6d |
568 | |
569 | CHECK_HLTMODULE([tpc], |
e962f438 |
570 | [AliTPCRawStream.h], |
571 | [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/TPC], |
f59fee6d |
572 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
573 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
574 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
575 | |
c6b46c3f |
576 | if test "x$enable_module" = "xmissheader"; then |
577 | enable_module="no...missing.headers" |
f59fee6d |
578 | enable_tpc="no...missing.headers" |
579 | elif test "x$have_alitpc" = "xno" ; then |
c6b46c3f |
580 | enable_module="no...requires.AliRoot.TPC.libraries" |
f59fee6d |
581 | enable_tpc="no...requires.AliRoot.TPC.libraries" |
c6b46c3f |
582 | elif test "x$enable_module" = "xforce"; then |
583 | enable_tpc="yes" |
f59fee6d |
584 | else |
585 | enable_tpc=$enable_module |
586 | fi |
2e742d30 |
587 | |
b521659f |
588 | if test "x$enable_tpc" = "xyes" ; then |
589 | AC_DEFINE(HLT_TPC) |
adec4ad4 |
590 | else |
591 | enable_module=$enable_tpc |
b521659f |
592 | fi |
593 | AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes) |
d6e2c707 |
594 | AC_MSG_CHECKING([whether to compile TPC library]) |
c6b46c3f |
595 | AC_MSG_RESULT([$enable_module]) |
f59fee6d |
596 | AC_SUBST([ALITPC_LIBS]) |
b521659f |
597 | |
5e3820e2 |
598 | dnl ------------------------------------------------------------------ |
599 | AH_TEMPLATE([HLT_RCU],[hlt rcu library]) |
600 | |
601 | CHECK_HLTMODULE([rcu], |
602 | [AliAltroDecoder.h], |
603 | [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/RAW], |
604 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
605 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
606 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
607 | |
608 | if test "x$enable_module" = "xmissheader"; then |
609 | enable_module="no...missing.headers" |
610 | enable_rcu="no...missing.headers" |
611 | elif test "x$have_alircu" = "xno" ; then |
612 | enable_module="no...requires.AliRoot.RAW.libraries" |
613 | enable_rcu="no...requires.AliRoot.RAW.libraries" |
614 | elif test "x$enable_module" = "xforce"; then |
615 | enable_rcu="yes" |
616 | else |
617 | AC_LANG_PUSH(C++) |
618 | save_CPPFLAGS=$CPPFLAGS |
619 | save_LDFLAGS=$LDFLAGS |
620 | save_LIBS=$LIBS |
621 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" |
622 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" |
623 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
624 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliAltroDecoder.h>], |
625 | [AliAltroDecoder decoder; |
626 | decoder.CopyBackward(NULL, 0);])], |
627 | [enable_rcu=$enable_module], |
628 | [enable_module="no...requires.AliRoot>v4-10-Release" |
629 | enable_rcu="no...requires.AliRoot>v4-10-Release"]) |
630 | CPPFLAGS=$save_CPPFLAGS |
631 | LDFLAGS=$save_LDFLAGS |
632 | LIBS=$save_LIBS |
633 | AC_LANG_POP(C++) |
634 | fi |
635 | |
636 | if test "x$enable_rcu" = "xyes" ; then |
637 | AC_DEFINE(HLT_RCU) |
adec4ad4 |
638 | else |
639 | enable_module=$enable_rcu |
5e3820e2 |
640 | fi |
641 | AM_CONDITIONAL(EN_HLT_RCU, test x$enable_rcu = xyes) |
d6e2c707 |
642 | AC_MSG_CHECKING([whether to compile RCU library]) |
5e3820e2 |
643 | AC_MSG_RESULT([$enable_module]) |
644 | AC_SUBST([ALIRCU_LIBS]) |
645 | |
c160eda8 |
646 | dnl ------------------------------------------------------------------ |
c160eda8 |
647 | AH_TEMPLATE([HLT_PHOS],[hlt phos library]) |
f59fee6d |
648 | |
649 | ALIPHOS_LIBS= |
650 | CHECK_HLTMODULE([phos], |
651 | [], [$ALIROOT_CPPFLAGS], |
652 | [RAWDatasim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS], |
652cf9d2 |
653 | [PHOSbase PHOSrec PHOSsim PHOSshuttle], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
f59fee6d |
654 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
655 | |
c6b46c3f |
656 | if test "x$enable_module" = "xmissheader"; then |
657 | enable_module="no...requires.AliRoot>v4-05-07" |
f59fee6d |
658 | enable_phos="no...requires.AliRoot>v4-05-07" |
c6b46c3f |
659 | elif test "x$enable_module" = "xforce"; then |
660 | enable_phos="yes" |
f59fee6d |
661 | else |
662 | have_alicalorawstream=no |
663 | if test ! "x$have_aliroot" = "xno" ; then |
664 | AC_LANG_PUSH(C++) |
665 | save_CPPFLAGS="$CPPFLAGS" |
666 | # this can not be used as AliCaloRawStream.h indirectly depends on TString.h |
667 | #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes]) |
668 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" |
669 | AC_MSG_CHECKING([for AliCaloRawStream.h usability]) |
670 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <TString.h> |
671 | #include <AliCaloRawStream.h>], |
672 | [int i])], |
673 | [AC_DEFINE(HAVE_ALICALORAWSTREAM) |
674 | have_alicalorawstream=yes], |
675 | []) |
676 | AC_MSG_RESULT([$have_alicalorawstream]) |
677 | AC_LANG_POP(C++) |
678 | CPPFLAGS="$save_CPPFLAGS" |
679 | fi |
680 | if test "x$have_alicalorawstream" != "xyes"; then |
681 | enable_phos="no...requires.AliRoot>v4-05-07" |
682 | else |
683 | enable_phos=$enable_module |
684 | fi |
685 | fi |
2e742d30 |
686 | |
c160eda8 |
687 | if test "x$enable_phos" = "xyes" ; then |
688 | AC_DEFINE(HLT_PHOS) |
f59fee6d |
689 | ALIPHOS_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 |
690 | else |
691 | enable_module=$enable_phos |
c160eda8 |
692 | fi |
693 | AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes) |
d6e2c707 |
694 | AC_MSG_CHECKING([whether to compile PHOS library]) |
c6b46c3f |
695 | AC_MSG_RESULT([$enable_module]) |
f59fee6d |
696 | AC_SUBST([ALIPHOS_LIBS]) |
c160eda8 |
697 | |
c6b46c3f |
698 | dnl ------------------------------------------------------------------ |
699 | AH_TEMPLATE([HLT_TRD],[hlt trd library]) |
700 | |
f59fee6d |
701 | ALITRD_LIBS= |
702 | CHECK_HLTMODULE([trd], |
703 | [], [], |
b3f74118 |
704 | [MLP XMLParser], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
f59fee6d |
705 | [TRDbase TRDrec TRDsim], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
706 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
707 | |
c6b46c3f |
708 | if test "x$enable_module" = "xmissheader"; then |
709 | enable_module="no...requires.AliRoot>v4-07-Release" |
f59fee6d |
710 | enable_trd="no...requires.AliRoot>v4-07-Release" |
c6b46c3f |
711 | elif test "x$enable_module" = "xforce"; then |
712 | enable_trd="yes" |
f59fee6d |
713 | else |
714 | enable_trd=$enable_module |
715 | if test "x$enable_trd" = "xyes" ; then |
716 | AC_LANG_PUSH(C++) |
717 | save_CPPFLAGS="$CPPFLAGS" |
718 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/TRD" |
adec4ad4 |
719 | # AliTRDclusterizer::SetRawVersion() requires >v4-07-Release |
720 | # changed to AliTRDrecoParam::SetSeedingOn() due to revision 26327, Mon Jun 2 2008 |
721 | AC_MSG_CHECKING([for required functions in AliTRDrecoParam]) |
722 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliTRDrecoParam.h>], |
723 | [AliTRDrecoParam p; |
4f05d3e3 |
724 | p.SetSeeding(0)])], |
f59fee6d |
725 | [], |
adec4ad4 |
726 | [enable_trd="no...requires.AliRoot>v4-13-Release"]) |
f59fee6d |
727 | AC_MSG_RESULT([$enable_trd]) |
728 | AC_LANG_POP(C++) |
729 | CPPFLAGS="$save_CPPFLAGS" |
730 | fi |
731 | fi |
2e742d30 |
732 | |
0f51f5b8 |
733 | if test "x$enable_trd" = "xyes" ; then |
734 | AC_DEFINE(HLT_TRD) |
f59fee6d |
735 | ALITRD_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 |
736 | else |
737 | enable_module=$enable_trd |
0f51f5b8 |
738 | fi |
739 | AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes) |
d6e2c707 |
740 | AC_MSG_CHECKING([whether to compile TRD library]) |
c6b46c3f |
741 | AC_MSG_RESULT([$enable_module]) |
f59fee6d |
742 | AC_SUBST([ALITRD_LIBS]) |
0f51f5b8 |
743 | |
94cc9aab |
744 | dnl ------------------------------------------------------------------ |
94cc9aab |
745 | AH_TEMPLATE([HLT_MUON],[hlt dimuon library]) |
2e742d30 |
746 | |
f59fee6d |
747 | ALIMUON_LIBS= |
e89e6b23 |
748 | CHECK_HLTMODULE([dimuon], |
41f99620 |
749 | [AliMpExMap.h AliMUONTriggerIO.h], |
750 | [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON -I$ALICE_ROOT/MUON/mapping], |
b3f74118 |
751 | [Gui RAWDatasim], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
752 | [MUONcore MUONraw MUONbase MUONgeometry MUONmapping MUONcalib MUONsim MUONtrigger MUONevaluation MUONrec], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
f59fee6d |
753 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
754 | |
755 | if test "x$enable_module" = "xmissheader"; then |
a853a794 |
756 | enable_module="no...requires.AliRoot>=v4-08-Release" |
757 | enable_muon="no...requires.AliRoot>=v4-08-Release" |
c6b46c3f |
758 | elif test "x$enable_module" = "xforce"; then |
759 | enable_muon="yes" |
f59fee6d |
760 | else |
761 | enable_muon=$enable_module |
762 | fi |
763 | |
764 | if test "x$enable_muon" = "xyes" ; then |
94cc9aab |
765 | AC_DEFINE(HLT_MUON) |
f59fee6d |
766 | ALIMUON_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 |
767 | else |
768 | enable_module=$enable_muon |
94cc9aab |
769 | fi |
f59fee6d |
770 | AM_CONDITIONAL(EN_HLT_MUON, test x$enable_muon = xyes) |
d6e2c707 |
771 | AC_MSG_CHECKING([whether to compile MUON library]) |
c6b46c3f |
772 | AC_MSG_RESULT([$enable_module]) |
f59fee6d |
773 | AC_SUBST([ALIMUON_LIBS]) |
94cc9aab |
774 | |
d6e2c707 |
775 | dnl ------------------------------------------------------------------ |
776 | AH_TEMPLATE([HLT_TRIGGER],[hlt trigger library]) |
777 | |
778 | ALITRIGGER_LIBS= |
779 | CHECK_HLTMODULE([trigger], |
780 | [], [$ALIROOT_CPPFLAGS], |
781 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
782 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
783 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
784 | |
785 | if test "x$enable_module" = "xmissheader"; then |
786 | enable_module="no...header.missing" |
787 | enable_trigger="no...header.missing" |
788 | elif test "x$enable_module" = "xforce"; then |
789 | enable_trigger="yes" |
790 | else |
791 | enable_trigger=$enable_module |
792 | fi |
793 | |
794 | if test "x$enable_trigger" = "xyes" ; then |
795 | AC_DEFINE(HLT_TRIGGER) |
796 | ALITRIGGER_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 |
797 | else |
798 | enable_module=$enable_trigger |
d6e2c707 |
799 | fi |
800 | AM_CONDITIONAL(EN_HLT_TRIGGER, test x$enable_trigger = xyes) |
801 | AC_MSG_CHECKING([whether to compile Trigger library]) |
802 | AC_MSG_RESULT([$enable_module]) |
803 | AC_SUBST([ALITRIGGER_LIBS]) |
804 | |
805 | dnl ------------------------------------------------------------------ |
806 | AH_TEMPLATE([HLT_ITS],[hlt its library]) |
807 | |
808 | ALIITS_LIBS= |
809 | CHECK_HLTMODULE([its], |
810 | [], [$ALIROOT_CPPFLAGS], |
811 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
812 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
813 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
814 | |
815 | if test "x$enable_module" = "xmissheader"; then |
816 | enable_module="no...header.missing" |
817 | enable_its="no...header.missing" |
818 | elif test "x$enable_module" = "xforce"; then |
819 | enable_its="yes" |
820 | else |
821 | enable_its=$enable_module |
adec4ad4 |
822 | if test "x$enable_its" = "xyes" ; then |
823 | AC_LANG_PUSH(C++) |
824 | save_CPPFLAGS="$CPPFLAGS" |
825 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I$ALICE_ROOT/ITS" |
826 | # changes in the AliVertexer base class revision 26414, Thu Jun 5 15:36:18 2008 |
827 | # require AliVertexer::GetNominalPos() |
828 | AC_MSG_CHECKING([for required functions in AliITSVertexer]) |
829 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AliITSVertexerZ.h>], |
830 | [AliITSVertexerZ v; |
831 | v.GetNominalPos()])], |
832 | [], |
833 | [enable_its="no...requires.AliRoot>v4-13-Release"]) |
834 | AC_MSG_RESULT([$enable_its]) |
835 | AC_LANG_POP(C++) |
836 | CPPFLAGS="$save_CPPFLAGS" |
837 | fi |
d6e2c707 |
838 | fi |
839 | |
840 | if test "x$enable_its" = "xyes" ; then |
841 | AC_DEFINE(HLT_ITS) |
842 | ALIITS_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 |
843 | else |
844 | enable_module=$enable_its |
d6e2c707 |
845 | fi |
846 | AM_CONDITIONAL(EN_HLT_ITS, test x$enable_its = xyes) |
847 | AC_MSG_CHECKING([whether to compile ITS library]) |
848 | AC_MSG_RESULT([$enable_module]) |
849 | AC_SUBST([ALIITS_LIBS]) |
850 | |
e89e6b23 |
851 | dnl ------------------------------------------------------------------ |
852 | AH_TEMPLATE([HLT_COMP],[hlt comp library]) |
853 | |
854 | ALICOMP_LIBS= |
855 | CHECK_HLTMODULE([comp], |
856 | [], [$ALIROOT_CPPFLAGS], |
857 | [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS], |
858 | [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], |
859 | [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS]) |
860 | |
861 | if test "x$enable_module" = "xmissheader"; then |
c6b46c3f |
862 | enable_module="no...header.missing" |
e89e6b23 |
863 | enable_comp="no...header.missing" |
c6b46c3f |
864 | elif test "x$enable_module" = "xforce"; then |
865 | enable_comp="yes" |
e89e6b23 |
866 | else |
867 | enable_comp=$enable_module |
868 | fi |
869 | |
870 | if test "x$enable_comp" = "xyes" ; then |
871 | AC_DEFINE(HLT_COMP) |
872 | ALICOMP_LIBS=$ALIHLTMODULE_LIBS |
adec4ad4 |
873 | else |
874 | enable_module=$enable_comp |
e89e6b23 |
875 | fi |
876 | AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes) |
877 | AC_MSG_CHECKING([whether to compile comp library]) |
c6b46c3f |
878 | AC_MSG_RESULT([$enable_module]) |
e89e6b23 |
879 | AC_SUBST([ALICOMP_LIBS]) |
880 | |
b521659f |
881 | dnl ------------------------------------------------------------------ |
fc455fba |
882 | AC_MSG_CHECKING([whether to disable AliRoot logging]) |
883 | AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging]) |
884 | AC_ARG_ENABLE(aliroot-logging, |
885 | [AC_HELP_STRING([--disable-aliroot-logging], |
886 | [disable logging through AliRoot logging methods])], |
887 | [],[enable_aliroot_logging=no]) |
c018a1bd |
888 | if test "x$have_aliroot" = "xno" ; then |
889 | enable_aliroot_logging=yes # this means 'disable' |
890 | fi |
fc455fba |
891 | if test "x$enable_aliroot_logging" != "xno" ; then |
892 | AC_DEFINE(NOALIROOT_LOGGING) |
b521659f |
893 | fi |
fc455fba |
894 | AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no) |
895 | AC_MSG_RESULT([$enable_aliroot_logging]) |
b521659f |
896 | |
897 | dnl ------------------------------------------------------------------ |
898 | AC_MSG_CHECKING([whether to enable saving MC data through the chain]) |
899 | AH_TEMPLATE([DOMC],[MC saving]) |
900 | AC_ARG_ENABLE(mc-saving, |
901 | [AC_HELP_STRING([--enable-mc-saving], |
902 | [enable saving MC data through the chain])], |
903 | [],[enable_mc_saving=no]) |
904 | if test "x$enable_mc_saving" = "xyes" ; then |
905 | AC_DEFINE(DOMC) |
906 | fi |
907 | AC_MSG_RESULT([$enable_mc_saving]) |
908 | |
b521659f |
909 | dnl ------------------------------------------------------------------ |
b521659f |
910 | dnl certainly something old, but we keep the define |
911 | AC_MSG_CHECKING([whether to use ROWHOUGH]) |
912 | AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH]) |
913 | AC_ARG_ENABLE(rowhough, |
914 | [AC_HELP_STRING([--enable-rowhough], |
915 | [use ROWHOUGH ])], |
916 | [],[enable_rowhough=no]) |
917 | if test "x$enable_rowhough" = "xyes" ; then |
918 | AC_DEFINE(USEROWHOUGH) |
919 | fi |
920 | AC_MSG_RESULT([$enable_rowhough]) |
921 | |
53feaef5 |
922 | dnl ------------------------------------------------------------------ |
923 | dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old |
924 | dnl stand-alone build system. This is most likely something old we can |
925 | dnl get rid off later, or do something more reasonable. Since the define |
926 | dnl needs the quotes they have to be escaped. This works well for the |
927 | dnl Makefile but not for the configure script. So we have to add the |
928 | dnl defines after all the other checks. |
929 | CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" |
930 | if test ! "x$have_aliroot" = "xno" ; then |
931 | CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" |
932 | fi |
933 | |
b521659f |
934 | dnl ------------------------------------------------------------------ |
935 | dnl |
936 | dnl Documentation |
937 | dnl |
938 | AC_ARG_VAR(DOXYGEN, The Documentation Generator) |
939 | AC_PATH_PROG(PERL, perl) |
940 | AC_PATH_PROG(DOXYGEN, doxygen) |
941 | AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x") |
5894eaa5 |
942 | AC_ARG_ENABLE(dot, |
943 | [AC_HELP_STRING([--enable-dot], |
944 | [enable dot documentation generator])], |
945 | [],[enable_dot=no]) |
b521659f |
946 | HAVE_DOT=NO |
947 | DOT_PATH= |
948 | AC_PATH_PROG(DOT, dot) |
5894eaa5 |
949 | if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then |
b521659f |
950 | HAVE_DOT=YES |
951 | DOT_PATH=`dirname $DOT` |
952 | fi |
953 | AC_SUBST([HAVE_DOT]) |
954 | AC_SUBST([DOT_PATH]) |
955 | |
90ebac25 |
956 | dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src |
957 | dnl echo $HAVE_SRC_SUBDIR |
958 | dnl if ! test -d $HAVE_SRC_SUBDIR; then |
959 | dnl HAVE_SRC_SUBDIR= |
960 | dnl fi |
961 | dnl AC_SUBST([HAVE_SRC_SUBDIR]) |
962 | |
2bbbadd1 |
963 | dnl ------------------------------------------------------------------ |
7233bc62 |
964 | AC_MSG_NOTICE([---------------------------------------------- ]) |
965 | AC_MSG_NOTICE([ build summary ]) |
966 | AC_MSG_NOTICE([---------------------------------------------- ]) |
967 | |
b521659f |
968 | AC_CONFIG_FILES([Makefile |
969 | BASE/Makefile |
53feaef5 |
970 | BASE/setenv.sh |
971 | BASE/setenv.csh |
2be16a33 |
972 | BASE/HOMER/Makefile |
242bb794 |
973 | BASE/util/Makefile |
d098ebd4 |
974 | BASE/interface/Makefile |
853121af |
975 | BASE/test/Makefile |
b521659f |
976 | doc/Makefile |
2efb85be |
977 | doc/doxygen.conf |
978 | doc/doxymodule.conf]) |
b521659f |
979 | |
7233bc62 |
980 | dnl AliRoot and installation directory for libraries |
981 | dnl |
982 | AC_MSG_NOTICE([AliRoot: $have_aliroot]) |
983 | AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" ) |
984 | if test "x$have_aliroot" != "xno"; then |
985 | AC_CONFIG_FILES([sim/Makefile |
986 | rec/Makefile |
652cf9d2 |
987 | rec/test/Makefile |
7233bc62 |
988 | shuttle/Makefile |
989 | ]) |
990 | fi |
991 | if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then |
992 | libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET |
993 | AC_MSG_NOTICE([libdir set to $libdir]) |
994 | fi |
995 | |
996 | AC_MSG_NOTICE([compile sample library: $enable_sample]) |
997 | if test "x$enable_sample" = "xyes"; then |
998 | AC_CONFIG_FILES([SampleLib/Makefile]) |
999 | fi |
1000 | |
652cf9d2 |
1001 | AC_MSG_NOTICE([compile RCU library: $enable_rcu]) |
1002 | if test "x$enable_rcu" = "xyes"; then |
1003 | AC_CONFIG_FILES([RCU/Makefile |
1004 | RCU/test/Makefile |
1005 | ]) |
1006 | fi |
1007 | |
7233bc62 |
1008 | AC_MSG_NOTICE([compile TPC library: $enable_tpc]) |
1009 | if test "x$enable_tpc" = "xyes"; then |
1010 | AC_CONFIG_FILES([TPCLib/Makefile |
1011 | TPCLib/test/Makefile |
1012 | TPCLib/mapping2array.cxx |
1013 | TPCLib/OnlineDisplay/Makefile |
1014 | ]) |
1015 | fi |
1016 | |
7233bc62 |
1017 | AC_MSG_NOTICE([compile PHOS library: $enable_phos]) |
1018 | if test "x$enable_phos" = "xyes"; then |
1019 | AC_CONFIG_FILES([PHOS/Makefile]) |
1020 | fi |
1021 | |
1022 | AC_MSG_NOTICE([compile TRD library: $enable_trd]) |
1023 | if test "x$enable_trd" = "xyes"; then |
1024 | AC_CONFIG_FILES([TRD/Makefile]) |
1025 | fi |
1026 | |
1027 | AC_MSG_NOTICE([compile MUON library: $enable_muon]) |
1028 | if test "x$enable_muon" = "xyes"; then |
1029 | AC_CONFIG_FILES([MUON/Makefile]) |
1030 | fi |
1031 | |
1032 | AC_MSG_NOTICE([compile ITS library: $enable_its]) |
1033 | if test "x$enable_its" = "xyes"; then |
1034 | AC_CONFIG_FILES([ITS/Makefile]) |
1035 | fi |
1036 | |
1037 | AC_MSG_NOTICE([compile trigger library: $enable_trigger]) |
1038 | if test "x$enable_trigger" = "xyes"; then |
1039 | AC_CONFIG_FILES([trigger/Makefile]) |
1040 | fi |
1041 | |
1042 | AC_MSG_NOTICE([compile comp library: $enable_comp]) |
1043 | if test "x$enable_comp" = "xyes"; then |
1044 | AC_CONFIG_FILES([comp/Makefile]) |
1045 | fi |
b521659f |
1046 | |
1047 | AC_OUTPUT |
1048 | dnl |
1049 | dnl EOF |
1050 | dnl |
1051 | |