1 |
gcodispo |
1.1 |
AC_DEFUN([AC_CHECK_SYSTEM],
|
2 |
|
|
[
|
3 |
|
|
AC_CACHE_VAL(ARCH, [
|
4 |
|
|
for p in `uname -m` ; do
|
5 |
|
|
case "$p" in
|
6 |
|
|
*x86_64*)
|
7 |
|
|
ARCH=amd64_
|
8 |
|
|
;;
|
9 |
|
|
*i386* | *i686* )
|
10 |
|
|
ARCH=ia32_
|
11 |
|
|
;;
|
12 |
|
|
esac
|
13 |
|
|
done
|
14 |
|
|
AC_SUBST(ARCH)
|
15 |
|
|
])
|
16 |
|
|
|
17 |
|
|
AC_CACHE_VAL(RELEASE, [
|
18 |
gcodispo |
1.8 |
for p in `cat /etc/redhat-release /etc/issue* 2>/dev/null| sed 's/ //g'` ; do
|
19 |
gcodispo |
1.1 |
case "$p" in
|
20 |
gcodispo |
1.8 |
*Debian*GNU*Linux*3*1* | *Fedora* | *Fermi* | *Red*Hat*Enterprise* | *Rocks* )
|
21 |
|
|
RELEASE=slc3_
|
22 |
|
|
break
|
23 |
|
|
;;
|
24 |
gcodispo |
1.1 |
*SL* | *Scientific*Linux* )
|
25 |
|
|
RELEASE=slc[`sed 's/[^0-9]//g' /etc/redhat-release | cut -c 1`]_
|
26 |
gcodispo |
1.7 |
break
|
27 |
gcodispo |
1.1 |
;;
|
28 |
|
|
*Mandrake* | *Red*Hat*Linux* | *SuSE* | *Debian*GNU*Linux*3*0* )
|
29 |
|
|
RELEASE=rh73_
|
30 |
|
|
ARC=""
|
31 |
|
|
AC_SUBST(ARCH)
|
32 |
gcodispo |
1.7 |
break
|
33 |
gcodispo |
1.1 |
;;
|
34 |
|
|
esac
|
35 |
|
|
done
|
36 |
|
|
AC_SUBST(RELEASE)
|
37 |
|
|
])
|
38 |
|
|
|
39 |
|
|
AC_CACHE_VAL(GCC_VERSION, [
|
40 |
|
|
for p in "`gcc --version | cut -d ' ' -f 1,3 `" ; do
|
41 |
|
|
case "$p" in
|
42 |
|
|
*gcc* )
|
43 |
|
|
GCC_VERSION=gcc[`echo $p | cut -d ' ' -f 2 |sed 's/[^0-9]//g' `]
|
44 |
|
|
;;
|
45 |
|
|
esac
|
46 |
|
|
done
|
47 |
|
|
AC_SUBST(GCC_VERSION)
|
48 |
|
|
])
|
49 |
|
|
|
50 |
|
|
AC_CACHE_VAL(SYSTEM, [
|
51 |
|
|
SYSTEM=${RELEASE}${ARCH}${GCC_VERSION}
|
52 |
|
|
echo system attributes... ${SYSTEM}
|
53 |
|
|
AC_SUBST(SYSTEM)
|
54 |
|
|
])
|
55 |
|
|
]
|
56 |
|
|
)
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
dn1 # Checks for SQLite libs
|
60 |
|
|
AC_DEFUN([AC_CHECK_SQLITE],
|
61 |
gcodispo |
1.10 |
[
|
62 |
|
|
AC_MSG_RESULT(checking for sqlite in:)
|
63 |
|
|
# checking command line options
|
64 |
|
|
AC_ARG_WITH(sqlite_dir, [ --with-sqlite-dir=DIR top directory containing sqlite tree], sqlite_dir=${withval})
|
65 |
|
|
AC_ARG_WITH(sqlite_lib, [ --with-sqlite-lib=DIR directory containing sqlite lib], sqlite_lib=${withval})
|
66 |
|
|
AC_ARG_WITH(sqlite_include, [ --with-sqlite-include=DIR directory containing sqlite include], sqlite_inc=${withval})
|
67 |
|
|
#
|
68 |
|
|
# if a top dir is provided
|
69 |
|
|
#
|
70 |
|
|
if test [-n] "${sqlite_dir}" ; then
|
71 |
|
|
if test [-d] "${sqlite_dir}/lib" ; then
|
72 |
|
|
sqlite_lib=`(cd ${sqlite_dir}/lib; pwd)`
|
73 |
|
|
sqlite_lib_sh=${sqlite_lib}
|
74 |
|
|
else
|
75 |
|
|
AC_MSG_ERROR(sqlite lib dir not found. Please check sqlite installation and path)
|
76 |
|
|
fi
|
77 |
|
|
if test [-d] "${sqlite_dir}/include" ; then
|
78 |
|
|
sqlite_inc=`(cd ${sqlite_dir}/include; pwd)`
|
79 |
|
|
else
|
80 |
|
|
AC_MSG_ERROR(sqlite include dir not found. Please check sqlite installation and path)
|
81 |
|
|
fi
|
82 |
|
|
# test -d "${sqlite_dir}/lib" && sqlite_lib=`(cd ${sqlite_dir}/lib; pwd)`
|
83 |
|
|
# test -d "${sqlite_dir}/include" && sqlite_inc=`(cd ${sqlite_dir}/include; pwd)`
|
84 |
|
|
LIBS=[" -L${sqlite_lib}"]
|
85 |
|
|
fi
|
86 |
|
|
#
|
87 |
|
|
# otherwise check for libs
|
88 |
|
|
# starting from the one provided
|
89 |
|
|
#
|
90 |
|
|
if test [-n] "${sqlite_lib}" ; then
|
91 |
|
|
test -d "${sqlite_lib}" && sqlite_lib=`(cd ${sqlite_lib}; pwd)`
|
92 |
|
|
LIBS=[" -L${sqlite_lib}"]
|
93 |
|
|
sqlite_lib_sh=${sqlite_lib}
|
94 |
|
|
#
|
95 |
|
|
# if not provided look in the current dir
|
96 |
|
|
#
|
97 |
|
|
else
|
98 |
gcodispo |
1.1 |
if test -d "$srcdir/sqlite" ; then
|
99 |
gcodispo |
1.13 |
sqlite_ld_path="$srcdir/sqlite/lib"
|
100 |
gcodispo |
1.5 |
sqlite_inc="\$(BOSSDIR)/sqlite/include"
|
101 |
|
|
sqlite_lib="\$(BOSSDIR)/sqlite/lib"
|
102 |
|
|
sqlite_lib_sh="\\\$BOSSDIR/sqlite/lib"
|
103 |
gcodispo |
1.13 |
LIBS=[" -L$sqlite_ld_path"]
|
104 |
gcodispo |
1.1 |
if test -f "$srcdir/sqlite/src/Makefile.in" ; then
|
105 |
|
|
MAKE_SQLITE_DIR="$srcdir/sqlite/src/Makefile"
|
106 |
|
|
fi
|
107 |
|
|
if test -f "$srcdir/sqlite/Makefile" ; then
|
108 |
|
|
MAKE_SQLITE="\$(MAKE) -C sqlite"
|
109 |
|
|
MAKE_SQLITE_CLEAN="\$(MAKE) -C sqlite clean"
|
110 |
|
|
AC_SUBST(MAKE_SQLITE)
|
111 |
|
|
AC_SUBST(MAKE_SQLITE_CLEAN)
|
112 |
|
|
fi
|
113 |
|
|
fi
|
114 |
gcodispo |
1.10 |
#
|
115 |
|
|
# then in ${VO_CMS_SW_DIR}/lcg/external/sqlite
|
116 |
|
|
#
|
117 |
|
|
if test x"${sqlite_lib}" = x ; then
|
118 |
gcodispo |
1.1 |
for i in \
|
119 |
gcodispo |
1.8 |
`ls -dr ${VO_CMS_SW_DIR}/lcg/external/sqlite/*[3.[^0].*]*/${SYSTEM} 2>/dev/null` \
|
120 |
|
|
`ls -dr /afs/cern.ch/cms/external/lcg/external/sqlite/*[3.[^0].*]*/${SYSTEM} 2>/dev/null`
|
121 |
gcodispo |
1.1 |
do
|
122 |
|
|
if test -f "$i/lib/libsqlite3.a" ; then
|
123 |
gcodispo |
1.2 |
sqlite_lib=`(cd $i/lib; pwd)`
|
124 |
gcodispo |
1.5 |
sqlite_lib_sh=${sqlite_lib}
|
125 |
gcodispo |
1.2 |
sqlite_inc=`(cd $i/include; pwd)`
|
126 |
gcodispo |
1.5 |
LIBS=[" -L${sqlite_lib}"]
|
127 |
gcodispo |
1.1 |
break
|
128 |
|
|
fi
|
129 |
|
|
done
|
130 |
|
|
fi
|
131 |
gcodispo |
1.10 |
#
|
132 |
|
|
# at the end check in a few common install locations
|
133 |
|
|
#
|
134 |
|
|
if test x"${sqlite_lib}" = x ; then
|
135 |
gcodispo |
1.1 |
for i in \
|
136 |
|
|
`ls -d ${libdir} 2>/dev/null` \
|
137 |
gcodispo |
1.2 |
`ls -d /usr/lib/sqlite/libsqlite3.a 2>/dev/null` \
|
138 |
|
|
`ls -d /usr/lib/libsqlite3.a 2>/dev/null` \
|
139 |
|
|
`ls -d /usr/local/lib/sqlite/libsqlite3.a 2>/dev/null` \
|
140 |
|
|
`ls -d /usr/local/lib/libsqlite3.a 2>/dev/null` \
|
141 |
|
|
`ls -d /usr/contrib/lib/sqlite/libsqlite3.a 2>/dev/null` \
|
142 |
|
|
`ls -d /usr/contrib/lib/libsqlite3.a 2>/dev/null`
|
143 |
gcodispo |
1.1 |
do
|
144 |
gcodispo |
1.2 |
if test -f "$i" ; then
|
145 |
|
|
sqlite_lib=`dirname $i`
|
146 |
gcodispo |
1.5 |
sqlite_lib_sh=${sqlite_lib}
|
147 |
|
|
LIBS=[" -L${sqlite_lib}"]
|
148 |
gcodispo |
1.1 |
break
|
149 |
|
|
fi
|
150 |
|
|
done
|
151 |
gcodispo |
1.2 |
if test x"${sqlite_lib}" != x; then
|
152 |
|
|
for i in \
|
153 |
|
|
`ls -d ${includedir} 2>/dev/null` \
|
154 |
|
|
`ls -d /usr/include/sqlite/sqlite3.h 2>/dev/null` \
|
155 |
|
|
`ls -d /usr/include/sqlite3.h 2>/dev/null` \
|
156 |
|
|
`ls -d /usr/local/include/sqlite/sqlite3.h 2>/dev/null` \
|
157 |
|
|
`ls -d /usr/local/include/sqlite3.h 2>/dev/null` \
|
158 |
|
|
`ls -d /usr/contrib/include/sqlite/sqlite3.h 2>/dev/null` \
|
159 |
|
|
`ls -d /usr/contrib/include/sqlite3.h 2>/dev/null`
|
160 |
|
|
do
|
161 |
|
|
if test -f "$i" ; then
|
162 |
|
|
sqlite_inc=`dirname $i`
|
163 |
|
|
break
|
164 |
|
|
fi
|
165 |
|
|
done
|
166 |
|
|
fi
|
167 |
gcodispo |
1.1 |
fi
|
168 |
gcodispo |
1.10 |
fi
|
169 |
|
|
#
|
170 |
gcodispo |
1.13 |
# now check if the include dir is there
|
171 |
|
|
#
|
172 |
|
|
if test [-n] "${sqlite_inc}" ; then
|
173 |
|
|
test -z "${sqlite_ld_path}" && sqlite_inc=`(cd ${sqlite_inc}; pwd)`
|
174 |
|
|
else
|
175 |
|
|
AC_MSG_ERROR(sqlite include dir not found. Please check sqlite installation and path)
|
176 |
|
|
fi
|
177 |
|
|
AC_MSG_RESULT(-> $sqlite_inc)
|
178 |
|
|
#
|
179 |
gcodispo |
1.10 |
# check if the library is actually there
|
180 |
|
|
#
|
181 |
|
|
AC_MSG_RESULT(-> $sqlite_lib)
|
182 |
|
|
if test x"${MAKE_SQLITE}" = x ; then
|
183 |
|
|
AC_CHECK_LIB([sqlite3], [main], , [
|
184 |
|
|
AC_MSG_ERROR(sqlite3 library not found. Please check sqlite installation and path)])
|
185 |
|
|
fi
|
186 |
|
|
#
|
187 |
|
|
# perform variable substitution
|
188 |
|
|
#
|
189 |
|
|
if test -n "${sqlite_lib}" && test -n "${sqlite_inc}" ; then
|
190 |
|
|
sqlite=sqlite
|
191 |
|
|
AC_SUBST(sqlite)
|
192 |
|
|
AC_SUBST(sqlite_lib)
|
193 |
|
|
AC_SUBST(sqlite_lib_sh)
|
194 |
|
|
AC_SUBST(sqlite_inc)
|
195 |
|
|
else
|
196 |
|
|
AC_MSG_WARN("Can't find sqlite")
|
197 |
|
|
AC_MSG_ERROR(Please install it and rerun configuration)
|
198 |
|
|
fi
|
199 |
|
|
])
|
200 |
gcodispo |
1.1 |
|
201 |
|
|
|
202 |
|
|
|
203 |
|
|
dnl # Checks for MySQL
|
204 |
|
|
AC_DEFUN([AC_CHECK_MYSQL],
|
205 |
gcodispo |
1.10 |
[
|
206 |
|
|
AC_MSG_RESULT(checking for mysql in:)
|
207 |
|
|
# checking command line options
|
208 |
|
|
AC_ARG_WITH(mysql_dir, [ --with-mysql-dir=DIR top directory containing mysql tree], mysql_dir=${withval})
|
209 |
|
|
AC_ARG_WITH(mysql_lib, [ --with-mysql-lib=DIR directory containing mysql lib], mysql_lib=${withval})
|
210 |
|
|
AC_ARG_WITH(mysql_include, [ --with-mysql-include=DIR directory containing mysql include], mysql_inc=${withval})
|
211 |
|
|
#
|
212 |
|
|
# if a top dir is provided
|
213 |
|
|
#
|
214 |
|
|
if test [-n] "${mysql_dir}" ; then
|
215 |
|
|
if test [-d] "${mysql_dir}/lib/mysql" ; then
|
216 |
|
|
mysql_lib=`(cd ${mysql_dir}/lib/mysql; pwd)`
|
217 |
|
|
elif test [-d] "${mysql_dir}/lib" ; then
|
218 |
|
|
mysql_lib=`(cd ${mysql_dir}/lib; pwd)`
|
219 |
|
|
else
|
220 |
|
|
AC_MSG_ERROR(mysql lib dir not found. Please check mysql installation and path)
|
221 |
|
|
fi
|
222 |
|
|
if test [-d] "${mysql_dir}/include/mysql" ; then
|
223 |
|
|
mysql_inc=`(cd ${mysql_dir}/include/mysql; pwd)`
|
224 |
|
|
elif test [-d] "${mysql_dir}/include" ; then
|
225 |
|
|
mysql_inc=`(cd ${mysql_dir}/include; pwd)`
|
226 |
|
|
else
|
227 |
|
|
AC_MSG_ERROR(mysql lib dir not found. Please check mysql installation and path)
|
228 |
|
|
fi
|
229 |
|
|
mysql_lib_sh=${mysql_lib}
|
230 |
|
|
LIBS=[" -L${mysql_lib}"]
|
231 |
|
|
fi
|
232 |
|
|
#
|
233 |
|
|
# otherwise check for libs
|
234 |
|
|
# starting from the one provided
|
235 |
|
|
#
|
236 |
|
|
if test [-n] "${mysql_lib}" ; then
|
237 |
|
|
mysql_lib=`(cd ${mysql_lib} 2>/dev/null; pwd)`
|
238 |
|
|
LIBS=[" -L${mysql_lib}"]
|
239 |
|
|
mysql_lib_sh=${mysql_lib}
|
240 |
|
|
#
|
241 |
|
|
# if not provided look in the current dir
|
242 |
|
|
#
|
243 |
|
|
else
|
244 |
gcodispo |
1.1 |
if test -d "$srcdir/mysql" ; then
|
245 |
gcodispo |
1.12 |
mysql_ld_path="$srcdir/mysql/lib"
|
246 |
gcodispo |
1.5 |
mysql_inc="\$(BOSSDIR)/mysql/include"
|
247 |
|
|
mysql_lib="\$(BOSSDIR)/mysql/lib"
|
248 |
|
|
mysql_lib_sh="\\\$BOSSDIR/mysql/lib"
|
249 |
gcodispo |
1.12 |
LIBS=[" -L$mysql_ld_path"]
|
250 |
gcodispo |
1.1 |
if test -f "$srcdir/mysql/Makefile.in" ; then
|
251 |
|
|
MAKE_MYSQL_DIR="$srcdir/mysql/src/Makefile"
|
252 |
|
|
fi
|
253 |
|
|
if test -f "$srcdir/mysql/Makefile" ; then
|
254 |
|
|
MAKE_MYSQL="\$(MAKE) -C mysql"
|
255 |
|
|
MAKE_MYSQL_CLEAN="\$(MAKE) -C mysql clean"
|
256 |
|
|
AC_SUBST(MAKE_MYSQL)
|
257 |
|
|
AC_SUBST(MAKE_MYSQL_CLEAN)
|
258 |
|
|
fi
|
259 |
|
|
fi
|
260 |
gcodispo |
1.10 |
#
|
261 |
|
|
# then in ${VO_CMS_SW_DIR}/lcg/external/mysql
|
262 |
|
|
#
|
263 |
|
|
if test x"${mysql_lib}" = x ; then
|
264 |
gcodispo |
1.1 |
for i in \
|
265 |
gcodispo |
1.8 |
`ls -dr ${VO_CMS_SW_DIR}/lcg/external/mysql/*4.*[^0].*/${SYSTEM} 2>/dev/null` \
|
266 |
|
|
`ls -dr ${VO_CMS_SW_DIR}/lcg/external/mysql/*5.*.*/${SYSTEM} 2>/dev/null` \
|
267 |
|
|
`ls -dr /afs/cern.ch/cms/external/lcg/external/mysql/*4.*[^0].*/${SYSTEM} 2>/dev/null` \
|
268 |
|
|
`ls -dr /afs/cern.ch/cms/external/lcg/external/mysql/*5.*.*/${SYSTEM} 2>/dev/null`
|
269 |
gcodispo |
1.1 |
do
|
270 |
|
|
if test -f "$i/lib/libmysqlclient.so" ; then
|
271 |
gcodispo |
1.2 |
mysql_lib=`(cd $i/lib; pwd)`
|
272 |
gcodispo |
1.5 |
mysql_lib_sh=${mysql_lib}
|
273 |
gcodispo |
1.2 |
mysql_inc=`(cd $i/include; pwd)`
|
274 |
gcodispo |
1.5 |
LIBS=[" -L${mysql_lib}"]
|
275 |
gcodispo |
1.1 |
break
|
276 |
|
|
fi
|
277 |
|
|
done
|
278 |
|
|
fi
|
279 |
gcodispo |
1.10 |
#
|
280 |
|
|
# at the end check in a few common install locations
|
281 |
|
|
#
|
282 |
|
|
if test x"${mysql_lib}" = x ; then
|
283 |
gcodispo |
1.1 |
for i in \
|
284 |
|
|
`ls -d ${libdir} 2>/dev/null` \
|
285 |
gcodispo |
1.2 |
`ls -d /usr/lib/mysql/libmysqlclient.a 2>/dev/null` \
|
286 |
|
|
`ls -d /usr/lib/libmysqlclient.a 2>/dev/null` \
|
287 |
|
|
`ls -d /usr/local/lib/mysql/libmysqlclient.a 2>/dev/null` \
|
288 |
|
|
`ls -d /usr/local/lib/libmysqlclient.a 2>/dev/null` \
|
289 |
|
|
`ls -d /usr/contrib/lib/mysql/libmysqlclient.a 2>/dev/null` \
|
290 |
|
|
`ls -d /usr/contrib/lib/libmysqlclient.a 2>/dev/null`
|
291 |
gcodispo |
1.1 |
do
|
292 |
gcodispo |
1.2 |
if test -f "$i" ; then
|
293 |
|
|
mysql_lib=`dirname $i`
|
294 |
gcodispo |
1.5 |
mysql_lib_sh=${mysql_lib}
|
295 |
|
|
LIBS=[" -L${mysql_lib}"]
|
296 |
gcodispo |
1.2 |
# echo $mysql_inc
|
297 |
gcodispo |
1.1 |
break
|
298 |
|
|
fi
|
299 |
|
|
done
|
300 |
gcodispo |
1.2 |
if test x"${mysql_lib}" != x; then
|
301 |
|
|
for i in \
|
302 |
|
|
`ls -d ${includedir} 2>/dev/null` \
|
303 |
|
|
`ls -d /usr/include/mysql/mysql.h 2>/dev/null` \
|
304 |
|
|
`ls -d /usr/include/mysql.h 2>/dev/null` \
|
305 |
|
|
`ls -d /usr/local/include/mysql/mysql.h 2>/dev/null` \
|
306 |
|
|
`ls -d /usr/local/include/mysql.h 2>/dev/null` \
|
307 |
|
|
`ls -d /usr/contrib/include/mysql/mysql.h 2>/dev/null` \
|
308 |
|
|
`ls -d /usr/contrib/include/mysql.h 2>/dev/null`
|
309 |
|
|
do
|
310 |
|
|
if test -f "$i" ; then
|
311 |
|
|
mysql_inc=`dirname $i`
|
312 |
|
|
# echo $mysql_inc
|
313 |
|
|
break
|
314 |
|
|
fi
|
315 |
|
|
done
|
316 |
|
|
fi
|
317 |
gcodispo |
1.1 |
fi
|
318 |
gcodispo |
1.10 |
fi
|
319 |
|
|
#
|
320 |
gcodispo |
1.13 |
# now check if the include dir is there
|
321 |
|
|
#
|
322 |
|
|
if test [-n] "${mysql_inc}" ; then
|
323 |
|
|
test -z "${mysql_ld_path}" && mysql_inc=`(cd ${mysql_inc}; pwd)`
|
324 |
|
|
else
|
325 |
|
|
AC_MSG_ERROR(mysql include dir not found. Please check mysql installation and path)
|
326 |
|
|
fi
|
327 |
|
|
AC_MSG_RESULT(-> $mysql_inc)
|
328 |
|
|
#
|
329 |
|
|
#
|
330 |
gcodispo |
1.10 |
# check if the library is actually there
|
331 |
|
|
#
|
332 |
|
|
AC_MSG_RESULT(-> $mysql_lib)
|
333 |
|
|
if test x"${MAKE_MYSQL}" = x ; then
|
334 |
|
|
AC_CHECK_LIB([mysqlclient], [main], [
|
335 |
gcodispo |
1.13 |
test -z "${mysql_ld_path}" && mysql_ld_path="${mysql_lib}"
|
336 |
gcodispo |
1.12 |
for p in `ldd ${mysql_ld_path}/libmysqlclient.so`; do
|
337 |
gcodispo |
1.10 |
case $p in
|
338 |
|
|
*ssl* )
|
339 |
|
|
ssl="yes"
|
340 |
|
|
;;
|
341 |
|
|
* )
|
342 |
|
|
;;
|
343 |
|
|
esac
|
344 |
|
|
done
|
345 |
|
|
if test "${ssl}" = "yes" ; then
|
346 |
|
|
AC_MSG_RESULT([-> found ssl dependency in mysl])
|
347 |
|
|
AC_CHECK_LIB([ssl], [main], , AC_MSG_ERROR(Missing ssl library needed by mysql))
|
348 |
|
|
ssl_lib="-lssl"
|
349 |
gcodispo |
1.2 |
# if test -f "/usr/lib/libssl.a" ; then
|
350 |
|
|
# ssl_lib="/usr/lib/libssl.a"
|
351 |
|
|
# else
|
352 |
|
|
# AC_MSG_WARN(found only dynamic library for ssl)
|
353 |
|
|
# AC_MSG_WARN(your mysql dbUpdator may not work always)
|
354 |
|
|
# echo -e "\tPRESS ANY KEY TO CONTINUE"
|
355 |
|
|
# read -n 1 junk
|
356 |
|
|
# ssl_lib="-lssl"
|
357 |
|
|
# fi
|
358 |
gcodispo |
1.10 |
AC_SUBST(ssl_lib)
|
359 |
|
|
fi
|
360 |
|
|
], [
|
361 |
|
|
AC_MSG_ERROR(mysqlclient library not found. Please check mysql installation and path)
|
362 |
|
|
])
|
363 |
|
|
fi
|
364 |
|
|
# perform variable substitution
|
365 |
|
|
#
|
366 |
|
|
if test -n "${mysql_lib}" && test -n "${mysql_inc}" ; then
|
367 |
|
|
mysql=mysql
|
368 |
|
|
AC_SUBST(mysql)
|
369 |
|
|
AC_SUBST(mysql_lib)
|
370 |
|
|
AC_SUBST(mysql_lib_sh)
|
371 |
|
|
AC_SUBST(mysql_inc)
|
372 |
|
|
else
|
373 |
|
|
echo "${mysql_lib}"
|
374 |
|
|
AC_MSG_WARN("Can't find mysql")
|
375 |
|
|
AC_MSG_ERROR(Please install it and rerun configuration)
|
376 |
|
|
fi
|
377 |
|
|
|
378 |
|
|
])
|
379 |
gcodispo |
1.2 |
|
380 |
|
|
|
381 |
|
|
|
382 |
gcodispo |
1.10 |
dn1 # Checks for Clarens libs
|
383 |
gcodispo |
1.2 |
AC_DEFUN([AC_CHECK_CLARENS],
|
384 |
gcodispo |
1.10 |
[
|
385 |
|
|
# AC_MSG_RESULT(checking for clarens in:)
|
386 |
|
|
# checking command line options
|
387 |
|
|
AC_ARG_WITH(clarens_dir, [ --with-clarens-dir=DIR top directory containing clarens tree], clarens_dir=${withval})
|
388 |
|
|
AC_ARG_WITH(clarens_lib, [ --with-clarens-lib=DIR directory containing clarens lib], clarens_lib=${withval})
|
389 |
|
|
AC_ARG_WITH(clarens_include, [ --with-clarens-include=DIR directory containing clarens include], clarens_inc=${withval})
|
390 |
gcodispo |
1.2 |
|
391 |
|
|
clarens_lib=""
|
392 |
|
|
clarens_inc=""
|
393 |
|
|
clarens=""
|
394 |
gcodispo |
1.10 |
clarens_lib_sh=""
|
395 |
gcodispo |
1.2 |
AC_SUBST(clarens)
|
396 |
gcodispo |
1.10 |
AC_SUBST(clarens_inc)
|
397 |
gcodispo |
1.2 |
AC_SUBST(clarens_lib)
|
398 |
gcodispo |
1.10 |
AC_SUBST(clarens_lib_sh)
|
399 |
gcodispo |
1.2 |
|
400 |
|
|
])
|
401 |
|
|
|
402 |
gcodispo |
1.10 |
|
403 |
|
|
dn1 # Checks for monalisa libs
|
404 |
gcodispo |
1.2 |
AC_DEFUN([AC_CHECK_MONALISA],
|
405 |
gcodispo |
1.10 |
[
|
406 |
|
|
AC_MSG_RESULT(checking for MonaLisa in:)
|
407 |
|
|
# checking command line options
|
408 |
|
|
AC_ARG_WITH(monalisa_dir, [ --with-monalisa-dir=DIR top directory containing monalisa tree], monalisa_dir=${withval})
|
409 |
|
|
AC_ARG_WITH(monalisa_lib, [ --with-monalisa-lib=DIR directory containing monalisa lib], monalisa_lib=${withval})
|
410 |
|
|
AC_ARG_WITH(monalisa_include, [ --with-monalisa-include=DIR directory containing monalisa lib], monalisa_inc=${withval})
|
411 |
|
|
#
|
412 |
|
|
# if a top dir is provided
|
413 |
|
|
#
|
414 |
|
|
if test [-n] "${monalisa_dir}" ; then
|
415 |
|
|
if test [-d] "${monalisa_dir}/lib" ; then
|
416 |
|
|
monalisa_lib=`(cd ${monalisa_dir}/lib; pwd)`
|
417 |
|
|
else
|
418 |
|
|
AC_MSG_ERROR(monalisa lib dir not found. Please check monalisa installation and path)
|
419 |
|
|
fi
|
420 |
|
|
if test [-d] "${monalisa_dir}/include" ; then
|
421 |
|
|
monalisa_inc=`(cd ${monalisa_dir}/include; pwd)`
|
422 |
|
|
else
|
423 |
|
|
AC_MSG_ERROR(monalisa include dir not found. Please check monalisa installation and path)
|
424 |
|
|
fi
|
425 |
|
|
monalisa_lib_sh=${monalisa_lib}
|
426 |
|
|
LIBS=[" -L${monalisa_lib}"]
|
427 |
|
|
fi
|
428 |
|
|
#
|
429 |
|
|
# otherwise check for libs
|
430 |
|
|
# starting from the one provided
|
431 |
|
|
#
|
432 |
|
|
if test [-n] "${monalisa_lib}" ; then
|
433 |
|
|
test -d "${monalisa_lib}" && monalisa_lib=`(cd ${monalisa_lib}; pwd)`
|
434 |
|
|
LIBS=[" -L${monalisa_lib}"]
|
435 |
|
|
monalisa_lib_sh=${monalisa_lib}
|
436 |
|
|
#
|
437 |
|
|
# if not provided look in the current dir
|
438 |
|
|
#
|
439 |
|
|
else
|
440 |
gcodispo |
1.2 |
if test -d "$srcdir/MonaLisa" ; then
|
441 |
gcodispo |
1.13 |
monalisa_ld_path="$srcdir/MonaLisa/lib"
|
442 |
gcodispo |
1.5 |
monalisa_inc="\$(BOSSDIR)/MonaLisa/include"
|
443 |
|
|
monalisa_lib="\$(BOSSDIR)/MonaLisa/lib"
|
444 |
|
|
monalisa_lib_sh="\\\$BOSSDIR/MonaLisa/lib"
|
445 |
gcodispo |
1.13 |
LIBS=[" -L$monalisa_ld_path"]
|
446 |
gcodispo |
1.2 |
if test -f "$srcdir/MonaLisa/Makefile.in" ; then
|
447 |
|
|
MAKE_MONALISA_DIR="$srcdir/MonaLisa/src/Makefile"
|
448 |
|
|
fi
|
449 |
|
|
if test -f "$srcdir/MonaLisa/Makefile" ; then
|
450 |
|
|
MAKE_MONALISA="\$(MAKE) -C MonaLisa"
|
451 |
|
|
MAKE_MONALISA_CLEAN="\$(MAKE) -C MonaLisa clean"
|
452 |
|
|
AC_SUBST(MAKE_MONALISA)
|
453 |
|
|
AC_SUBST(MAKE_MONALISA_CLEAN)
|
454 |
|
|
fi
|
455 |
|
|
fi
|
456 |
gcodispo |
1.10 |
#
|
457 |
|
|
# then in ${VO_CMS_SW_DIR}/lcg/app/releases/MonaLisa
|
458 |
|
|
#
|
459 |
|
|
if test x"${monalisa_lib}" = x ; then
|
460 |
gcodispo |
1.2 |
for i in \
|
461 |
|
|
`ls -dr ${VO_CMS_SW_DIR}/lcg/app/releases/MonaLisa 2>/dev/null` \
|
462 |
|
|
`ls -dr /afs/cern.ch/cms/external/lcg/app/releases/MonaLisa 2>/dev/null`
|
463 |
|
|
do
|
464 |
|
|
if test -f "$i/lib/libMonaLisa.so" ; then
|
465 |
|
|
monalisa_lib=`(cd $i/lib; pwd)`
|
466 |
|
|
monalisa_inc=`(cd $i/include; pwd)`
|
467 |
gcodispo |
1.5 |
monalisa_lib_sh=${monalisa_lib}
|
468 |
|
|
LIBS=[" -L${monalisa_lib}"]
|
469 |
gcodispo |
1.2 |
break
|
470 |
|
|
fi
|
471 |
|
|
done
|
472 |
|
|
fi
|
473 |
|
|
fi
|
474 |
gcodispo |
1.10 |
#
|
475 |
|
|
# check if the library is actually there
|
476 |
|
|
#
|
477 |
|
|
AC_MSG_RESULT(-> $monalisa_lib)
|
478 |
|
|
if test x"${MAKE_MONALISA}" = x ; then
|
479 |
|
|
AC_CHECK_LIB([apmoncpp], [main], ,[
|
480 |
|
|
AC_MSG_ERROR(MonaLisa library not found. Please check MonaLisa installation and path)
|
481 |
|
|
])
|
482 |
|
|
fi
|
483 |
|
|
#
|
484 |
|
|
# now check if the include dir is there
|
485 |
|
|
#
|
486 |
|
|
AC_MSG_RESULT(-> $monalisa_inc)
|
487 |
|
|
if test [-n] "${monalisa_inc}"; then
|
488 |
gcodispo |
1.13 |
test -z "${monalisa_ld_path}" && monalisa_inc=`(cd ${monalisa_inc}; pwd)`
|
489 |
gcodispo |
1.10 |
else
|
490 |
|
|
AC_MSG_ERROR( monalisa include dir not found. Please check monalisa installation and path)
|
491 |
|
|
fi
|
492 |
|
|
#
|
493 |
|
|
# perform variable substitution
|
494 |
|
|
#
|
495 |
|
|
if test -n "${monalisa_lib}" && test -n "${monalisa_inc}" ; then
|
496 |
|
|
monalisa=monalisa
|
497 |
|
|
AC_SUBST(monalisa)
|
498 |
|
|
AC_SUBST(monalisa_lib)
|
499 |
|
|
AC_SUBST(monalisa_lib_sh)
|
500 |
|
|
AC_SUBST(monalisa_inc)
|
501 |
|
|
else
|
502 |
|
|
AC_MSG_WARN("Can't find monalisa")
|
503 |
|
|
AC_MSG_ERROR(Please install it and rerun configuration)
|
504 |
|
|
fi
|
505 |
gcodispo |
1.1 |
|
506 |
gcodispo |
1.10 |
])
|
507 |
gcodispo |
1.9 |
|
508 |
|
|
|
509 |
|
|
AC_DEFUN([AC_CHECK_PYTHON],
|
510 |
|
|
[
|
511 |
|
|
for p in `python -V 2>/dev/stdout | cut -d ' ' -f 2` ; do
|
512 |
|
|
case "$p" in
|
513 |
|
|
2.*.* | 2.* )
|
514 |
|
|
AC_MSG_RESULT(found python version: "$p")
|
515 |
|
|
MAKE_PYTHON="\$(MAKE) -C BossPython"
|
516 |
|
|
MAKE_PYTHON_CLEAN="\$(MAKE) -C BossPython clean"
|
517 |
|
|
AC_SUBST(MAKE_PYTHON)
|
518 |
|
|
AC_SUBST(MAKE_PYTHON_CLEAN)
|
519 |
|
|
break
|
520 |
|
|
;;
|
521 |
|
|
* )
|
522 |
|
|
break
|
523 |
|
|
;;
|
524 |
|
|
esac
|
525 |
|
|
done
|
526 |
|
|
if test x"${MAKE_PYTHON}" = x ; then
|
527 |
|
|
AC_MSG_WARN("Not found: python 2.*")
|
528 |
|
|
fi
|
529 |
|
|
for p in `swig -version 2>/dev/stdout | cut -d ' ' -f 3` ; do
|
530 |
|
|
case "$p" in
|
531 |
|
|
1.*.* | 1.* )
|
532 |
|
|
AC_MSG_RESULT(found swig version: "$p")
|
533 |
|
|
swig_generate=generate
|
534 |
|
|
AC_SUBST(swig_generate)
|
535 |
|
|
break
|
536 |
|
|
;;
|
537 |
|
|
* )
|
538 |
|
|
break
|
539 |
|
|
;;
|
540 |
|
|
esac
|
541 |
|
|
done
|
542 |
|
|
if test x"${swig_generate}" = x ; then
|
543 |
|
|
AC_MSG_WARN("Not found: swig 1.*")
|
544 |
|
|
fi
|
545 |
|
|
]
|
546 |
|
|
)
|
547 |
gcodispo |
1.10 |
|
548 |
|
|
# AC_CHECK_LIB([uuid], [main])
|
549 |
|
|
AC_DEFUN([AC_CHECK_UUID],
|
550 |
|
|
[
|
551 |
|
|
AC_ARG_WITH(libuuid, [ --with-uuid-lib=PATH directory containig the uuid library], libuuid=${withval})
|
552 |
|
|
if test [-n] "${libuuid}" ; then
|
553 |
|
|
libuuid_dir=`dirname $libuuid`
|
554 |
|
|
libuuid=`basename $libuuid`
|
555 |
|
|
LIBS=[" -L${libuuid_dir}"]
|
556 |
|
|
AC_CHECK_LIB([uuid], [main], ,[
|
557 |
|
|
AC_MSG_ERROR("Library uuid not found in ${libuuid_dir}")
|
558 |
|
|
])
|
559 |
|
|
else
|
560 |
|
|
uuid_inc="/usr/include/uuid/"
|
561 |
|
|
AC_SUBST(uuid_inc)
|
562 |
|
|
AC_CHECK_LIB([uuid], [main])
|
563 |
|
|
fi
|
564 |
|
|
#
|
565 |
|
|
AC_ARG_WITH(uuid_inc, [ --with-uuid-include=PATH directory containig the uuid.h include file ], uuid_inc=${withval})
|
566 |
|
|
if test [-n] "${uuid_inc}" ; then
|
567 |
|
|
echo "${uuid_inc}"
|
568 |
|
|
AC_SUBST(uuid_inc)
|
569 |
|
|
else
|
570 |
|
|
AC_MSG_ERROR("Library uuid not found in ${libuuid_dir}")
|
571 |
|
|
fi
|
572 |
|
|
]
|
573 |
|
|
) |