ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/BOSS/acinclude.m4
Revision: 1.24
Committed: Tue Jul 17 07:19:08 2007 UTC (17 years, 9 months ago) by gcodispo
Branch: MAIN
CVS Tags: BOSS_4_3_10, BOSS_4_3_9, BOSS_4_3_8, BOSS_4_3_8-ui3_1, BOSS_4_3_7-ui3_1, BOSS_4_3_7, BOSS_4_3_6, HEAD
Branch point for: BOSS_4_3-ui3_0
Changes since 1.23: +2 -2 lines
Error occurred while calculating annotation data.
Log Message:
Fixed uuid search path

File Contents

# Content
1 AC_DEFUN([AC_CHECK_SYSTEM],
2 [
3 AC_CACHE_VAL(ARCH, [
4 os=`uname`
5 if test ${os} = "Linux"; then
6 SONAME="so"
7 LD_FLAGS="-Wl,-E"
8 LIB_OPT="-shared"
9 AC_MSG_RESULT(Operating System... Linux)
10 elif test ${os} = "Darwin"; then
11 AC_MSG_RESULT(Operating System... Darwin)
12 SONAME="dylib"
13 LD_FLAGS=""
14 LIB_OPT="-dynamiclib"
15 else
16 AC_MSG_ERROR( Unsupported OS )
17 fi
18 for p in `uname -m` ; do
19 case "$p" in
20 *x86_64*)
21 ARCH=amd64_
22 ;;
23 *i386* | *i686* )
24 ARCH=ia32_
25 ;;
26 esac
27 done
28 AC_SUBST(SONAME)
29 AC_SUBST(LD_FLAGS)
30 AC_SUBST(LIB_OPT)
31 AC_SUBST(ARCH)
32 ])
33
34 AC_CACHE_VAL(RELEASE, [
35 for p in `cat /etc/redhat-release /etc/issue* 2>/dev/null| sed 's/ //g'` ; do
36 case "$p" in
37 *Debian*GNU*Linux*3*1* | *Fedora* | *Fermi* | *Red*Hat*Enterprise* | *Rocks* )
38 RELEASE=slc3_
39 break
40 ;;
41 *SL* | *Scientific*Linux* )
42 RELEASE=slc[`sed 's/[^0-9]//g' /etc/redhat-release | cut -c 1`]_
43 break
44 ;;
45 *Mandrake* | *Red*Hat*Linux* | *SuSE* | *Debian*GNU*Linux*3*0* )
46 RELEASE=rh73_
47 ARC=""
48 AC_SUBST(ARCH)
49 break
50 ;;
51 esac
52 done
53 AC_SUBST(RELEASE)
54 ])
55
56 AC_CACHE_VAL(GCC_VERSION, [
57 for p in "`gcc --version | cut -d ' ' -f 1,3 `" ; do
58 case "$p" in
59 *gcc* )
60 GCC_VERSION=gcc[`echo $p | cut -d ' ' -f 2 |sed 's/[^0-9]//g' `]
61 ;;
62 esac
63 done
64 AC_SUBST(GCC_VERSION)
65 ])
66
67 AC_CACHE_VAL(SYSTEM, [
68 SYSTEM=${RELEASE}${ARCH}${GCC_VERSION}
69 echo system attributes... ${SYSTEM}
70 AC_SUBST(SYSTEM)
71 ])
72 ]
73 )
74
75
76 dn1 # Checks for SQLite libs
77 AC_DEFUN([AC_CHECK_SQLITE],
78 [
79 AC_MSG_RESULT(checking for sqlite in:)
80 # checking command line options
81 AC_ARG_WITH(sqlite_dir, [ --with-sqlite-dir=DIR top directory containing sqlite tree], sqlite_dir=${withval})
82 AC_ARG_WITH(sqlite_lib, [ --with-sqlite-lib=DIR directory containing sqlite lib], sqlite_lib=${withval})
83 AC_ARG_WITH(sqlite_include, [ --with-sqlite-include=DIR directory containing sqlite include], sqlite_inc=${withval})
84 #
85 # if a top dir is provided
86 #
87 if test [-n] "${sqlite_dir}" ; then
88 if test [-d] "${sqlite_dir}/lib" ; then
89 sqlite_lib=`(cd ${sqlite_dir}/lib; pwd)`
90 sqlite_lib_sh=${sqlite_lib}
91 else
92 AC_MSG_ERROR(sqlite lib dir not found. Please check sqlite installation and path)
93 fi
94 if test [-d] "${sqlite_dir}/include" ; then
95 sqlite_inc=`(cd ${sqlite_dir}/include; pwd)`
96 else
97 AC_MSG_ERROR(sqlite include dir not found. Please check sqlite installation and path)
98 fi
99 # test -d "${sqlite_dir}/lib" && sqlite_lib=`(cd ${sqlite_dir}/lib; pwd)`
100 # test -d "${sqlite_dir}/include" && sqlite_inc=`(cd ${sqlite_dir}/include; pwd)`
101 LIBS=[" -L${sqlite_lib}"]
102 fi
103 #
104 # otherwise check for libs
105 # starting from the one provided
106 #
107 if test [-n] "${sqlite_lib}" ; then
108 test -d "${sqlite_lib}" && sqlite_lib=`(cd ${sqlite_lib}; pwd)`
109 LIBS=[" -L${sqlite_lib}"]
110 sqlite_lib_sh=${sqlite_lib}
111 #
112 # if not provided look in the current dir
113 #
114 else
115 if test -d "$srcdir/sqlite" ; then
116 sqlite_ld_path="$srcdir/sqlite/lib"
117 sqlite_inc="\$(BOSS_ROOT)/sqlite/include"
118 sqlite_lib="\$(BOSS_ROOT)/sqlite/lib"
119 sqlite_lib_sh="\\\$BOSS_ROOT/sqlite/lib"
120 LIBS=[" -L$sqlite_ld_path"]
121 if test -f "$srcdir/sqlite/src/Makefile.in" ; then
122 MAKE_SQLITE_DIR="$srcdir/sqlite/src/Makefile"
123 fi
124 if test -f "$srcdir/sqlite/Makefile" ; then
125 MAKE_SQLITE="\$(MAKE) -C sqlite"
126 MAKE_SQLITE_CLEAN="\$(MAKE) -C sqlite clean"
127 AC_SUBST(MAKE_SQLITE)
128 AC_SUBST(MAKE_SQLITE_CLEAN)
129 fi
130 fi
131 #
132 # then in ${VO_CMS_SW_DIR}/lcg/external/sqlite
133 #
134 if test x"${sqlite_lib}" = x ; then
135 for i in \
136 `ls -dr ${VO_CMS_SW_DIR}/lcg/external/sqlite/*[3.[^0].*]*/${SYSTEM} 2>/dev/null` \
137 `ls -dr /afs/cern.ch/cms/external/lcg/external/sqlite/*[3.[^0].*]*/${SYSTEM} 2>/dev/null`
138 do
139 if test -f "$i/lib/libsqlite3.a" ; then
140 sqlite_lib=`(cd $i/lib; pwd)`
141 sqlite_lib_sh=${sqlite_lib}
142 sqlite_inc=`(cd $i/include; pwd)`
143 LIBS=[" -L${sqlite_lib}"]
144 break
145 fi
146 done
147 fi
148 #
149 # at the end check in a few common install locations
150 #
151 if test x"${sqlite_lib}" = x ; then
152 for i in \
153 `ls -d ${libdir} 2>/dev/null` \
154 `ls -d /usr/lib/sqlite/libsqlite3.a 2>/dev/null` \
155 `ls -d /usr/lib/libsqlite3.a 2>/dev/null` \
156 `ls -d /usr/local/lib/sqlite/libsqlite3.a 2>/dev/null` \
157 `ls -d /usr/local/lib/libsqlite3.a 2>/dev/null` \
158 `ls -d /usr/contrib/lib/sqlite/libsqlite3.a 2>/dev/null` \
159 `ls -d /usr/contrib/lib/libsqlite3.a 2>/dev/null`
160 do
161 if test -f "$i" ; then
162 sqlite_lib=`dirname $i`
163 sqlite_lib_sh=${sqlite_lib}
164 LIBS=[" -L${sqlite_lib}"]
165 break
166 fi
167 done
168 if test x"${sqlite_lib}" != x; then
169 for i in \
170 `ls -d ${includedir} 2>/dev/null` \
171 `ls -d /usr/include/sqlite/sqlite3.h 2>/dev/null` \
172 `ls -d /usr/include/sqlite3.h 2>/dev/null` \
173 `ls -d /usr/local/include/sqlite/sqlite3.h 2>/dev/null` \
174 `ls -d /usr/local/include/sqlite3.h 2>/dev/null` \
175 `ls -d /usr/contrib/include/sqlite/sqlite3.h 2>/dev/null` \
176 `ls -d /usr/contrib/include/sqlite3.h 2>/dev/null`
177 do
178 if test -f "$i" ; then
179 sqlite_inc=`dirname $i`
180 break
181 fi
182 done
183 fi
184 fi
185 fi
186 #
187 # now check if the include dir is there
188 #
189 if test [-n] "${sqlite_inc}" ; then
190 test -z "${sqlite_ld_path}" && sqlite_inc=`(cd ${sqlite_inc}; pwd)`
191 else
192 AC_MSG_ERROR(sqlite include dir not found. Please check sqlite installation and path)
193 fi
194 AC_MSG_RESULT(-> $sqlite_inc)
195 #
196 # check if the library is actually there
197 #
198 AC_MSG_RESULT(-> $sqlite_lib)
199 if test x"${MAKE_SQLITE}" = x ; then
200 AC_CHECK_LIB([sqlite3], [main], , [
201 AC_MSG_ERROR(sqlite3 library not found. Please check sqlite installation and path)])
202 fi
203 #
204 # perform variable substitution
205 #
206 if test -n "${sqlite_lib}" && test -n "${sqlite_inc}" ; then
207 sqlite=sqlite
208 AC_SUBST(sqlite)
209 AC_SUBST(sqlite_lib)
210 AC_SUBST(sqlite_lib_sh)
211 AC_SUBST(sqlite_inc)
212 else
213 AC_MSG_WARN("Can't find sqlite")
214 AC_MSG_ERROR(Please install it and rerun configuration)
215 fi
216 ])
217
218
219
220 dnl # Checks for MySQL
221 AC_DEFUN([AC_CHECK_MYSQL],
222 [
223 AC_MSG_RESULT(checking for mysql in:)
224 # checking command line options
225 AC_ARG_WITH(mysql_dir, [ --with-mysql-dir=DIR top directory containing mysql tree], mysql_dir=${withval})
226 AC_ARG_WITH(mysql_lib, [ --with-mysql-lib=DIR directory containing mysql lib], mysql_lib=${withval})
227 AC_ARG_WITH(mysql_include, [ --with-mysql-include=DIR directory containing mysql include], mysql_inc=${withval})
228 #
229 # if a top dir is provided
230 #
231 if test [-n] "${mysql_dir}" ; then
232 if test [-d] "${mysql_dir}/lib/mysql" ; then
233 mysql_lib=`(cd ${mysql_dir}/lib/mysql; pwd)`
234 elif test [-d] "${mysql_dir}/lib" ; then
235 mysql_lib=`(cd ${mysql_dir}/lib; pwd)`
236 else
237 AC_MSG_ERROR(mysql lib dir not found. Please check mysql installation and path)
238 fi
239 if test [-d] "${mysql_dir}/include/mysql" ; then
240 mysql_inc=`(cd ${mysql_dir}/include/mysql; pwd)`
241 elif test [-d] "${mysql_dir}/include" ; then
242 mysql_inc=`(cd ${mysql_dir}/include; pwd)`
243 else
244 AC_MSG_ERROR(mysql lib dir not found. Please check mysql installation and path)
245 fi
246 mysql_lib_sh=${mysql_lib}
247 LIBS=[" -L${mysql_lib}"]
248 fi
249 #
250 # otherwise check for libs
251 # starting from the one provided
252 #
253 if test [-n] "${mysql_lib}" ; then
254 mysql_lib=`(cd ${mysql_lib} 2>/dev/null; pwd)`
255 LIBS=[" -L${mysql_lib}"]
256 mysql_lib_sh=${mysql_lib}
257 #
258 # if not provided look in the current dir
259 #
260 else
261 if test -d "$srcdir/mysql" ; then
262 mysql_ld_path="$srcdir/mysql/lib"
263 mysql_inc="\$(BOSS_ROOT)/mysql/include"
264 mysql_lib="\$(BOSS_ROOT)/mysql/lib"
265 mysql_lib_sh="\\\$BOSS_ROOT/mysql/lib"
266 LIBS=[" -L$mysql_ld_path"]
267 if test -f "$srcdir/mysql/Makefile.in" ; then
268 MAKE_MYSQL_DIR="$srcdir/mysql/src/Makefile"
269 fi
270 if test -f "$srcdir/mysql/Makefile" ; then
271 MAKE_MYSQL="\$(MAKE) -C mysql"
272 MAKE_MYSQL_CLEAN="\$(MAKE) -C mysql clean"
273 AC_SUBST(MAKE_MYSQL)
274 AC_SUBST(MAKE_MYSQL_CLEAN)
275 fi
276 fi
277 #
278 # then in ${VO_CMS_SW_DIR}/lcg/external/mysql
279 #
280 if test x"${mysql_lib}" = x ; then
281 for i in \
282 `ls -dr ${VO_CMS_SW_DIR}/lcg/external/mysql/*4.*[^0].*/${SYSTEM} 2>/dev/null` \
283 `ls -dr ${VO_CMS_SW_DIR}/lcg/external/mysql/*5.*.*/${SYSTEM} 2>/dev/null` \
284 `ls -dr /afs/cern.ch/cms/external/lcg/external/mysql/*4.*[^0].*/${SYSTEM} 2>/dev/null` \
285 `ls -dr /afs/cern.ch/cms/external/lcg/external/mysql/*5.*.*/${SYSTEM} 2>/dev/null`
286 do
287 if test -f "$i/lib/libmysqlclient.so" ; then
288 mysql_lib=`(cd $i/lib; pwd)`
289 mysql_lib_sh=${mysql_lib}
290 mysql_inc=`(cd $i/include; pwd)`
291 LIBS=[" -L${mysql_lib}"]
292 break
293 fi
294 done
295 fi
296 #
297 # at the end check in a few common install locations
298 #
299 if test x"${mysql_lib}" = x ; then
300 for i in \
301 `ls -d ${libdir} 2>/dev/null` \
302 `ls -d /usr/lib/mysql/libmysqlclient.a 2>/dev/null` \
303 `ls -d /usr/lib/libmysqlclient.a 2>/dev/null` \
304 `ls -d /usr/local/lib/mysql/libmysqlclient.a 2>/dev/null` \
305 `ls -d /usr/local/lib/libmysqlclient.a 2>/dev/null` \
306 `ls -d /usr/contrib/lib/mysql/libmysqlclient.a 2>/dev/null` \
307 `ls -d /usr/contrib/lib/libmysqlclient.a 2>/dev/null`
308 do
309 if test -f "$i" ; then
310 mysql_lib=`dirname $i`
311 mysql_lib_sh=${mysql_lib}
312 LIBS=[" -L${mysql_lib}"]
313 # echo $mysql_inc
314 break
315 fi
316 done
317 if test x"${mysql_lib}" != x; then
318 for i in \
319 `ls -d ${includedir} 2>/dev/null` \
320 `ls -d /usr/include/mysql/mysql.h 2>/dev/null` \
321 `ls -d /usr/include/mysql.h 2>/dev/null` \
322 `ls -d /usr/local/include/mysql/mysql.h 2>/dev/null` \
323 `ls -d /usr/local/include/mysql.h 2>/dev/null` \
324 `ls -d /usr/contrib/include/mysql/mysql.h 2>/dev/null` \
325 `ls -d /usr/contrib/include/mysql.h 2>/dev/null`
326 do
327 if test -f "$i" ; then
328 mysql_inc=`dirname $i`
329 # echo $mysql_inc
330 break
331 fi
332 done
333 fi
334 fi
335 fi
336 #
337 # now check if the include dir is there
338 #
339 if test [-n] "${mysql_inc}" ; then
340 test -z "${mysql_ld_path}" && mysql_inc=`(cd ${mysql_inc}; pwd)`
341 else
342 AC_MSG_ERROR(mysql include dir not found. Please check mysql installation and path)
343 fi
344 AC_MSG_RESULT(-> $mysql_inc)
345 #
346 #
347 # check if the library is actually there
348 #
349 AC_MSG_RESULT(-> $mysql_lib)
350 if test x"${MAKE_MYSQL}" = x ; then
351 AC_CHECK_LIB([mysqlclient], [main], [
352 test -z "${mysql_ld_path}" && mysql_ld_path="${mysql_lib}"
353 for p in `ldd ${mysql_ld_path}/libmysqlclient.so`; do
354 case $p in
355 *ssl* )
356 ssl="yes"
357 ;;
358 * )
359 ;;
360 esac
361 done
362 if test "${ssl}" = "yes" ; then
363 AC_MSG_RESULT([-> found ssl dependency in mysl])
364 AC_CHECK_LIB([ssl], [main], , AC_MSG_ERROR(Missing ssl library needed by mysql))
365 ssl_lib="-lssl"
366 # if test -f "/usr/lib/libssl.a" ; then
367 # ssl_lib="/usr/lib/libssl.a"
368 # else
369 # AC_MSG_WARN(found only dynamic library for ssl)
370 # AC_MSG_WARN(your mysql dbUpdator may not work always)
371 # echo -e "\tPRESS ANY KEY TO CONTINUE"
372 # read -n 1 junk
373 # ssl_lib="-lssl"
374 # fi
375 AC_SUBST(ssl_lib)
376 fi
377 ], [
378 AC_MSG_ERROR(mysqlclient library not found. Please check mysql installation and path)
379 ])
380 fi
381 # perform variable substitution
382 #
383 if test -n "${mysql_lib}" && test -n "${mysql_inc}" ; then
384 mysql=mysql
385 AC_SUBST(mysql)
386 AC_SUBST(mysql_lib)
387 AC_SUBST(mysql_lib_sh)
388 AC_SUBST(mysql_inc)
389 else
390 echo "${mysql_lib}"
391 AC_MSG_WARN("Can't find mysql")
392 AC_MSG_ERROR(Please install it and rerun configuration)
393 fi
394
395 ])
396
397
398
399 dn1 # Checks for Clarens libs
400 AC_DEFUN([AC_CHECK_CLARENS],
401 [
402 # AC_MSG_RESULT(checking for clarens in:)
403 # checking command line options
404 AC_ARG_WITH(clarens_dir, [ --with-clarens-dir=DIR top directory containing clarens tree], clarens_dir=${withval})
405 AC_ARG_WITH(clarens_lib, [ --with-clarens-lib=DIR directory containing clarens lib], clarens_lib=${withval})
406 AC_ARG_WITH(clarens_include, [ --with-clarens-include=DIR directory containing clarens include], clarens_inc=${withval})
407
408 clarens_lib=""
409 clarens_inc=""
410 clarens=""
411 clarens_lib_sh=""
412 AC_SUBST(clarens)
413 AC_SUBST(clarens_inc)
414 AC_SUBST(clarens_lib)
415 AC_SUBST(clarens_lib_sh)
416
417 ])
418
419
420 dn1 # Checks for monalisa libs
421 AC_DEFUN([AC_CHECK_MONALISA],
422 [
423 AC_MSG_RESULT(checking for MonaLisa in:)
424 # checking command line options
425 AC_ARG_WITH(monalisa_dir, [ --with-monalisa-dir=DIR top directory containing monalisa tree], monalisa_dir=${withval})
426 AC_ARG_WITH(monalisa_lib, [ --with-monalisa-lib=DIR directory containing monalisa lib], monalisa_lib=${withval})
427 AC_ARG_WITH(monalisa_include, [ --with-monalisa-include=DIR directory containing monalisa lib], monalisa_inc=${withval})
428 #
429 # if a top dir is provided
430 #
431 if test [-n] "${monalisa_dir}" ; then
432 if test [-d] "${monalisa_dir}/lib" ; then
433 monalisa_lib=`(cd ${monalisa_dir}/lib; pwd)`
434 else
435 AC_MSG_ERROR(monalisa lib dir not found. Please check monalisa installation and path)
436 fi
437 if test [-d] "${monalisa_dir}/include" ; then
438 monalisa_inc=`(cd ${monalisa_dir}/include; pwd)`
439 else
440 AC_MSG_ERROR(monalisa include dir not found. Please check monalisa installation and path)
441 fi
442 monalisa_lib_sh=${monalisa_lib}
443 LIBS=[" -L${monalisa_lib}"]
444 fi
445 #
446 # otherwise check for libs
447 # starting from the one provided
448 #
449 if test [-n] "${monalisa_lib}" ; then
450 test -d "${monalisa_lib}" && monalisa_lib=`(cd ${monalisa_lib}; pwd)`
451 LIBS=[" -L${monalisa_lib}"]
452 monalisa_lib_sh=${monalisa_lib}
453 #
454 # if not provided look in the current dir
455 #
456 else
457 if test -d "$srcdir/MonaLisa" ; then
458 monalisa_ld_path="$srcdir/MonaLisa/lib"
459 monalisa_inc="\$(BOSS_ROOT)/MonaLisa/include"
460 monalisa_lib="\$(BOSS_ROOT)/MonaLisa/lib"
461 monalisa_lib_sh="\\\$BOSS_ROOT/MonaLisa/lib"
462 LIBS=[" -L$monalisa_ld_path"]
463 if test -f "$srcdir/MonaLisa/Makefile.in" ; then
464 MAKE_MONALISA_DIR="$srcdir/MonaLisa/src/Makefile"
465 fi
466 if test -f "$srcdir/MonaLisa/Makefile" ; then
467 MAKE_MONALISA="\$(MAKE) -C MonaLisa"
468 MAKE_MONALISA_CLEAN="\$(MAKE) -C MonaLisa clean"
469 AC_SUBST(MAKE_MONALISA)
470 AC_SUBST(MAKE_MONALISA_CLEAN)
471 fi
472 fi
473 #
474 # then in ${VO_CMS_SW_DIR}/lcg/app/releases/MonaLisa
475 #
476 if test x"${monalisa_lib}" = x ; then
477 for i in \
478 `ls -dr ${VO_CMS_SW_DIR}/lcg/app/releases/MonaLisa 2>/dev/null` \
479 `ls -dr /afs/cern.ch/cms/external/lcg/app/releases/MonaLisa 2>/dev/null`
480 do
481 if test -f "$i/lib/libMonaLisa.so" ; then
482 monalisa_lib=`(cd $i/lib; pwd)`
483 monalisa_inc=`(cd $i/include; pwd)`
484 monalisa_lib_sh=${monalisa_lib}
485 LIBS=[" -L${monalisa_lib}"]
486 break
487 fi
488 done
489 fi
490 fi
491 #
492 # check if the library is actually there
493 #
494 AC_MSG_RESULT(-> $monalisa_lib)
495 if test x"${MAKE_MONALISA}" = x ; then
496 AC_CHECK_LIB([apmoncpp], [main], ,[
497 AC_MSG_ERROR(MonaLisa library not found. Please check MonaLisa installation and path)
498 ])
499 fi
500 #
501 # now check if the include dir is there
502 #
503 AC_MSG_RESULT(-> $monalisa_inc)
504 if test [-n] "${monalisa_inc}"; then
505 test -z "${monalisa_ld_path}" && monalisa_inc=`(cd ${monalisa_inc}; pwd)`
506 else
507 AC_MSG_ERROR( monalisa include dir not found. Please check monalisa installation and path)
508 fi
509 #
510 # perform variable substitution
511 #
512 if test -n "${monalisa_lib}" && test -n "${monalisa_inc}" ; then
513 monalisa=monalisa
514 AC_SUBST(monalisa)
515 AC_SUBST(monalisa_lib)
516 AC_SUBST(monalisa_lib_sh)
517 AC_SUBST(monalisa_inc)
518 else
519 AC_MSG_WARN("Can't find monalisa")
520 AC_MSG_ERROR(Please install it and rerun configuration)
521 fi
522
523 ])
524
525
526 AC_DEFUN([AC_CHECK_PYTHON],
527 [
528 for p in `python -V 2>/dev/stdout | cut -d ' ' -f 2` ; do
529 case "$p" in
530 2.*.* | 2.* )
531 AC_MSG_RESULT(found python version: "$p")
532 MAKE_PYTHON="\$(MAKE) -C BossPython"
533 MAKE_PYTHON_CLEAN="\$(MAKE) -C BossPython clean"
534 AC_SUBST(MAKE_PYTHON)
535 AC_SUBST(MAKE_PYTHON_CLEAN)
536 break
537 ;;
538 * )
539 break
540 ;;
541 esac
542 done
543 if test x"${MAKE_PYTHON}" = x ; then
544 AC_MSG_WARN("Not found: python 2.*")
545 fi
546 for p in `swig -version 2>/dev/stdout | cut -d ' ' -f 3` ; do
547 case "$p" in
548 1.*.* | 1.* )
549 AC_MSG_RESULT(found swig version: "$p")
550 swig_generate=generate
551 AC_SUBST(swig_generate)
552 break
553 ;;
554 * )
555 break
556 ;;
557 esac
558 done
559 if test x"${swig_generate}" = x ; then
560 AC_MSG_WARN("Not found: swig 1.*")
561 fi
562 ]
563 )
564
565 # AC_CHECK_LIB([libz], [main])
566 AC_DEFUN([AC_CHECK_ZLIB],
567 [
568 # checking command line options
569 AC_ARG_WITH(zlib_dir, [ --with-zlib-dir=DIR top directory containing zlib tree], zlib_dir=${withval})
570 AC_ARG_WITH(zlib_lib, [ --with-zlib-lib=PATH directory containig the zlib library], zlib_lib=${withval})
571 AC_ARG_WITH(zlib_include, [ --with-zlib-include=PATH directory containig the zlib.h include file ], zlib_inc=${withval})
572 #
573 # if a top dir is provided
574 #
575 if test [-n] "${zlib_dir}" ; then
576 if test [-d] "${zlib_dir}/lib" ; then
577 zlib_lib=`(cd ${zlib_dir}/lib; pwd)`
578 else
579 AC_MSG_ERROR(zlib lib dir not found. Please check zlib installation and path)
580 fi
581 if test [-d] "${zlib_dir}/include" ; then
582 zlib_inc=`(cd ${zlib_dir}/include; pwd)`
583 else
584 AC_MSG_ERROR(zlib include dir not found. Please check zlib installation and path)
585 fi
586 fi
587
588 #
589 # otherwise check for libs
590 # starting from the one provided
591 #
592 if test [-z] "${zlib_lib}" ; then
593 zlib_inc="/usr/include"
594 zlib_lib="/usr/lib"
595 elif test [-d] "${zlib_lib}" ; then
596 test [-f] "${zlib_lib}/libz.so" ||
597 AC_MSG_ERROR([${zlib_lib}/libz.so not found.])
598 test [-f] "${zlib_lib}/libz.a" ||
599 AC_MSG_ERROR([${zlib_lib}/libz.a not found.])
600 zlib_lib=`cd ${zlib_lib}; pwd`
601 AC_MSG_RESULT([checking for ${zlib_lib}/libz.so])
602 LIBS=[" -L${zlib_lib}"]
603 else
604 AC_MSG_ERROR([zlib directory not found: ${zlib_lib}])
605 fi
606 #
607 AC_CHECK_LIB([z], [main], ,[
608 AC_MSG_ERROR([Library zlib not found in ${zlib_lib}])
609 ])
610 #
611 # now check if the include dir is there
612 #
613 if test [-f] "${zlib_inc}/zlib.h" ; then
614 zlib_inc=`cd ${zlib_inc}; pwd`
615 AC_MSG_RESULT([checking for ${zlib_inc}/zlib.h... yes])
616 else
617 AC_MSG_WARN([checking for ${zlib_inc}/zlib.h... not found!])
618 AC_MSG_ERROR([Please specify a valid path for zlib.h])
619 fi
620 #
621 # perform variable substitution
622 #
623 if test -n "${zlib_lib}" && test -n "${zlib_inc}" ; then
624 zlib=zlib
625 AC_SUBST(zlib_lib)
626 AC_SUBST(zlib_inc)
627 else
628 AC_MSG_WARN("Missing gzip compression library libz.a and libz.so needed by MySQL client library mysqlclient")
629 AC_MSG_ERROR(Please install it and rerun configuration)
630 fi
631 ]
632 )
633
634
635 # AC_CHECK_LIB([uuid], [main])
636 AC_DEFUN([AC_CHECK_UUID],
637 [
638 # checking command line options
639 AC_ARG_WITH(uuid_dir, [ --with-uuid-dir=DIR top directory containing uuid tree], uuid_dir=${withval})
640 AC_ARG_WITH(uuid_lib, [ --with-uuid-lib=PATH directory containig the uuid library], uuid_lib=${withval})
641 AC_ARG_WITH(uuid_include, [ --with-uuid-include=PATH directory containig the uuid.h include file ], uuid_inc=${withval})
642 #
643 # if a top dir is provided
644 #
645 if test [-n] "${uuid_dir}" ; then
646 if test [-d] "${uuid_dir}/lib" ; then
647 uuid_lib=`(cd ${uuid_dir}/lib; pwd)`
648 else
649 AC_MSG_ERROR(uuid lib dir not found. Please check uuid installation and path)
650 fi
651 if test [-d] "${uuid_dir}/include" ; then
652 uuid_inc=`(cd ${uuid_dir}/include; pwd)`
653 else
654 AC_MSG_ERROR(uuid include dir not found. Please check uuid installation and path)
655 fi
656 fi
657
658 #
659 # otherwise check for libs
660 # starting from the one provided
661 #
662 if test [-z] "${uuid_lib}" ; then
663 uuid_inc="/usr/include/uuid/"
664 uuid_lib="/usr/lib"
665 elif test [-d] "${uuid_lib}" ; then
666 test [-f] "${uuid_lib}/libuuid.so" ||
667 AC_MSG_ERROR([${uuid_lib}/libuuid.so not found.])
668 uuid_lib=`cd ${uuid_lib}; pwd`
669 AC_MSG_RESULT([checking for ${uuid_lib}/libuuid.so])
670 LIBS=[" -L${uuid_lib}"]
671 else
672 AC_MSG_ERROR([uuid-lib directory not found: ${uuid_lib}])
673 fi
674 #
675 AC_CHECK_LIB([uuid], [main], ,[
676 AC_MSG_ERROR([Library uuid not found in ${uuid_lib}])
677 ])
678 #
679 # now check if the include dir is there
680 #
681 if test [-f] "${uuid_inc}/uuid.h" ; then
682 uuid_inc=`cd ${uuid_inc}; pwd`
683 AC_MSG_RESULT([checking for ${uuid_inc}/uuid.h... yes])
684 elif test [-f] "${uuid_inc}/uuid/uuid.h" ; then
685 uuid_inc=`cd ${uuid_inc}/uuid; pwd`
686 AC_MSG_RESULT([checking for ${uuid_inc}/uuid/uuid.h... yes])
687 else
688 AC_MSG_WARN([checking for ${uuid_inc}/uuid.h... not found!])
689 AC_MSG_ERROR([Please specify a valid path for uuid.h])
690 fi
691 #
692 # perform variable substitution
693 #
694 if test -n "${uuid_lib}" && test -n "${uuid_inc}" ; then
695 uuid=uuid
696 AC_SUBST(uuid_lib)
697 AC_SUBST(uuid_inc)
698 else
699 AC_MSG_WARN("Can't find uuid")
700 AC_MSG_ERROR(Please install it and rerun configuration)
701 fi
702 ]
703 )
704
705
706 # AC_CHECK_LIB([xercesc], [main])
707 AC_DEFUN([AC_CHECK_XERCESC],
708 [
709 AC_MSG_RESULT(checking for XercesC in:)
710 # checking command line options
711 AC_ARG_WITH(xercesc_dir, [ --with-xercesc-dir=DIR top directory containing xercesc tree], xercesc_dir=${withval})
712 AC_ARG_WITH(xercesc_lib, [ --with-xercesc-lib=PATH directory containig the xercesc library], xercesc_lib=${withval})
713 AC_ARG_WITH(xercesc_include, [ --with-xercesc-include=PATH directory containig the xercesc.h include file ], xercesc_inc=${withval})
714 #
715 # if a top dir is provided
716 #
717 if test [-n] "${xercesc_dir}" ; then
718 if test [-d] "${xercesc_dir}/lib" ; then
719 xercesc_lib=`(cd ${xercesc_dir}/lib; pwd)`
720 xercesc_lib_sh=${xercesc_lib}
721 else
722 AC_MSG_ERROR(xercesc lib dir not found. Please check xercesc installation and path)
723 fi
724 if test [-d] "${xercesc_dir}/include" ; then
725 xercesc_inc=`(cd ${xercesc_dir}/include; pwd)`
726 else
727 AC_MSG_ERROR(xercesc include dir not found. Please check xercesc installation and path)
728 fi
729 LIBS=[" -L${xercesc_lib}"]
730 fi
731 #
732 # otherwise check for libs
733 # starting from the one provided
734 #
735 if test [-n] "${xercesc_lib}" ; then
736 test -d "${xercesc_lib}" && xercesc_lib=`(cd ${xercesc_lib}; pwd)`
737 LIBS=[" -L${xercesc_lib}"]
738 xercesc_lib_sh=${xercesc_lib}
739 #
740 # if not provided look in the current dir
741 #
742 else
743 if test -d "$srcdir/xercesc" ; then
744 xercesc_ld_path="$srcdir/xercesc/lib"
745 xercesc_inc="\$(BOSS_ROOT)/xercesc/include"
746 xercesc_lib="\$(BOSS_ROOT)/xercesc/lib"
747 xercesc_lib_sh="\\\$BOSS_ROOT/xercesc/lib"
748 LIBS=[" -L$xercesc_ld_path"]
749 if test -f "$srcdir/xercesc/src/Makefile.in" ; then
750 MAKE_XERCESC_DIR="$srcdir/xercesc/src/Makefile"
751 fi
752 if test -f "$srcdir/xercesc/Makefile" ; then
753 MAKE_XERCESC="\$(MAKE) -C xercesc"
754 MAKE_XERCESC_CLEAN="\$(MAKE) -C xercesc clean"
755 AC_SUBST(MAKE_XERCESC)
756 AC_SUBST(MAKE_XERCESC_CLEAN)
757 fi
758 fi
759 #
760 # then in ${VO_CMS_SW_DIR}/lcg/external/xercesc
761 #
762 if test x"${xercesc_lib}" = x ; then
763 for i in \
764 `ls -dr ${VO_CMS_SW_DIR}/lcg/external/xerces-c/2.*.*/${SYSTEM} 2>/dev/null` \
765 `ls -dr /afs/cern.ch/cms/external/lcg/external/XercesC/2.*.*/${SYSTEM} 2>/dev/null`
766 do
767 if test -f "$i/lib/libxerces-c.so" ; then
768 xercesc_lib=`(cd $i/lib; pwd)`
769 xercesc_lib_sh=${xercesc_lib}
770 xercesc_inc=`(cd $i/include; pwd)`
771 LIBS=[" -L${xercesc_lib}"]
772 break
773 fi
774 done
775 fi
776 #
777 # at the end check in a few common install locations
778 #
779 if test x"${xercesc_lib}" = x ; then
780 for i in \
781 `ls -d ${libdir} 2>/dev/null` \
782 `ls -d /usr/lib/xercesc/libxerces-c.so 2>/dev/null` \
783 `ls -d /usr/lib/libxerces-c.so 2>/dev/null` \
784 `ls -d /usr/local/lib/xercesc/libxerces-c.so 2>/dev/null` \
785 `ls -d /usr/local/lib/libxerces-c.so 2>/dev/null` \
786 `ls -d /usr/contrib/lib/xercesc/libxerces-c.so 2>/dev/null` \
787 `ls -d /usr/contrib/lib/libxerces-c.so 2>/dev/null`
788 do
789 if test -f "$i" ; then
790 xercesc_lib=`dirname $i`
791 xercesc_lib_sh=${xercesc_lib}
792 LIBS=[" -L${xercesc_lib}"]
793 # echo $xercesc_inc
794 break
795 fi
796 done
797 if test x"${xercesc_lib}" != x; then
798 for i in \
799 `ls -d ${includedir} 2>/dev/null` \
800 `ls -d /usr/include/xercesc/dom/DOM.hpp 2>/dev/null` \
801 `ls -d /usr/local/include/xercesc/dom/DOM.hpp 2>/dev/null` \
802 `ls -d /usr/contrib/include/xercesc/dom/DOM.hpp 2>/dev/null`
803 do
804 if test -f "$i" ; then
805 xercesc_inc=`dirname $i`
806 break
807 fi
808 done
809 fi
810 fi
811 fi
812 #
813 # check if the library is actually there
814 #
815 AC_MSG_RESULT(-> $xercesc_lib)
816 if test x"${MAKE_XERCESC}" = x ; then
817 AC_CHECK_LIB([xerces-c], [main], , [
818 AC_MSG_ERROR(xerces-c library not found. Please check xercesc installation and path)])
819 fi
820 #
821 # now check if the include dir is there
822 #
823 AC_MSG_RESULT(-> $xercesc_inc)
824 if test [-n] "${xercesc_inc}" ; then
825 test -z "${xercesc_ld_path}" && xercesc_inc=`(cd ${xercesc_inc}; pwd)`
826 else
827 AC_MSG_ERROR([xercesc include dir not found. Please check xercesc installation and path])
828 fi
829
830 # if test [-f] "${xercesc_inc}/xercesc/dom/DOM.hpp" ; then
831 # AC_MSG_RESULT([checking for ${xercesc_inc}/xercesc/dom/DOM.hpp... yes])
832 # else
833 # AC_MSG_WARN([checking for ${xercesc_inc}/xercesc/dom/DOM.hpp... not found!])
834 # AC_MSG_ERROR([Please specify a valid path for xercesc/dom/DOM.hpp])
835 # fi
836 #
837 # perform variable substitution
838 #
839 if test -n "${xercesc_lib}" && test -n "${xercesc_inc}" ; then
840 xercesc=xercesc
841 AC_SUBST(xercesc)
842 AC_SUBST(xercesc_lib)
843 AC_SUBST(xercesc_lib_sh)
844 AC_SUBST(xercesc_inc)
845 else
846 AC_MSG_WARN("Can't find xercesc")
847 AC_MSG_ERROR(Please install it and rerun configuration)
848 fi
849 ]
850 )
851