]>
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 ------------------------------------------------------------------ | |
2bbbadd1 | 8 | AC_INIT([Alice High Level Trigger] , [0.5-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 | ||
47 | dnl test for additional required root libraries | |
48 | # we check for the libSTEER library which is linked to | |
49 | # - the ROOT libs libGeom libMinuit libVMC libEG | |
50 | # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07) | |
51 | # - ROOT libCint needs also libdl | |
52 | # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires | |
53 | # libTreePlayer.so | |
54 | # - from Jan 07 libESD also depends on libXMLIO | |
55 | LIBS='-ldl' | |
56 | if test "x$have_root" = "x1"; then | |
57 | save_CPPFLAGS=$CPPFLAGS | |
58 | save_LDFLAGS=$LDFLAGS | |
59 | save_LIBS=$LIBS | |
60 | ||
61 | ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO' | |
62 | for CHECKLIB in $ROOT_CHECKLIBS ; do | |
63 | CPPFLAGS="$save_CPPFLAGS" | |
64 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}" | |
65 | LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS" | |
66 | AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"]) | |
67 | done | |
68 | ||
69 | CPPFLAGS=$save_CPPFLAGS | |
70 | LDFLAGS=$save_LDFLAGS | |
71 | LIBS=$save_LIBS | |
72 | fi | |
b521659f | 73 | |
74 | dnl ------------------------------------------------------------------ | |
75 | # TODO: make this configurable through arguments | |
76 | #Define whether you want to run with ALIROOT or only ROOT | |
77 | AH_TEMPLATE([ALIHLT_USEPACKAGE],[running environment]) | |
78 | ALIHLT_USEPACKAGE=ALIROOT | |
79 | #ALIHLT_USEPACKAGE=ROOT | |
80 | #ALIHLT_USEPACKAGE=STANDALONE | |
81 | AC_DEFINE(use_aliroot) | |
82 | AC_DEFINE(use_root) | |
85869391 | 83 | CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}" |
85869391 | 84 | |
85 | dnl ------------------------------------------------------------------ | |
74c73e5a | 86 | dnl check for AliRoot features |
87 | AC_LANG_PUSH(C++) | |
74c73e5a | 88 | have_aliroot=no |
2bbbadd1 | 89 | AC_ARG_WITH(aliroot,[ --with-aliroot top of the AliRoot installation], |
90 | [test -d $with_aliroot && ALICE_ROOT=$with_aliroot], | |
91 | []) | |
92 | ||
93 | if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then | |
94 | dnl ------------------------------------------------------------------ | |
95 | dnl Try to estimate the system architecture | |
96 | case $host_os:$host_cpu in | |
97 | linux*:x86_64*) alice_target='linuxx8664gcc' ;; | |
98 | linux*) alice_target='linux' ;; | |
99 | *) alice_target='unknown' ;; | |
100 | esac | |
101 | if test "x$alice_target" = "xunknown" ; then | |
102 | if test -z $ALICE_TARGET ; then | |
103 | AC_MSG_ERROR([Can not estimate system architecture. | |
104 | To avoid the problem, set the ALICE_TARGET variable appropriately. | |
105 | Please send the following information to Matthias.Richter@ift.uib.no: | |
106 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) | |
107 | else | |
108 | AC_MSG_NOTICE([Unknown system architecture. | |
109 | Please send the following information to Matthias.Richter@ift.uib.no: | |
110 | ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ]) | |
111 | fi | |
112 | else | |
113 | if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then | |
114 | AC_MSG_WARN([The ALICE_TARGET variable does not match your current system | |
115 | overriding $ALICE_TARGET by $alice_target]) | |
116 | fi | |
117 | ALICE_TARGET=$alice_target | |
118 | fi | |
dc8f7cb7 | 119 | ALIROOTBINDIR=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET} |
74c73e5a | 120 | ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET} |
121 | ALIROOTINCDIR=${ALICE_ROOT}/include | |
dc8f7cb7 | 122 | test -d ${ALIROOTBINDIR} || AC_MSG_WARN([can not find AliRoot binary directory $ALIROOTBINDIR]) |
2bbbadd1 | 123 | test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR]) |
124 | test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR]) | |
74c73e5a | 125 | fi |
2bbbadd1 | 126 | |
127 | AC_MSG_CHECKING([for AliRoot]) | |
74c73e5a | 128 | if test "x$ALICE_ROOT" != "x" \ |
dc8f7cb7 | 129 | && test -d ${ALIROOTBINDIR} \ |
74c73e5a | 130 | && test -d ${ALIROOTLIBDIR} \ |
131 | && test -d ${ALIROOTINCDIR}; then | |
132 | have_aliroot=$ALICE_ROOT | |
133 | else | |
dc8f7cb7 | 134 | ALIROOTBINDIR= |
74c73e5a | 135 | ALIROOTLIBDIR= |
136 | ALIROOTINCDIR= | |
137 | fi | |
138 | AC_MSG_RESULT([$have_aliroot]) | |
139 | ||
140 | if test ! "x$have_aliroot" = "xno" ; then | |
74c73e5a | 141 | ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW" |
142 | ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}" | |
dc8f7cb7 | 143 | ALIROOT_LIBS="-lESD $ADD_ROOTLIBS" |
74c73e5a | 144 | save_CPPFLAGS=$CPPFLAGS |
145 | save_LDFLAGS=$LDFLAGS | |
146 | save_LIBS=$LIBS | |
147 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
db16520a | 148 | LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS" |
2bbbadd1 | 149 | |
74c73e5a | 150 | # check for certain AliRoot libraries/files/features |
2bbbadd1 | 151 | # CBD library is present since AliRoot version v4-05-00 (02.06.2006) |
152 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
153 | CHECKLIB=CDB | |
154 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
74c73e5a | 155 | |
2bbbadd1 | 156 | # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006) |
157 | have_alirawdata=no | |
158 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
159 | CHECKLIB=RAWDatabase | |
160 | AC_CHECK_LIB([$CHECKLIB],[_init], | |
161 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" | |
162 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
163 | CHECKLIB=RAWDatarec | |
164 | AC_CHECK_LIB([$CHECKLIB],[_init], | |
165 | [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB" | |
166 | AC_DEFINE(HAVE_ALIRAWDATA) | |
167 | have_alirawdata=$CHECKLIB])], | |
168 | [# second pass with -RAWData | |
169 | CHECKLIB="-lRAWData" | |
170 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER" | |
171 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h> | |
172 | #include <AliRawReaderFile.h> | |
173 | #include <AliRawReaderDate.h> | |
174 | #include <AliRawReaderRoot.h>], | |
175 | [AliRawReaderMemory mreader; | |
176 | AliRawReaderFile freader; | |
177 | AliRawReaderDate dreader(NULL,0); | |
178 | AliRawReaderRoot rreader(NULL,0);])], | |
179 | [AC_DEFINE(HAVE_ALIRAWDATA) | |
180 | ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB" | |
181 | have_alirawdata=$CHECKLIB], | |
182 | [have_alirawdata=no]) | |
183 | ]) dnl AC_CHECK_LIB RAWDatabase | |
184 | AC_MSG_CHECKING(for AliRawReader classes in RAWData libraries) | |
185 | AC_MSG_RESULT($have_alirawdata) | |
186 | ||
187 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" | |
188 | CHECKLIB=STEER | |
189 | AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"]) | |
74c73e5a | 190 | |
191 | if test ! "x$have_aliroot" = "xno" ; then | |
192 | # the HLTTPCLib needs to link agains TPCbase and TPCrec | |
193 | # TPC library for AliTPCParam and AliSimDigits used in | |
194 | # AliHLTTPCFileHandler.h and AliHLTTPCDisplay.cxx | |
195 | saveALIROOT_CPPFLAGS="$ALIROOT_CPPFLAGS" | |
196 | ALIROOT_CPPFLAGS="$saveALIROOT_CPPFLAGS -I${ALICE_ROOT}/TPC" | |
197 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
198 | have_alitpc=yes | |
199 | AC_MSG_CHECKING(for required classes in TPC libraries) | |
200 | if test ! "x$have_alitpc" = "xno" ; then | |
201 | save_ALIROOT_LIBS=$ALIROOT_LIBS | |
202 | ALIROOT_LIBS="$save_ALIROOT_LIBS -lTPCbase -lTPCrec" | |
db16520a | 203 | LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" |
74c73e5a | 204 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliSimDigits.h> |
205 | #include <AliTPCParam.h> | |
206 | #include <AliTPCParamSR.h> | |
207 | #include <AliTPCDigitsArray.h> | |
208 | #include <AliTPCClustersArray.h> | |
209 | #include <AliTPCcluster.h> | |
210 | #include <AliTPCClustersRow.h>], | |
211 | [AliSimDigits dig; | |
212 | AliTPCParam param; | |
213 | AliTPCParamSR paramsr; | |
214 | AliTPCDigitsArray digarray; | |
215 | AliTPCClustersArray clustarray; | |
216 | AliTPCcluster clust; | |
217 | AliTPCClustersRow row])], | |
218 | [AC_DEFINE(HAVE_ALITPC) | |
219 | saveALIROOT_CPPFLAGS=$ALIROOT_CPPFLAGS | |
220 | saveALIROOT_LIBS=$ALIROOT_LIBS], | |
221 | [have_alitpc=no | |
222 | ALIROOT_CPPFLAGS=$saveALIROOT_CPPFLAGS | |
223 | ALIROOT_LIBS=$saveALIROOT_LIBS]) | |
224 | fi | |
225 | AC_MSG_RESULT($have_alitpc) | |
226 | fi | |
227 | ||
228 | if test ! "x$have_alirawdata" = "xno" ; then | |
229 | # check for header files needed by the TPCLib/AliHLTTPCDigitReaderPacket | |
230 | # the header file has been moved to the TPC module | |
231 | CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS" | |
232 | # AliRawReaderMemory.h AliRawReaderFile.h already checked | |
233 | #AC_CHECK_HEADERS([AliRawReaderMemory.h AliRawReaderFile.h AliTPCRawStream.h]) | |
234 | AC_CHECK_HEADERS([AliTPCRawStream.h]) | |
235 | fi | |
85869391 | 236 | |
db16520a | 237 | have_tpc_mapping=no |
238 | if test ! "x$have_aliroot" = "xno" ; then | |
239 | # the TPCLib/AliHLTTPCRawReader needs the actual Pad layot of the TPC | |
240 | # which is stored in the TPC/mapping/Patchx.data files from | |
241 | # AliRoot version v4-04-Release (May 2006) | |
242 | AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available]) | |
243 | TPC_PAD_MAPPING_PATH=$have_aliroot/TPC/mapping | |
244 | AC_CHECK_FILE( [$TPC_PAD_MAPPING_PATH/Patch0.data], | |
245 | [have_tpc_mapping=yes | |
246 | AC_SUBST(TPC_PAD_MAPPING_PATH) | |
247 | AC_DEFINE(HAVE_TPC_MAPPING)], | |
248 | []) | |
249 | ||
250 | fi | |
251 | AC_MSG_CHECKING([for TPC mapping layout]) | |
252 | AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes) | |
253 | AC_MSG_RESULT([$have_tpc_mapping]) | |
254 | ||
74c73e5a | 255 | if test "x$have_aliroot" = "xno" ; then |
256 | ALIROOT_CPPFLAGS= | |
257 | ALIROOT_LDFLAGS= | |
258 | ALIROOT_LIBS= | |
259 | fi | |
260 | CPPFLAGS=$save_CPPFLAGS | |
261 | LDFLAGS=$save_LDFLAGS | |
262 | LIBS=$save_LIBS | |
74c73e5a | 263 | fi |
264 | AC_LANG_POP(C++) | |
265 | AC_SUBST([ALIROOT_CPPFLAGS]) | |
266 | AC_SUBST([ALIROOT_LDFLAGS]) | |
dc8f7cb7 | 267 | AC_SUBST([ALIROOTBINDIR]) |
53feaef5 | 268 | AC_SUBST([ALIROOTLIBDIR]) |
74c73e5a | 269 | AC_SUBST([ALIROOT_LIBS]) |
85869391 | 270 | |
6c1a9d9e | 271 | HLTBASE_CPPFLAGS='-I${top_srcdir}/BASE' |
272 | HLTBASE_LDFLAGS= | |
273 | AC_SUBST([HLTBASE_CPPFLAGS]) | |
274 | AC_SUBST([HLTBASE_LDFLAGS]) | |
275 | ||
78b557c2 | 276 | dnl ------------------------------------------------------------------ |
277 | dnl check for the HLT PubSub Framework | |
278 | AC_MSG_CHECKING([for HLT PubSub Framework]) | |
279 | AC_ARG_WITH(pubsub, [installation path of the HLT PubSub framework], | |
280 | [], | |
281 | [ test -n $ALIHLT_DC_DIR && with_pubsub=$ALIHLT_DC_DIR ]) | |
282 | if test -z $with_pubsub || ! test -d $with_pubsub ; then | |
283 | with_pubsub=no | |
284 | fi | |
285 | AC_MSG_RESULT([$with_pubsub]) | |
5f1685a0 | 286 | HOMER_VERSION=1 |
287 | HOMER_LIBS= | |
78b557c2 | 288 | |
289 | AH_TEMPLATE([HAVE_HOMERREADER],[the HLT PubSub Homer Reader interface]) | |
290 | if test "x$with_pubsub" != "xno" ; then | |
291 | save_CPPFLAGS=$CPPFLAGS | |
292 | save_LDFLAGS=$LDFLAGS | |
293 | save_LIBS=$LIBS | |
4a6b4894 | 294 | # currently the different versions of the HLT PubSub framework have a different |
295 | # directory layout | |
20b6dd9a | 296 | if test -d ${with_pubsub}/include/HOMER ; then |
5235c3e9 | 297 | # the 'early' location of the include files with separated HOMER sub dirs |
9ce4bf4a | 298 | HOMER_INCDIRS="${with_pubsub}/include/HOMER ${with_pubsub}/include/HOMER/reader" |
5235c3e9 | 299 | elif test -d ${with_pubsub}/include/Util/HOMER ; then |
300 | # location for HLT Framework versions after Sep 2006 | |
9ce4bf4a | 301 | HOMER_INCDIRS="${with_pubsub}/include/Util/HOMER" |
5235c3e9 | 302 | elif test -d ${with_pubsub}/src/Util/HOMER/include ; then |
303 | # fall back if include files were not installed (versions after Sep 06) | |
9ce4bf4a | 304 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/include" |
4a6b4894 | 305 | else |
5235c3e9 | 306 | # fall back if include files were not installed (versions before Sep 06) |
9ce4bf4a | 307 | HOMER_INCDIRS="${with_pubsub}/src/Util/HOMER/reader/include ${with_pubsub}/src/Util/HOMER/data/include" |
4a6b4894 | 308 | fi |
9ce4bf4a | 309 | HOMER_CPPFLAGS=`for i in ${HOMER_INCDIRS}; do echo -n "-I$i " ; done` |
53feaef5 | 310 | HOMER_BINDIR="${with_pubsub}/bin/`uname -s`-`uname -m`" |
311 | HOMER_LIBDIR="${with_pubsub}/lib/`uname -s`-`uname -m`" | |
312 | HOMER_LDFLAGS="-L${HOMER_LIBDIR}" | |
78b557c2 | 313 | CPPFLAGS="$save_CPPFLAGS $HOMER_CPPFLAGS" |
314 | LDFLAGS="$save_LDFLAGS $HOMER_LDFLAGS" | |
315 | LIBS="$save_LIBS " | |
316 | with_homer=no | |
317 | AC_LANG_PUSH(C++) | |
318 | AC_CHECK_HEADER([HOMERReader.h], | |
5f1685a0 | 319 | [ AC_CHECK_LIB([HOMER],[_init], |
320 | [with_homer=yes | |
321 | HOMER_LIBS="-lHOMER"], | |
322 | [ AC_CHECK_LIB([HOMERReader],[_init], | |
323 | [with_homer=yes | |
324 | HOMER_LIBS="-lHOMERReader"])]) | |
325 | LIBS="$LIBS $HOMER_LIBS" | |
9ce4bf4a | 326 | AC_MSG_CHECKING([version of HOMER library]) |
5f1685a0 | 327 | dnl The Homer library has no versioning, so we do our own |
328 | dnl version description | |
329 | dnl ---------------------------------------------------------------------- | |
330 | dnl 1 inintial version | |
331 | dnl 2 GetBlockStatusFlags added to the interface | |
332 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <HOMERReader.h>], | |
333 | [HOMERReader reader("dummy", 0); | |
334 | reader.GetBlockStatusFlags(0);])], | |
335 | [if test $HOMER_VERSION -lt 2 ; then HOMER_VERSION=2; fi], | |
336 | []) | |
337 | AC_MSG_RESULT([$HOMER_VERSION]) | |
338 | ]) #AC_CHECK_HEADER([HOMERReader.h]) | |
78b557c2 | 339 | AC_LANG_POP(C++) |
340 | if test "x$with_homer" = "xno" ; then | |
341 | HOMER_CPPFLAGS= | |
342 | HOMER_LDFLAGS= | |
5f1685a0 | 343 | HOMER_LIBS= |
78b557c2 | 344 | else |
5f1685a0 | 345 | HOMER_CPPFLAGS="$HOMER_CPPFLAGS -DHOMER_VERSION=$HOMER_VERSION" |
78b557c2 | 346 | AC_DEFINE(HAVE_HOMERREADER) |
347 | fi | |
348 | CPPFLAGS="$save_CPPFLAGS" | |
349 | LDFLAGS="$save_LDFLAGS" | |
350 | LIBS="$save_LIBS" | |
351 | fi | |
352 | AC_SUBST([HOMER_CPPFLAGS]) | |
353 | AC_SUBST([HOMER_LDFLAGS]) | |
53feaef5 | 354 | AC_SUBST([HOMER_LIBDIR]) |
355 | AC_SUBST([HOMER_BINDIR]) | |
5f1685a0 | 356 | AC_SUBST([HOMER_LIBS]) |
78b557c2 | 357 | |
85869391 | 358 | dnl ------------------------------------------------------------------ |
359 | AC_MSG_CHECKING([whether to impose strict coding conventions]) | |
360 | AC_ARG_ENABLE(strict, | |
361 | [AC_HELP_STRING([--enable-strict], | |
362 | [enable coding convention checks ])], | |
363 | [],[enable_strict=no]) | |
364 | if test "x$enable_strict" = "xyes" ; then | |
365 | CPPFLAGS="$CPPFLAGS -Weffc++" | |
366 | fi | |
367 | AC_MSG_RESULT([$enable_strict]) | |
b521659f | 368 | |
369 | dnl ------------------------------------------------------------------ | |
370 | AC_MSG_CHECKING([whether to compile sample library]) | |
371 | AH_TEMPLATE([HLT_SAMPLE],[hlt sample library]) | |
372 | AC_ARG_ENABLE(sample, | |
373 | [AC_HELP_STRING([--enable-sample], | |
374 | [compile the sample library ])], | |
375 | [],[enable_sample=yes]) | |
376 | if test "x$enable_sample" = "xyes" ; then | |
377 | AC_DEFINE(HLT_SAMPLE) | |
378 | fi | |
379 | AM_CONDITIONAL(EN_HLT_SAMPLE, test x$enable_sample = xyes) | |
380 | AC_MSG_RESULT([$enable_sample]) | |
381 | ||
382 | dnl ------------------------------------------------------------------ | |
383 | AC_MSG_CHECKING([whether to compile tpc library]) | |
384 | AH_TEMPLATE([HLT_TPC],[hlt tpc library]) | |
385 | AC_ARG_ENABLE(tpc, | |
386 | [AC_HELP_STRING([--enable-tpc], | |
387 | [compile the tpc library ])], | |
388 | [],[enable_tpc=yes]) | |
74c73e5a | 389 | if test "x$have_aliroot" = "xno" ; then |
390 | enable_tpc="no...requires.AliRoot" | |
391 | elif test "x$have_alitpc" = "xno" ; then | |
392 | enable_tpc="no...requires.AliRoot.TPC.libraries" | |
393 | fi | |
b521659f | 394 | if test "x$enable_tpc" = "xyes" ; then |
395 | AC_DEFINE(HLT_TPC) | |
396 | fi | |
397 | AM_CONDITIONAL(EN_HLT_TPC, test x$enable_tpc = xyes) | |
398 | AC_MSG_RESULT([$enable_tpc]) | |
399 | ||
c160eda8 | 400 | dnl ------------------------------------------------------------------ |
401 | AC_MSG_CHECKING([whether to compile phos library]) | |
402 | AH_TEMPLATE([HLT_PHOS],[hlt phos library]) | |
403 | AC_ARG_ENABLE(phos, | |
404 | [AC_HELP_STRING([--enable-phos], | |
405 | [compile the phos library ])], | |
406 | [],[enable_phos=yes]) | |
407 | if test "x$have_aliroot" = "xno" ; then | |
408 | enable_phos="no...requires.AliRoot" | |
409 | fi | |
410 | if test "x$enable_phos" = "xyes" ; then | |
411 | AC_DEFINE(HLT_PHOS) | |
412 | fi | |
413 | AM_CONDITIONAL(EN_HLT_PHOS, test x$enable_phos = xyes) | |
414 | AC_MSG_RESULT([$enable_phos]) | |
415 | ||
b521659f | 416 | dnl ------------------------------------------------------------------ |
417 | AC_MSG_CHECKING([whether to enable HLT logging]) | |
418 | AH_TEMPLATE([NOLOGGING],[disable hlt logging]) | |
419 | AC_ARG_ENABLE(logging, | |
420 | [AC_HELP_STRING([--enable-logging], | |
421 | [enable logging])], | |
422 | [],[enable_logging=yes]) | |
423 | if test "x$enable_logging" != "xyes" ; then | |
424 | AC_DEFINE(NOLOGGING) | |
425 | fi | |
426 | AC_MSG_RESULT([$enable_logging]) | |
427 | ||
428 | dnl ------------------------------------------------------------------ | |
429 | AC_MSG_CHECKING([whether to enable saving MC data through the chain]) | |
430 | AH_TEMPLATE([DOMC],[MC saving]) | |
431 | AC_ARG_ENABLE(mc-saving, | |
432 | [AC_HELP_STRING([--enable-mc-saving], | |
433 | [enable saving MC data through the chain])], | |
434 | [],[enable_mc_saving=no]) | |
435 | if test "x$enable_mc_saving" = "xyes" ; then | |
436 | AC_DEFINE(DOMC) | |
437 | fi | |
438 | AC_MSG_RESULT([$enable_mc_saving]) | |
439 | ||
b521659f | 440 | dnl ------------------------------------------------------------------ |
b521659f | 441 | dnl certainly something old, but we keep the define |
442 | AC_MSG_CHECKING([whether to use ROWHOUGH]) | |
443 | AH_TEMPLATE([USEROWHOUGH],[HLT ROWHOUGH]) | |
444 | AC_ARG_ENABLE(rowhough, | |
445 | [AC_HELP_STRING([--enable-rowhough], | |
446 | [use ROWHOUGH ])], | |
447 | [],[enable_rowhough=no]) | |
448 | if test "x$enable_rowhough" = "xyes" ; then | |
449 | AC_DEFINE(USEROWHOUGH) | |
450 | fi | |
451 | AC_MSG_RESULT([$enable_rowhough]) | |
452 | ||
53feaef5 | 453 | dnl ------------------------------------------------------------------ |
454 | dnl The ROOTVERSION and ALIROOTVERSION defines were used by the old | |
455 | dnl stand-alone build system. This is most likely something old we can | |
456 | dnl get rid off later, or do something more reasonable. Since the define | |
457 | dnl needs the quotes they have to be escaped. This works well for the | |
458 | dnl Makefile but not for the configure script. So we have to add the | |
459 | dnl defines after all the other checks. | |
460 | CPPFLAGS="$CPPFLAGS -DROOTVERSION=\\\"`${ROOTCONF} --version`\\\"" | |
461 | if test ! "x$have_aliroot" = "xno" ; then | |
462 | CPPFLAGS="$CPPFLAGS -DALIROOTVERSION=\\\"Unknown\\\"" | |
463 | fi | |
464 | ||
b521659f | 465 | dnl ------------------------------------------------------------------ |
466 | dnl | |
467 | dnl Documentation | |
468 | dnl | |
469 | AC_ARG_VAR(DOXYGEN, The Documentation Generator) | |
470 | AC_PATH_PROG(PERL, perl) | |
471 | AC_PATH_PROG(DOXYGEN, doxygen) | |
472 | AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x") | |
473 | HAVE_DOT=NO | |
474 | DOT_PATH= | |
475 | AC_PATH_PROG(DOT, dot) | |
476 | if ! test "x$DOT" = "x" ; then | |
477 | HAVE_DOT=YES | |
478 | DOT_PATH=`dirname $DOT` | |
479 | fi | |
480 | AC_SUBST([HAVE_DOT]) | |
481 | AC_SUBST([DOT_PATH]) | |
482 | ||
2bbbadd1 | 483 | dnl ------------------------------------------------------------------ |
484 | dnl inatallation directory for libraries | |
485 | dnl | |
486 | if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then | |
487 | libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET | |
488 | AC_MSG_NOTICE([libdir set to $libdir]) | |
489 | fi | |
b521659f | 490 | dnl ------------------------------------------------------------------ |
491 | AC_CONFIG_FILES([Makefile | |
492 | BASE/Makefile | |
53feaef5 | 493 | BASE/setenv.sh |
494 | BASE/setenv.csh | |
b521659f | 495 | SampleLib/Makefile |
496 | TPCLib/Makefile | |
db16520a | 497 | TPCLib/mapping2array.cxx |
78b557c2 | 498 | TPCLib/OnlineDisplay/Makefile |
c160eda8 | 499 | PHOS/Makefile |
b521659f | 500 | doc/Makefile |
501 | doc/doxygen.conf]) | |
502 | ||
503 | ||
504 | AC_OUTPUT | |
505 | dnl | |
506 | dnl EOF | |
507 | dnl | |
508 |