]>
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 ------------------------------------------------------------------ | |
79d1ba52 | 8 | AC_INIT([Alice High Level Trigger] , [0.7-dev], [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 | |
dc8f7cb7 | 29 | AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 0 ) |
30 | ||
31 | dnl ------------------------------------------------------------------ | |
32 | dnl A warning posted into the auto-generated files | |
33 | dnl Does NOT concern this file ;-) | |
34 | AUTOGENERATED_WARNING="!!!!!!! DO NOT EDIT THIS FILE !!!!!!" | |
35 | AC_SUBST([AUTOGENERATED_WARNING]) | |
b521659f | 36 | |
37 | dnl ------------------------------------------------------------------ | |
38 | dnl | |
39 | dnl Check for ROOT | |
40 | dnl | |
41 | ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])]) | |
42 | AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" ) | |
53feaef5 | 43 | AC_SUBST([ROOTSYS]) |
dc8f7cb7 | 44 | ROOTBINDIR=`dirname $ROOTEXEC` |
45 | AC_SUBST([ROOTBINDIR]) | |
46 | ||
dfaa582a | 47 | dnl test for additional required root libraries and headers |
48 | LIBS='-ldl' | |
49 | if test "x$have_root" = "x1"; then | |
50 | AC_LANG_PUSH(C++) | |
51 | save_CPPFLAGS=$CPPFLAGS | |
52 | save_LDFLAGS=$LDFLAGS | |
53 | save_LIBS=$LIBS | |
54 | CPPFLAGS=`echo $save_CPPFLAGS; for i in ${ROOTINCDIR}; do echo -n "-I$i " ; done` | |
55 | ||
dc8f7cb7 | 56 | # we check for the libSTEER library which is linked to |
57 | # - the ROOT libs libGeom libMinuit libVMC libEG | |
58 | # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07) | |
59 | # - ROOT libCint needs also libdl | |
60 | # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires | |
61 | # libTreePlayer.so | |
62 | # - from Jan 07 libESD also depends on libXMLIO | |
dc8f7cb7 | 63 | ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO' |
64 | for CHECKLIB in $ROOT_CHECKLIBS ; do | |
dc8f7cb7 | 65 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}" |
66 | LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS" | |
67 | AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"]) | |
68 | done | |
dfaa582a | 69 | |
70 | # TBuffer.h has been made pure virtual in root v5-15-02 and one | |
71 | # has to derive from TBufferFile.h (needed for BASE/AliHLTMessage.h) | |
72 | AC_CHECK_HEADERS([TBufferFile.h]) | |
73 | ||
0b6c2560 | 74 | # TView.h has been made pure virtual right after root v5-15-02 and one |
75 | # has to derive from TView3D.h (needed for TPCLib/OnlineDisplay/AliHLTTPCDisplay3D) | |
76 | AC_CHECK_HEADERS([TView3D.h]) | |
77 | ||
dc8f7cb7 | 78 | CPPFLAGS=$save_CPPFLAGS |
79 | LDFLAGS=$save_LDFLAGS | |
80 | LIBS=$save_LIBS | |
dfaa582a | 81 | AC_LANG_POP(C++) |
dc8f7cb7 | 82 | fi |
b521659f | 83 | |
84 | dnl ------------------------------------------------------------------ | |
85 | # TODO: make this configurable through arguments | |
86 | #Define whether you want to run with ALIROOT or only ROOT | |
87 | AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment]) | |
88 | ALIHLT_USEPACKAGE=ALIROOT | |
89 | #ALIHLT_USEPACKAGE=ROOT | |
90 | #ALIHLT_USEPACKAGE=STANDALONE | |
91 | AC_DEFINE(use_aliroot) | |
92 | AC_DEFINE(use_root) | |
85869391 | 93 | CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}" |
85869391 | 94 | |
95 | dnl ------------------------------------------------------------------ | |
74c73e5a | 96 | dnl check for AliRoot features |
97 | AC_LANG_PUSH(C++) | |
74c73e5a | 98 | have_aliroot=no |
2bbbadd1 | 99 | AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation], |
100 | [test -d $with_aliroot && ALICE_ROOT=$with_aliroot], | |
101 | []) | |
102 | ||
103 | if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then | |
104 | dnl ------------------------------------------------------------------ | |
105 | dnl Try to estimate the system architecture | |
106 | case $host_os:$host_cpu in | |
107 | linux*:x86_64*) alice_target='linuxx8664gcc' ;; | |
108 | linux*) alice_target='linux' ;; | |
109 | *) alice_target='unknown' ;; | |
110 | esac | |
111 | if test "x$alice_target" = "xunknown" ; then | |
112 | if test -z $ALICE_TARGET ; then | |
113 | AC_MSG_ERROR([Can not estimate system architecture. | |
114 | To avoid the problem, set the ALICE_TARGET variable appropriately. | |
115 | Please send the following information to Matthias.Richter@ift.uib.no: | |
116 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) | |
117 | else | |
118 | AC_MSG_NOTICE([Unknown system architecture. | |
119 | Please send the following information to Matthias.Richter@ift.uib.no: | |
120 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) | |
121 | fi | |
122 | else | |
123 | if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then | |
124 | AC_MSG_WARN([The ALICE_TARGET variable does not match your current system | |
125 | overriding $ALICE_TARGET by $alice_target]) | |
126 | fi | |
127 | ALICE_TARGET=$alice_target | |
128 | fi | |
dc8f7cb7 | 129 | ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET} |
74c73e5a | 130 | ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET} |
131 | ALIROOTINCDIR=${ALICE_ROOT}/include | |
dc8f7cb7 | 132 | test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR]) |
2bbbadd1 | 133 | test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR]) |
134 | test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR]) | |
74c73e5a | 135 | fi |
2bbbadd1 | 136 | |
137 | AC_MSG_CHECKING([for AliRoot]) | |
74c73e5a | 138 | if test "x$ALICE_ROOT" != "x" \ |
dc8f7cb7 | 139 | && test -d ${ALIROOTBINDIR} \ |
74c73e5a | 140 | && test -d ${ALIROOTLIBDIR} \ |
141 | && test -d ${ALIROOTINCDIR}; then | |
142 | have_aliroot=$ALICE_ROOT | |
143 | else | |
dc8f7cb7 | 144 | ALIROOTBINDIR= |
74c73e5a | 145 | ALIROOTLIBDIR= |
146 | ALIROOTINCDIR= | |
147 | fi | |
148 | AC_MSG_RESULT([$have_aliroot]) | |
149 | ||
150 | if test ! "x$have_aliroot" = "xno" ; then | |
74c73e5a | 151 | ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW" |
152 | ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}" | |
dc8f7cb7 | 153 | ALIROOT_LIBS="-lESD $ADD_ROOTLIBS" |
74c73e5a | 154 | save_CPPFLAGS=$CPPFLAGS |
155 | save_LDFLAGS=$LDFLAGS | |
156 | save_LIBS=$LIBS | |
157 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
db16520a | 158 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" |
2bbbadd1 | 159 | |
74c73e5a | 160 | # check for certain AliRoot libraries/files/features |
2bbbadd1 | 161 | # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006) |
162 | have_alirawdata=no | |
163 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
164 | CHECKLIB=RAWDatabase | |
165 | AC_CHECK_LIB([$CHECKLIB],[_init], | |
166 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" | |
167 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
168 | CHECKLIB=RAWDatarec | |
169 | AC_CHECK_LIB([$CHECKLIB],[_init], | |
170 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" | |
171 | AC_DEFINE(HAVE_ALIRAWDATA) | |
172 | have_alirawdata=$CHECKLIB])], | |
173 | [# second pass with -RAWData | |
174 | CHECKLIB="-lRAWData" | |
175 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER" | |
176 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h> | |
177 | #include <AliRawReaderFile.h> | |
178 | #include <AliRawReaderDate.h> | |
179 | #include <AliRawReaderRoot.h>], | |
180 | [AliRawReaderMemory mreader; | |
181 | AliRawReaderFile freader; | |
182 | AliRawReaderDate dreader(NULL,0); | |
183 | AliRawReaderRoot rreader(NULL,0);])], | |
184 | [AC_DEFINE(HAVE_ALIRAWDATA) | |
185 | ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB" | |
186 | have_alirawdata=$CHECKLIB], | |
187 | [have_alirawdata=no]) | |
188 | ]) dnl AC_CHECK_LIB RAWDatabase | |
fa274626 | 189 | AC_MSG_CHECKING([for AliRawReader classes in RAWData libraries]) |
190 | AC_MSG_RESULT([$have_alirawdata]) | |
191 | ||
675d662a | 192 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
193 | CHECKLIB=AOD | |
194 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
195 | ||
196 | # CBD library is present since AliRoot version v4-05-00 (02.06.2006) | |
405f8376 | 197 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
675d662a | 198 | CHECKLIB=CDB |
199 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
200 | ||
201 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
202 | CHECKLIB=STEER | |
203 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
204 | ||
fa274626 | 205 | dnl |
206 | dnl check whether AliLog supports notification callback | |
207 | dnl | |
675d662a | 208 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
fa274626 | 209 | have_alilog_notification=no |
210 | AC_MSG_CHECKING([whether AliLog supports notification callback]) | |
211 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], | |
212 | [AliLog::AliLogNotification fct])], | |
213 | [have_alilog_notification=yes], | |
214 | [AC_DEFINE(NO_ALILOG_NOTIFICATION)]) | |
215 | AC_MSG_RESULT([$have_alilog_notification]) | |
2bbbadd1 | 216 | |
04dbc9e4 | 217 | dnl |
218 | dnl Check for the interface of AliExternalTrackParam which has been changed | |
219 | dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04 | |
220 | dnl or higher) | |
221 | externaltrackparam_version=1 | |
222 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>], | |
223 | [AliExternalTrackParam trackparam; | |
224 | Double_t param[[5]]; Double_t covar[[15]]; | |
225 | trackparam.Set(0., 0., param, covar);])], | |
226 | [externaltrackparam_version=2], | |
227 | [AC_DEFINE(EXTERNALTRACKPARAM_V1)]) | |
228 | AC_MSG_CHECKING(for version of AliExternalTrackParam) | |
229 | AC_MSG_RESULT($externaltrackparam_version) | |
230 | ||
5894eaa5 | 231 | dnl |
232 | dnl required header files and libraries for the AliHLTPHOS library | |
233 | dnl | |
234 | have_alicalorawstream=no | |
235 | if test ! "x$have_aliroot" = "xno" ; then | |
236 | # this can not be used as AliCaloRawStream.h indirectly depends on TString.h | |
237 | #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes]) | |
238 | AC_MSG_CHECKING([for AliCaloRawStream.h usability]) | |
239 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <TString.h> | |
240 | #include <AliCaloRawStream.h>], | |
241 | [int i])], | |
242 | [AC_DEFINE(HAVE_ALICALORAWSTREAM) | |
243 | have_alicalorawstream=yes], | |
244 | []) | |
245 | AC_MSG_RESULT([$have_alicalorawstream]) | |
246 | fi | |
247 | ||
248 | dnl | |
249 | dnl required header files and libraries for the AliHLTTRD library | |
250 | dnl | |
251 | AC_CHECK_HEADERS([AliGeomManager.h], [], [AC_DEFINE([HAVNT_ALIGEOMMANAGER])]) | |
252 | ||
253 | dnl | |
254 | dnl required header files and libraries for the AliHLTTPC library | |
255 | dnl | |
74c73e5a | 256 | if test ! "x$have_aliroot" = "xno" ; then |
257 | # the HLTTPCLib needs to link agains TPCbase and TPCrec | |
258 | # TPC library for AliTPCParam and AliSimDigits used in | |
259 | # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx | |
5894eaa5 | 260 | # fram May 07 TPCbase depends on libGui.so |
74c73e5a | 261 | saveALIROOT_CPPFLAGS="$ALIROOT_CPPFLAGS" |
262 | ALIROOT_CPPFLAGS="$saveALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC" | |
263 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
264 | have_alitpc=yes | |
265 | AC_MSG_CHECKING(for required classes in TPC libraries) | |
266 | if test ! "x$have_alitpc" = "xno" ; then | |
267 | save_ALIROOT_LIBS=$ALIROOT_LIBS | |
5894eaa5 | 268 | ALIROOT_LIBS="$save_ALIROOT_LIBS -lTPCbase -lTPCrec -lGui" |
db16520a | 269 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
74c73e5a | 270 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h> |
271 | #include <AliTPCParam.h> | |
272 | #include <AliTPCParamSR.h> | |
273 | #include <AliTPCDigitsArray.h> | |
274 | #include <AliTPCClustersArray.h> | |
275 | #include <AliTPCcluster.h> | |
276 | #include <AliTPCClustersRow.h>], | |
277 | [AliSimDigits dig; | |
278 | AliTPCParam param; | |
279 | AliTPCParamSR paramsr; | |
280 | AliTPCDigitsArray digarray; | |
281 | AliTPCClustersArray clustarray; | |
282 | AliTPCcluster clust; | |
283 | AliTPCClustersRow row])], | |
284 | [AC_DEFINE(HAVE_ALITPC) | |
285 | saveALIROOT_CPPFLAGS=$ALIROOT_CPPFLAGS | |
286 | saveALIROOT_LIBS=$ALIROOT_LIBS], | |
287 | [have_alitpc=no | |
288 | ALIROOT_CPPFLAGS=$saveALIROOT_CPPFLAGS | |
289 | ALIROOT_LIBS=$saveALIROOT_LIBS]) | |
290 | fi | |
291 | AC_MSG_RESULT($have_alitpc) | |
292 | fi | |
293 | ||
294 | if test ! "x$have_alirawdata" = "xno" ; then | |
295 | # check for header files needed by the TPCLib/AliHLTTPCDigitReaderPacket | |
296 | # the header file has been moved to the TPC module | |
297 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
298 | # AliRawReaderMemory.h AliRawReaderFile.h already checked | |
299 | #AC_CHECK_HEADERS([AliRawReaderMemory.h AliRawReaderFile.h AliTPCRawStream.h]) | |
300 | AC_CHECK_HEADERS([AliTPCRawStream.h]) | |
301 | fi | |
85869391 | 302 | |
db16520a | 303 | have_tpc_mapping=no |
304 | if test ! "x$have_aliroot" = "xno" ; then | |
04dbc9e4 | 305 | # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC |
db16520a | 306 | # which is stored in the TPC/mapping/Patchx.data files from |
307 | # AliRoot version v4-04-Release (May 2006) | |
308 | AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available]) | |
309 | TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping | |
310 | AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data], | |
311 | [have_tpc_mapping=yes | |
312 | AC_SUBST(TPC_PAD_MAPPING_PATH) | |
313 | AC_DEFINE(HAVE_TPC_MAPPING)], | |
314 | []) | |
315 | ||
316 | fi | |
317 | AC_MSG_CHECKING([for TPC mapping layout]) | |
db16520a | 318 | AC_MSG_RESULT([$have_tpc_mapping]) |
04dbc9e4 | 319 | |
74c73e5a | 320 | if test "x$have_aliroot" = "xno" ; then |
321 | ALIROOT_CPPFLAGS= | |
322 | ALIROOT_LDFLAGS= | |
323 | ALIROOT_LIBS= | |
324 | fi | |
325 | CPPFLAGS=$save_CPPFLAGS | |
326 | LDFLAGS=$save_LDFLAGS | |
327 | LIBS=$save_LIBS | |
74c73e5a | 328 | fi |
329 | AC_LANG_POP(C++) | |
5f5b708b | 330 | AC_SUBST([ALICE_ROOT]) |
74c73e5a | 331 | AC_SUBST([ALIROOT_CPPFLAGS]) |
332 | AC_SUBST([ALIROOT_LDFLAGS]) | |
dc8f7cb7 | 333 | AC_SUBST([ALIROOTBINDIR]) |
53feaef5 | 334 | AC_SUBST([ALIROOTLIBDIR]) |
74c73e5a | 335 | AC_SUBST([ALIROOT_LIBS]) |
0f51f5b8 | 336 | AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes) |
85869391 | 337 | |
6c1a9d9e | 338 | HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE' |
339 | HLTBASE_LDFLAGS= | |
340 | AC_SUBST([HLTBASE_CPPFLAGS]) | |
341 | AC_SUBST([HLTBASE_LDFLAGS]) | |
342 | ||
78b557c2 | 343 | dnl ------------------------------------------------------------------ |
344 | dnl check for the HLT PubSub Framework | |
345 | AC_MSG_CHECKING([for HLT PubSub Framework]) | |
346 | AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework], | |
347 | [], | |
348 | [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ]) | |
349 | if test -z $with_pubsub || ! test -d $with_pubsub ; then | |
350 | with_pubsub=no | |
351 | fi | |
352 | AC_MSG_RESULT([$with_pubsub]) | |
5f1685a0 | 353 | HOMER_VERSION=1 |
354 | HOMER_LIBS= | |
78b557c2 | 355 | |
356 | AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface]) | |
357 | if test "x$with_pubsub" != "xno" ; then | |
358 | save_CPPFLAGS=$CPPFLAGS | |
359 | save_LDFLAGS=$LDFLAGS | |
360 | save_LIBS=$LIBS | |
4a6b4894 | 361 | # currently the different versions of the HLT PubSub framework have a different |
362 | # directory layout | |
20b6dd9a | 363 | if test -d ${with_pubsub}/include/HOMER ; then |
5235c3e9 | 364 | # the 'early' location of the include files with separated HOMER sub dirs |
9ce4bf4a | 365 | HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader" |
5235c3e9 | 366 | elif test -d ${with_pubsub}/include/Util/HOMER ; then |
367 | # location for HLT Framework versions after Sep 2006 | |
9ce4bf4a | 368 | HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER" |
5235c3e9 | 369 | elif test -d ${with_pubsub}/src/Util/HOMER/include ; then |
370 | # fall back if include files were not installed (versions after Sep 06) | |
9ce4bf4a | 371 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include" |
4a6b4894 | 372 | else |
5235c3e9 | 373 | # fall back if include files were not installed (versions before Sep 06) |
9ce4bf4a | 374 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include" |
4a6b4894 | 375 | fi |
9ce4bf4a | 376 | HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done` |
5894eaa5 | 377 | |
378 | AC_ARG_ENABLE(pubsub-debug, | |
379 | [AC_HELP_STRING([--disable-pubsub-debug], | |
380 | [force the production version of the PubSub framework])], | |
381 | [],[enable_pubsub_debug=yes]) | |
382 | homer_type="none" | |
383 | HOMER_TARGET="`uname -s`-`uname -m`" | |
384 | AC_MSG_CHECKING([for HLT PubSub Framework release type]) | |
385 | if test -d "${with_pubsub}/lib/${HOMER_TARGET}-release" ; then | |
386 | homer_type="production" | |
387 | HOMER_TARGET="${HOMER_TARGET}-release" | |
388 | elif test "x$enable_pubsub_debug" = "xyes" && test -d "${with_pubsub}/lib/${HOMER_TARGET}-debug" ; then | |
389 | homer_type="debug" | |
390 | HOMER_TARGET="${HOMER_TARGET}-debug" | |
391 | fi | |
392 | AC_MSG_RESULT([${homer_type}]) | |
393 | HOMER_BINDIR="${with_pubsub}/bin/${HOMER_TARGET}" | |
394 | HOMER_LIBDIR="${with_pubsub}/lib/${HOMER_TARGET}" | |
53feaef5 | 395 | HOMER_LDFLAGS="-L${HOMER_LIBDIR}" |
78b557c2 | 396 | CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS" |
397 | LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS" | |
398 | LIBS="$save_LIBS " | |
399 | with_homer=no | |
400 | AC_LANG_PUSH(C++) | |
401 | AC_CHECK_HEADER([HOMERReader.h], | |
5f1685a0 | 402 | [ AC_CHECK_LIB([HOMER],[_init], |
403 | [with_homer=yes | |
404 | HOMER_LIBS="-lHOMER"], | |
405 | [ AC_CHECK_LIB([HOMERReader],[_init], | |
406 | [with_homer=yes | |
407 | HOMER_LIBS="-lHOMERReader"])]) | |
408 | LIBS="$LIBS $HOMER_LIBS" | |
9ce4bf4a | 409 | AC_MSG_CHECKING([version of HOMER library]) |
5f1685a0 | 410 | dnl The Homer library has no versioning, so we do our own |
411 | dnl version description | |
412 | dnl ---------------------------------------------------------------------- | |
413 | dnl 1 inintial version | |
414 | dnl 2 GetBlockStatusFlags added to the interface | |
415 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>], | |
416 | [HOMERReader reader("dummy", 0); | |
417 | reader.GetBlockStatusFlags(0);])], | |
418 | [if test $HOMER_VERSION -lt 2 ; then HOMER_VERSION=2; fi], | |
419 | []) | |
420 | AC_MSG_RESULT([$HOMER_VERSION]) | |
421 | ]) #AC_CHECK_HEADER([HOMERReader.h]) | |
78b557c2 | 422 | AC_LANG_POP(C++) |
423 | if test "x$with_homer" = "xno" ; then | |
424 | HOMER_CPPFLAGS= | |
425 | HOMER_LDFLAGS= | |
5f1685a0 | 426 | HOMER_LIBS= |
78b557c2 | 427 | else |
5f1685a0 | 428 | HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION" |
78b557c2 | 429 | AC_DEFINE(HAVE_HOMERREADER) |
430 | fi | |
431 | CPPFLAGS="$save_CPPFLAGS" | |
432 | LDFLAGS="$save_LDFLAGS" | |
433 | LIBS="$save_LIBS" | |
434 | fi | |
435 | AC_SUBST([HOMER_CPPFLAGS]) | |
436 | AC_SUBST([HOMER_LDFLAGS]) | |
53feaef5 | 437 | AC_SUBST([HOMER_LIBDIR]) |
438 | AC_SUBST([HOMER_BINDIR]) | |
5f1685a0 | 439 | AC_SUBST([HOMER_LIBS]) |
78b557c2 | 440 | |
85869391 | 441 | dnl ------------------------------------------------------------------ |
442 | AC_MSG_CHECKING([whether to impose strict coding conventions]) | |
443 | AC_ARG_ENABLE(strict, | |
444 | [AC_HELP_STRING([--enable-strict], | |
445 | [enable coding convention checks ])], | |
446 | [],[enable_strict=no]) | |
447 | if test "x$enable_strict" = "xyes" ; then | |
448 | CPPFLAGS="$CPPFLAGS -Weffc++" | |
449 | fi | |
450 | AC_MSG_RESULT([$enable_strict]) | |
b521659f | 451 | |
452 | dnl ------------------------------------------------------------------ | |
453 | AC_MSG_CHECKING([whether to compile sample library]) | |
454 | AH_TEMPLATE([HLT_SAMPLE],[hlt sample library]) | |
455 | AC_ARG_ENABLE(sample, | |
456 | [AC_HELP_STRING([--enable-sample], | |
457 | [compile the sample library ])], | |
458 | [],[enable_sample=yes]) | |
459 | if test "x$enable_sample" = "xyes" ; then | |
460 | AC_DEFINE(HLT_SAMPLE) | |
461 | fi | |
462 | AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes) | |
463 | AC_MSG_RESULT([$enable_sample]) | |
464 | ||
465 | dnl ------------------------------------------------------------------ | |
466 | AC_MSG_CHECKING([whether to compile tpc library]) | |
467 | AH_TEMPLATE([HLT_TPC],[hlt tpc library]) | |
468 | AC_ARG_ENABLE(tpc, | |
469 | [AC_HELP_STRING([--enable-tpc], | |
470 | [compile the tpc library ])], | |
471 | [],[enable_tpc=yes]) | |
74c73e5a | 472 | if test "x$have_aliroot" = "xno" ; then |
473 | enable_tpc="no...requires.AliRoot" | |
474 | elif test "x$have_alitpc" = "xno" ; then | |
475 | enable_tpc="no...requires.AliRoot.TPC.libraries" | |
476 | fi | |
b521659f | 477 | if test "x$enable_tpc" = "xyes" ; then |
478 | AC_DEFINE(HLT_TPC) | |
479 | fi | |
480 | AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes) | |
481 | AC_MSG_RESULT([$enable_tpc]) | |
482 | ||
c160eda8 | 483 | dnl ------------------------------------------------------------------ |
484 | AC_MSG_CHECKING([whether to compile phos library]) | |
485 | AH_TEMPLATE([HLT_PHOS],[hlt phos library]) | |
486 | AC_ARG_ENABLE(phos, | |
487 | [AC_HELP_STRING([--enable-phos], | |
488 | [compile the phos library ])], | |
489 | [],[enable_phos=yes]) | |
490 | if test "x$have_aliroot" = "xno" ; then | |
491 | enable_phos="no...requires.AliRoot" | |
04dbc9e4 | 492 | elif ! test "x$have_alicalorawstream" = "xyes"; then |
493 | enable_phos="no...requires.AliRoot>v4-05-07" | |
c160eda8 | 494 | fi |
495 | if test "x$enable_phos" = "xyes" ; then | |
496 | AC_DEFINE(HLT_PHOS) | |
497 | fi | |
498 | AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes) | |
499 | AC_MSG_RESULT([$enable_phos]) | |
500 | ||
0f51f5b8 | 501 | dnl ------------------------------------------------------------------ |
502 | AC_MSG_CHECKING([whether to compile trd library]) | |
503 | AH_TEMPLATE([HLT_TRD],[hlt trd library]) | |
504 | AC_ARG_ENABLE(trd, | |
505 | [AC_HELP_STRING([--enable-trd], | |
506 | [compile the trd library ])], | |
507 | [],[enable_trd=yes]) | |
508 | if test "x$have_aliroot" = "xno" ; then | |
509 | enable_trd="no...requires.AliRoot" | |
510 | fi | |
511 | if test "x$enable_trd" = "xyes" ; then | |
512 | AC_DEFINE(HLT_TRD) | |
513 | fi | |
514 | AM_CONDITIONAL(EN_HLT_TRD, test x$enable_trd = xyes) | |
515 | AC_MSG_RESULT([$enable_trd]) | |
516 | ||
94cc9aab | 517 | dnl ------------------------------------------------------------------ |
518 | AC_MSG_CHECKING([whether to compile dimuon library]) | |
519 | AH_TEMPLATE([HLT_MUON],[hlt dimuon library]) | |
520 | AC_ARG_ENABLE(dimuon, | |
521 | [AC_HELP_STRING([--enable-dimuon], | |
522 | [compile the dimuon library ])], | |
523 | [],[enable_dimuon=yes]) | |
524 | if test "x$have_aliroot" = "xno" ; then | |
525 | enable_dimuon="no...requires.AliRoot" | |
526 | fi | |
527 | if test "x$enable_dimuon" = "xyes" ; then | |
528 | AC_DEFINE(HLT_MUON) | |
529 | fi | |
530 | AM_CONDITIONAL(EN_HLT_MUON, test x$enable_dimuon = xyes) | |
531 | AC_MSG_RESULT([$enable_dimuon]) | |
532 | ||
b521659f | 533 | dnl ------------------------------------------------------------------ |
fc455fba | 534 | AC_MSG_CHECKING([whether to disable AliRoot logging]) |
535 | AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging]) | |
536 | AC_ARG_ENABLE(aliroot-logging, | |
537 | [AC_HELP_STRING([--disable-aliroot-logging], | |
538 | [disable logging through AliRoot logging methods])], | |
539 | [],[enable_aliroot_logging=no]) | |
540 | if test "x$enable_aliroot_logging" != "xno" ; then | |
541 | AC_DEFINE(NOALIROOT_LOGGING) | |
b521659f | 542 | fi |
fc455fba | 543 | AM_CONDITIONAL(NOALIROOT_LOGGING, test x$enable_aliroot_logging != no) |
544 | AC_MSG_RESULT([$enable_aliroot_logging]) | |
b521659f | 545 | |
546 | dnl ------------------------------------------------------------------ | |
547 | AC_MSG_CHECKING([whether to enable saving MC data through the chain]) | |
548 | AH_TEMPLATE([DOMC],[MC saving]) | |
549 | AC_ARG_ENABLE(mc-saving, | |
550 | [AC_HELP_STRING([--enable-mc-saving], | |
551 | [enable saving MC data through the chain])], | |
552 | [],[enable_mc_saving=no]) | |
553 | if test "x$enable_mc_saving" = "xyes" ; then | |
554 | AC_DEFINE(DOMC) | |
555 | fi | |
556 | AC_MSG_RESULT([$enable_mc_saving]) | |
557 | ||
b521659f | 558 | dnl ------------------------------------------------------------------ |
b521659f | 559 | dnl certainly something old, but we keep the define |
560 | AC_MSG_CHECKING([whether to use ROWHOUGH]) | |
561 | AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH]) | |
562 | AC_ARG_ENABLE(rowhough, | |
563 | [AC_HELP_STRING([--enable-rowhough], | |
564 | [use ROWHOUGH ])], | |
565 | [],[enable_rowhough=no]) | |
566 | if test "x$enable_rowhough" = "xyes" ; then | |
567 | AC_DEFINE(USEROWHOUGH) | |
568 | fi | |
569 | AC_MSG_RESULT([$enable_rowhough]) | |
570 | ||
53feaef5 | 571 | dnl ------------------------------------------------------------------ |
572 | dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old | |
573 | dnl stand-alone build system. This is most likely something old we can | |
574 | dnl get rid off later, or do something more reasonable. Since the define | |
575 | dnl needs the quotes they have to be escaped. This works well for the | |
576 | dnl Makefile but not for the configure script. So we have to add the | |
577 | dnl defines after all the other checks. | |
578 | CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" | |
579 | if test ! "x$have_aliroot" = "xno" ; then | |
580 | CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" | |
581 | fi | |
582 | ||
b521659f | 583 | dnl ------------------------------------------------------------------ |
584 | dnl | |
585 | dnl Documentation | |
586 | dnl | |
587 | AC_ARG_VAR(DOXYGEN, The Documentation Generator) | |
588 | AC_PATH_PROG(PERL, perl) | |
589 | AC_PATH_PROG(DOXYGEN, doxygen) | |
590 | AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x") | |
5894eaa5 | 591 | AC_ARG_ENABLE(dot, |
592 | [AC_HELP_STRING([--enable-dot], | |
593 | [enable dot documentation generator])], | |
594 | [],[enable_dot=no]) | |
b521659f | 595 | HAVE_DOT=NO |
596 | DOT_PATH= | |
597 | AC_PATH_PROG(DOT, dot) | |
5894eaa5 | 598 | if test "x$DOT" != "x" && test "x$enable_dot" = "xyes" ; then |
b521659f | 599 | HAVE_DOT=YES |
600 | DOT_PATH=`dirname $DOT` | |
601 | fi | |
602 | AC_SUBST([HAVE_DOT]) | |
603 | AC_SUBST([DOT_PATH]) | |
604 | ||
90ebac25 | 605 | dnl HAVE_SRC_SUBDIR=${abs_top_srcdir}/src |
606 | dnl echo $HAVE_SRC_SUBDIR | |
607 | dnl if ! test -d $HAVE_SRC_SUBDIR; then | |
608 | dnl HAVE_SRC_SUBDIR= | |
609 | dnl fi | |
610 | dnl AC_SUBST([HAVE_SRC_SUBDIR]) | |
611 | ||
2bbbadd1 | 612 | dnl ------------------------------------------------------------------ |
613 | dnl inatallation directory for libraries | |
614 | dnl | |
615 | if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then | |
616 | libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET | |
617 | AC_MSG_NOTICE([libdir set to $libdir]) | |
618 | fi | |
b521659f | 619 | dnl ------------------------------------------------------------------ |
620 | AC_CONFIG_FILES([Makefile | |
621 | BASE/Makefile | |
53feaef5 | 622 | BASE/setenv.sh |
623 | BASE/setenv.csh | |
242bb794 | 624 | BASE/util/Makefile |
d098ebd4 | 625 | BASE/interface/Makefile |
b521659f | 626 | SampleLib/Makefile |
627 | TPCLib/Makefile | |
db16520a | 628 | TPCLib/mapping2array.cxx |
78b557c2 | 629 | TPCLib/OnlineDisplay/Makefile |
c160eda8 | 630 | PHOS/Makefile |
0f51f5b8 | 631 | TRD/Makefile |
94cc9aab | 632 | MUON/Makefile |
b521659f | 633 | doc/Makefile |
634 | doc/doxygen.conf]) | |
635 | ||
636 | ||
637 | AC_OUTPUT | |
638 | dnl | |
639 | dnl EOF | |
640 | dnl | |
641 |